diff --git a/components/DropDown/DropDown.vue b/components/DropDown/DropDown.vue
index 759b222..fbb3786 100644
--- a/components/DropDown/DropDown.vue
+++ b/components/DropDown/DropDown.vue
@@ -1,26 +1,21 @@
-
+
-
+
{{item}}
-
+
-
+
-
+
-
+
@@ -31,21 +26,26 @@
*/
import DropDownItem from "./DropDownItem.vue"
export default {
- name:"DropDown",
+ name: "DropDown",
components: {
DropDownItem
},
props: {
postlist: {
- type:Array,
- default(){
- return [['全部', '餐饮美食', '百货超市', '美容美发'],['区域1', '区域2', '区域3', '区域4'],['100m2','200m2','300m2'],['附近的', '最新发布的', '其他']]
+ type: Array,
+ default () {
+ return [
+ ['全部', '餐饮美食', '百货超市', '美容美发'],
+ ['区域1', '区域2', '区域3', '区域4'],
+ ['100m2', '200m2', '300m2'],
+ ['附近的', '最新发布的', '其他']
+ ]
}
}
},
data() {
return {
- title: ['行业','区域','面积','筛选'],
+ title: ['行业', '区域', '面积', '筛选'],
activeIndex: -1,
// postlist: [['全部', '餐饮美食', '百货超市', '美容美发'],['区域1', '区域2', '区域3', '区域4'],['100m2','200m2','300m2'],['附近的', '最新发布的', '其他']]
};
@@ -55,29 +55,33 @@
return this.postlist[this.activeIndex]
}
},
+ created() {
+ this.postlist[1]=JSON.parse(uni.getStorageSync('regionList'))
+ },
methods: {
- changeActiveIndex(index){
- if(this.activeIndex === index){
+ changeActiveIndex(index) {
+ if (this.activeIndex === index) {
this.activeIndex = -1;
- }else
+ } else
this.activeIndex = index
},
cancelDrop() {
console.log("取消遮罩");
this.activeIndex = -1;
}
- },
-
+ }
}