Commit 9b5cd4cb by 黑潮

update: 上传图片

parent 93fa3ed6
......@@ -334,9 +334,11 @@ export default {
methods: {
beforeUpload(file) {
if (!['image/jpeg', 'image/png'].includes(file.type)) {
return this.$message.warning('图片格式错误');
this.$message.warning('图片格式错误');
return false;
} else if (file.size > 1024 * 1024) {
return this.$message.warning('图片大小超过1MB');
this.$message.warning('图片大小超过1MB');
return false;
}
},
onUploaded(row) {
......
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