更新记录
v0.0.11(2023-11-11)
下载此版本
增加id字段
v0.0.1(2023-11-09)
下载此版本
首次发布
平台兼容性
App |
快应用 |
微信小程序 |
支付宝小程序 |
百度小程序 |
字节小程序 |
QQ小程序 |
HBuilderX 3.7.0 |
× |
× |
× |
× |
× |
× |
钉钉小程序 |
快手小程序 |
飞书小程序 |
京东小程序 |
× |
× |
× |
× |
H5-Safari |
Android Browser |
微信浏览器(Android) |
QQ浏览器(Android) |
Chrome |
IE |
Edge |
Firefox |
PC-Safari |
× |
× |
× |
× |
× |
× |
× |
× |
× |
使用方法
<picker-pop :data="orgData" @change="handleChange">
<picker-pop :data="areaData" @change="handleChange">
const orgData = [
{
name: "西区",
child: [
{
name: "新疆",
},
{
name: "青海",
},
{
name: "西藏",
},
],
},
{
name: "东区",
child: [
{
name: "江苏",
},
{
name: "南京",
},
{
name: "上海",
},
],
},
{
name: "南区",
child: [
{
name: "广州",
},
{
name: "海南",
},
{
name: "广西",
},
],
},
];
const areaData = [
{
name: "河北省",
child: [
{
name: "石家庄",
child: [{ name: "平山" }, { name: "井陉" }],
},
{
name: "保定",
child: [{ name: "高碑店" }, { name: "涿州" }],
},
],
},
{
name: "山西",
child: [
{
name: "太原",
child: [{ name: "太1" }, { name: "太2" }],
},
{
name: "大同",
child: [{ name: "大1" }, { name: "大2" }],
},
],
},
];
export default {
data() {
return {
orgData,
areaData,
};
},
methods: {
handleChange() {},
},
};