From 8dab987ec7d6a6d3f1ebb2ff1ae5eab45310891f Mon Sep 17 00:00:00 2001 From: 梁灏 Date: Mon, 21 Aug 2017 16:28:04 +0800 Subject: [PATCH] update ColorPicker --- examples/routers/color-picker.vue | 8 +++++++- src/components/color-picker/color-picker.vue | 2 ++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/examples/routers/color-picker.vue b/examples/routers/color-picker.vue index 194d75f..a602b54 100644 --- a/examples/routers/color-picker.vue +++ b/examples/routers/color-picker.vue @@ -2,7 +2,7 @@
{{ color }} - + @@ -25,6 +25,12 @@ methods: { setColor () { this.color = '#26bc77'; + }, + c1 (d) { + console.log(d); + }, + c2 (d) { + console.log(d); } } }; diff --git a/src/components/color-picker/color-picker.vue b/src/components/color-picker/color-picker.vue index 2bfa555..47f69f6 100644 --- a/src/components/color-picker/color-picker.vue +++ b/src/components/color-picker/color-picker.vue @@ -215,6 +215,7 @@ }, set (newVal) { this.val = newVal; + this.$emit('on-active-change', this.formatColor); } }, classes () { @@ -347,6 +348,7 @@ }, handleClear () { this.$emit('input', ''); + this.$emit('on-change', ''); this.handleClose(); }, handleSelectColor (color) { -- libgit2 0.21.4