|
@@ -129,6 +129,13 @@ export default {
|
|
|
return false
|
|
|
}
|
|
|
})
|
|
|
+ },
|
|
|
+ resetForm () {
|
|
|
+ this.$refs.ruleForm.resetFields()
|
|
|
+ this.form.name = ''
|
|
|
+ this.form.isEnable = undefined
|
|
|
+ this.form.remarks = ''
|
|
|
+ this.titleText = '新增角色'
|
|
|
}
|
|
|
},
|
|
|
watch: {
|
|
@@ -138,11 +145,8 @@ export default {
|
|
|
isshow (newValue, oldValue) {
|
|
|
if (!newValue) {
|
|
|
this.$emit('close')
|
|
|
- this.$refs.ruleForm.resetFields()
|
|
|
- this.form.name = ''
|
|
|
- this.form.isEnable = undefined
|
|
|
- this.form.remarks = ''
|
|
|
- this.titleText = '新增角色'
|
|
|
+ } else {
|
|
|
+ this.resetForm()
|
|
|
}
|
|
|
},
|
|
|
nowData: {
|