diff --git a/packages/switch/src/index.vue b/packages/switch/src/index.vue index f10fc23991..4c65fb662b 100644 --- a/packages/switch/src/index.vue +++ b/packages/switch/src/index.vue @@ -26,7 +26,7 @@ {{ inactiveText }} - +
@@ -138,7 +138,6 @@ export default defineComponent({ const elForm = inject(elFormKey, {} as ElFormContext) const elFormItem = inject(elFormItemKey, {} as ElFormItemContext) - const coreWidth = ref(props.width) const isModelValue = ref(props.modelValue !== false) const input = ref(null) const core = ref(null) @@ -204,8 +203,6 @@ export default defineComponent({ } onMounted(() => { - coreWidth.value = coreWidth.value || 40 - if (props.activeValue || props.inactiveValue) { setBackgroundColor() } @@ -216,7 +213,6 @@ export default defineComponent({ return { input, core, - coreWidth, switchDisabled, checked, handleChange,