refactor:基于 lint 处理排版
This commit is contained in:
@@ -1,11 +1,8 @@
|
||||
<script lang="ts" setup>
|
||||
import type { Editor as EditorType } from 'tinymce/tinymce';
|
||||
import type { IPropTypes } from '@tinymce/tinymce-vue/lib/cjs/main/ts/components/EditorPropTypes';
|
||||
type InitOptions = IPropTypes['init'];
|
||||
import type { PropType } from 'vue';
|
||||
import type { Editor as EditorType } from 'tinymce/tinymce';
|
||||
|
||||
import Editor from '@tinymce/tinymce-vue';
|
||||
import ImgUpload from './img-upload.vue';
|
||||
import type { PropType } from 'vue';
|
||||
|
||||
import {
|
||||
computed,
|
||||
@@ -21,12 +18,21 @@ import {
|
||||
} from 'vue';
|
||||
|
||||
import { preferences, usePreferences } from '@vben/preferences';
|
||||
import { buildShortUUID, isNumber } from '@vben/utils';
|
||||
|
||||
import Editor from '@tinymce/tinymce-vue';
|
||||
|
||||
import { isNumber, buildShortUUID } from '@vben/utils';
|
||||
import { bindHandlers } from './helper';
|
||||
import { plugins as defaultPlugins, toolbar as defaultToolbar } from './tinymce';
|
||||
import { useUpload } from '#/components/upload/use-upload';
|
||||
|
||||
import { bindHandlers } from './helper';
|
||||
import ImgUpload from './img-upload.vue';
|
||||
import {
|
||||
plugins as defaultPlugins,
|
||||
toolbar as defaultToolbar,
|
||||
} from './tinymce';
|
||||
|
||||
type InitOptions = IPropTypes['init'];
|
||||
|
||||
defineOptions({ inheritAttrs: false });
|
||||
|
||||
const props = defineProps({
|
||||
@@ -300,8 +306,8 @@ function handleError(name: string) {
|
||||
if (!editor) {
|
||||
return;
|
||||
}
|
||||
const content = editor?.getContent()?? '';
|
||||
const val = content?.replace(getUploadingImgName(name), '')?? '';
|
||||
const content = editor?.getContent() ?? '';
|
||||
const val = content?.replace(getUploadingImgName(name), '') ?? '';
|
||||
setValue(editor, val);
|
||||
}
|
||||
</script>
|
||||
@@ -349,4 +355,4 @@ function handleError(name: string) {
|
||||
:deep(.tox-promotion) {
|
||||
display: none !important;
|
||||
}
|
||||
</style>
|
||||
</style>
|
||||
|
||||
Reference in New Issue
Block a user