8/7 收银台加个未收,打印票据多个支付明细,房屋租赁-签约/上下架
This commit is contained in:
@@ -147,9 +147,11 @@
|
||||
:show-file-list="true"
|
||||
v-model:file-list="showImgList"
|
||||
name="files"
|
||||
:limit="MAX_UPLOAD_FILES"
|
||||
:onChange="handleChange"
|
||||
:onExceed="handleExceed"
|
||||
:multiple="true"
|
||||
:on-preview="handlePreview"
|
||||
:auto-upload="false"
|
||||
drag
|
||||
:action="uploadApi"
|
||||
@@ -339,6 +341,10 @@ const handleAdd = () => {
|
||||
});
|
||||
};
|
||||
|
||||
function handlePreview(uploadFile: UploadFile) {
|
||||
window.open(uploadFile.url);
|
||||
}
|
||||
|
||||
/** 修改按钮操作 */
|
||||
const handleUpdate = (row?: HouseRentalVO) => {
|
||||
const id = row?.id || ids.value[0];
|
||||
@@ -424,7 +430,7 @@ const handleExceed = () => {
|
||||
};
|
||||
const handleChange = (file: UploadUserFile) => {
|
||||
// 实时判断当前已存在图片总数
|
||||
if (showImgList.value.length >= MAX_UPLOAD_FILES) {
|
||||
if (showImgList.value.length > MAX_UPLOAD_FILES) {
|
||||
ElMessage.warning(`最多上传${MAX_UPLOAD_FILES}张,无法继续添加`);
|
||||
// 清除刚选中的文件,防止缓存残留
|
||||
uploadRef.value?.handleRemove(file);
|
||||
|
||||
Reference in New Issue
Block a user