修复设置字幕后再次打开字幕窗口无法修改的BUG

This commit is contained in:
fangxiang 2022-05-04 15:33:34 +08:00
parent 4565543981
commit a467423b1a
1 changed files with 8 additions and 5 deletions

View File

@ -96,16 +96,20 @@
</q-item> </q-item>
<q-separator inset /> <q-separator inset />
<q-item style="height: 50vh"> <q-item style="height: 50vh">
<q-item-section> <q-item-section
:style="{
'align-items': loading ? 'center' : 'unset',
}"
>
<editor <editor
:disabled="loading" v-if="!loading"
class="fit" class="fit"
tinymce-script-src="tinymce/tinymce.min.js" tinymce-script-src="tinymce/tinymce.min.js"
:init="editor_config" :init="editor_config"
v-model="subtitle.text" v-model="subtitle.text"
/> />
<q-spinner v-else color="primary" size="5em" :thickness="2" />
</q-item-section> </q-item-section>
</q-item> </q-item>
</q-list> </q-list>
@ -217,11 +221,11 @@ export default defineComponent({
if (response) { if (response) {
subtitle.value = response.subtitle; subtitle.value = response.subtitle;
} }
loading.value = false;
} catch (e) { } catch (e) {
console.log(e); console.log(e);
show_dialog.value = false; show_dialog.value = false;
} }
loading.value = false;
}, },
onShow() { onShow() {
document.querySelectorAll(".tox ").forEach((item) => { document.querySelectorAll(".tox ").forEach((item) => {
@ -251,7 +255,6 @@ export default defineComponent({
}); });
show_dialog.value = false; show_dialog.value = false;
} catch {} } catch {}
loading.value = false;
}, },
}; };
}, },