Commit a863ad46b4e2837cbbda8bb51b8c9a6e8bb3f442

Authored by Vben
1 parent 7db37eed

fix(tinymce): ensure that the public resource path is correct,fix #487

src/components/Tinymce/src/Editor.vue
... ... @@ -96,21 +96,22 @@
96 96  
97 97 const initOptions = computed(() => {
98 98 const { height, options, toolbar, plugins } = props;
  99 + const publicPath = import.meta.env.VITE_PUBLIC_PATH || '/';
99 100 return {
100 101 selector: `#${unref(tinymceId)}`,
101 102 height,
102 103 toolbar,
103 104 menubar: 'file edit insert view format table',
104 105 plugins,
105   - language_url: '/resource/tinymce/langs/zh_CN.js',
  106 + language_url: publicPath + 'resource/tinymce/langs/zh_CN.js',
106 107 language: 'zh_CN',
107 108 branding: false,
108 109 default_link_target: '_blank',
109 110 link_title: false,
110 111 object_resizing: false,
111 112 skin: 'oxide',
112   - skin_url: 'resource/tinymce/skins/ui/oxide',
113   - content_css: 'resource/tinymce/skins/ui/oxide/content.min.css',
  113 + skin_url: publicPath + 'resource/tinymce/skins/ui/oxide',
  114 + content_css: publicPath + 'resource/tinymce/skins/ui/oxide/content.min.css',
114 115 ...options,
115 116 setup: (editor: any) => {
116 117 editorRef.value = editor;
... ...
src/utils/lib/echarts.ts
... ... @@ -18,6 +18,11 @@ import {
18 18 ParallelComponent,
19 19 LegendComponent,
20 20 RadarComponent,
  21 + ToolboxComponent,
  22 + DataZoomComponent,
  23 + VisualMapComponent,
  24 + TimelineComponent,
  25 + CalendarComponent,
21 26 } from 'echarts/components';
22 27  
23 28 import { SVGRenderer } from 'echarts/renderers';
... ... @@ -38,6 +43,11 @@ echarts.use([
38 43 SVGRenderer,
39 44 PictorialBarChart,
40 45 RadarComponent,
  46 + ToolboxComponent,
  47 + DataZoomComponent,
  48 + VisualMapComponent,
  49 + TimelineComponent,
  50 + CalendarComponent,
41 51 ]);
42 52  
43 53 export default echarts;
... ...