Use Vue to get label class dynamically

This commit is contained in:
Montana
2018-09-20 09:45:49 -04:00
parent b973d3cf45
commit a1cf4335ce
2 changed files with 6 additions and 7 deletions

View File

@@ -24,6 +24,7 @@ export default {
data: function () {
return {
value: this.initialData,
label_class: this.initialData,
}
},
@@ -31,7 +32,10 @@ export default {
change: function (e) {
this.value = e.target.value
},
readableName: function (role) {
displayName: function (role) {
this.label_class = role === "no_access" ?
"label" : "label label--success"
return role.replace(/[_]/g, " ")
},
cancel: function (current_role, selected_role) {