Blame view

examples/routers/color-picker.vue 1.72 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>
263c991e   Sergio Crisostomo   Add open change e...
15
16
          {{openState}}
          <ColorPicker v-model="color7" :hue="false" @on-open-change="onOpenChange"></ColorPicker>
b6bda1dc   梁灏   update ColorPicker
17
      </div>
c6faec44   梁灏   init ColorPicker
18
19
20
21
22
  </template>
  <script>
      export default {
          props: {},
          data () {
e7893a68   梁灏   update ColorPicker
23
              return {
4109bbc6   梁灏   update ColorPicker
24
                  color: 'rgba(12,34,255,.85)',
27d45967   梁灏   #2724 #2672
25
                  color2: '',
263c991e   Sergio Crisostomo   Add open change e...
26
27
                  color7: '#19be6b',
                  openState: false,
e7893a68   梁灏   update ColorPicker
28
              };
c6faec44   梁灏   init ColorPicker
29
30
          },
          computed: {},
0aefe4aa   梁灏   update ColorPicker
31
          methods: {
1f61a559   梁灏   update ColorPicker
32
33
              setColor () {
                  this.color = '#26bc77';
8dab987e   梁灏   update ColorPicker
34
35
36
37
38
39
              },
              c1 (d) {
                  console.log(d);
              },
              c2 (d) {
                  console.log(d);
263c991e   Sergio Crisostomo   Add open change e...
40
41
42
              },
              onOpenChange(state){
                  this.openState = state;
0aefe4aa   梁灏   update ColorPicker
43
44
              }
          }
c6faec44   梁灏   init ColorPicker
45
      };
263c991e   Sergio Crisostomo   Add open change e...
46
  </script>