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