regionalinfo
Advanced tools
Comparing version 1.0.4 to 1.0.5
@@ -1882,36 +1882,34 @@ (function (global, factory) { | ||
let districtFun = () =>{ | ||
let first = []; | ||
let fristParam = {}; | ||
let second = []; | ||
let secondParam = {}; | ||
province.map(item =>{ | ||
fristParam.labal = item.name; | ||
fristParam.value = item.id; | ||
for(let key in city){ | ||
if(key === item.id){ | ||
city[key].map(item =>{ | ||
secondParam.labal = item.name; | ||
secondParam.value = item.id; | ||
second.push(secondParam); | ||
secondParam = {}; | ||
}); | ||
class Index { | ||
static district(){ | ||
let first = []; | ||
let fristParam = {}; | ||
let second = []; | ||
let secondParam = {}; | ||
province.map(item =>{ | ||
fristParam.labal = item.name; | ||
fristParam.value = item.id; | ||
for(let key in city){ | ||
if(key === item.id){ | ||
city[key].map(item =>{ | ||
secondParam.labal = item.name; | ||
secondParam.value = item.id; | ||
second.push(secondParam); | ||
secondParam = {}; | ||
}); | ||
} | ||
} | ||
} | ||
fristParam.children = second; | ||
first.push(fristParam); | ||
fristParam = {}; | ||
second = []; | ||
}); | ||
console.log(first,'-----------------'); | ||
return first | ||
}; | ||
let district = districtFun(); | ||
var index = { | ||
district | ||
fristParam.children = second; | ||
first.push(fristParam); | ||
fristParam = {}; | ||
second = []; | ||
}); | ||
return first | ||
} | ||
} | ||
return index; | ||
return Index; | ||
}))); |
{ | ||
"name": "regionalinfo", | ||
"version": "1.0.4", | ||
"version": "1.0.5", | ||
"description": "regionalinfo", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
50725
1907