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