1.1.2 • Published 3 years ago
table-multiple-choice v1.1.2
安装
npm install
使用
- 在 需要使用的文件中引入
import xxx(可自定义组件名) from 'table-multiple-choice/src/packages/Multiplechoice'
- 注册组件
components: { TableMultipleChoice },
- 页面中使用
<TableMultipleChoice
:parentRowLength="parentRowLength"
:parentResultData="parentResultData"
:parentRowData="parentRowData"
:parentRowProp="parentRowProp"
@getResultData="getResultData"
/>
属性说明
Property | Deacription | type | default | example |
---|---|---|---|---|
parentRowLength | 设置一行展示多少个 | Number | 4 | - |
parentResultData | 设置默认值 | Array | 1, 4, 5 | |
parentRowData | 要展示的选项数据 | Array(对象数组) | {val: 1, tel: '测试1', num: '1001'},{val: 2, tel: '测试2', num: '1002'}, | |
parentRowProp | 修改属性值(绑定值为 label, 展示值为 text, 如果原数据不存在该属性, 则可以设置指定的属性值为 label 和 text) | Object | { } | {label: 'val', text: 'tel'} |
getResultData | 获取结果值 | Array | - |