1
0
mirror of https://github.com/PanJiaChen/vue-element-admin.git synced 2025-08-11 05:11:59 +08:00

addAction (#470)

* addAction

* minimal change

* minimal change
This commit is contained in:
elsiosanchez 2020-04-29 17:02:01 -04:00 committed by GitHub
parent efe5f49e9e
commit b45619fa74
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 10 additions and 0 deletions

View File

@ -156,6 +156,13 @@ export default {
withOutColumnNames,
isChangedAllValues: true
})
},
addAction(action) {
this.$store.dispatch('addAction', {
name: action.name,
action: action.action,
containerUuid: this.metadata.containerUuid
})
}
}
}

View File

@ -68,6 +68,9 @@ const contextMenu = {
references
})
},
addAction({ state }, newAction) {
newAction.push(state.contextMenu.actions)
},
/**
* TODO: Verify tableName params to change in constant
* @param {number} recordId