移除一些warning

This commit is contained in:
zhl 2021-05-08 13:52:26 +08:00
parent cfba05705b
commit 55102a4ed3
4 changed files with 9 additions and 6 deletions

View File

@ -283,7 +283,7 @@ export default class extends Vue {
document.title = `${title} - ${this.postForm._id}` document.title = `${title} - ${this.postForm._id}`
} }
private typeChange(_: string[]) { private typeChange() {
this.postForm.tag = this.typeSelect[0] this.postForm.tag = this.typeSelect[0]
this.postForm.sub_tag = this.typeSelect[1] this.postForm.sub_tag = this.typeSelect[1]
} }

View File

@ -104,7 +104,6 @@ import { IShopData } from '@/api/types'
import Pagination from '@/components/Pagination/index.vue' import Pagination from '@/components/Pagination/index.vue'
import { deleteShop, getShops } from '@/api/shop' import { deleteShop, getShops } from '@/api/shop'
import { parseTime } from '@/utils' import { parseTime } from '@/utils'
import { Form } from 'element-ui'
@Component({ @Component({
name: 'ShopList', name: 'ShopList',

View File

@ -137,7 +137,7 @@ export interface ITreeData{
id: string id: string
label: string label: string
actions: string[] actions: string[]
level: number level?: number
children: ITreeData[] children: ITreeData[]
} }
@ -157,7 +157,7 @@ export default class extends Vue {
private loading = true private loading = true
private dialogType = 'new' private dialogType = 'new'
private dialogVisible = false private dialogVisible = false
private record: ITreeData = {} private record: ITreeData = this.initData()
private actions = [ private actions = [
'read', 'edit', 'delete' 'read', 'edit', 'delete'
] ]
@ -329,7 +329,7 @@ export default class extends Vue {
} }
// begin of tree drag // begin of tree drag
private allowDrop(draggingNode, dropNode, type) { private allowDrop(draggingNode: TreeNode<any, any>, dropNode: TreeNode<any, any>, type: string) {
if (type === 'inner') { if (type === 'inner') {
return dropNode.level === 1 return dropNode.level === 1
} else { } else {
@ -337,7 +337,7 @@ export default class extends Vue {
} }
} }
private allowDrag(draggingNode) { private allowDrag(draggingNode: TreeNode<any, any>) {
return draggingNode.level === 2 return draggingNode.level === 2
} }
// end of tree drag // end of tree drag

View File

@ -216,6 +216,10 @@ export default class extends Vue {
} }
$refs!: {
modalForm: HTMLFormElement
}
async created() { async created() {
await this.getRoles() await this.getRoles()
await this.getRemotePermissions() await this.getRemotePermissions()