mirror of
https://github.com/ElemeFE/element.git
synced 2025-12-13 11:34:02 +08:00
ColorPicker: add active-change event
This commit is contained in:
@@ -93,4 +93,5 @@ ColorPicker is a color selector supporting multiple color formats.
|
||||
### Events
|
||||
| Event Name | Description | Parameters |
|
||||
|---------|--------|---------|
|
||||
| change | triggers when input value changes | color value |
|
||||
| change | triggers when input value changes | color value |
|
||||
| active-change | triggers when the current active color changes | active color value |
|
||||
@@ -93,4 +93,5 @@
|
||||
### Events
|
||||
| 事件名称 | 说明 | 回调参数 |
|
||||
|---------- |-------- |---------- |
|
||||
| change | 当绑定值变化时触发 | 当前值 |
|
||||
| change | 当绑定值变化时触发 | 当前值 |
|
||||
| active-change | 面板中当前显示的颜色发生改变时触发 | 当前显示的颜色值 |
|
||||
@@ -70,6 +70,9 @@
|
||||
handler() {
|
||||
this.showPanelColor = true;
|
||||
}
|
||||
},
|
||||
displayedColor(val) {
|
||||
this.$emit('active-change', val);
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
@@ -40,7 +40,7 @@
|
||||
props: {
|
||||
value: {
|
||||
type: [Boolean, String, Number],
|
||||
default: true
|
||||
default: false
|
||||
},
|
||||
disabled: {
|
||||
type: Boolean,
|
||||
|
||||
Reference in New Issue
Block a user