Blame view

src/wxcomponents/vant/loading/index.js 746 Bytes
289f85d9e   Adam   提交
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
  import { VantComponent } from '../common/component';
  import { addUnit } from '../common/utils';
  VantComponent({
      props: {
          color: String,
          vertical: Boolean,
          type: {
              type: String,
              value: 'circular'
          },
          size: {
              type: String,
              observer: 'setSizeWithUnit'
          },
          textSize: {
              type: String,
              observer: 'setTextSizeWithUnit'
          }
      },
      methods: {
          setSizeWithUnit(size) {
              this.setData({
                  sizeWithUnit: addUnit(size)
              });
          },
          setTextSizeWithUnit(size) {
              this.set({
                  textSizeWithUnit: addUnit(size)
              });
          }
      }
  });