Commit 27d459671e09770981f7aa7da1277162e7a66697

Authored by 梁灏
1 parent 0cb1f3e4

#2724 #2672

remove saturation prop, and add hue prop
examples/routers/color-picker.vue
... ... @@ -10,6 +10,9 @@
10 10 <color-picker v-model="color" placement="bottom-start" size="small"></color-picker>
11 11 <Date-picker type="date" placeholder="选择日期" size="small" style="width: 200px"></Date-picker>
12 12 <Button @click="setColor">set color</Button>
  13 +
  14 + <br><br><br><br>
  15 + <ColorPicker v-model="color7" :saturation="false"></ColorPicker>
13 16 </div>
14 17 </template>
15 18 <script>
... ... @@ -18,7 +21,8 @@
18 21 data () {
19 22 return {
20 23 color: 'rgba(12,34,255,.85)',
21   - color2: ''
  24 + color2: '',
  25 + color7: '#19be6b'
22 26 };
23 27 },
24 28 computed: {},
... ...
src/components/color-picker/color-picker.vue
... ... @@ -24,10 +24,10 @@
24 24 v-transfer-dom>
25 25 <div :class="[prefixCls + '-picker']">
26 26 <div :class="[prefixCls + '-picker-wrapper']">
27   - <div v-if="saturation" :class="[prefixCls + '-picker-panel']">
  27 + <div :class="[prefixCls + '-picker-panel']">
28 28 <Saturation v-model="saturationColors" @change="childChange"></Saturation>
29 29 </div>
30   - <div :class="[prefixCls + '-picker-hue-slider']">
  30 + <div v-if="hue" :class="[prefixCls + '-picker-hue-slider']">
31 31 <Hue v-model="saturationColors" @change="childChange"></Hue>
32 32 </div>
33 33 <div v-if="alpha" :class="[prefixCls + '-picker-alpha-slider']">
... ... @@ -130,7 +130,7 @@
130 130 value: {
131 131 type: String
132 132 },
133   - saturation: {
  133 + hue: {
134 134 type: Boolean,
135 135 default: true
136 136 },
... ...