perf: remove optional chain

This commit is contained in:
vben
2020-10-23 23:11:12 +08:00
parent 144fde8a68
commit e034d1bacc
16 changed files with 234 additions and 275 deletions

View File

@@ -53,13 +53,12 @@
});
const initOptions = computed(() => {
const { height, menubar } = props;
const { height, options } = props;
return {
selector: `#${unref(tinymceId)}`,
height: height,
toolbar: toolbar,
theme: 'silver',
menubar: menubar,
menubar: 'file edit insert view format table',
plugins: plugins,
// 语言包
language_url: 'resource/tinymce/langs/zh_CN.js',
@@ -70,6 +69,7 @@
advlist_bullet_styles: 'square',
advlist_number_styles: 'default',
object_resizing: false,
...options,
setup: (editor: any) => {
editorRef.value = editor;
editor.on('init', (e: Event) => initSetup(e));

View File

@@ -1,9 +1,9 @@
import { PropType } from 'vue';
export const basicProps = {
menubar: {
type: String as PropType<string>,
default: 'file edit insert view format table',
options: {
type: Object as PropType<any>,
default: {},
},
value: {
type: String as PropType<string>,