|
@@ -139,28 +139,29 @@ Switch is used for switching between two opposing states.
|
|
|
|
|
|
### Attributes
|
|
### Attributes
|
|
|
|
|
|
- Attribute | Description | Type | Accepted Values | Default
|
|
|
|
-----| ----| ----| ----|----
|
|
|
|
-value / v-model | binding value | boolean / string / number | — | —
|
|
|
|
-disabled | whether Switch is disabled | boolean | — | false
|
|
|
|
-width | width of Switch | number | — | 40
|
|
|
|
-active-icon-class | class name of the icon displayed when in `on` state, overrides `active-text` | string | — | —
|
|
|
|
-inactive-icon-class |class name of the icon displayed when in `off` state, overrides `inactive-text`| string | — | —
|
|
|
|
-active-text | text displayed when in `on` state | string | — | —
|
|
|
|
-inactive-text | text displayed when in `off` state | string | — | —
|
|
|
|
-active-value | switch value when in `on` state | boolean / string / number | — | true
|
|
|
|
-inactive-value | switch value when in `off` state | boolean / string / number | — | false
|
|
|
|
-active-color | background color when in `on` state | string | — | #409EFF
|
|
|
|
-inactive-color | background color when in `off` state | string | — | #C0CCDA
|
|
|
|
-name| input name of Switch | string | — | —
|
|
|
|
|
|
+| Attribute | Description | Type | Accepted Values | Default |
|
|
|
|
+|-----| ----| ----| ----|---- |
|
|
|
|
+| value / v-model | binding value | boolean / string / number | — | — |
|
|
|
|
+| disabled | whether Switch is disabled | boolean | — | false |
|
|
|
|
+| width | width of Switch | number | — | 40 |
|
|
|
|
+| active-icon-class | class name of the icon displayed when in `on` state, overrides `active-text` | string | — | — |
|
|
|
|
+| inactive-icon-class |class name of the icon displayed when in `off` state, overrides `inactive-text`| string | — | — |
|
|
|
|
+| active-text | text displayed when in `on` state | string | — | — |
|
|
|
|
+| inactive-text | text displayed when in `off` state | string | — | — |
|
|
|
|
+| active-value | switch value when in `on` state | boolean / string / number | — | true |
|
|
|
|
+| inactive-value | switch value when in `off` state | boolean / string / number | — | false |
|
|
|
|
+| active-color | background color when in `on` state | string | — | #409EFF |
|
|
|
|
+| inactive-color | background color when in `off` state | string | — | #C0CCDA |
|
|
|
|
+| name | input name of Switch | string | — | — |
|
|
|
|
+| validate-event | whether to trigger form validation | boolean | - | true |
|
|
|
|
|
|
### Events
|
|
### Events
|
|
|
|
|
|
- Event Name | Description | Parameters
|
|
|
|
----- | ----| ----
|
|
|
|
-change | triggers when value changes | value after changing
|
|
|
|
|
|
+| Event Name | Description | Parameters |
|
|
|
|
+| ---- | ----| ---- |
|
|
|
|
+| change | triggers when value changes | value after changing |
|
|
|
|
|
|
### Methods
|
|
### Methods
|
|
-Method | Description | Parameters
|
|
|
|
-------|--------|-------
|
|
|
|
-focus | focus the Switch component | —
|
|
|
|
|
|
+| Method | Description | Parameters |
|
|
|
|
+| ------|--------|------- |
|
|
|
|
+| focus | focus the Switch component | — |
|