Commit 77978d27 authored by salitedfish's avatar salitedfish

Merge branch 'main' of gitlab.33.cn:HF_web/NFT

parents d1b9fb8b 9f7a1b9a
...@@ -208,8 +208,16 @@ export default Vue.extend({ ...@@ -208,8 +208,16 @@ export default Vue.extend({
this.$toast(item.name); this.$toast(item.name);
}, },
handleFileChange(ref:any) { handleFileChange(ref:any) {
console.log(ref);
const ele = this.$refs[ref] as HTMLInputElement; const ele = this.$refs[ref] as HTMLInputElement;
const files = ele.files; const files = ele.files as FileList;
//限制大小
console.log(files[0].size);
//限制类型
console.log(files[0].type);
if (files && files.length >= 1) { if (files && files.length >= 1) {
this[this.uploadType == '封面图片'? 'coverstatus':'status'] = uploadStatus.uploading; this[this.uploadType == '封面图片'? 'coverstatus':'status'] = uploadStatus.uploading;
this.afterRead(files[0]); this.afterRead(files[0]);
......
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