var options = {
// 全局元件名稱,使用new VueHtml5Editor(options)時該選項無效
// global component name
name: 'vue-html5-editor', // 是否顯示子產品名稱,開啟的話會在工具欄的圖示背景直接顯示名稱 // if set true,will append module name to toolbar after icon
showModuleName: false, // 自定義各個圖示的class,預設使用的是font-awesome提供的圖示 // custom icon class of built-in modules,default using font-awesome // 配置圖檔子產品 // config image module
image: {
// 檔案最大體積,機關位元組 max file size
sizeLimit: 1024 * 1024, // 上傳參數,預設把圖檔轉為base64而不上傳 // upload config,default null and convert image to base64
upload: {
url: "https://upload-z2.qiniup.com/",
headers: { 'Content-Type': 'multipart/form-data;boundary = ' + new Date().getTime()},
params: {},
fieldName: {}
}, // 壓縮參數,預設使用localResizeIMG進行壓縮,設定為null禁止壓縮 // compression config,default resize image by localResizeIMG (https://github.com/think2011/localResizeIMG) // set null to disable compression
compress: {
width: 1600,
height: 1600,
quality: 80
}, // 響應資料處理,最終傳回圖檔連結 // handle response data,return image url
uploadHandler(responseText) {
//default accept json data like {ok:false,msg:"unexpected"} or {ok:true,data:"image url"}
var json = JSON.parse(responseText);
if (!json.ok) {
alert(json.msg);
} else {
return json.data;
}
}
}, // 語言,内建的有英文(en-us)和中文(zh-cn) //default en-us, en-us and zh-cn are built-in
upload裡面的參數怎麼配啊 大佬指點下啊 七牛應該還要放token啊 這個url應該是跳轉到别的方法去的嗎?