修正角色编辑时, 权限格式判断错误的bug
This commit is contained in:
parent
8f90002491
commit
bd9325376f
@ -336,7 +336,8 @@ export default class extends Vue {
|
|||||||
private permissionChange(vals: string[]) {
|
private permissionChange(vals: string[]) {
|
||||||
if (vals.length > 0) {
|
if (vals.length > 0) {
|
||||||
const lastVal = this.role.permissions[this.role.permissions.length - 1]
|
const lastVal = this.role.permissions[this.role.permissions.length - 1]
|
||||||
if (!/^([a-zA-Z0-9*]:[a-zA-Z0-9*]|\*)$/.test(lastVal)) {
|
console.log(lastVal)
|
||||||
|
if (!/(^([a-zA-Z0-9*]+:[a-zA-Z0-9*]+$)|\*)/.test(lastVal)) {
|
||||||
this.role.permissions.pop()
|
this.role.permissions.pop()
|
||||||
this.$message({
|
this.$message({
|
||||||
type: 'error',
|
type: 'error',
|
||||||
|
Loading…
x
Reference in New Issue
Block a user