refactor(CURD): ♻️ 编辑表单使用drawer模式
This commit is contained in:
@@ -1,6 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<!-- drawer -->
|
<!-- drawer -->
|
||||||
<template v-if="props.modalConfig.component === 'drawer'">
|
<template v-if="modalConfig.component === 'drawer'">
|
||||||
<el-drawer
|
<el-drawer
|
||||||
v-model="modalVisible"
|
v-model="modalVisible"
|
||||||
:append-to-body="true"
|
:append-to-body="true"
|
||||||
|
|||||||
@@ -5,10 +5,10 @@ import type { IModalConfig } from "@/components/PageModal/index.vue";
|
|||||||
const modalConfig: IModalConfig<UserForm> = {
|
const modalConfig: IModalConfig<UserForm> = {
|
||||||
pageName: "sys:user",
|
pageName: "sys:user",
|
||||||
pk: "id",
|
pk: "id",
|
||||||
dialog: {
|
component: "drawer",
|
||||||
|
drawer: {
|
||||||
title: "修改用户",
|
title: "修改用户",
|
||||||
width: 800,
|
size: 300,
|
||||||
draggable: true,
|
|
||||||
},
|
},
|
||||||
formAction: function (data) {
|
formAction: function (data) {
|
||||||
return UserAPI.update(data.id as number, data);
|
return UserAPI.update(data.id as number, data);
|
||||||
|
|||||||
Reference in New Issue
Block a user