Add open change event to color picker
This commit is contained in:
parent
ca1b7bfaa6
commit
263c991ee0
2 changed files with 9 additions and 3 deletions
|
@ -12,7 +12,8 @@
|
||||||
<Button @click="setColor">set color</Button>
|
<Button @click="setColor">set color</Button>
|
||||||
|
|
||||||
<br><br><br><br>
|
<br><br><br><br>
|
||||||
<ColorPicker v-model="color7" :hue="false"></ColorPicker>
|
{{openState}}
|
||||||
|
<ColorPicker v-model="color7" :hue="false" @on-open-change="onOpenChange"></ColorPicker>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
|
@ -22,7 +23,8 @@
|
||||||
return {
|
return {
|
||||||
color: 'rgba(12,34,255,.85)',
|
color: 'rgba(12,34,255,.85)',
|
||||||
color2: '',
|
color2: '',
|
||||||
color7: '#19be6b'
|
color7: '#19be6b',
|
||||||
|
openState: false,
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
computed: {},
|
computed: {},
|
||||||
|
@ -35,6 +37,9 @@
|
||||||
},
|
},
|
||||||
c2 (d) {
|
c2 (d) {
|
||||||
console.log(d);
|
console.log(d);
|
||||||
|
},
|
||||||
|
onOpenChange(state){
|
||||||
|
this.openState = state;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
|
@ -305,6 +305,7 @@
|
||||||
} else {
|
} else {
|
||||||
this.$refs.drop.destroy();
|
this.$refs.drop.destroy();
|
||||||
}
|
}
|
||||||
|
this.$emit('on-open-change', Boolean(val));
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
|
Loading…
Add table
Reference in a new issue