【更新】代码黄波浪警告消除

pull/22/head
小诺 2021-05-20 15:13:20 +08:00 committed by 小诺
parent d836eea89b
commit 9cba70f783
1 changed files with 7 additions and 7 deletions

View File

@ -80,7 +80,7 @@
getAreaList(this.queryParam).then((res) => {
if (res.success) {
this.data = res.data
this.removeEmptyChildren(this.data);
this.removeEmptyChildren(this.data)
}
}).finally(() => {
this.loading = false
@ -92,7 +92,7 @@
for (let i = 0; i < data.length; i++) {
const item = data[i]
//
if (item.levelCode === 4 || (item.levelCode === 2 && item.name === "市辖区")) {
if (item.levelCode === 4 || (item.levelCode === 2 && item.name === '市辖区')) {
item.children = null
}
}
@ -101,19 +101,19 @@
this.selectedRowKeys = selectedRowKeys
},
onExpand(expanded, record) {
if(expanded) {
if (expanded) {
//
const index = this.expandedData.indexOf(record.id);
const index = this.expandedData.indexOf(record.id)
//
if(index === -1) {
if (index === -1) {
this.queryParam.parentCode = record.areaCode
getAreaList(this.queryParam).then((res) => {
if (res.success) {
//
record.children = res.data
this.removeEmptyChildren(record.children);
this.removeEmptyChildren(record.children)
// id
this.expandedData.push(record.id);
this.expandedData.push(record.id)
}
}).finally(() => {
this.loading = false