Skip to content

Commit c177f0e

Browse files
authored
Merge pull request #99 from codingapi/dev
Dev
2 parents b0bcd99 + ecc155b commit c177f0e

File tree

17 files changed

+112
-31
lines changed

17 files changed

+112
-31
lines changed

admin-ui/package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@
66
"@ant-design/icons": "^5.4.0",
77
"@ant-design/pro-components": "^2.8.7",
88
"@babel/standalone": "^7.25.6",
9-
"@codingapi/flow-pc": "^0.0.8",
10-
"@codingapi/form-pc": "^0.0.16",
11-
"@codingapi/ui-framework": "^0.0.12",
9+
"@codingapi/flow-pc": "^0.0.17",
10+
"@codingapi/form-pc": "^0.0.17",
11+
"@codingapi/ui-framework": "^0.0.17",
1212
"@dnd-kit/core": "^6.2.0",
1313
"@dnd-kit/sortable": "^9.0.0",
1414
"@handsontable/react-wrapper": "^15.0.0",

admin-ui/src/config/menus.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ export const menus = [
2424
{
2525
path: '/mirco',
2626
name: '微前端',
27-
icon: "FormOutlined",
27+
icon: "AppstoreOutlined",
2828
page: 'mirco',
2929
},
3030
{

admin-ui/src/pages/flow/leave/LeaveForm.tsx

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,12 @@
11
import React, {useEffect} from "react";
2-
import {FlowFormViewProps} from "@codingapi/ui-framework";
3-
import {Form,FormInput,FormTextArea} from "@codingapi/form-pc";
4-
import {ValidateUtils} from "@codingapi/ui-framework";
2+
import {FlowFormViewProps, ValidateUtils} from "@codingapi/ui-framework";
3+
import {Form, FormInput, FormTextArea} from "@codingapi/form-pc";
54

65
const LeaveForm: React.FC<FlowFormViewProps> = (props) => {
76

87
useEffect(() => {
98
if (props.dataVersion && props.data) {
10-
console.log('data',props.data);
9+
console.log('data', props.data);
1110
props.form?.setFieldsValue({
1211
...props.data
1312
});
@@ -33,8 +32,8 @@ const LeaveForm: React.FC<FlowFormViewProps> = (props) => {
3332
<FormInput
3433
name={"days"}
3534
label={"请假天数"}
36-
inputType={"number"}
37-
required={true}
35+
inputType={"number"}
36+
required={true}
3837
validateFunction={ValidateUtils.validateNotEmpty}
3938
/>
4039

admin-ui/src/pages/flow/user/index.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -182,6 +182,7 @@ const UserPage = () => {
182182
<Modal
183183
title={"编辑用户"}
184184
open={visible}
185+
destroyOnHidden={true}
185186
onClose={()=>{
186187
setVisible(false);
187188
}}

admin-ui/src/pages/flow/user/select.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ const UserSelect:React.FC<UserSelectProps> = (props) => {
4343
open={props.visible}
4444
onCancel={() => props.setVisible(false)}
4545
onClose={() => props.setVisible(false)}
46-
destroyOnClose={true}
46+
destroyOnHidden={true}
4747
title={"选择用户"}
4848
onOk={() => {
4949
if (props.onSelect) {

admin-ui/src/pages/flow/work/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,7 @@ const FlowPage = () => {
195195
data-testid={"flow-editor"}
196196
title="编辑流程"
197197
open={editorVisible}
198-
destroyOnClose={true}
198+
destroyOnHidden={true}
199199
onClose={()=>{
200200
setEditorVisible(false)
201201
}}

admin-ui/src/pages/flow/work/select.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ const FlowSelect: React.FC<FlowSelectProps> = (props) => {
6363
open={props.visible}
6464
onCancel={() => props.setVisible(false)}
6565
onClose={() => props.setVisible(false)}
66-
destroyOnClose={true}
66+
destroyOnHidden={true}
6767
title={"选择流程"}
6868
onOk={() => {
6969
if (props.onSelect) {

admin-ui/src/pages/form/index.tsx

Lines changed: 19 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,25 +2,25 @@ import React from 'react';
22
import {PageContainer} from "@ant-design/pro-components";
33
import {Button, Col, message, Row} from "antd";
44
import {
5+
Form,
6+
FormCaptcha,
57
FormCascader,
8+
FormCheckbox,
69
FormCode,
710
FormColor,
811
FormDate,
12+
FormInput,
13+
FormPassword,
914
FormRadio,
1015
FormRate,
1116
FormSelect,
1217
FormSlider,
1318
FormStepper,
1419
FormSwitch,
1520
FormTextArea,
16-
FormUploader,
17-
FormCheckbox,
18-
FormCaptcha,
19-
FormPassword,
20-
FormInput,
21-
Form
21+
FormUploader
2222
} from "@codingapi/form-pc";
23-
import {FormInstance,FormField} from "@codingapi/ui-framework";
23+
import {FormField, FormInstance} from "@codingapi/ui-framework";
2424

2525

2626
const FooterButtons: React.FC<{ formInstance: FormInstance }> = ({formInstance}) => {
@@ -69,7 +69,12 @@ const FooterButtons: React.FC<{ formInstance: FormInstance }> = ({formInstance})
6969

7070
<Button
7171
onClick={async () => {
72-
await formInstance.validate();
72+
const result = await formInstance.validate();
73+
if (result) {
74+
message.success("验证通过");
75+
} else {
76+
message.error("验证失败");
77+
}
7378
}}
7479
>验证表单</Button>
7580

@@ -379,6 +384,9 @@ const FormPage = () => {
379384
<Form
380385
form={leftFormInstance}
381386
layout={"horizontal"}
387+
onFinish={async (values)=>{
388+
message.success(JSON.stringify(values));
389+
}}
382390
footer={(
383391
<FooterButtons
384392
formInstance={leftFormInstance}
@@ -567,6 +575,9 @@ const FormPage = () => {
567575

568576
<Col span={12}>
569577
<Form
578+
onFinish={async (values)=>{
579+
message.success(JSON.stringify(values));
580+
}}
570581
form={rightFormInstance}
571582
footer={(
572583
<FooterButtons

admin-ui/todo.md

Lines changed: 0 additions & 3 deletions
This file was deleted.

mobile-ui/package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@
44
"private": true,
55
"dependencies": {
66
"@babel/standalone": "^7.25.6",
7-
"@codingapi/flow-mobile": "^0.0.3",
8-
"@codingapi/form-mobile": "^0.0.3",
9-
"@codingapi/ui-framework": "^0.0.12",
7+
"@codingapi/flow-mobile": "^0.0.17",
8+
"@codingapi/form-mobile": "^0.0.17",
9+
"@codingapi/ui-framework": "^0.0.17",
1010
"@logicflow/core": "^2.0.10",
1111
"@logicflow/extension": "^2.0.14",
1212
"@reduxjs/toolkit": "^2.2.7",

0 commit comments

Comments
 (0)