perf: perf component

This commit is contained in:
vben
2020-11-26 21:19:39 +08:00
parent 19011296ed
commit 73c8e0c158
80 changed files with 529 additions and 631 deletions

View File

@@ -1 +1,5 @@
export { default as Tinymce } from './src/Editor.vue';
import Tinymce from './src/Editor.vue';
import { withInstall } from '../util';
export { Tinymce };
export default withInstall(Tinymce);

View File

@@ -8,7 +8,6 @@
import {
defineComponent,
computed,
onMounted,
nextTick,
ref,
unref,
@@ -24,6 +23,7 @@
import { snowUuid } from '/@/utils/uuid';
import { bindHandlers } from './helper';
import lineHeight from './lineHeight';
import { onMountedOrActivated } from '/@/hooks/core/onMountedOrActivated';
const CDN_URL = 'https://cdn.bootcdn.net/ajax/libs/tinymce/5.5.1';
@@ -91,8 +91,7 @@
editor.setMode(attrs.disabled ? 'readonly' : 'design');
}
);
onMounted(() => {
onMountedOrActivated(() => {
nextTick(() => {
init();
});