|
@@ -122,15 +122,12 @@
|
|
|
this.store.dispatch('security/getUiPluginById', {
|
|
|
pluginId: this.pluginDefineId
|
|
|
}).then(res => {
|
|
|
- this.rule = JSON.parse(res.pluginParams)
|
|
|
- this.rule.forEach(item => {
|
|
|
+ this.rule = JSON.parse(res.pluginParams).map(item => {
|
|
|
if (item.title.indexOf('$t') !== -1) {
|
|
|
item.title = this.$t(item.field)
|
|
|
}
|
|
|
- // fix null pointer exception
|
|
|
- if (!item.props) {
|
|
|
- item.props = {}
|
|
|
- }
|
|
|
+ item.props = item.props || {}
|
|
|
+ return item
|
|
|
})
|
|
|
}).catch(e => {
|
|
|
this.$message.error(e.msg || '')
|