Commit e9c032c8 authored by cinwell.li's avatar cinwell.li Committed by baiyaaaaa

ColorPicker: hide the dropdown when clicking on another colorpicker. (#2929)

parent 35d594d4
......@@ -30,9 +30,7 @@
color: {
required: true
},
vertical: {
type: Boolean
}
vertical: Boolean
},
watch: {
......
......@@ -25,9 +25,7 @@
required: true
},
vertical: {
type: Boolean
}
vertical: Boolean
},
data() {
......
......@@ -22,7 +22,6 @@
import HueSlider from './hue-slider';
import AlphaSlider from './alpha-slider';
import Popper from 'element-ui/src/utils/vue-popper';
import Clickoutside from 'element-ui/src/utils/clickoutside';
import Locale from 'element-ui/src/mixins/locale';
export default {
......@@ -36,15 +35,11 @@
AlphaSlider
},
directives: { Clickoutside },
props: {
color: {
required: true
},
showAlpha: {
type: Boolean
}
showAlpha: Boolean
},
methods: {
......
<template>
<div class="el-color-picker" v-clickoutside="hide">
<div class="el-color-picker__trigger" @click.stop="showPicker = !showPicker">
<div class="el-color-picker__trigger" @click="showPicker = !showPicker">
<span class="el-color-picker__color" :class="{ 'is-alpha': showAlpha }">
<span class="el-color-picker__color-inner"
:style="{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment