refactor: ♻️ 抽屉适配移动端自适应调整宽度
This commit is contained in:
@@ -162,6 +162,7 @@
|
||||
v-model="dialog.visible"
|
||||
:title="dialog.title"
|
||||
append-to-body
|
||||
:size="drawerSize"
|
||||
@close="handleCloseDialog"
|
||||
>
|
||||
<el-form ref="userFormRef" :model="formData" :rules="rules" label-width="80px">
|
||||
@@ -237,8 +238,10 @@
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import UserAPI, { UserForm, UserPageQuery, UserPageVO } from "@/api/system/user.api";
|
||||
import { useAppStore } from "@/store/modules/app.store";
|
||||
import { DeviceEnum } from "@/enums/settings/device.enum";
|
||||
|
||||
import UserAPI, { UserForm, UserPageQuery, UserPageVO } from "@/api/system/user.api";
|
||||
import DeptAPI from "@/api/system/dept.api";
|
||||
import RoleAPI from "@/api/system/role.api";
|
||||
|
||||
@@ -249,6 +252,9 @@ defineOptions({
|
||||
name: "User",
|
||||
inheritAttrs: false,
|
||||
});
|
||||
|
||||
const appStore = useAppStore();
|
||||
|
||||
const queryFormRef = ref();
|
||||
const userFormRef = ref();
|
||||
|
||||
@@ -265,6 +271,7 @@ const dialog = reactive({
|
||||
visible: false,
|
||||
title: "新增用户",
|
||||
});
|
||||
const drawerSize = computed(() => (appStore.device === DeviceEnum.DESKTOP ? "600px" : "90%"));
|
||||
|
||||
const formData = reactive<UserForm>({
|
||||
status: 1,
|
||||
|
||||
Reference in New Issue
Block a user