fix:assetmeta option不能删除的问题 以及option可以为空的问题
This commit is contained in:
@@ -269,6 +269,17 @@ export default {
|
||||
this.$refs.editAssetMetaForm.validate((valid) => {
|
||||
if (valid) {
|
||||
const param = { ...this.editAssetMeta }
|
||||
if (param.type === 'radio' || param.type === 'checkbox' || param.type === 'select') {
|
||||
for (let i = 0; i < param.param.items.length; i++) {
|
||||
if (!param.param.items[i].name) {
|
||||
console.log(this.$refs['metaNameOption' + i])
|
||||
this.$refs['metaNameOption' + i][0].focus()
|
||||
this.$message.error(this.$t('config.assetMeta.metaOptionNull'))
|
||||
this.prevent_opt.save = false
|
||||
return
|
||||
}
|
||||
}
|
||||
}
|
||||
if (param.type !== 'radio' && param.type !== 'checkbox' && param.type !== 'select' && param.type !== 'datetime') {
|
||||
delete param.param
|
||||
} else {
|
||||
@@ -403,6 +414,7 @@ export default {
|
||||
return
|
||||
}
|
||||
this.editAssetMeta.param.items.splice(index, 1)
|
||||
this.$forceUpdate()
|
||||
},
|
||||
copyParam (index) {
|
||||
if (this.editAssetMeta.type !== 'checkbox') {
|
||||
|
||||
Reference in New Issue
Block a user