|
|
@ -7,7 +7,7 @@ |
|
|
|
{{ form.id }} |
|
|
|
<i class="el-icon-document-copy cursor-pointer ml-2" @click="copy(form.id)"></i> |
|
|
|
</div> |
|
|
|
<el-button type="success" plain size="mini" v-else>点击生成插件id</el-button> |
|
|
|
<el-button type="success" plain size="mini" @click="handelPluginId" v-else>点击生成插件id</el-button> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item prop="name"> |
|
|
|
<template v-slot:label> |
|
|
@ -175,7 +175,7 @@ async function handelPluginId() { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
// handelPluginId() |
|
|
|
handelPluginId(); |
|
|
|
|
|
|
|
// 复制 |
|
|
|
async function copy(Msg) { |
|
|
@ -228,16 +228,16 @@ function handleAvatarSuccess(res) { |
|
|
|
} |
|
|
|
|
|
|
|
function beforeAvatarUpload(file) { |
|
|
|
const isJPG = file.type === 'image/jpeg'; |
|
|
|
// const isJPG = file.type === 'image/jpeg'; |
|
|
|
const isLt2M = file.size / 1024 / 1024 < 2; |
|
|
|
|
|
|
|
if (!isJPG) { |
|
|
|
ElMessage.error('上传头像图片只能是 JPG 格式!'); |
|
|
|
} |
|
|
|
// if (!isJPG) { |
|
|
|
// ElMessage.error('上传头像图片只能是 JPG 格式!'); |
|
|
|
// } |
|
|
|
if (!isLt2M) { |
|
|
|
ElMessage.error('上传头像图片大小不能超过 2MB!'); |
|
|
|
} |
|
|
|
return isJPG && isLt2M; |
|
|
|
return isLt2M; |
|
|
|
} |
|
|
|
|
|
|
|
// 删除轮播图 |
|
|
|