mirror of
https://github.com/vbenjs/gf-vben-admin.git
synced 2025-01-23 11:50:20 +08:00
fix(tinymce): fixed inline
mode
修复Tinymce的inline模式在一些场景下会出现异常的问题 fixed: #1092
This commit is contained in:
parent
e7c96363a1
commit
8e01377481
@ -5,6 +5,7 @@
|
||||
### 🐛 Bug Fixes
|
||||
|
||||
- **CodeEditor** 修复 JSON 编辑器在格式化无效 JSON 文本时会抛出异常的问题
|
||||
- **Tinymce** 修复 inline 模式在一些场景下会出现异常的问题
|
||||
- **其它**
|
||||
- 修复部分封装组件在使用插槽时报错的问题
|
||||
- 修复`useECharts`的`theme`参数不起作用的问题
|
||||
|
@ -8,7 +8,13 @@
|
||||
v-show="editorRef"
|
||||
:disabled="disabled"
|
||||
/>
|
||||
<textarea :id="tinymceId" ref="elRef" :style="{ visibility: 'hidden' }"></textarea>
|
||||
<textarea
|
||||
:id="tinymceId"
|
||||
ref="elRef"
|
||||
:style="{ visibility: 'hidden' }"
|
||||
v-if="!initOptions.inline"
|
||||
></textarea>
|
||||
<slot v-else></slot>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@ -188,7 +194,11 @@
|
||||
);
|
||||
|
||||
onMountedOrActivated(() => {
|
||||
tinymceId.value = buildShortUUID('tiny-vue');
|
||||
if (initOptions.value.inline) {
|
||||
tinymceId.value = unref(initOptions).selector!;
|
||||
} else {
|
||||
tinymceId.value = buildShortUUID('tiny-vue');
|
||||
}
|
||||
nextTick(() => {
|
||||
setTimeout(() => {
|
||||
initEditor();
|
||||
@ -206,7 +216,7 @@
|
||||
|
||||
function destory() {
|
||||
if (tinymce !== null) {
|
||||
tinymce?.remove?.(unref(editorRef));
|
||||
tinymce?.remove?.(tinymceId.value as string);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user