Commit a863ad46b4e2837cbbda8bb51b8c9a6e8bb3f442
1 parent
7db37eed
fix(tinymce): ensure that the public resource path is correct,fix #487
Showing
2 changed files
with
14 additions
and
3 deletions
src/components/Tinymce/src/Editor.vue
@@ -96,21 +96,22 @@ | @@ -96,21 +96,22 @@ | ||
96 | 96 | ||
97 | const initOptions = computed(() => { | 97 | const initOptions = computed(() => { |
98 | const { height, options, toolbar, plugins } = props; | 98 | const { height, options, toolbar, plugins } = props; |
99 | + const publicPath = import.meta.env.VITE_PUBLIC_PATH || '/'; | ||
99 | return { | 100 | return { |
100 | selector: `#${unref(tinymceId)}`, | 101 | selector: `#${unref(tinymceId)}`, |
101 | height, | 102 | height, |
102 | toolbar, | 103 | toolbar, |
103 | menubar: 'file edit insert view format table', | 104 | menubar: 'file edit insert view format table', |
104 | plugins, | 105 | plugins, |
105 | - language_url: '/resource/tinymce/langs/zh_CN.js', | 106 | + language_url: publicPath + 'resource/tinymce/langs/zh_CN.js', |
106 | language: 'zh_CN', | 107 | language: 'zh_CN', |
107 | branding: false, | 108 | branding: false, |
108 | default_link_target: '_blank', | 109 | default_link_target: '_blank', |
109 | link_title: false, | 110 | link_title: false, |
110 | object_resizing: false, | 111 | object_resizing: false, |
111 | skin: 'oxide', | 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 | ...options, | 115 | ...options, |
115 | setup: (editor: any) => { | 116 | setup: (editor: any) => { |
116 | editorRef.value = editor; | 117 | editorRef.value = editor; |
src/utils/lib/echarts.ts
@@ -18,6 +18,11 @@ import { | @@ -18,6 +18,11 @@ import { | ||
18 | ParallelComponent, | 18 | ParallelComponent, |
19 | LegendComponent, | 19 | LegendComponent, |
20 | RadarComponent, | 20 | RadarComponent, |
21 | + ToolboxComponent, | ||
22 | + DataZoomComponent, | ||
23 | + VisualMapComponent, | ||
24 | + TimelineComponent, | ||
25 | + CalendarComponent, | ||
21 | } from 'echarts/components'; | 26 | } from 'echarts/components'; |
22 | 27 | ||
23 | import { SVGRenderer } from 'echarts/renderers'; | 28 | import { SVGRenderer } from 'echarts/renderers'; |
@@ -38,6 +43,11 @@ echarts.use([ | @@ -38,6 +43,11 @@ echarts.use([ | ||
38 | SVGRenderer, | 43 | SVGRenderer, |
39 | PictorialBarChart, | 44 | PictorialBarChart, |
40 | RadarComponent, | 45 | RadarComponent, |
46 | + ToolboxComponent, | ||
47 | + DataZoomComponent, | ||
48 | + VisualMapComponent, | ||
49 | + TimelineComponent, | ||
50 | + CalendarComponent, | ||
41 | ]); | 51 | ]); |
42 | 52 | ||
43 | export default echarts; | 53 | export default echarts; |