Commit 2b2dc78adddcc453032c00f7ba4fad5cea7a1f42
Committed by
GitHub
1 parent
6b2cd674
Add saturation property
add a property to decide whether saturation panel should show
Showing
1 changed file
with
6 additions
and
2 deletions
Show diff stats
src/components/color-picker/color-picker.vue
... | ... | @@ -24,7 +24,7 @@ |
24 | 24 | v-transfer-dom> |
25 | 25 | <div :class="[prefixCls + '-picker']"> |
26 | 26 | <div :class="[prefixCls + '-picker-wrapper']"> |
27 | - <div :class="[prefixCls + '-picker-panel']"> | |
27 | + <div v-if="saturation" :class="[prefixCls + '-picker-panel']"> | |
28 | 28 | <Saturation v-model="saturationColors" @change="childChange"></Saturation> |
29 | 29 | </div> |
30 | 30 | <div :class="[prefixCls + '-picker-hue-slider']"> |
... | ... | @@ -130,6 +130,10 @@ |
130 | 130 | value: { |
131 | 131 | type: String |
132 | 132 | }, |
133 | + saturation: { | |
134 | + type: Boolean, | |
135 | + default: true | |
136 | + }, | |
133 | 137 | alpha: { |
134 | 138 | type: Boolean, |
135 | 139 | default: false |
... | ... | @@ -367,4 +371,4 @@ |
367 | 371 | } |
368 | 372 | } |
369 | 373 | }; |
370 | -</script> | |
371 | 374 | \ No newline at end of file |
375 | +</script> | ... | ... |