|
@@ -75,7 +75,13 @@ export default defineComponent({
|
|
|
|
|
|
|
|
|
|
const handleUpload = (file) => {
|
|
const handleUpload = (file) => {
|
|
|
|
+ Toast.loading({
|
|
|
|
+ message: '上传中...',
|
|
|
|
+ duration: 0,
|
|
|
|
+ forbidClick: true,
|
|
|
|
+ });
|
|
upload(file).then((res) => {
|
|
upload(file).then((res) => {
|
|
|
|
+ Toast.clear();
|
|
let type = /\w+([.jpg|.png|.gif|.swf|.bmp|.jpeg]){1}$/.test(
|
|
let type = /\w+([.jpg|.png|.gif|.swf|.bmp|.jpeg]){1}$/.test(
|
|
res.data.fileName?.substr( res.data.fileName?.lastIndexOf('.') + 1 ) ?? '',
|
|
res.data.fileName?.substr( res.data.fileName?.lastIndexOf('.') + 1 ) ?? '',
|
|
);
|
|
);
|
|
@@ -85,7 +91,8 @@ export default defineComponent({
|
|
imagessrclist.push(res.data);;
|
|
imagessrclist.push(res.data);;
|
|
}
|
|
}
|
|
|
|
|
|
- }).catch((error)=>{
|
|
|
|
|
|
+ }).catch((error) => {
|
|
|
|
+ Toast.clear();
|
|
|
|
|
|
});
|
|
});
|
|
};
|
|
};
|