Merge pull request #98 from cshaptx4869/patch-60

refactor(CURD): ♻️ 编辑表单使用drawer模式
This commit is contained in:
Ray Hao
2024-05-14 15:55:33 +08:00
committed by GitHub
2 changed files with 4 additions and 4 deletions

View File

@@ -1,6 +1,6 @@
<template>
<!-- drawer -->
<template v-if="props.modalConfig.component === 'drawer'">
<template v-if="modalConfig.component === 'drawer'">
<el-drawer
v-model="modalVisible"
:append-to-body="true"

View File

@@ -5,10 +5,10 @@ import type { IModalConfig } from "@/components/PageModal/index.vue";
const modalConfig: IModalConfig<UserForm> = {
pageName: "sys:user",
pk: "id",
dialog: {
component: "drawer",
drawer: {
title: "修改用户",
width: 800,
draggable: true,
size: 300,
},
formAction: function (data) {
return UserAPI.update(data.id as number, data);