mirror of
https://gitee.com/baidu/amis.git
synced 2024-12-02 11:58:10 +08:00
a000fa7c94
* Tabs 支持 source 关联数据循环 * visibleOn 的判断传参错误
37 lines
560 B
JavaScript
37 lines
560 B
JavaScript
export default {
|
|
type: 'page',
|
|
title: '动态选项卡',
|
|
subTitle: '根据变量动态生成',
|
|
data: {
|
|
arr: [
|
|
{
|
|
label: '收入',
|
|
value: 123
|
|
},
|
|
|
|
{
|
|
label: '支出',
|
|
value: 233
|
|
}
|
|
]
|
|
},
|
|
body: [
|
|
{
|
|
type: 'tabs',
|
|
source: '${arr}',
|
|
mode: 'card',
|
|
tabs: [
|
|
{
|
|
title: '${label}-A',
|
|
body: '选项卡内容 ${value}'
|
|
},
|
|
|
|
{
|
|
title: '${label}-B',
|
|
body: '选项卡内容 ${value}'
|
|
}
|
|
]
|
|
}
|
|
]
|
|
};
|