We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 978d64c commit 4971b12Copy full SHA for 4971b12
1 file changed
src/ui/Switch.vue
@@ -47,7 +47,7 @@
47
48
<script setup lang="ts">
49
import type { Component } from 'vue'
50
-import { computed, useAttrs } from 'vue'
+import { computed } from 'vue'
51
52
interface Props
53
{
@@ -95,11 +95,6 @@ const emit = defineEmits<{
95
change: [value: boolean, event: Event]
96
}>()
97
98
-const attrs = useAttrs()
99
-
100
-// 生成唯一 ID
101
-const switchId = computed(() => props.id || `switch-${ Math.random().toString(36).substr(2, 9) }`)
102
103
// 包装器样式
104
const wrapperClasses = computed(() => [
105
'inline-flex items-center gap-3',
0 commit comments