Skip to content

Commit

Permalink
fix(tinymce): ensure that the public resource path is correct,fix vbe…
Browse files Browse the repository at this point in the history
  • Loading branch information
anncwb committed Apr 16, 2021
1 parent dc337f8 commit 477b5bb
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/components/Tinymce/src/Editor.vue
Original file line number Diff line number Diff line change
Expand Up @@ -96,21 +96,22 @@
const initOptions = computed(() => {
const { height, options, toolbar, plugins } = props;
const publicPath = import.meta.env.VITE_PUBLIC_PATH || '/';
return {
selector: `#${unref(tinymceId)}`,
height,
toolbar,
menubar: 'file edit insert view format table',
plugins,
language_url: '/resource/tinymce/langs/zh_CN.js',
language_url: publicPath + 'resource/tinymce/langs/zh_CN.js',
language: 'zh_CN',
branding: false,
default_link_target: '_blank',
link_title: false,
object_resizing: false,
skin: 'oxide',
skin_url: 'resource/tinymce/skins/ui/oxide',
content_css: 'resource/tinymce/skins/ui/oxide/content.min.css',
skin_url: publicPath + 'resource/tinymce/skins/ui/oxide',
content_css: publicPath + 'resource/tinymce/skins/ui/oxide/content.min.css',
...options,
setup: (editor: any) => {
editorRef.value = editor;
Expand Down
10 changes: 10 additions & 0 deletions src/utils/lib/echarts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,11 @@ import {
ParallelComponent,
LegendComponent,
RadarComponent,
ToolboxComponent,
DataZoomComponent,
VisualMapComponent,
TimelineComponent,
CalendarComponent,
} from 'echarts/components';

import { SVGRenderer } from 'echarts/renderers';
Expand All @@ -38,6 +43,11 @@ echarts.use([
SVGRenderer,
PictorialBarChart,
RadarComponent,
ToolboxComponent,
DataZoomComponent,
VisualMapComponent,
TimelineComponent,
CalendarComponent,
]);

export default echarts;

0 comments on commit 477b5bb

Please sign in to comment.