remove saturation prop, and add hue prop
This commit is contained in:
梁灏 2018-01-24 15:51:57 +08:00
parent 0cb1f3e463
commit 27d459671e
2 changed files with 8 additions and 4 deletions

View file

@ -10,6 +10,9 @@
<color-picker v-model="color" placement="bottom-start" size="small"></color-picker>
<Date-picker type="date" placeholder="选择日期" size="small" style="width: 200px"></Date-picker>
<Button @click="setColor">set color</Button>
<br><br><br><br>
<ColorPicker v-model="color7" :saturation="false"></ColorPicker>
</div>
</template>
<script>
@ -18,7 +21,8 @@
data () {
return {
color: 'rgba(12,34,255,.85)',
color2: ''
color2: '',
color7: '#19be6b'
};
},
computed: {},

View file

@ -24,10 +24,10 @@
v-transfer-dom>
<div :class="[prefixCls + '-picker']">
<div :class="[prefixCls + '-picker-wrapper']">
<div v-if="saturation" :class="[prefixCls + '-picker-panel']">
<div :class="[prefixCls + '-picker-panel']">
<Saturation v-model="saturationColors" @change="childChange"></Saturation>
</div>
<div :class="[prefixCls + '-picker-hue-slider']">
<div v-if="hue" :class="[prefixCls + '-picker-hue-slider']">
<Hue v-model="saturationColors" @change="childChange"></Hue>
</div>
<div v-if="alpha" :class="[prefixCls + '-picker-alpha-slider']">
@ -130,7 +130,7 @@
value: {
type: String
},
saturation: {
hue: {
type: Boolean,
default: true
},