2023-05-07 11:19:35 +00:00
|
|
|
<template>
|
|
|
|
<DocSectionText v-bind="$attrs"> </DocSectionText>
|
|
|
|
<div class="card flex flex-column align-items-center gap-3">
|
2023-05-08 12:59:27 +00:00
|
|
|
<TriStateCheckbox
|
|
|
|
v-model="value"
|
|
|
|
:pt="{
|
2023-05-23 07:56:17 +00:00
|
|
|
checkbox: {
|
2023-05-09 09:18:10 +00:00
|
|
|
class: value ? 'bg-teal-500 border-white' : undefined
|
|
|
|
}
|
2023-05-08 12:59:27 +00:00
|
|
|
}"
|
|
|
|
/>
|
2023-05-07 11:19:35 +00:00
|
|
|
<label for="checkbox">{{ value == null ? 'null' : value }}</label>
|
|
|
|
</div>
|
|
|
|
<DocSectionCode :code="code" />
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
|
|
|
export default {
|
|
|
|
data() {
|
|
|
|
return {
|
|
|
|
value: null,
|
|
|
|
code: {
|
2023-08-16 13:58:31 +00:00
|
|
|
basic: `<TriStateCheckbox
|
2023-05-08 12:59:27 +00:00
|
|
|
v-model="value"
|
|
|
|
:pt="{
|
2023-05-23 07:56:17 +00:00
|
|
|
checkbox: {
|
2023-05-09 09:18:10 +00:00
|
|
|
class: value ? 'bg-teal-500 border-white' : undefined
|
|
|
|
}
|
2023-05-08 12:59:27 +00:00
|
|
|
}"
|
|
|
|
/>`,
|
2023-08-16 13:58:31 +00:00
|
|
|
options: `<template>
|
2023-05-07 11:19:35 +00:00
|
|
|
<div class="card flex flex-column align-items-center gap-3">
|
2023-05-08 12:59:27 +00:00
|
|
|
<TriStateCheckbox
|
|
|
|
v-model="value"
|
|
|
|
:pt="{
|
2023-05-23 07:56:17 +00:00
|
|
|
checkbox: {
|
2023-05-09 09:18:10 +00:00
|
|
|
class: value ? 'bg-teal-500 border-white' : undefined
|
|
|
|
}
|
2023-05-08 12:59:27 +00:00
|
|
|
}"
|
|
|
|
/>
|
2023-05-07 11:19:35 +00:00
|
|
|
<label for="checkbox">{{ value == null ? 'null' : value }}</label>
|
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
|
|
|
export default {
|
|
|
|
data() {
|
|
|
|
return {
|
|
|
|
value: null
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
<\/script>`,
|
2023-08-16 13:58:31 +00:00
|
|
|
composition: `<template>
|
2023-05-07 11:19:35 +00:00
|
|
|
<div class="card flex flex-column align-items-center gap-3">
|
2023-05-08 12:59:27 +00:00
|
|
|
<TriStateCheckbox
|
|
|
|
v-model="value"
|
|
|
|
:pt="{
|
2023-05-23 07:56:17 +00:00
|
|
|
checkbox: {
|
2023-05-09 09:18:10 +00:00
|
|
|
class: value ? 'bg-teal-500 border-white' : undefined
|
|
|
|
}
|
2023-05-08 12:59:27 +00:00
|
|
|
}"
|
|
|
|
/>
|
2023-05-07 11:19:35 +00:00
|
|
|
<label for="checkbox">{{ value == null ? 'null' : value }}</label>
|
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script setup>
|
|
|
|
import { ref } from 'vue';
|
|
|
|
|
|
|
|
const value = ref(null);
|
|
|
|
<\/script>`
|
|
|
|
}
|
|
|
|
};
|
|
|
|
}
|
|
|
|
};
|
|
|
|
</script>
|