mirror of https://github.com/jeecgboot/jeecg-boot
类型修正
parent
e0fb952146
commit
d1ac35108d
|
@ -17,6 +17,7 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
|
import type { RawEditorOptions } from 'tinymce';
|
||||||
import tinymce from 'tinymce/tinymce';
|
import tinymce from 'tinymce/tinymce';
|
||||||
import Editor from '@tinymce/tinymce-vue'
|
import Editor from '@tinymce/tinymce-vue'
|
||||||
import 'tinymce/themes/silver';
|
import 'tinymce/themes/silver';
|
||||||
|
@ -45,7 +46,7 @@
|
||||||
import { ThemeEnum } from '/@/enums/appEnum';
|
import { ThemeEnum } from '/@/enums/appEnum';
|
||||||
const tinymceProps = {
|
const tinymceProps = {
|
||||||
options: {
|
options: {
|
||||||
type: Object as PropType<Partial<RawEditorSettings>>,
|
type: Object as PropType<Partial<RawEditorOptions>>,
|
||||||
default: {},
|
default: {},
|
||||||
},
|
},
|
||||||
value: {
|
value: {
|
||||||
|
@ -81,6 +82,11 @@
|
||||||
type: Boolean,
|
type: Boolean,
|
||||||
default: true,
|
default: true,
|
||||||
},
|
},
|
||||||
|
//是否聚焦
|
||||||
|
autoFocus:{
|
||||||
|
type: Boolean,
|
||||||
|
default: true,
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
export default defineComponent({
|
export default defineComponent({
|
||||||
|
@ -91,7 +97,7 @@
|
||||||
emits: ['change', 'update:modelValue', 'inited', 'init-error'],
|
emits: ['change', 'update:modelValue', 'inited', 'init-error'],
|
||||||
setup(props, { emit, attrs }) {
|
setup(props, { emit, attrs }) {
|
||||||
console.log("---Tinymce---初始化---")
|
console.log("---Tinymce---初始化---")
|
||||||
|
|
||||||
const editorRef = ref<Nullable<any>>(null);
|
const editorRef = ref<Nullable<any>>(null);
|
||||||
const fullscreen = ref(false);
|
const fullscreen = ref(false);
|
||||||
const tinymceId = ref<string>(buildShortUUID('tiny-vue'));
|
const tinymceId = ref<string>(buildShortUUID('tiny-vue'));
|
||||||
|
@ -144,7 +150,9 @@
|
||||||
link_title: false,
|
link_title: false,
|
||||||
object_resizing: true,
|
object_resizing: true,
|
||||||
toolbar_mode: 'sliding',
|
toolbar_mode: 'sliding',
|
||||||
auto_focus: true,
|
//update-begin---author:wangshuai---date:2024-08-01---for:【TV360X-416】单表代码生成,表单打开时,会先聚焦富文本组件,并滚动到富文本组件所在的位置---
|
||||||
|
auto_focus: props.autoFocus,
|
||||||
|
//update-end---author:wangshuai---date:2024-08-01---for:【TV360X-416】单表代码生成,表单打开时,会先聚焦富文本组件,并滚动到富文本组件所在的位置---
|
||||||
// toolbar_groups: true,
|
// toolbar_groups: true,
|
||||||
skin: skinName.value,
|
skin: skinName.value,
|
||||||
skin_url: publicPath + 'resource/tinymce/skins/ui/' + skinName.value,
|
skin_url: publicPath + 'resource/tinymce/skins/ui/' + skinName.value,
|
||||||
|
|
Loading…
Reference in New Issue