添加删除校验
This commit is contained in:
parent
e9031d0a45
commit
91c7e6c904
|
@ -36,6 +36,7 @@
|
|||
|
||||
<script setup>
|
||||
import { useRouter } from 'vue-router'
|
||||
import { message } from 'ant-design-vue'
|
||||
import { ref, defineProps } from 'vue'
|
||||
import mybus from '@/myplugins/mybus'
|
||||
const props = defineProps({
|
||||
|
@ -58,7 +59,11 @@
|
|||
//移除方法
|
||||
const removeFunction = (data) => {
|
||||
dataForm.value.map((val) => {
|
||||
if (val.arr.length > 1) {
|
||||
val.arr = val.arr.filter((item) => item.id !== data.id)
|
||||
} else {
|
||||
message.error('至少需要提交一条能力申请!')
|
||||
}
|
||||
})
|
||||
dataForm.value = dataForm.value.filter((val) => val.arr.length !== 0)
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue