2023-05-07 11:38:47 +00:00
|
|
|
<template>
|
|
|
|
<DocSectionText v-bind="$attrs"> </DocSectionText>
|
|
|
|
<div class="card flex justify-content-center">
|
2023-05-08 13:01:44 +00:00
|
|
|
<ToggleButton
|
|
|
|
v-model="checked"
|
|
|
|
class="w-8rem"
|
|
|
|
:pt="{
|
|
|
|
root: () => ({
|
|
|
|
class: checked ? 'bg-green-500 border-white' : undefined
|
|
|
|
})
|
|
|
|
}"
|
|
|
|
/>
|
2023-05-07 11:38:47 +00:00
|
|
|
</div>
|
|
|
|
<DocSectionCode :code="code" />
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
|
|
|
export default {
|
|
|
|
data() {
|
|
|
|
return {
|
|
|
|
checked: false,
|
|
|
|
code: {
|
|
|
|
basic: `
|
2023-05-08 13:01:44 +00:00
|
|
|
<ToggleButton
|
|
|
|
v-model="checked"
|
|
|
|
class="w-8rem"
|
|
|
|
:pt="{
|
|
|
|
root: () => ({
|
|
|
|
class: checked ? 'bg-green-500 border-white' : undefined
|
|
|
|
})
|
|
|
|
}"
|
|
|
|
/>`,
|
2023-05-07 11:38:47 +00:00
|
|
|
options: `
|
|
|
|
<template>
|
|
|
|
<div class="card flex justify-content-center">
|
2023-05-08 13:01:44 +00:00
|
|
|
<ToggleButton
|
|
|
|
v-model="checked"
|
|
|
|
class="w-8rem"
|
|
|
|
:pt="{
|
|
|
|
root: () => ({
|
|
|
|
class: checked ? 'bg-green-500 border-white' : undefined
|
|
|
|
})
|
|
|
|
}"
|
|
|
|
/>
|
2023-05-07 11:38:47 +00:00
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
|
|
|
export default {
|
|
|
|
data() {
|
|
|
|
return {
|
|
|
|
checked: false
|
|
|
|
}
|
|
|
|
}
|
|
|
|
};
|
|
|
|
<\/script>`,
|
|
|
|
composition: `
|
|
|
|
<template>
|
|
|
|
<div class="card flex justify-content-center">
|
2023-05-08 13:01:44 +00:00
|
|
|
<ToggleButton
|
|
|
|
v-model="checked"
|
|
|
|
class="w-8rem"
|
|
|
|
:pt="{
|
|
|
|
root: () => ({
|
|
|
|
class: checked ? 'bg-green-500 border-white' : undefined
|
|
|
|
})
|
|
|
|
}"
|
|
|
|
/>
|
2023-05-07 11:38:47 +00:00
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script setup>
|
|
|
|
import { ref } from 'vue';
|
|
|
|
|
|
|
|
const checked = ref(false);
|
|
|
|
<\/script>`
|
|
|
|
}
|
|
|
|
};
|
|
|
|
}
|
|
|
|
};
|
|
|
|
</script>
|