fix: 新增自定义组件、业务组件添加名称重复判重

main
wu.jian2 1 year ago
parent 896bd38b88
commit b73d61e525

@ -214,7 +214,11 @@ export default {
{ {
validator: (rule, value, callback) => { validator: (rule, value, callback) => {
if (value) { if (value) {
this.$dataRoomAxios.post('/bigScreen/design/name/repeat', { const reqUrl = {
component: '/bigScreen/design/name/repeat',
bizComponent: '/bigScreen/bizComponent/name/repeat'
}
this.$dataRoomAxios.post(reqUrl[this.type], {
name: value, name: value,
type: this.type, type: this.type,
id: this.dataForm.id id: this.dataForm.id
@ -229,7 +233,7 @@ export default {
callback() callback()
} }
}, },
trigger: 'change' trigger: ['blur', 'change']
} }
] ]
}, },

Loading…
Cancel
Save