在vue專案中使用ueditor

2021-09-10 21:33:02 字數 636 閱讀 2036

從ueditor的官網ueditor編輯器,官網位址為:

將上述ueditor資料夾拷貝到vue專案的static資料夾中,此資料夾為專案的靜態服務資料夾;

2.修改配置

在ueditor.config.js中修改如下**:

window.ueditor_home_url = "./static/ueditor/"

var url = window.ueditor_home_url || getuebasepath();

3、檔案引入

在vue專案的入口檔案main.js中將ueditor所有的基礎檔案引入如下

import '../static/ueditor/ueditor.config.js'

import '../static/ueditor/ueditor.all.min.js'

import '../static/ueditor/lang/zh-cn/zh-cn.js'

import '../static/ueditor/ueditor.parse.min.js'

4、編寫ueditor.vue元件

0">

5、在元件中引用

在 Vue 專案中使用 ECharts

重要檔案版本 在 vue 專案中使用 echarts 只需要在 vue 元件的mounted生命週期中 初始化 echarts,然後在每次配置項有變更時呼叫setoption 方法更新配置即可 專案模板原始碼 class default chart style div template import...

在vue專案中使用echarts

安裝echarts依賴 npm install echarts s 建立圖表 全域性引入 main.js 引入echarts import echarts from echarts vue.prototype.echarts echarts 這裡也可以在router下index.js引入,看規定 h...

在vue專案中使用iconfont

在實際的專案開發中,我們經常會借助confont圖示庫來渲染一些圖示 本文將以win平台為例,詳細介紹在vue專案中使用iconfont的一般流程 開啟 iconfont官網 二 在專案中引入 使用 iconfont 在vue專案的styles目錄下,新建 iconfont 目錄 將 以 iconf...