增加一些简单判断

main
26947 2024-06-12 16:37:46 +08:00
parent 628ee19269
commit e94b31d717
1 changed files with 4 additions and 2 deletions

View File

@ -141,7 +141,10 @@ const data = reactive({
{ required: true, message: '请选择活动结束时间', trigger: 'change' }, { required: true, message: '请选择活动结束时间', trigger: 'change' },
{ {
validator: (rule, value, callback) => { validator: (rule, value, callback) => {
if (value <= form.value.startTime) { if( value == null | form.value.startTime == null ){
callback();
}
else if (value <= form.value.startTime) {
callback(proxy.$modal.msgError('时间选择错误')); callback(proxy.$modal.msgError('时间选择错误'));
} else { } else {
callback(); callback();
@ -153,7 +156,6 @@ const data = reactive({
} }
}); });
const { form, rules } = toRefs(data); const { form, rules } = toRefs(data);
const fileList1 = ref([])
const fileTypeInfo1 = ref('image') const fileTypeInfo1 = ref('image')
const bgColor = ref(''); const bgColor = ref('');
bgColor.value = 'rgba(170, 0, 0, 0)' bgColor.value = 'rgba(170, 0, 0, 0)'