pull/165/head
tangjinzhou 7 years ago
commit 82575bda4a

@ -10,6 +10,10 @@
| loading | loading state of switch | boolean | false | | loading | loading state of switch | boolean | false |
| size | the size of the `Switch`, options: `default` `small` | string | default | | size | the size of the `Switch`, options: `default` `small` | string | default |
| unCheckedChildren | content to be shown when the state is unchecked | string\|slot | | | unCheckedChildren | content to be shown when the state is unchecked | string\|slot | |
### events
| Events Name | Description | Arguments |
| --- | --- | --- |
| change | a callback function, can be executed when the checked state is changing | Function(checked:Boolean) | | | change | a callback function, can be executed when the checked state is changing | Function(checked:Boolean) | |
## Methods ## Methods

@ -10,6 +10,10 @@
| loading | 加载中的开关 | boolean | false | | loading | 加载中的开关 | boolean | false |
| size | 开关大小,可选值:`default` `small` | string | default | | size | 开关大小,可选值:`default` `small` | string | default |
| unCheckedChildren | 非选中时的内容 | string\|slot | | | unCheckedChildren | 非选中时的内容 | string\|slot | |
### 事件
| 事件名称 | 说明 | 回调参数 |
| --- | --- | --- |
| change | 变化时回调函数 | Function(checked:Boolean) | | | change | 变化时回调函数 | Function(checked:Boolean) | |
## 方法 ## 方法

@ -15,8 +15,8 @@ export default {
props: { props: {
...switchPropTypes, ...switchPropTypes,
prefixCls: switchPropTypes.prefixCls.def('rc-switch'), prefixCls: switchPropTypes.prefixCls.def('rc-switch'),
checkedChildren: switchPropTypes.checkedChildren.def(null), checkedChildren: switchPropTypes.checkedChildren,
unCheckedChildren: switchPropTypes.unCheckedChildren.def(null), unCheckedChildren: switchPropTypes.unCheckedChildren,
defaultChecked: switchPropTypes.defaultChecked.def(''), defaultChecked: switchPropTypes.defaultChecked.def(''),
// onChange: switchPropTypes.onChange.def(noop), // onChange: switchPropTypes.onChange.def(noop),
// onClick: switchPropTypes.onClick.def(noop), // onClick: switchPropTypes.onClick.def(noop),

@ -3,7 +3,7 @@ const AsyncComp = () => {
const hashs = window.location.hash.split('/') const hashs = window.location.hash.split('/')
const d = hashs[hashs.length - 1] const d = hashs[hashs.length - 1]
return { return {
component: import(`../components/input/demo/${d}`), component: import(`../components/switch/demo/${d}`),
} }
} }
export default [ export default [

Loading…
Cancel
Save