移除一些eslint的error
This commit is contained in:
parent
5cd7fb81b9
commit
eed9ad54ad
@ -1,6 +1,7 @@
|
|||||||
export default {
|
export default {
|
||||||
route: {
|
route: {
|
||||||
dashboard: 'トップ',
|
dashboard: 'トップ',
|
||||||
|
system: 'システム',
|
||||||
documentation: 'ドキュメント',
|
documentation: 'ドキュメント',
|
||||||
guide: 'ガイド',
|
guide: 'ガイド',
|
||||||
permission: '権限',
|
permission: '権限',
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
export default {
|
export default {
|
||||||
route: {
|
route: {
|
||||||
dashboard: '대시보드',
|
dashboard: '대시보드',
|
||||||
|
system: '체계',
|
||||||
documentation: '문서',
|
documentation: '문서',
|
||||||
guide: '가이드',
|
guide: '가이드',
|
||||||
permission: '권한',
|
permission: '권한',
|
||||||
|
@ -123,20 +123,17 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import path from 'path'
|
|
||||||
import { cloneDeep } from 'lodash'
|
import { cloneDeep } from 'lodash'
|
||||||
import { Component, Vue } from 'vue-property-decorator'
|
import { Component, Vue } from 'vue-property-decorator'
|
||||||
import { RouteConfig } from 'vue-router'
|
import { getRoles, saveRole, deleteRole } from '@/api/roles'
|
||||||
import { getRoles, saveRole, deleteRole } from '@/api/roles'
|
|
||||||
interface IRole {
|
interface IRole {
|
||||||
key: string
|
key: string
|
||||||
name: string
|
name: string
|
||||||
comment: string
|
comment: string
|
||||||
permissions: string[],
|
permissions: string[]
|
||||||
pstr: string
|
pstr: string
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
const defaultRole: IRole = {
|
const defaultRole: IRole = {
|
||||||
key: '',
|
key: '',
|
||||||
name: '',
|
name: '',
|
||||||
@ -146,8 +143,7 @@ const defaultRole: IRole = {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
name: 'RoleSystem',
|
name: 'RoleSystem'
|
||||||
|
|
||||||
})
|
})
|
||||||
export default class extends Vue {
|
export default class extends Vue {
|
||||||
private role = Object.assign({}, defaultRole)
|
private role = Object.assign({}, defaultRole)
|
||||||
@ -160,20 +156,15 @@ export default class extends Vue {
|
|||||||
label: 'title'
|
label: 'title'
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
created() {
|
created() {
|
||||||
this.getRoles()
|
this.getRoles()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
private async getRoles() {
|
private async getRoles() {
|
||||||
const { data } = await getRoles({ /* Your params here */ })
|
const { data } = await getRoles({ /* Your params here */ })
|
||||||
this.rolesList = data
|
this.rolesList = data
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
private handleCreateRole() {
|
private handleCreateRole() {
|
||||||
this.role = Object.assign({}, defaultRole)
|
this.role = Object.assign({}, defaultRole)
|
||||||
|
|
||||||
@ -210,8 +201,7 @@ export default class extends Vue {
|
|||||||
private async confirmRole() {
|
private async confirmRole() {
|
||||||
const isEdit = this.dialogType === 'edit'
|
const isEdit = this.dialogType === 'edit'
|
||||||
this.role.permissions = this.role.pstr.split(',')
|
this.role.permissions = this.role.pstr.split(',')
|
||||||
const { data } = await saveRole(this.role)
|
await saveRole(this.role)
|
||||||
|
|
||||||
|
|
||||||
if (isEdit) {
|
if (isEdit) {
|
||||||
for (let index = 0; index < this.rolesList.length; index++) {
|
for (let index = 0; index < this.rolesList.length; index++) {
|
||||||
@ -237,7 +227,6 @@ export default class extends Vue {
|
|||||||
type: 'success'
|
type: 'success'
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
@ -251,4 +240,7 @@ export default class extends Vue {
|
|||||||
margin-bottom: 30px;
|
margin-bottom: 30px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
read-only {
|
||||||
|
color: #a09d9d;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user