refactor: category prop on drawer info

This commit is contained in:
puriphatt 2024-04-22 17:51:56 +07:00
parent 175d9c4d35
commit e854d9267f

View file

@ -1,9 +1,10 @@
<script setup lang="ts"> <script setup lang="ts">
import { ref } from 'vue'; import { onMounted, ref, watch } from 'vue';
import AppBox from './app/AppBox.vue'; import AppBox from './app/AppBox.vue';
defineProps<{ defineProps<{
title: string; title: string;
category?: string;
isEdit?: boolean; isEdit?: boolean;
bgOn?: boolean; bgOn?: boolean;
statusBranch?: string; statusBranch?: string;
@ -16,7 +17,6 @@ defineProps<{
undo?: (...args: unknown[]) => void; undo?: (...args: unknown[]) => void;
}>(); }>();
// const drawerWidth = ref(window.screen.width * 0.8);
const drawerOpen = defineModel<boolean>('drawerOpen', { const drawerOpen = defineModel<boolean>('drawerOpen', {
default: false, default: false,
}); });
@ -33,7 +33,6 @@ function reset() {
<q-drawer <q-drawer
@before-hide="reset" @before-hide="reset"
@hide="close" @hide="close"
:width="$q.screen.gt.md ? 1200 : $q.screen.gt.xs ? 700 : 900"
:breakpoint="1366" :breakpoint="1366"
v-model="drawerOpen" v-model="drawerOpen"
behavior="mobile" behavior="mobile"
@ -91,6 +90,7 @@ function reset() {
</div> </div>
<div class="col text-subtitle1 text-weight-bold text-center"> <div class="col text-subtitle1 text-weight-bold text-center">
<text v-if="category" class="app-text-muted">{{ category }} /</text>
{{ title }} {{ title }}
<text <text