0.0.6 • Published 4 years ago
@mas.io/mas-account-switch v0.0.6
安装
tnpm install --save @alipay/mas-account-switch
组件介绍
行业小程序公积金账户切换卡片组件
参数说明
属性 | 是否必填 | 参数类型 | 参数说明 | 默认值 | 示例 |
---|---|---|---|---|---|
title | 否 | String | 标题文案 | '账户余额(元)' | -- |
amount | 是 | String | 数字金额 | - | -- |
checked | 否 | Boolean | 是否选中 | false | -- |
statusText | 否 | String | 状态文案 | '正常' | -- |
statusColor | 否 | String | 状态文案颜色 | '#00B578' | -- |
list | 否 | Array | Array<{ key: string; value: string;} | 卡片数组文案 | -- |
onChecked | 否 | Function | (checked: Boolean, item: props) => void | 点击卡片回调 | -- |
在小程序中使用
{
"usingComponents": {
"mas-account-switch": "@mas.io/mas-account-switch/es/index"
}
}
在 page.axml 中引用组件
<!-- 页面使用方式 -->
<mas-account-switch
checked="{{false}}"
amount="{{'383.00'}}"
onChecked="onChecked"
list="{{list}}"
/>