Avue 富文本編輯器 avue-plugin-ueditor 無法上傳圖片


//package.json
"dependencies": { "@smallwei/avue": "^2.8.23", "avue-plugin-ueditor": "^0.2.3", "vue": "^2.6.14" }, "devDependencies": { "@vue/cli-service": "4.4.4", "vue-template-compiler": "^2.5.17" }

 

//main.js
import AvueUeditor from "avue-plugin-ueditor";
Vue.use(AvueUeditor);

//解決post請求報錯
import axios from "axios";
Vue.prototype.$axios = axios;
//使用 .vue
<template>
  <basic-container>
    <avue-crud v-bind="bindVal" v-on="onEvent" v-model="form" :page.sync="page">
      <template #contentForm="{type,disabled}">
        <avue-ueditor v-model="text" :options="options"></avue-ueditor>
      </template>
    </avue-crud>
  </basic-container>
</template>

<script>
export default {
    data() {
      return {
        text: "",
        options: {
          //普通圖片上傳
          action: "https://avuejs.com/imgupload",
          customConfig: {}, //wangEditor編輯的配置
          props: {
            res: "data",
            url: "url",
          },
        },
      };
    },

 }

 

注意版本號,使用“

https://avuejs.com/imgupload

”記得配置跨域


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM