style:样式切换

This commit is contained in:
lqins
2024-12-19 16:57:57 +08:00
parent 710b008453
commit 357c77ef30
59 changed files with 4775 additions and 3420 deletions

View File

@@ -1,24 +1,26 @@
<template>
<el-switch v-model="model" :size="size"
@change="$emit('update:value', $event)"
style="--el-switch-on-color:#555555;--el-color-white:#0E0808"/>
<el-switch
v-model="model"
:size="size"
@change="$emit('update:value', $event)"
/>
</template>
<script setup>
import {ref, watch} from "vue";
import { ref, watch } from "vue";
const props = defineProps({
value : Boolean,
value: Boolean,
size: {
type: String,
default: 'default',
default: "default"
}
});
const model = ref(props.value)
const model = ref(props.value);
watch(() => props.value, (newValue) => {
model.value = newValue
})
watch(
() => props.value,
(newValue) => {
model.value = newValue;
}
);
</script>