-- 项目名称校验

This commit is contained in:
yuping
2022-12-10 21:29:22 +08:00
parent ee870a1d80
commit 59cff1b7a9
3 changed files with 6 additions and 4 deletions

View File

@@ -20,6 +20,9 @@ const props = defineProps({
type: Boolean,
default: true
},
id: {
type: String,
},
type: {
type: Number,
default: 1
@@ -49,8 +52,7 @@ watch(modelV, () => {
})
function validateProName() {
console.log(props.value)
props.value && validateName({name: props.value, type: props.type}).then(res => {
props.value && validateName({name: props.value, type: props.type, id: props.id}).then(res => {
emit('update:validate', res.data.data !== 1)
})
}