V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
asdhasdl
V2EX  ›  前端开发

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

  •  
  •   asdhasdl · 2023-10-29 08:52:59 +08:00 · 507 次点击
    这是一个创建于 392 天前的主题,其中的信息可能已经有所发展或是发生改变。
    肝疼,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"
    }
    ]
    }
    ]
    }
    ]
    目前尚无回复
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   实用小工具   ·   2791 人在线   最高记录 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 33ms · UTC 09:43 · PVG 17:43 · LAX 01:43 · JFK 04:43
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.