fix: drawer width
This commit is contained in:
parent
c848c095c6
commit
ab533c190d
1 changed files with 13 additions and 3 deletions
|
|
@ -1,5 +1,5 @@
|
|||
<script setup lang="ts">
|
||||
import { ref } from 'vue';
|
||||
import { ref, watch } from 'vue';
|
||||
|
||||
defineProps<{
|
||||
title: string;
|
||||
|
|
@ -12,6 +12,7 @@ defineProps<{
|
|||
undo?: (...args: unknown[]) => void;
|
||||
}>();
|
||||
|
||||
// const drawerWidth = ref(window.screen.width * 0.8);
|
||||
const drawerOpen = defineModel<boolean>('drawerOpen', {
|
||||
default: false,
|
||||
});
|
||||
|
|
@ -23,13 +24,22 @@ function reset() {
|
|||
myForm.value.resetValidation();
|
||||
}
|
||||
}
|
||||
|
||||
// watch(
|
||||
// () => window.screen.width,
|
||||
// (v) => {
|
||||
// console.log(v);
|
||||
|
||||
// drawerWidth.value = v;
|
||||
// },
|
||||
// );
|
||||
</script>
|
||||
<template>
|
||||
<q-drawer
|
||||
@before-hide="reset"
|
||||
@hide="close"
|
||||
:width="1300"
|
||||
:breakpoint="500"
|
||||
:width="$q.screen.gt.md ? 1200 : $q.screen.gt.xs ? 700 : 900"
|
||||
:breakpoint="1366"
|
||||
v-model="drawerOpen"
|
||||
behavior="mobile"
|
||||
side="right"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue