| 12345678910111213141516171819202122232425262728293031323334 |
- import { VantComponent } from '../common/component';
- VantComponent({
- field: true,
- props: {
- title: String,
- border: Boolean,
- checked: Boolean,
- loading: Boolean,
- disabled: Boolean,
- activeColor: String,
- inactiveColor: String,
- size: {
- type: String,
- value: '24px'
- }
- },
- watch: {
- checked: function checked(value) {
- this.set({
- value: value
- });
- }
- },
- created: function created() {
- this.set({
- value: this.data.checked
- });
- },
- methods: {
- onChange: function onChange(event) {
- this.$emit('change', event.detail);
- }
- }
- });
|