Skip to content

Commit

Permalink
类型修正
Browse files Browse the repository at this point in the history
  • Loading branch information
zhangdaiscott committed Aug 5, 2024
1 parent e0fb952 commit d1ac351
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions jeecgboot-vue3/src/components/Tinymce/src/Editor.vue
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
</template>

<script lang="ts">
import type { RawEditorOptions } from 'tinymce';
import tinymce from 'tinymce/tinymce';
import Editor from '@tinymce/tinymce-vue'
import 'tinymce/themes/silver';
Expand Down Expand Up @@ -45,7 +46,7 @@
import { ThemeEnum } from '/@/enums/appEnum';
const tinymceProps = {
options: {
type: Object as PropType<Partial<RawEditorSettings>>,
type: Object as PropType<Partial<RawEditorOptions>>,
default: {},
},
value: {
Expand Down Expand Up @@ -81,6 +82,11 @@
type: Boolean,
default: true,
},
//是否聚焦
autoFocus:{
type: Boolean,
default: true,
}
};
export default defineComponent({
Expand All @@ -91,7 +97,7 @@
emits: ['change', 'update:modelValue', 'inited', 'init-error'],
setup(props, { emit, attrs }) {
console.log("---Tinymce---初始化---")
const editorRef = ref<Nullable<any>>(null);
const fullscreen = ref(false);
const tinymceId = ref<string>(buildShortUUID('tiny-vue'));
Expand Down Expand Up @@ -144,7 +150,9 @@
link_title: false,
object_resizing: true,
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,
skin: skinName.value,
skin_url: publicPath + 'resource/tinymce/skins/ui/' + skinName.value,
Expand Down

0 comments on commit d1ac351

Please sign in to comment.