Blame view

examples/routers/color-picker.vue 1.55 KB
c6faec44   梁灏   init ColorPicker
1
  <template>
b6bda1dc   梁灏   update ColorPicker
2
      <div style="margin: 100px;">
c0fa72ca   梁灏   update ColorPicker
3
          {{ color }}
b6bda1dc   梁灏   update ColorPicker
4
          <!--<Input placeholder="请输入..." size="large" style="width: 50px;"></Input>-->
8dab987e   梁灏   update ColorPicker
5
          <color-picker @on-change="c1" @on-active-change="c2" v-model="color" placement="bottom-start" size="large"></color-picker>
4109bbc6   梁灏   update ColorPicker
6
          <Date-picker transfer type="date" placeholder="选择日期" style="width: 200px"></Date-picker>
8105945f   梁灏   update ColorPicker
7
          <color-picker :transfer="true" ref="xxx" v-model="color" format="rgb" alpha :recommend="true"></color-picker>
4109bbc6   梁灏   update ColorPicker
8
          <color-picker v-model="color2" format="hsv" :alpha="true" :recommend="false"></color-picker>
b6bda1dc   梁灏   update ColorPicker
9
          <!--<Date-picker type="date" placeholder="选择日期" style="width: 200px"></Date-picker>-->
4109bbc6   梁灏   update ColorPicker
10
11
          <color-picker v-model="color" placement="bottom-start" size="small"></color-picker>
          <Date-picker type="date" placeholder="选择日期" size="small" style="width: 200px"></Date-picker>
1f61a559   梁灏   update ColorPicker
12
          <Button @click="setColor">set color</Button>
27d45967   梁灏   #2724 #2672
13
14
  
          <br><br><br><br>
45f823c0   梁灏   update demo
15
          <ColorPicker v-model="color7" :hue="false"></ColorPicker>
b6bda1dc   梁灏   update ColorPicker
16
      </div>
c6faec44   梁灏   init ColorPicker
17
18
19
20
21
  </template>
  <script>
      export default {
          props: {},
          data () {
e7893a68   梁灏   update ColorPicker
22
              return {
4109bbc6   梁灏   update ColorPicker
23
                  color: 'rgba(12,34,255,.85)',
27d45967   梁灏   #2724 #2672
24
25
                  color2: '',
                  color7: '#19be6b'
e7893a68   梁灏   update ColorPicker
26
              };
c6faec44   梁灏   init ColorPicker
27
28
          },
          computed: {},
0aefe4aa   梁灏   update ColorPicker
29
          methods: {
1f61a559   梁灏   update ColorPicker
30
31
              setColor () {
                  this.color = '#26bc77';
8dab987e   梁灏   update ColorPicker
32
33
34
35
36
37
              },
              c1 (d) {
                  console.log(d);
              },
              c2 (d) {
                  console.log(d);
0aefe4aa   梁灏   update ColorPicker
38
39
              }
          }
c6faec44   梁灏   init ColorPicker
40
41
      };
  </script>