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,7 +24,7 @@ | ||
24 | v-transfer-dom> | 24 | v-transfer-dom> |
25 | <div :class="[prefixCls + '-picker']"> | 25 | <div :class="[prefixCls + '-picker']"> |
26 | <div :class="[prefixCls + '-picker-wrapper']"> | 26 | <div :class="[prefixCls + '-picker-wrapper']"> |
27 | - <div :class="[prefixCls + '-picker-panel']"> | 27 | + <div v-if="saturation" :class="[prefixCls + '-picker-panel']"> |
28 | <Saturation v-model="saturationColors" @change="childChange"></Saturation> | 28 | <Saturation v-model="saturationColors" @change="childChange"></Saturation> |
29 | </div> | 29 | </div> |
30 | <div :class="[prefixCls + '-picker-hue-slider']"> | 30 | <div :class="[prefixCls + '-picker-hue-slider']"> |
@@ -130,6 +130,10 @@ | @@ -130,6 +130,10 @@ | ||
130 | value: { | 130 | value: { |
131 | type: String | 131 | type: String |
132 | }, | 132 | }, |
133 | + saturation: { | ||
134 | + type: Boolean, | ||
135 | + default: true | ||
136 | + }, | ||
133 | alpha: { | 137 | alpha: { |
134 | type: Boolean, | 138 | type: Boolean, |
135 | default: false | 139 | default: false |
@@ -367,4 +371,4 @@ | @@ -367,4 +371,4 @@ | ||
367 | } | 371 | } |
368 | } | 372 | } |
369 | }; | 373 | }; |
370 | -</script> | ||
371 | \ No newline at end of file | 374 | \ No newline at end of file |
375 | +</script> |