uniapp 如何用<picker>实现省市区三级联动

2023-10-29 08:52:59 +08:00
 asdhasdl
肝疼,4 个小时了,弄不出。感觉官网教程用下来完全摸不着头脑。
后端数据如下:
[
{
"name": "浙江",
"code": "zj",
"citys": [
{
"name": "杭州",
"code": "zj-hz",
"districts": [
{
"name": "西湖区",
"code": "zj-hz-xh"
},
{
"name": "滨江区",
"code": "zj-hz-bj"
}
]
},
{
"name": "温州",
"code": "zj-wz",
"districts": [
{
"name": "鹿城区",
"code": "zj-wz-lc"
},
{
"districtName": "瓯海区",
"districtCode": "zj-wz-oh"
}
]
}
]
},
{
"name": "福建",
"code": "fj",
"citys": [
{
"name": "福州",
"code": "fj-fz",
"districts": [
{
"name": "鼓楼区",
"code": "fj-fz-gl"
},
{
"name": "台江区",
"code": "fj-fz-tj"
}
]
},
{
"name": "厦门",
"code": "fj-xm",
"districts": [
{
"name": "思明区",
"code": "fj-xm-sm"
},
{
"districtName": "海沧区",
"districtCode": "fj-xm-hc"
}
]
}
]
}
]
505 次点击
所在节点    前端开发
0 条回复

这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。

https://www.v2ex.com/t/986363

V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。

V2EX is a community of developers, designers and creative people.

© 2021 V2EX