Add open change event to color picker

This commit is contained in:
Sergio Crisostomo 2018-05-03 10:42:26 +02:00
parent ca1b7bfaa6
commit 263c991ee0
2 changed files with 9 additions and 3 deletions

View file

@ -12,7 +12,8 @@
<Button @click="setColor">set color</Button>
<br><br><br><br>
<ColorPicker v-model="color7" :hue="false"></ColorPicker>
{{openState}}
<ColorPicker v-model="color7" :hue="false" @on-open-change="onOpenChange"></ColorPicker>
</div>
</template>
<script>
@ -22,7 +23,8 @@
return {
color: 'rgba(12,34,255,.85)',
color2: '',
color7: '#19be6b'
color7: '#19be6b',
openState: false,
};
},
computed: {},
@ -35,6 +37,9 @@
},
c2 (d) {
console.log(d);
},
onOpenChange(state){
this.openState = state;
}
}
};

View file

@ -305,6 +305,7 @@
} else {
this.$refs.drop.destroy();
}
this.$emit('on-open-change', Boolean(val));
}
},
methods: {