Commit 9596d8be by crushh

update: dist

parent 23bc394b
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
<el-input class="w340" v-model="form.templateName" show-word-limit placeholder="请输入模板名称" maxlength="20"></el-input> <el-input class="w340" v-model="form.templateName" show-word-limit placeholder="请输入模板名称" maxlength="20"></el-input>
</el-form-item> </el-form-item>
<el-form-item label="游戏首页背景" prop="backImageUrl.materialValue" :rules="[{ required: true, message: '请上传' } ]"> <el-form-item label="游戏首页背景" prop="backImageUrl.materialValue" :rules="[{ required: true, message: '请上传' } ]">
<vue-gic-upload-image :project-name="projectName" is-yw :action-url="actionUrl" :image-list="imageList.backImageUrlList" max-image-length="1" accept="image/jpg,image/jpeg,image/png,image/gif" :before-upload="(file) => beforeUpload(file, 5)" @uploadOnSuccess="(data) => uploadOnSuccess(data, 'backImageUrl')" @deleteImage="deleteImage('backImageUrl')" preview-append-to-body> <vue-gic-upload-image :project-name="projectName" :limit-size="5120" is-yw :action-url="actionUrl" :image-list="imageList.backImageUrlList" max-image-length="1" accept="image/jpg,image/jpeg,image/png,image/gif" :before-upload="(file) => beforeUpload(file, 5)" @uploadOnSuccess="(data) => uploadOnSuccess(data, 'backImageUrl')" @deleteImage="deleteImage('backImageUrl')" preview-append-to-body>
</vue-gic-upload-image> </vue-gic-upload-image>
<p class="tips mt6">图片建议尺寸 750*1800px,格式 jpg/jpeg/png/gif,大小 5M 以内。</p> <p class="tips mt6">图片建议尺寸 750*1800px,格式 jpg/jpeg/png/gif,大小 5M 以内。</p>
</el-form-item> </el-form-item>
...@@ -530,7 +530,6 @@ export default { ...@@ -530,7 +530,6 @@ export default {
}); });
}, },
beforeUpload(file, size = 1, nogif) { beforeUpload(file, size = 1, nogif) {
console.log(file, file.size / 1024 / 1024);
let arr = [ 'image/jpg', 'image/jpeg', 'image/png' ]; let arr = [ 'image/jpg', 'image/jpeg', 'image/png' ];
!nogif ? arr.push( 'image/gif') : ''; !nogif ? arr.push( 'image/gif') : '';
if(!arr.includes(file.type )){ if(!arr.includes(file.type )){
......
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