Commit 7b99d6bb authored by ganjingcun's avatar ganjingcun

editor

parent 889fa9a3
...@@ -5,8 +5,8 @@ import config from './config'; ...@@ -5,8 +5,8 @@ import config from './config';
Vue.use(VueResource) Vue.use(VueResource)
// const URL = "http://localhost:3000/api" const URL = "http://localhost:3000/api"
const URL = "https://api.mycard.moe/ygopro/arena" // const URL = "https://api.mycard.moe/ygopro/arena"
export default class Api { export default class Api {
......
...@@ -72,7 +72,7 @@ ...@@ -72,7 +72,7 @@
</el-form-item> </el-form-item>
<el-form-item label="图片URL" :label-width="formLabelWidth"> <el-form-item label="图片URL" :label-width="formLabelWidth">
<el-input v-model="avatar_url_new" placeholder="请输入您希望展示的图片的地址" auto-complete="off"></el-input> <el-input v-model="avatar_url_new" placeholder="请输入您希望展示的图片的地址" auto-complete="off"></el-input>
<a href="https://ygobbs.com/" target="_blank" class="el-icon-upload2"> 图片上传地址</a> <a href="https://ygobbs.com/t/86271" target="_blank" class="el-icon-upload2"> 图片上传地址</a>
</el-form-item> </el-form-item>
<!--<el-form-item label="类型" :label-width="formLabelWidth"> <!--<el-form-item label="类型" :label-width="formLabelWidth">
<el-select v-model="form.region" placeholder="请选择类型"> <el-select v-model="form.region" placeholder="请选择类型">
......
...@@ -44,12 +44,12 @@ Vue.use(VueHtml5Editor,{ ...@@ -44,12 +44,12 @@ Vue.use(VueHtml5Editor,{
sizeLimit: 512 * 1024, sizeLimit: 512 * 1024,
// 上传参数,默认把图片转为base64而不上传 // 上传参数,默认把图片转为base64而不上传
// upload config,default null and convert image to base64 // upload config,default null and convert image to base64
upload: { // upload: {
url: null, // url: null,
headers: {}, // headers: {},
params: {}, // params: {},
fieldName: {} // fieldName: {}
}, // },
// 压缩参数,默认使用localResizeIMG进行压缩,设置为null禁止压缩 // 压缩参数,默认使用localResizeIMG进行压缩,设置为null禁止压缩
// compression config,default resize image by localResizeIMG (https://github.com/think2011/localResizeIMG) // compression config,default resize image by localResizeIMG (https://github.com/think2011/localResizeIMG)
// set null to disable compression // set null to disable compression
...@@ -60,15 +60,15 @@ Vue.use(VueHtml5Editor,{ ...@@ -60,15 +60,15 @@ Vue.use(VueHtml5Editor,{
}, },
// 响应数据处理,最终返回图片链接 // 响应数据处理,最终返回图片链接
// handle response data,return image url // handle response data,return image url
uploadHandler(responseText){ // uploadHandler(responseText){
//default accept json data like {ok:false,msg:"unexpected"} or {ok:true,data:"image url"} // //default accept json data like {ok:false,msg:"unexpected"} or {ok:true,data:"image url"}
var json = JSON.parse(responseText) // var json = JSON.parse(responseText)
if (!json.ok) { // if (!json.ok) {
alert(json.msg) // alert(json.msg)
} else { // } else {
return json.data // return json.data
} // }
} // }
}, },
// 语言,内建的有英文(en-us)和中文(zh-cn) // 语言,内建的有英文(en-us)和中文(zh-cn)
//default en-us, en-us and zh-cn are built-in //default en-us, en-us and zh-cn are built-in
...@@ -89,7 +89,7 @@ Vue.use(VueHtml5Editor,{ ...@@ -89,7 +89,7 @@ Vue.use(VueHtml5Editor,{
"eraser": "格式清除", "eraser": "格式清除",
"info": "关于", "info": "关于",
"color": "颜色", "color": "颜色",
"please enter a url": "请输入地址", "please enter a url": "请输入图片的URL",
"create link": "创建链接", "create link": "创建链接",
"bold": "加粗", "bold": "加粗",
"italic": "倾斜", "italic": "倾斜",
...@@ -109,8 +109,8 @@ Vue.use(VueHtml5Editor,{ ...@@ -109,8 +109,8 @@ Vue.use(VueHtml5Editor,{
"background color": "背景色", "background color": "背景色",
"row count": "行数", "row count": "行数",
"column count": "列数", "column count": "列数",
"save": "确定", "save": "插入图片",
"upload": "上传", "upload": "点我没用",
"progress": "进度", "progress": "进度",
"unknown": "未知", "unknown": "未知",
"please wait": "请稍等", "please wait": "请稍等",
...@@ -134,7 +134,7 @@ Vue.use(VueHtml5Editor,{ ...@@ -134,7 +134,7 @@ Vue.use(VueHtml5Editor,{
"link", "link",
"unlink", "unlink",
"tabulation", "tabulation",
// "image", "image",
"hr", "hr",
// "eraser", // "eraser",
// "undo", // "undo",
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment