Blame view

test/routers/rate.vue 958 Bytes
49d380cf   梁灏   init Rate component
1
  <template>
6bfdf8f8   梁灏   release 0.9.16
2
3
      <Row>
          <i-col span="12">
6aa72722   huixisheng   Support rate
4
              <Rate show-text :value="valueText"></Rate>
6bfdf8f8   梁灏   release 0.9.16
5
6
          </i-col>
          <i-col span="12">
6aa72722   huixisheng   Support rate
7
              <Rate show-text v-model="valueCustomText" >
6bfdf8f8   梁灏   release 0.9.16
8
9
10
                  <span style="color: #f5a623">{{ valueCustomText }}</span>
              </Rate>
          </i-col>
6aa72722   huixisheng   Support rate
11
12
13
14
15
16
          <i-col span="12">
              <Rate disabled :value="valueDisabled"></Rate>
          </i-col>
          <i-col span="12">
              <Rate allow-half :value="valueHalf" v-on:on-change="changeValue"></Rate>
          </i-col>
6bfdf8f8   梁灏   release 0.9.16
17
      </Row>
49d380cf   梁灏   init Rate component
18
19
20
21
22
  </template>
  <script>
      export default {
          props: {},
          data () {
962c40bd   梁灏   update Rate
23
              return {
6bfdf8f8   梁灏   release 0.9.16
24
                  valueText: 3,
6aa72722   huixisheng   Support rate
25
26
27
                  valueCustomText: 3.8,
                  valueDisabled: 2,
                  valueHalf: 2.5
962c40bd   梁灏   update Rate
28
              };
49d380cf   梁灏   init Rate component
29
30
          },
          computed: {},
6aa72722   huixisheng   Support rate
31
32
33
34
35
          methods: {
              changeValue (val) {
                  console.log(val);
              }
          }
49d380cf   梁灏   init Rate component
36
37
      };
  </script>