feat: 分组管理
This commit is contained in:
@@ -1,13 +1,14 @@
|
||||
<template>
|
||||
<ns-modal
|
||||
ref="modalRef"
|
||||
centered
|
||||
v-bind="extraModalConfig"
|
||||
destroyOnClose
|
||||
v-model:visible="visible"
|
||||
:title="title"
|
||||
:okButtonProps="buttonProps"
|
||||
@ok="handleOk">
|
||||
<ns-form ref="formRef" :schemas="schemas" :model="formData" formLayout="formVertical" />
|
||||
<ns-form ref="formRef" :schemas="schemas" :model="formData" formLayout="vertical" />
|
||||
</ns-modal>
|
||||
</template>
|
||||
|
||||
@@ -21,6 +22,7 @@
|
||||
api: string | object | Function;
|
||||
data?: object;
|
||||
extraModalConfig?: object;
|
||||
success?: Function;
|
||||
};
|
||||
const route = useRoute();
|
||||
const { httpRequest } = useApi();
|
||||
@@ -59,14 +61,15 @@
|
||||
formRef.value
|
||||
.triggerSubmit()
|
||||
.then((data: any) => {
|
||||
const { api } = props;
|
||||
const { api, success } = props;
|
||||
const requestConfig: HttpRequestConfig = { method: 'POST' };
|
||||
const { params } = route;
|
||||
|
||||
httpRequest({ api, params: data, pathParams: params, requestConfig })
|
||||
.then(() => {
|
||||
.then((res) => {
|
||||
NsMessage.success('操作成功', 1, () => {
|
||||
toggle();
|
||||
success && success(res);
|
||||
});
|
||||
})
|
||||
.finally(() => {
|
||||
|
Reference in New Issue
Block a user