0.0.17 • Published 4 years ago

@retailwe/ui-checkbox v0.0.17

Weekly downloads
-
License
-
Repository
-
Last release
4 years ago

checkbox 多选框

引入

全局引入,在 miniprogram 根目录下的app.json中配置,局部引入,在需要引入的页面或组件的index.json中配置。

// app.json 或 index.json
"usingComponents": {
  "wr-checkbox": "@retailwe/ui-checkbox/index"
}

代码演示

<wr-checkbox items="{{items}}" bindchange="onChange"></wr-checkbox>
Page({
  data: {
    items: [
      { name: '美国', value: 'USA' },
      { name: '中国', value: 'CHN', checked: 'true' },
      { name: '巴西', value: 'BRA' },
      { name: '日本', value: 'JPN', color: 'red' },
      { name: '英国', value: 'ENG', disabled: true },
    ],
  },
  onChange: function(e) {
    console.log(e);
  },
});

checkbox Props

参数说明类型默认值版本
itemsobjectobject--

包含 默认属性 { disbaled color name value checkout} | iClass | 自定义 class 类名 | string | - | - | | disabled | boolean | false | - | - | | color | string | | - | - | | name | string | | - | - | | value | string | * | - | - | | checked | boolean | false* | - | - |

radio Event

事件名说明参数
change组件时触发-

atention css 只能在全局 Page 修改样式

0.0.17

4 years ago

0.0.16

4 years ago

0.0.15

4 years ago

0.0.14

4 years ago

0.0.13

4 years ago

0.0.12

4 years ago

0.0.11

4 years ago

0.0.10

4 years ago

0.0.9

4 years ago

0.0.8

4 years ago

0.0.7-beta.1

4 years ago