# popupGeneralList ^7.8
弹出通用弹窗组件
# 请求参数
Prop | Type | Required | Default | Comment |
---|---|---|---|---|
title | String | N | N/A | 如果有值,则显示标题,否则去掉“标题栏”区域 |
cancelLabel | String | Y | N/A | 底部取消按钮的显示文案 |
list | Array<Object> | N | N/A | list数组, 详情见注1 |
# 参数详情:list(注1)
内部元素为对象,对象内部属性如下
Prop | Type | Required | Default | Comment |
---|---|---|---|---|
groupName | String | N | N/A | 小组label, 若不传,则不显示该区域 |
items | Array<Object> | Y | N/A | 每一行的属性描述, 详情见注2 |
# 参数详情:items(注2)
内部元素为对象,对象内部属性如下
Prop | Type | Required | Default | Comment |
---|---|---|---|---|
key | String | Y | N/A | 点击后返回key值 |
iconUrl | String | N | N/A | 显示的图标,如果有值,则显示图标,无则不显示 |
title | String | N | N/A | 列表左边label |
desc | String | N | N/A | 列表右边的描述 |
# 接口调用示例
const params = {
title: '请选择客服类型',
cancelLabel: '取消',
list: [
{
groupName: '售前销售',
items: [
{
key: 'onlineService',
iconUrl: 'aaa.png',
title: '在线客服',
desc: '查看更多',
},
],
},
]
}
this.$bridge
.popupGeneralList(params)
.then(res => {
this.$alert(res)
})
.catch(err => {
this.$toast(err)
})
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
# 返回参数
点击item后,返回对应item的数据
Prop | Type | Required | Default | Comment |
---|---|---|---|---|
key | String | Y | N/A | 点击后返回key值 |
iconUrl | String | N | N/A | 显示的图标,如果有值,则显示图标。无则不显示 |
title | String | N | N/A | 列表左边label |
desc | String | N | N/A | 列表右边的描述 |
# 接口返回示例
{
key: "onlineService",
iconUrl: "aaa.png",
title: "在线客服",
desc: "查看更多"
}
1
2
3
4
5
6
2
3
4
5
6