2023-05-06 19:56:50 +00:00
|
|
|
<template>
|
|
|
|
<DocSectionText v-bind="$attrs"> </DocSectionText>
|
|
|
|
<div class="card flex justify-content-center">
|
|
|
|
<SelectButton
|
|
|
|
v-model="value"
|
|
|
|
:options="options"
|
|
|
|
aria-labelledby="basic"
|
|
|
|
:pt="{
|
2023-05-08 12:32:33 +00:00
|
|
|
label: ({ state }) => ({
|
|
|
|
class: state.focusedIndex === 1 ? 'text-blue-300' : undefined
|
|
|
|
})
|
2023-05-06 19:56:50 +00:00
|
|
|
}"
|
|
|
|
/>
|
|
|
|
</div>
|
|
|
|
<DocSectionCode :code="code" />
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
|
|
|
export default {
|
|
|
|
data() {
|
|
|
|
return {
|
|
|
|
value: 'Off',
|
|
|
|
options: ['Off', 'On'],
|
|
|
|
code: {
|
|
|
|
basic: `
|
2023-05-08 12:32:33 +00:00
|
|
|
<SelectButton
|
|
|
|
v-model="value"
|
|
|
|
:options="options"
|
|
|
|
aria-labelledby="basic"
|
|
|
|
:pt="{
|
|
|
|
label: ({ state }) => ({
|
|
|
|
class: state.focusedIndex === 1 ? 'text-blue-300' : undefined
|
|
|
|
})
|
|
|
|
}"/>`,
|
2023-05-06 19:56:50 +00:00
|
|
|
options: `
|
|
|
|
<template>
|
|
|
|
<div class="card flex justify-content-center">
|
2023-05-08 12:32:33 +00:00
|
|
|
<SelectButton
|
|
|
|
v-model="value"
|
|
|
|
:options="options"
|
|
|
|
aria-labelledby="basic"
|
|
|
|
:pt="{
|
|
|
|
label: ({ state }) => ({
|
|
|
|
class: state.focusedIndex === 1 ? 'text-blue-300' : undefined
|
|
|
|
})
|
|
|
|
}"
|
|
|
|
/>
|
2023-05-06 19:56:50 +00:00
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
|
|
|
export default {
|
|
|
|
data() {
|
|
|
|
return {
|
|
|
|
value: 'off',
|
|
|
|
options: ['Off', 'On']
|
|
|
|
}
|
|
|
|
}
|
|
|
|
};
|
|
|
|
<\/script>`,
|
|
|
|
composition: `
|
|
|
|
<template>
|
|
|
|
<div class="card flex justify-content-center">
|
2023-05-08 12:32:33 +00:00
|
|
|
<SelectButton
|
|
|
|
v-model="value"
|
|
|
|
:options="options"
|
|
|
|
aria-labelledby="basic"
|
|
|
|
:pt="{
|
|
|
|
label: ({ state }) => ({
|
|
|
|
class: state.focusedIndex === 1 ? 'text-blue-300' : undefined
|
|
|
|
})
|
|
|
|
}"
|
|
|
|
/>
|
2023-05-06 19:56:50 +00:00
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script setup>
|
|
|
|
import { ref } from 'vue';
|
|
|
|
|
|
|
|
const value = ref('off');
|
|
|
|
const options = ref(['Off', 'On']);
|
|
|
|
<\/script>`
|
|
|
|
}
|
|
|
|
};
|
|
|
|
}
|
|
|
|
};
|
|
|
|
</script>
|