|
|
@ -85,11 +85,11 @@ const okLoading = ref(false) |
|
|
|
const okHandle = () => { |
|
|
|
formRef.value.validate(async (valid: any, err: any) => { |
|
|
|
if (!valid) { |
|
|
|
console.log(err) |
|
|
|
// const keys = Object.keys(err) |
|
|
|
// if (!keys.includes('matrixId') && !keys.includes('name')) { |
|
|
|
// |
|
|
|
// } |
|
|
|
const keys = Object.keys(err).filter((item: string) => item.split('.').length === 3).map((item: string) => Number(item.split('.')[1])).sort((a, b) => a - b) |
|
|
|
if (keys.length) { |
|
|
|
activeTab.value = keys[0] |
|
|
|
swiperInstance?.slideTo(activeTab.value) |
|
|
|
} |
|
|
|
return |
|
|
|
} |
|
|
|
try { |
|
|
@ -112,11 +112,11 @@ const okHandle = () => { |
|
|
|
const updateCraftAndOk = () => { |
|
|
|
formRef.value.validate(async (valid: any, err: any) => { |
|
|
|
if (!valid) { |
|
|
|
console.log(err) |
|
|
|
// const keys = Object.keys(err) |
|
|
|
// if (!keys.includes('matrixId') && !keys.includes('name')) { |
|
|
|
// |
|
|
|
// } |
|
|
|
const keys = Object.keys(err).filter((item: string) => item.split('.').length === 3).map((item: string) => Number(item.split('.')[1])).sort((a, b) => a - b) |
|
|
|
if (keys.length) { |
|
|
|
activeTab.value = keys[0] |
|
|
|
swiperInstance?.slideTo(activeTab.value) |
|
|
|
} |
|
|
|
return |
|
|
|
} |
|
|
|
try { |
|
|
|