Blame view

examples/routers/color-picker.vue 1.43 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>
b6bda1dc   梁灏   update ColorPicker
13
      </div>
c6faec44   梁灏   init ColorPicker
14
15
16
17
18
  </template>
  <script>
      export default {
          props: {},
          data () {
e7893a68   梁灏   update ColorPicker
19
              return {
4109bbc6   梁灏   update ColorPicker
20
                  color: 'rgba(12,34,255,.85)',
c0fa72ca   梁灏   update ColorPicker
21
                  color2: ''
e7893a68   梁灏   update ColorPicker
22
              };
c6faec44   梁灏   init ColorPicker
23
24
          },
          computed: {},
0aefe4aa   梁灏   update ColorPicker
25
          methods: {
1f61a559   梁灏   update ColorPicker
26
27
              setColor () {
                  this.color = '#26bc77';
8dab987e   梁灏   update ColorPicker
28
29
30
31
32
33
              },
              c1 (d) {
                  console.log(d);
              },
              c2 (d) {
                  console.log(d);
0aefe4aa   梁灏   update ColorPicker
34
35
              }
          }
c6faec44   梁灏   init ColorPicker
36
37
      };
  </script>