1
0
mirror of https://github.com/lana-k/sqliteviz.git synced 2025-12-07 02:28:54 +08:00

group export

This commit is contained in:
lana-k
2020-10-19 21:24:31 +02:00
parent 8f49c0509f
commit 71c70e0232
2 changed files with 75 additions and 13 deletions

View File

@@ -1,5 +1,5 @@
<template>
<div class="checkbox-container" @click.stop="checked = !checked">
<div class="checkbox-container" @click.stop="onClick">
<div v-show="!checked" class="unchecked" />
<img
v-show="checked && theme === 'accent'"
@@ -23,17 +23,28 @@ export default {
validator: (value) => {
return ['accent', 'light'].includes(value)
}
},
init: {
type: Boolean,
required: false,
default: false
}
},
data () {
return {
checked: false
checked: this.init
}
},
watch: {
checked () {
this.$emit('change', this.checked)
}
},
methods: {
onClick () {
this.checked = !this.checked
this.$emit('click', this.checked)
}
}
}
</script>