style: add import and stricter lint (#3440)

* style: add import lint

* chore: apply eslint rules

* chore: add stricter lint

* chore: lint all files

* auto fix

* manually fix

* restore build-indices.ts
This commit is contained in:
三咲智子
2021-09-17 15:27:31 +08:00
committed by GitHub
parent 1615b9ee67
commit 0636e1e240
147 changed files with 669 additions and 387 deletions

View File

@ -3,7 +3,7 @@
<div class="block">
<p>Using render-content</p>
<el-tree
:data="data"
:data="dataSource"
show-checkbox
node-key="id"
default-expand-all
@ -14,7 +14,7 @@
<div class="block">
<p>Using scoped slot</p>
<el-tree
:data="data"
:data="dataSource"
show-checkbox
node-key="id"
default-expand-all
@ -90,7 +90,7 @@ export default {
},
]
return {
data: JSON.parse(JSON.stringify(data)),
dataSource: JSON.parse(JSON.stringify(data)),
}
},
@ -101,7 +101,7 @@ export default {
data.children = []
}
data.children.push(newChild)
this.data = [...this.data]
this.dataSource = [...this.dataSource]
},
remove(node, data) {
@ -109,7 +109,7 @@ export default {
const children = parent.data.children || parent.data
const index = children.findIndex((d) => d.id === data.id)
children.splice(index, 1)
this.data = [...this.data]
this.dataSource = [...this.dataSource]
},
renderContent(h, { node, data, store }) {