|
@ -151,6 +151,12 @@ |
|
|
> |
|
|
> |
|
|
<i class="el-icon-plus" /> |
|
|
<i class="el-icon-plus" /> |
|
|
</el-upload> |
|
|
</el-upload> |
|
|
|
|
|
<div |
|
|
|
|
|
v-if="validation === false" |
|
|
|
|
|
style="padding-left: 10px; color: red" |
|
|
|
|
|
> |
|
|
|
|
|
提示:宽高{{ dislabelSize.width }}x{{ dislabelSize.height }} |
|
|
|
|
|
</div> |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
</el-form> |
|
|
</el-form> |
|
|
<div class="drawer__footer"> |
|
|
<div class="drawer__footer"> |
|
@ -214,7 +220,10 @@ export default { |
|
|
downloadLoading: false, |
|
|
downloadLoading: false, |
|
|
searchArticleLoading: false, |
|
|
searchArticleLoading: false, |
|
|
articles: [], |
|
|
articles: [], |
|
|
|
|
|
// 图片是否上传 |
|
|
validation: true, |
|
|
validation: true, |
|
|
|
|
|
// 正确图片宽高 |
|
|
|
|
|
dislabelSize: {}, |
|
|
}; |
|
|
}; |
|
|
}, |
|
|
}, |
|
|
created() { |
|
|
created() { |
|
@ -230,13 +239,21 @@ export default { |
|
|
return ""; |
|
|
return ""; |
|
|
}, |
|
|
}, |
|
|
}, |
|
|
}, |
|
|
|
|
|
watch: { |
|
|
|
|
|
dialogFormVisible(newVal) { |
|
|
|
|
|
if (newVal === false) { |
|
|
|
|
|
this.validation = true; |
|
|
|
|
|
} |
|
|
|
|
|
}, |
|
|
|
|
|
}, |
|
|
methods: { |
|
|
methods: { |
|
|
// 验证图片宽高 |
|
|
// 验证图片宽高 |
|
|
async validationImages(file) { |
|
|
async validationImages(file) { |
|
|
let desc = this.temp.static === 1 ? "bigSwiper" : "smallSwiper"; |
|
|
let desc = this.temp.static === 1 ? "bigSwiper" : "smallSwiper"; |
|
|
let res = await this.$getImgWidth(file, desc); |
|
|
let res = await this.$getImgWidth(file, desc); |
|
|
this.validation = res; |
|
|
|
|
|
return res; |
|
|
|
|
|
|
|
|
this.validation = res.validation; |
|
|
|
|
|
this.dislabelSize = res; |
|
|
|
|
|
return res.validation; |
|
|
}, |
|
|
}, |
|
|
getList() { |
|
|
getList() { |
|
|
this.listLoading = true; |
|
|
this.listLoading = true; |
|
|