This commit is contained in:
2025-07-07 19:31:29 +08:00
parent b083567241
commit b19e50f135
9 changed files with 34 additions and 5 deletions

View File

@@ -0,0 +1,17 @@
import {watch} from "vue";
import {Message} from "@arco-design/web-vue";
const useUploadLength = ({array, length}) => {
watch(
() => array,
(val) => {
if (val.length > length) {
Message.warning(`最多可上传${length}`);
val.length = length;
}
},
{deep: true,}
)
}
export default useUploadLength;