mirror of
https://github.com/vbenjs/vben-admin-thin-next.git
synced 2025-01-24 10:33:47 +08:00
fix(tinymce): ensure that the public resource path is correct,fix #487
This commit is contained in:
parent
7db37eedcc
commit
a863ad46b4
@ -96,21 +96,22 @@
|
|||||||
|
|
||||||
const initOptions = computed(() => {
|
const initOptions = computed(() => {
|
||||||
const { height, options, toolbar, plugins } = props;
|
const { height, options, toolbar, plugins } = props;
|
||||||
|
const publicPath = import.meta.env.VITE_PUBLIC_PATH || '/';
|
||||||
return {
|
return {
|
||||||
selector: `#${unref(tinymceId)}`,
|
selector: `#${unref(tinymceId)}`,
|
||||||
height,
|
height,
|
||||||
toolbar,
|
toolbar,
|
||||||
menubar: 'file edit insert view format table',
|
menubar: 'file edit insert view format table',
|
||||||
plugins,
|
plugins,
|
||||||
language_url: '/resource/tinymce/langs/zh_CN.js',
|
language_url: publicPath + 'resource/tinymce/langs/zh_CN.js',
|
||||||
language: 'zh_CN',
|
language: 'zh_CN',
|
||||||
branding: false,
|
branding: false,
|
||||||
default_link_target: '_blank',
|
default_link_target: '_blank',
|
||||||
link_title: false,
|
link_title: false,
|
||||||
object_resizing: false,
|
object_resizing: false,
|
||||||
skin: 'oxide',
|
skin: 'oxide',
|
||||||
skin_url: 'resource/tinymce/skins/ui/oxide',
|
skin_url: publicPath + 'resource/tinymce/skins/ui/oxide',
|
||||||
content_css: 'resource/tinymce/skins/ui/oxide/content.min.css',
|
content_css: publicPath + 'resource/tinymce/skins/ui/oxide/content.min.css',
|
||||||
...options,
|
...options,
|
||||||
setup: (editor: any) => {
|
setup: (editor: any) => {
|
||||||
editorRef.value = editor;
|
editorRef.value = editor;
|
||||||
|
@ -18,6 +18,11 @@ import {
|
|||||||
ParallelComponent,
|
ParallelComponent,
|
||||||
LegendComponent,
|
LegendComponent,
|
||||||
RadarComponent,
|
RadarComponent,
|
||||||
|
ToolboxComponent,
|
||||||
|
DataZoomComponent,
|
||||||
|
VisualMapComponent,
|
||||||
|
TimelineComponent,
|
||||||
|
CalendarComponent,
|
||||||
} from 'echarts/components';
|
} from 'echarts/components';
|
||||||
|
|
||||||
import { SVGRenderer } from 'echarts/renderers';
|
import { SVGRenderer } from 'echarts/renderers';
|
||||||
@ -38,6 +43,11 @@ echarts.use([
|
|||||||
SVGRenderer,
|
SVGRenderer,
|
||||||
PictorialBarChart,
|
PictorialBarChart,
|
||||||
RadarComponent,
|
RadarComponent,
|
||||||
|
ToolboxComponent,
|
||||||
|
DataZoomComponent,
|
||||||
|
VisualMapComponent,
|
||||||
|
TimelineComponent,
|
||||||
|
CalendarComponent,
|
||||||
]);
|
]);
|
||||||
|
|
||||||
export default echarts;
|
export default echarts;
|
||||||
|
Loading…
Reference in New Issue
Block a user