【fix ESLint】src/components/_util/Area.js
This commit is contained in:
@@ -5,7 +5,7 @@ import Vue from 'vue'
|
|||||||
export default class Area {
|
export default class Area {
|
||||||
/**
|
/**
|
||||||
* 构造器
|
* 构造器
|
||||||
* @param express
|
* @param pcaa
|
||||||
*/
|
*/
|
||||||
constructor (pcaa) {
|
constructor (pcaa) {
|
||||||
if (!pcaa) {
|
if (!pcaa) {
|
||||||
@@ -34,7 +34,7 @@ export default class Area {
|
|||||||
}
|
}
|
||||||
|
|
||||||
getCode (text) {
|
getCode (text) {
|
||||||
if (!text || text.length == 0) {
|
if (!text || text.length === 0) {
|
||||||
return ''
|
return ''
|
||||||
}
|
}
|
||||||
for (const item of this.all) {
|
for (const item of this.all) {
|
||||||
@@ -45,7 +45,7 @@ export default class Area {
|
|||||||
}
|
}
|
||||||
|
|
||||||
getText (code) {
|
getText (code) {
|
||||||
if (!code || code.length == 0) {
|
if (!code || code.length === 0) {
|
||||||
return ''
|
return ''
|
||||||
}
|
}
|
||||||
const arr = []
|
const arr = []
|
||||||
@@ -61,9 +61,9 @@ export default class Area {
|
|||||||
|
|
||||||
getPcode (id, arr, index) {
|
getPcode (id, arr, index) {
|
||||||
for (const item of this.all) {
|
for (const item of this.all) {
|
||||||
if (item.id === id && item.index == index) {
|
if (item.id === id && item.index === index) {
|
||||||
arr.unshift(id)
|
arr.unshift(id)
|
||||||
if (item.pid != '86') {
|
if (item.pid !== '86') {
|
||||||
this.getPcode(item.pid, arr, --index)
|
this.getPcode(item.pid, arr, --index)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -72,9 +72,9 @@ export default class Area {
|
|||||||
|
|
||||||
getAreaBycode (code, arr, index) {
|
getAreaBycode (code, arr, index) {
|
||||||
for (const item of this.all) {
|
for (const item of this.all) {
|
||||||
if (item.id === code && item.index == index) {
|
if (item.id === code && item.index === index) {
|
||||||
arr.unshift(item.text)
|
arr.unshift(item.text)
|
||||||
if (item.pid != '86') {
|
if (item.pid !== '86') {
|
||||||
this.getAreaBycode(item.pid, arr, --index)
|
this.getAreaBycode(item.pid, arr, --index)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user