1.下载 tinymce完整包放到public目录
2.下载中文语言包到tinymce/langs里
- await load("/tinymce/tinymce.min.js")引入
@/components/Tinymce/index.vue
@util/loadScript.js
const dynamicLoadScript = src => {
return new Promise((resolve, reject) => {
const existingScript = document.getElementById(src);
if (existingScript) resolve();
if (!existingScript) {
const script = document.createElement("script");
script.src = src;
script.id = src;
document.body.appendChild(script);
script.onload = resolve;
script.onerror = reject;
}
});
};
export default dynamicLoadScript;
使用
page B
4.封装echarts组件
src/components/Echarts/index.vue
使用src/views/PageA.vue
page A
追加数据