cfel-base-components 0.0.22 → 0.0.23
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/demo/src/index.jsx +2 -2
- package/package.json +1 -1
- package/src/components/account/index.tsx +12 -6
- package/src/components/role/index.tsx +11 -6
package/README.md
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
<!-- npm run dev
|
|
2
|
-
npm
|
|
2
|
+
npm publish -->
|
package/demo/src/index.jsx
CHANGED
package/package.json
CHANGED
|
@@ -12,9 +12,13 @@ import { accountPage } from "./api"
|
|
|
12
12
|
|
|
13
13
|
import "./index.scss"
|
|
14
14
|
|
|
15
|
+
export interface AccountProps {
|
|
16
|
+
historyAction: any;
|
|
17
|
+
}
|
|
15
18
|
|
|
16
|
-
|
|
17
|
-
|
|
19
|
+
export default function Account({
|
|
20
|
+
historyAction
|
|
21
|
+
}:AccountProps) {
|
|
18
22
|
const searchFormRef: any = useRef()
|
|
19
23
|
|
|
20
24
|
useEffect(() => {
|
|
@@ -85,12 +89,14 @@ export default function Account() {
|
|
|
85
89
|
fixed: 'right',
|
|
86
90
|
width: 80,
|
|
87
91
|
render: (rowdata: any) => (
|
|
88
|
-
|
|
92
|
+
|
|
93
|
+
<Space>
|
|
89
94
|
<a
|
|
90
95
|
onClick={() => {
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
96
|
+
historyAction?.push({
|
|
97
|
+
pathname: `/account-info`,
|
|
98
|
+
search: `?id=${rowdata.id}`,
|
|
99
|
+
});
|
|
94
100
|
}}
|
|
95
101
|
>
|
|
96
102
|
配置
|
|
@@ -13,9 +13,13 @@ import { ProFormText, } from '@ant-design/pro-components';
|
|
|
13
13
|
import { timeFormatter } from '../../utils';
|
|
14
14
|
|
|
15
15
|
import "./index.scss"
|
|
16
|
+
export interface RoleProps {
|
|
17
|
+
historyAction: any;
|
|
18
|
+
}
|
|
16
19
|
|
|
17
|
-
|
|
18
|
-
|
|
20
|
+
export default function Role({
|
|
21
|
+
historyAction
|
|
22
|
+
}:RoleProps) {
|
|
19
23
|
const searchFormRef: any = useRef()
|
|
20
24
|
|
|
21
25
|
useEffect(() => {
|
|
@@ -63,10 +67,11 @@ export default function Role() {
|
|
|
63
67
|
width: 80,
|
|
64
68
|
fixed: "right",
|
|
65
69
|
render: (rowdata: any,) => <Space>
|
|
66
|
-
<a
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
+
<a onClick={() => {
|
|
71
|
+
historyAction?.push({
|
|
72
|
+
pathname: `/role-info`,
|
|
73
|
+
search: `?roleCode=${rowdata.roleCode}`,
|
|
74
|
+
});
|
|
70
75
|
}}>赋予账号</a>
|
|
71
76
|
</Space>
|
|
72
77
|
},
|