Skip to content

Commit 849abd0

Browse files
committed
fix: swap item
1 parent 4ab657e commit 849abd0

2 files changed

Lines changed: 9 additions & 2 deletions

File tree

apps/daisy/src/swap-item.vue

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
>
66
<input
77
v-model="isOpen"
8-
:disabled="disabled"
8+
:disabled="isDisabled"
99
type="checkbox"
1010
>
1111
<div class="swap-on text-center">{{ emoji }}</div>
@@ -14,10 +14,16 @@
1414
</template>
1515

1616
<script setup lang="ts">
17-
defineProps<{
17+
import { computed } from 'vue'
18+
19+
const props = defineProps<{
1820
emoji: string
1921
disabled: boolean
2022
}>()
2123
2224
const isOpen = defineModel<boolean>('isOpen')
25+
26+
const isDisabled = computed(() => {
27+
return props.disabled || isOpen.value
28+
})
2329
</script>

apps/daisy/vite.config.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import { tailwindPlugin, vuePlugin } from '@vue-workspace/vite-config'
22
import { defineConfig } from 'vite'
33

44
export default defineConfig({
5+
base: './',
56
plugins: [
67
vuePlugin,
78
tailwindPlugin(),

0 commit comments

Comments
 (0)