fix: <OperateDrawer> 使用defineModel定义visible
This commit is contained in:
parent
e7418c2627
commit
a7752db587
@ -17,11 +17,14 @@ interface Emits {
|
|||||||
(e: 'update:modelValue', modelValue: boolean): void;
|
(e: 'update:modelValue', modelValue: boolean): void;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const visible = defineModel<boolean>('visible', {
|
||||||
|
default: false
|
||||||
|
});
|
||||||
|
|
||||||
const emit = defineEmits<Emits>();
|
const emit = defineEmits<Emits>();
|
||||||
const slots = defineSlots();
|
const slots = defineSlots();
|
||||||
const appStore = useAppStore();
|
const appStore = useAppStore();
|
||||||
const state = reactive({ width: 0 });
|
const state = reactive({ width: 0 });
|
||||||
const visible = ref(props.modelValue);
|
|
||||||
const isFullscreen = ref(false);
|
const isFullscreen = ref(false);
|
||||||
const drawerWidth = computed(() => {
|
const drawerWidth = computed(() => {
|
||||||
const maxMinWidth = 360;
|
const maxMinWidth = 360;
|
||||||
|
Loading…
Reference in New Issue
Block a user