修正角色编辑时, 权限格式判断错误的bug
This commit is contained in:
parent
8f90002491
commit
bd9325376f
@ -336,7 +336,8 @@ export default class extends Vue {
|
||||
private permissionChange(vals: string[]) {
|
||||
if (vals.length > 0) {
|
||||
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.$message({
|
||||
type: 'error',
|
||||
|
Loading…
x
Reference in New Issue
Block a user