Browse Source

明细数据长度为0的时候校验

hella_online_20240829
zhang_li 4 months ago
parent
commit
1783ce55ef
  1. 3
      src/components/TableForm/src/TableForm.vue

3
src/components/TableForm/src/TableForm.vue

@ -607,6 +607,9 @@ const TableBaseForm_Ref = ref()
const validateForm = () => { const validateForm = () => {
console.log(TableBaseForm_Ref.value) console.log(TableBaseForm_Ref.value)
let _lists = TableBaseForm_Ref.value?.map((v) => v.validate()) let _lists = TableBaseForm_Ref.value?.map((v) => v.validate())
if(!_lists ||_lists.length == 0){
return false
}
return Promise.all(_lists) return Promise.all(_lists)
.then(() => { .then(() => {
return true return true

Loading…
Cancel
Save