8/1 限制前端输入字数

This commit is contained in:
Zy
2026-08-01 10:11:38 +08:00
parent 2907f9202c
commit ca5f214bac
33 changed files with 271 additions and 253 deletions

View File

@@ -278,7 +278,7 @@ const rules = ref({
{
validator: (_: any, value: string | number, callback: (arg0?: Error) => void) => {
if (value === '' || value === null || value === 0) {
return callback(new Error('请输入房屋面积'));
return callback();
}
const val = Number(value);
if (Number.isNaN(val)) {
@@ -371,7 +371,8 @@ const handleExceed = () => {
ElMessage.warning('最多上传9张图片');
};
const handlePictureCardPreview: UploadProps['onPreview'] = (uploadFile) => {
dialogImageUrl.value = uploadFile.url!;
dialogImageUrl.value = '';
dialogImageUrl.value = uploadFile.url;
dialogVisible.value = true;
};
const handleRemove: UploadProps['onRemove'] = (_, uploadFiles) => {