mirror of
https://gitee.com/ssssssss-team/magic-boot.git
synced 2025-04-19 18:36:23 +08:00
23 lines
481 B
Vue
23 lines
481 B
Vue
<template>
|
|
<el-switch
|
|
v-model="modelValue"
|
|
:active-value="activeValue"
|
|
:inactive-value="inactiveValue"
|
|
v-bind="props.props"
|
|
/>
|
|
</template>
|
|
|
|
<script setup>
|
|
import { watch } from 'vue'
|
|
const emit = defineEmits(['update:modelValue'])
|
|
const props = defineProps({
|
|
modelValue: String,
|
|
activeValue: String,
|
|
inactiveValue: String,
|
|
props: Object
|
|
})
|
|
watch(() => props.modelValue, (value) => {
|
|
emit('update:modelValue', value)
|
|
})
|
|
</script>
|