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

This commit is contained in:
小诺 2021-05-20 15:13:20 +08:00 committed by 小诺
parent d836eea89b
commit 9cba70f783

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
}
}
@ -103,7 +103,7 @@
onExpand(expanded, record) {
if (expanded) {
//
const index = this.expandedData.indexOf(record.id);
const index = this.expandedData.indexOf(record.id)
//
if (index === -1) {
this.queryParam.parentCode = record.areaCode
@ -111,9 +111,9 @@
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