Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: ♻️ 修改CURD示例编辑弹窗尺寸 #121

Merged
merged 1 commit into from
May 30, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions src/views/demo/curd/config/edit.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,17 @@ import RoleAPI from "@/api/role";
import UserAPI from "@/api/user";
import type { UserForm } from "@/api/user/model";
import type { IModalConfig } from "@/components/PageModal/index.vue";
import { DeviceEnum } from "@/enums/DeviceEnum";
import { useAppStore } from "@/store";

const modalConfig: IModalConfig<UserForm> = {
pageName: "sys:user",
pk: "id",
component: "drawer",
drawer: {
title: "修改用户",
size: 300,
size: useAppStore().device === DeviceEnum.MOBILE ? "90%" : 600,
},
pk: "id",
formAction: function (data) {
return UserAPI.update(data.id as number, data);
},
Expand Down