Blame view

uni_modules/uview-plus/components/u-switch/props.js 1.9 KB
a2702f6d   刘淇   巡查计划
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
  import { defineMixin } from '../../libs/vue'
  import defProps from '../../libs/config/props.js'
  export const props = defineMixin({
      props: {
          // 是否为加载中状态
          loading: {
              type: Boolean,
              default: () => defProps.switch.loading
          },
          // 是否为禁用装填
          disabled: {
              type: Boolean,
              default: () => defProps.switch.disabled
          },
          // 开关尺寸,单位px
          size: {
              type: [String, Number],
              default: () => defProps.switch.size
          },
          // 打开时的背景颜色
          activeColor: {
              type: String,
              default: () => defProps.switch.activeColor
          },
          // 关闭时的背景颜色
          inactiveColor: {
              type: String,
              default: () => defProps.switch.inactiveColor
          },
          // 通过v-model双向绑定的值
          // #ifdef VUE3
          modelValue: {
              type: [Boolean, String, Number],
              default: () => defProps.switch.value
          },
          // #endif
          // #ifdef VUE2
          value: {
              type: [Boolean, String, Number],
              default: () => defProps.switch.value
          },
          // #endif
          // switch打开时的值
          activeValue: {
              type: [String, Number, Boolean],
              default: () => defProps.switch.activeValue
          },
          // switch关闭时的值
          inactiveValue: {
              type: [String, Number, Boolean],
              default: () => defProps.switch.inactiveValue
          },
          // 是否开启异步变更,开启后需要手动控制输入值
          asyncChange: {
              type: Boolean,
              default: () => defProps.switch.asyncChange
          },
          // 圆点与外边框的距离
          space: {
              type: [String, Number],
              default: () => defProps.switch.space
          }
      }
  })