refactor(02): use new toggle button
This commit is contained in:
parent
415aa4bc87
commit
b4c01c7c28
3 changed files with 31 additions and 32 deletions
|
|
@ -3,6 +3,7 @@ import { Icon } from '@iconify/vue';
|
|||
|
||||
import AppBox from 'components/app/AppBox.vue';
|
||||
import AppCircle from 'components/app/AppCircle.vue';
|
||||
import ToggleButton from '../button/ToggleButton.vue';
|
||||
|
||||
defineProps<{
|
||||
data: {
|
||||
|
|
@ -143,22 +144,17 @@ defineEmits<{
|
|||
</q-item>
|
||||
<q-item dense>
|
||||
<q-item-section class="q-py-sm">
|
||||
<div class="q-pa-sm surface-2 rounded">
|
||||
<q-toggle
|
||||
dense
|
||||
color="positive"
|
||||
size="sm"
|
||||
@click="$emit('toggleStatus', disabled === false)"
|
||||
<div class="q-pa-sm surface-2 rounded flex items-center">
|
||||
<ToggleButton
|
||||
two-way
|
||||
:model-value="!disabled"
|
||||
val="xs"
|
||||
padding="none"
|
||||
>
|
||||
<div class="q-ml-xs">
|
||||
{{
|
||||
!disabled ? $t('switchOnLabel') : $t('switchOffLabel')
|
||||
}}
|
||||
</div>
|
||||
</q-toggle>
|
||||
@click="$emit('toggleStatus', disabled === false)"
|
||||
/>
|
||||
<span class="q-pl-md">
|
||||
{{
|
||||
!disabled ? $t('switchOnLabel') : $t('switchOffLabel')
|
||||
}}
|
||||
</span>
|
||||
</div>
|
||||
</q-item-section>
|
||||
</q-item>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue