Commit 3bc43335 authored by Leopoldthecoder's avatar Leopoldthecoder Committed by 杨奕

ColorPicker: add active-change event

parent e7647fd7
...@@ -93,4 +93,5 @@ ColorPicker is a color selector supporting multiple color formats. ...@@ -93,4 +93,5 @@ ColorPicker is a color selector supporting multiple color formats.
### Events ### Events
| Event Name | Description | Parameters | | Event Name | Description | Parameters |
|---------|--------|---------| |---------|--------|---------|
| change | triggers when input value changes | color value | | change | triggers when input value changes | color value |
\ No newline at end of file | active-change | triggers when the current active color changes | active color value |
\ No newline at end of file
...@@ -93,4 +93,5 @@ ...@@ -93,4 +93,5 @@
### Events ### Events
| 事件名称 | 说明 | 回调参数 | | 事件名称 | 说明 | 回调参数 |
|---------- |-------- |---------- | |---------- |-------- |---------- |
| change | 当绑定值变化时触发 | 当前值 | | change | 当绑定值变化时触发 | 当前值 |
\ No newline at end of file | active-change | 面板中当前显示的颜色发生改变时触发 | 当前显示的颜色值 |
\ No newline at end of file
...@@ -70,6 +70,9 @@ ...@@ -70,6 +70,9 @@
handler() { handler() {
this.showPanelColor = true; this.showPanelColor = true;
} }
},
displayedColor(val) {
this.$emit('active-change', val);
} }
}, },
......
...@@ -40,7 +40,7 @@ ...@@ -40,7 +40,7 @@
props: { props: {
value: { value: {
type: [Boolean, String, Number], type: [Boolean, String, Number],
default: true default: false
}, },
disabled: { disabled: {
type: Boolean, type: Boolean,
......
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