diff --git a/src/components/ColorPicker/Alpha.vue b/src/components/ColorPicker/Alpha.vue index f3e372df..7c82eea6 100644 --- a/src/components/ColorPicker/Alpha.vue +++ b/src/components/ColorPicker/Alpha.vue @@ -54,7 +54,7 @@ export default defineComponent({ else a = Math.round(left * 100 / containerWidth) / 100 if(color.value.a !== a) { - emit('change', { + emit('colorChange', { r: color.value.r, g: color.value.g, b: color.value.b, diff --git a/src/components/ColorPicker/EditableInput.vue b/src/components/ColorPicker/EditableInput.vue index 60c8a849..ce2dfc20 100644 --- a/src/components/ColorPicker/EditableInput.vue +++ b/src/components/ColorPicker/EditableInput.vue @@ -30,7 +30,7 @@ export default defineComponent({ const handleInput = (e: InputEvent) => { const value = (e.target as HTMLInputElement).value - if(value.length >= 6) emit('change', tinycolor(value).toRgb()) + if(value.length >= 6) emit('colorChange', tinycolor(value).toRgb()) } return { diff --git a/src/components/ColorPicker/Hue.vue b/src/components/ColorPicker/Hue.vue index 6b81139c..a185eb6a 100644 --- a/src/components/ColorPicker/Hue.vue +++ b/src/components/ColorPicker/Hue.vue @@ -71,7 +71,7 @@ export default defineComponent({ h = (360 * percent / 100) } if(color.value.h !== h) { - emit('change', { + emit('colorChange', { h, l: color.value.l, s: color.value.s, diff --git a/src/components/ColorPicker/Saturation.vue b/src/components/ColorPicker/Saturation.vue index 5bd61b54..e338f294 100644 --- a/src/components/ColorPicker/Saturation.vue +++ b/src/components/ColorPicker/Saturation.vue @@ -48,7 +48,7 @@ export default defineComponent({ const pointerLeft = computed(() => color.value.s * 100 + '%') const emitChangeEvent = throttle(function(param) { - emit('change', param) + emit('colorChange', param) }, 20, { leading: true, trailing: false }) const saturationRef = ref() diff --git a/src/components/ColorPicker/index.vue b/src/components/ColorPicker/index.vue index ce854916..4d589c18 100644 --- a/src/components/ColorPicker/index.vue +++ b/src/components/ColorPicker/index.vue @@ -1,7 +1,7 @@