@teamix/pro 1.1.6 → 1.1.7
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 +97 -0
- package/dist/pro.css +1 -1
- package/dist/pro.js +288 -385
- package/dist/pro.min.css +1 -1
- package/dist/pro.min.js +1 -1
- package/dist/pro.min.js.LICENSE.txt +1 -1
- package/es/form/ProForm/index.scss +7 -1
- package/es/form/SchemaForm/index.js +3 -2
- package/es/form/SchemaForm/initializeArrayCards.js +10 -55
- package/es/form/SchemaForm/initializeArrayCollapse.js +10 -64
- package/es/form/SchemaForm/initializeArrayIcon.js +13 -6
- package/es/form/SchemaForm/initializeArrayItems.js +16 -75
- package/es/form/SchemaForm/initializeArrayTable.js +23 -33
- package/es/form/typing.d.ts +2 -5
- package/es/index.d.ts +1 -1
- package/es/index.js +1 -1
- package/es/info/components/FormItem/index.js +4 -4
- package/es/info/components/FormItem/index.scss +11 -0
- package/es/info/components/InfoValueItem/index.js +12 -1
- package/es/info/components/baseInfo/index.js +3 -4
- package/es/info/components/headerInfo/index.js +3 -4
- package/es/info/components/tableInfo/index.js +4 -3
- package/es/info/components/tableInfo/index.scss +1 -1
- package/es/info/index.scss +4 -0
- package/es/info/typing.d.ts +1 -1
- package/es/info/utils/index.d.ts +8 -1
- package/es/info/utils/index.js +18 -1
- package/es/nocode/configurators/PageHeader.js +49 -43
- package/es/nocode/configurators/ProTable.js +12 -9
- package/es/nocode/configurators/common.d.ts +117 -105
- package/es/nocode/configurators/common.js +38 -34
- package/es/table/components/Filter/index.js +8 -16
- package/lib/form/ProForm/index.scss +7 -1
- package/lib/form/SchemaForm/index.js +3 -2
- package/lib/form/SchemaForm/initializeArrayCards.js +10 -54
- package/lib/form/SchemaForm/initializeArrayCollapse.js +10 -63
- package/lib/form/SchemaForm/initializeArrayIcon.js +13 -6
- package/lib/form/SchemaForm/initializeArrayItems.js +16 -74
- package/lib/form/SchemaForm/initializeArrayTable.js +23 -33
- package/lib/form/typing.d.ts +2 -5
- package/lib/index.d.ts +1 -1
- package/lib/index.js +1 -1
- package/lib/info/components/FormItem/index.js +4 -4
- package/lib/info/components/FormItem/index.scss +11 -0
- package/lib/info/components/InfoValueItem/index.js +12 -1
- package/lib/info/components/baseInfo/index.js +4 -6
- package/lib/info/components/headerInfo/index.js +6 -8
- package/lib/info/components/tableInfo/index.js +4 -2
- package/lib/info/components/tableInfo/index.scss +1 -1
- package/lib/info/index.scss +4 -0
- package/lib/info/typing.d.ts +1 -1
- package/lib/info/utils/index.d.ts +8 -1
- package/lib/info/utils/index.js +21 -1
- package/lib/nocode/configurators/PageHeader.js +49 -43
- package/lib/nocode/configurators/ProTable.js +12 -9
- package/lib/nocode/configurators/common.d.ts +117 -105
- package/lib/nocode/configurators/common.js +38 -34
- package/lib/table/components/Filter/index.js +7 -15
- package/package.json +2 -2
@@ -21,9 +21,10 @@ import './index.scss';
|
|
21
21
|
import { Table } from '@alicloudfe/components';
|
22
22
|
import './index.scss';
|
23
23
|
import ProCard from '../../../card';
|
24
|
-
import {
|
24
|
+
import { LabelIconTip } from '@teamix/utils';
|
25
25
|
import InfoValueItem from '../InfoValueItem';
|
26
26
|
import { BaseSkeleton } from '../../..';
|
27
|
+
import { getDataIndexValue } from '../../utils';
|
27
28
|
|
28
29
|
var ProTableInfo = function ProTableInfo(props) {
|
29
30
|
var header = props.header,
|
@@ -89,7 +90,7 @@ var ProTableInfo = function ProTableInfo(props) {
|
|
89
90
|
}
|
90
91
|
|
91
92
|
var itemData = filterColumns.map(function (item, index) {
|
92
|
-
var _item$title, _item$valueType,
|
93
|
+
var _item$title, _item$valueType, _data;
|
93
94
|
|
94
95
|
var data = (_data = {}, _defineProperty(_data, "label_".concat(index), /*#__PURE__*/React.createElement(LabelIconTip, {
|
95
96
|
label: (_item$title = item === null || item === void 0 ? void 0 : item.title) !== null && _item$title !== void 0 ? _item$title : '',
|
@@ -97,7 +98,7 @@ var ProTableInfo = function ProTableInfo(props) {
|
|
97
98
|
icon: item.tooltipIcon
|
98
99
|
})), _defineProperty(_data, "value_".concat(index), /*#__PURE__*/React.createElement(React.Fragment, null, loading && /*#__PURE__*/React.createElement(BaseSkeleton.Info, null), !loading && /*#__PURE__*/React.createElement(InfoValueItem, {
|
99
100
|
type: (_item$valueType = item === null || item === void 0 ? void 0 : item.valueType) !== null && _item$valueType !== void 0 ? _item$valueType : 'text',
|
100
|
-
value:
|
101
|
+
value: getDataIndexValue(item.dataIndex, dataSource !== null && dataSource !== void 0 ? dataSource : result),
|
101
102
|
render: item.render,
|
102
103
|
dataSource: item.dataSource,
|
103
104
|
infoItem: item,
|
package/es/info/index.scss
CHANGED
package/es/info/typing.d.ts
CHANGED
package/es/info/utils/index.d.ts
CHANGED
@@ -1,5 +1,12 @@
|
|
1
1
|
import React from 'react';
|
2
|
-
import { ProInfoActionType, ProInfoGroupContextProps } from '../typing';
|
2
|
+
import { ProInfoActionType, ProInfoGroupContextProps, ProInfoItemProps } from '../typing';
|
3
3
|
export declare function useActionType<T>(ref: React.MutableRefObject<ProInfoActionType | undefined>, action: ProInfoActionType): void;
|
4
4
|
/** ProInfoGroupContext */
|
5
5
|
export declare const ProInfoGroupContext: React.Context<ProInfoGroupContextProps>;
|
6
|
+
/**
|
7
|
+
* 获取 dataIndex 值
|
8
|
+
* @param dataIndex
|
9
|
+
* @param dataSource
|
10
|
+
* @returns
|
11
|
+
*/
|
12
|
+
export declare function getDataIndexValue(dataIndex: ProInfoItemProps['dataIndex'], dataSource: object): any;
|
package/es/info/utils/index.js
CHANGED
@@ -4,6 +4,7 @@ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { va
|
|
4
4
|
|
5
5
|
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
6
6
|
|
7
|
+
import { getDeepValue } from '@teamix/utils';
|
7
8
|
import React from 'react';
|
8
9
|
export function useActionType(ref, action) {
|
9
10
|
// 合并自定义事件
|
@@ -13,4 +14,20 @@ export function useActionType(ref, action) {
|
|
13
14
|
}
|
14
15
|
/** ProInfoGroupContext */
|
15
16
|
|
16
|
-
export var ProInfoGroupContext = /*#__PURE__*/React.createContext({});
|
17
|
+
export var ProInfoGroupContext = /*#__PURE__*/React.createContext({});
|
18
|
+
/**
|
19
|
+
* 获取 dataIndex 值
|
20
|
+
* @param dataIndex
|
21
|
+
* @param dataSource
|
22
|
+
* @returns
|
23
|
+
*/
|
24
|
+
|
25
|
+
export function getDataIndexValue(dataIndex, dataSource) {
|
26
|
+
if (Array.isArray(dataIndex)) {
|
27
|
+
return dataIndex.map(function (item) {
|
28
|
+
return getDeepValue(item !== null && item !== void 0 ? item : '', dataSource);
|
29
|
+
});
|
30
|
+
}
|
31
|
+
|
32
|
+
return getDeepValue(dataIndex !== null && dataIndex !== void 0 ? dataIndex : '', dataSource);
|
33
|
+
}
|
@@ -103,34 +103,37 @@ var schema = [{
|
|
103
103
|
children: [{
|
104
104
|
name: 'tags',
|
105
105
|
component: 'ArrayTable',
|
106
|
-
items:
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
106
|
+
items: {
|
107
|
+
type: 'object',
|
108
|
+
children: [{
|
109
|
+
name: 'text',
|
110
|
+
title: '名称',
|
111
|
+
component: 'Input'
|
112
|
+
}, {
|
113
|
+
name: 'type',
|
114
|
+
title: '类型',
|
115
|
+
component: 'Select',
|
116
|
+
dataSource: [{
|
117
|
+
label: '普通',
|
118
|
+
value: 'normal'
|
119
|
+
}, {
|
120
|
+
label: '主要',
|
121
|
+
value: 'primary'
|
122
|
+
}]
|
123
|
+
}, {
|
124
|
+
name: 'color',
|
125
|
+
title: '颜色',
|
126
|
+
component: 'Input'
|
117
127
|
}, {
|
118
|
-
|
119
|
-
|
128
|
+
title: '操作',
|
129
|
+
component: 'ArrayTable.Remove',
|
130
|
+
decoratorProps: {
|
131
|
+
fixed: 'right',
|
132
|
+
width: 40
|
133
|
+
},
|
134
|
+
formItem: null
|
120
135
|
}]
|
121
|
-
},
|
122
|
-
name: 'color',
|
123
|
-
title: '颜色',
|
124
|
-
component: 'Input'
|
125
|
-
}, {
|
126
|
-
title: '操作',
|
127
|
-
component: 'ArrayTable.Remove',
|
128
|
-
decoratorProps: {
|
129
|
-
fixed: 'right',
|
130
|
-
width: 40
|
131
|
-
},
|
132
|
-
formItem: null
|
133
|
-
}],
|
136
|
+
},
|
134
137
|
children: [{
|
135
138
|
title: '添加标签'
|
136
139
|
}]
|
@@ -146,23 +149,26 @@ var schema = [{
|
|
146
149
|
children: [{
|
147
150
|
name: 'breadcrumb',
|
148
151
|
component: 'ArrayTable',
|
149
|
-
items:
|
150
|
-
|
151
|
-
|
152
|
-
|
153
|
-
|
154
|
-
|
155
|
-
|
156
|
-
|
157
|
-
|
158
|
-
|
159
|
-
|
160
|
-
|
161
|
-
|
162
|
-
|
163
|
-
|
164
|
-
|
165
|
-
|
152
|
+
items: {
|
153
|
+
type: 'object',
|
154
|
+
children: [{
|
155
|
+
name: 'text',
|
156
|
+
title: '名称',
|
157
|
+
component: 'Input'
|
158
|
+
}, {
|
159
|
+
name: 'link',
|
160
|
+
title: '链接',
|
161
|
+
component: 'Input'
|
162
|
+
}, {
|
163
|
+
title: '操作',
|
164
|
+
component: 'ArrayTable.Remove',
|
165
|
+
decoratorProps: {
|
166
|
+
fixed: 'right',
|
167
|
+
width: 40
|
168
|
+
},
|
169
|
+
formItem: null
|
170
|
+
}]
|
171
|
+
},
|
166
172
|
children: [{
|
167
173
|
title: '添加面包屑'
|
168
174
|
}]
|
@@ -133,16 +133,19 @@ var schema = [{
|
|
133
133
|
name: 'pageSizeList',
|
134
134
|
title: '分页大小列表',
|
135
135
|
component: 'ArrayItems',
|
136
|
-
|
137
|
-
|
136
|
+
items: {
|
137
|
+
component: 'FormFlex',
|
138
|
+
children: [{
|
139
|
+
component: 'ArrayItems.SortHandle'
|
140
|
+
}, {
|
141
|
+
component: 'NumberPicker',
|
142
|
+
decoratorProps: {
|
143
|
+
feedbackLayout: 'none'
|
144
|
+
}
|
145
|
+
}, {
|
146
|
+
component: 'ArrayItems.Remove'
|
147
|
+
}]
|
138
148
|
},
|
139
|
-
items: [{
|
140
|
-
component: 'ArrayItems.SortHandle'
|
141
|
-
}, {
|
142
|
-
component: 'NumberPicker'
|
143
|
-
}, {
|
144
|
-
component: 'ArrayItems.Remove'
|
145
|
-
}],
|
146
149
|
children: [{
|
147
150
|
title: '添加一条'
|
148
151
|
}],
|
@@ -4,53 +4,57 @@ export declare function array(title: string, name: string, fields: any[], main?:
|
|
4
4
|
name: string;
|
5
5
|
title: string | undefined;
|
6
6
|
component: string;
|
7
|
-
|
8
|
-
itemType: string;
|
9
|
-
};
|
10
|
-
items: ({
|
11
|
-
component: string;
|
12
|
-
children: {
|
13
|
-
component: string;
|
14
|
-
}[];
|
15
|
-
name?: undefined;
|
16
|
-
type?: undefined;
|
17
|
-
title?: undefined;
|
18
|
-
reactions?: undefined;
|
19
|
-
} | {
|
20
|
-
name: string;
|
21
|
-
component: string;
|
7
|
+
items: {
|
22
8
|
type: string;
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
9
|
+
decorator: string;
|
10
|
+
children: ({
|
11
|
+
component: string;
|
12
|
+
children: {
|
13
|
+
component: string;
|
14
|
+
}[];
|
15
|
+
name?: undefined;
|
16
|
+
type?: undefined;
|
17
|
+
title?: undefined;
|
18
|
+
reactions?: undefined;
|
19
|
+
} | {
|
33
20
|
name: string;
|
34
21
|
component: string;
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
22
|
+
type: string;
|
23
|
+
title: string;
|
24
|
+
reactions: {
|
25
|
+
dependencies: string[];
|
26
|
+
fulfill: {
|
27
|
+
schema: {
|
28
|
+
title: string;
|
29
|
+
};
|
30
|
+
};
|
41
31
|
};
|
42
|
-
children:
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
32
|
+
children: {
|
33
|
+
name: string;
|
34
|
+
component: string;
|
35
|
+
props: {
|
36
|
+
layout: string;
|
37
|
+
labelAlign: string;
|
38
|
+
colon: boolean;
|
39
|
+
labelCol: number;
|
40
|
+
wrapperCol: number;
|
41
|
+
};
|
42
|
+
children: any[];
|
43
|
+
}[];
|
44
|
+
} | {
|
45
|
+
component: string;
|
46
|
+
children?: undefined;
|
47
|
+
name?: undefined;
|
48
|
+
type?: undefined;
|
49
|
+
title?: undefined;
|
50
|
+
reactions?: undefined;
|
51
|
+
})[];
|
52
|
+
};
|
52
53
|
children: {
|
53
|
-
|
54
|
+
component: string;
|
55
|
+
props: {
|
56
|
+
title: string;
|
57
|
+
};
|
54
58
|
}[];
|
55
59
|
}[];
|
56
60
|
};
|
@@ -64,69 +68,10 @@ export declare function actions(props?: {
|
|
64
68
|
name: string;
|
65
69
|
title: string | undefined;
|
66
70
|
component: string;
|
67
|
-
|
68
|
-
itemType: string;
|
69
|
-
};
|
70
|
-
items: ({
|
71
|
-
component: string;
|
72
|
-
children: {
|
73
|
-
component: string;
|
74
|
-
}[];
|
75
|
-
name?: undefined;
|
76
|
-
type?: undefined;
|
77
|
-
title?: undefined;
|
78
|
-
reactions?: undefined;
|
79
|
-
} | {
|
80
|
-
name: string;
|
81
|
-
component: string;
|
71
|
+
items: {
|
82
72
|
type: string;
|
83
|
-
|
84
|
-
|
85
|
-
dependencies: string[];
|
86
|
-
fulfill: {
|
87
|
-
schema: {
|
88
|
-
title: string;
|
89
|
-
};
|
90
|
-
};
|
91
|
-
};
|
92
|
-
children: {
|
93
|
-
name: string;
|
94
|
-
component: string;
|
95
|
-
props: {
|
96
|
-
layout: string;
|
97
|
-
labelAlign: string;
|
98
|
-
colon: boolean;
|
99
|
-
labelCol: number;
|
100
|
-
wrapperCol: number;
|
101
|
-
};
|
102
|
-
children: any[];
|
103
|
-
}[];
|
104
|
-
} | {
|
105
|
-
component: string;
|
106
|
-
children?: undefined;
|
107
|
-
name?: undefined;
|
108
|
-
type?: undefined;
|
109
|
-
title?: undefined;
|
110
|
-
reactions?: undefined;
|
111
|
-
})[];
|
112
|
-
children: {
|
113
|
-
title: string;
|
114
|
-
}[];
|
115
|
-
}[];
|
116
|
-
};
|
117
|
-
export declare function filter(name: string): {
|
118
|
-
name: string;
|
119
|
-
type: string;
|
120
|
-
children: {
|
121
|
-
title: string;
|
122
|
-
children: {
|
123
|
-
name: string;
|
124
|
-
title: string | undefined;
|
125
|
-
component: string;
|
126
|
-
props: {
|
127
|
-
itemType: string;
|
128
|
-
};
|
129
|
-
items: ({
|
73
|
+
decorator: string;
|
74
|
+
children: ({
|
130
75
|
component: string;
|
131
76
|
children: {
|
132
77
|
component: string;
|
@@ -168,8 +113,75 @@ export declare function filter(name: string): {
|
|
168
113
|
title?: undefined;
|
169
114
|
reactions?: undefined;
|
170
115
|
})[];
|
171
|
-
|
116
|
+
};
|
117
|
+
children: {
|
118
|
+
component: string;
|
119
|
+
props: {
|
172
120
|
title: string;
|
121
|
+
};
|
122
|
+
}[];
|
123
|
+
}[];
|
124
|
+
};
|
125
|
+
export declare function filter(name: string): {
|
126
|
+
name: string;
|
127
|
+
type: string;
|
128
|
+
children: {
|
129
|
+
title: string;
|
130
|
+
children: {
|
131
|
+
name: string;
|
132
|
+
title: string | undefined;
|
133
|
+
component: string;
|
134
|
+
items: {
|
135
|
+
type: string;
|
136
|
+
decorator: string;
|
137
|
+
children: ({
|
138
|
+
component: string;
|
139
|
+
children: {
|
140
|
+
component: string;
|
141
|
+
}[];
|
142
|
+
name?: undefined;
|
143
|
+
type?: undefined;
|
144
|
+
title?: undefined;
|
145
|
+
reactions?: undefined;
|
146
|
+
} | {
|
147
|
+
name: string;
|
148
|
+
component: string;
|
149
|
+
type: string;
|
150
|
+
title: string;
|
151
|
+
reactions: {
|
152
|
+
dependencies: string[];
|
153
|
+
fulfill: {
|
154
|
+
schema: {
|
155
|
+
title: string;
|
156
|
+
};
|
157
|
+
};
|
158
|
+
};
|
159
|
+
children: {
|
160
|
+
name: string;
|
161
|
+
component: string;
|
162
|
+
props: {
|
163
|
+
layout: string;
|
164
|
+
labelAlign: string;
|
165
|
+
colon: boolean;
|
166
|
+
labelCol: number;
|
167
|
+
wrapperCol: number;
|
168
|
+
};
|
169
|
+
children: any[];
|
170
|
+
}[];
|
171
|
+
} | {
|
172
|
+
component: string;
|
173
|
+
children?: undefined;
|
174
|
+
name?: undefined;
|
175
|
+
type?: undefined;
|
176
|
+
title?: undefined;
|
177
|
+
reactions?: undefined;
|
178
|
+
})[];
|
179
|
+
};
|
180
|
+
children: {
|
181
|
+
component: string;
|
182
|
+
props: {
|
183
|
+
title: string;
|
184
|
+
};
|
173
185
|
}[];
|
174
186
|
}[];
|
175
187
|
}[];
|
@@ -5,46 +5,50 @@ export function array(title, name, fields, main, arrayTitle) {
|
|
5
5
|
name: name,
|
6
6
|
title: arrayTitle,
|
7
7
|
component: 'ArrayItems',
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
items: [{
|
12
|
-
component: 'FormFlex',
|
8
|
+
items: {
|
9
|
+
type: 'object',
|
10
|
+
decorator: 'ArrayItems.Item',
|
13
11
|
children: [{
|
14
|
-
component: '
|
12
|
+
component: 'FormFlex',
|
13
|
+
children: [{
|
14
|
+
component: 'ArrayItems.SortHandle'
|
15
|
+
}, {
|
16
|
+
component: 'ArrayItems.Index'
|
17
|
+
}]
|
15
18
|
}, {
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
schema: {
|
27
|
-
title: '{{$deps[0]}}'
|
19
|
+
name: 'drawer',
|
20
|
+
component: 'Editable.Drawer',
|
21
|
+
type: 'void',
|
22
|
+
title: '编辑详情',
|
23
|
+
reactions: {
|
24
|
+
dependencies: [".drawer.layout.".concat(main ? main : fields[0].name)],
|
25
|
+
fulfill: {
|
26
|
+
schema: {
|
27
|
+
title: '{{$deps[0]}}'
|
28
|
+
}
|
28
29
|
}
|
29
|
-
}
|
30
|
-
},
|
31
|
-
children: [{
|
32
|
-
name: 'layout',
|
33
|
-
component: 'FormLayout',
|
34
|
-
props: {
|
35
|
-
layout: 'vertical',
|
36
|
-
labelAlign: 'left',
|
37
|
-
colon: false,
|
38
|
-
labelCol: 24,
|
39
|
-
wrapperCol: 24
|
40
30
|
},
|
41
|
-
children:
|
31
|
+
children: [{
|
32
|
+
name: 'layout',
|
33
|
+
component: 'FormLayout',
|
34
|
+
props: {
|
35
|
+
layout: 'vertical',
|
36
|
+
labelAlign: 'left',
|
37
|
+
colon: false,
|
38
|
+
labelCol: 24,
|
39
|
+
wrapperCol: 24
|
40
|
+
},
|
41
|
+
children: fields
|
42
|
+
}]
|
43
|
+
}, {
|
44
|
+
component: 'ArrayItems.Remove'
|
42
45
|
}]
|
43
|
-
},
|
44
|
-
component: 'ArrayItems.Remove'
|
45
|
-
}],
|
46
|
+
},
|
46
47
|
children: [{
|
47
|
-
|
48
|
+
component: 'ArrayItems.Addition',
|
49
|
+
props: {
|
50
|
+
title: '添加一条'
|
51
|
+
}
|
48
52
|
}]
|
49
53
|
}]
|
50
54
|
};
|
@@ -26,12 +26,12 @@ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
26
26
|
|
27
27
|
import React, { useEffect, useMemo, useState } from 'react';
|
28
28
|
import TeamixIcon from '@teamix/icon';
|
29
|
-
import { Button, Dropdown, Menu
|
29
|
+
import { Button, Dropdown, Menu } from '@alicloudfe/components';
|
30
30
|
import { baseClass } from '@teamix/utils';
|
31
31
|
import './index.scss';
|
32
32
|
var CheckboxItem = Menu.CheckboxItem;
|
33
33
|
var cls = baseClass('teamix-pro-table-toolbar-filter');
|
34
|
-
var
|
34
|
+
var RadioItem = Menu.RadioItem;
|
35
35
|
|
36
36
|
var Filter = function Filter(props) {
|
37
37
|
var column = props.column,
|
@@ -85,27 +85,19 @@ var Filter = function Filter(props) {
|
|
85
85
|
}, []); // 渲染单选
|
86
86
|
|
87
87
|
var renderSingle = function renderSingle() {
|
88
|
-
|
89
|
-
|
90
|
-
return /*#__PURE__*/React.createElement(RadioGroup, {
|
91
|
-
value: (_selected$ = selected === null || selected === void 0 ? void 0 : selected[0]) !== null && _selected$ !== void 0 ? _selected$ : '',
|
92
|
-
onChange: function onChange(check) {
|
93
|
-
setSelected([check]);
|
94
|
-
}
|
95
|
-
}, filters === null || filters === void 0 ? void 0 : filters.map(function (_ref3) {
|
88
|
+
return filters === null || filters === void 0 ? void 0 : filters.map(function (_ref3) {
|
96
89
|
var label = _ref3.label,
|
97
90
|
value = _ref3.value;
|
98
91
|
var valueStr = value.toString();
|
99
|
-
return /*#__PURE__*/React.createElement(
|
92
|
+
return /*#__PURE__*/React.createElement(RadioItem, {
|
100
93
|
id: valueStr,
|
101
|
-
|
94
|
+
checked: selected.includes(valueStr),
|
102
95
|
key: valueStr,
|
103
|
-
|
104
|
-
|
105
|
-
marginLeft: '5px'
|
96
|
+
onChange: function onChange(check) {
|
97
|
+
setSelected([valueStr]);
|
106
98
|
}
|
107
99
|
}, label);
|
108
|
-
})
|
100
|
+
});
|
109
101
|
}; // 渲染多选
|
110
102
|
|
111
103
|
|
@@ -37,9 +37,13 @@ $form-item-cls: #{$css-prefix}formily-item;
|
|
37
37
|
> .teamix-pro-field-checkbox,
|
38
38
|
.teamix-pro-field-radio,
|
39
39
|
.teamix-pro-field-switch,
|
40
|
-
.teamix-pro-field-colorradio
|
40
|
+
.teamix-pro-field-colorradio,
|
41
|
+
.#{$css-prefix}btn-text {
|
41
42
|
line-height: var(--form-element-medium-height, 32px);
|
42
43
|
}
|
44
|
+
> .#{$css-prefix}btn-text {
|
45
|
+
width: auto;
|
46
|
+
}
|
43
47
|
}
|
44
48
|
}
|
45
49
|
}
|
@@ -93,9 +97,11 @@ $form-item-cls: #{$css-prefix}formily-item;
|
|
93
97
|
.#{$form-item-cls}-control-content {
|
94
98
|
.#{$form-item-cls}-addon-before {
|
95
99
|
margin-right: 16px;
|
100
|
+
color: var(--color-text1-8, #848484);
|
96
101
|
}
|
97
102
|
.#{$form-item-cls}-addon-after {
|
98
103
|
margin-left: 16px;
|
104
|
+
color: var(--color-text1-8, #848484);
|
99
105
|
}
|
100
106
|
}
|
101
107
|
}
|
@@ -277,9 +277,10 @@ var _default = /*#__PURE__*/(0, _react.memo)(function (_ref) {
|
|
277
277
|
|
278
278
|
var recursiveProperties = (children === null || children === void 0 ? void 0 : children.length) ? {
|
279
279
|
properties: formatSchema(children)
|
280
|
-
} : {}; // 递归items
|
280
|
+
} : {}; // 递归items(类似子组件,会先由各initialize方法格式化为固定形式,type不同不统一处理)
|
281
|
+
// 例如:[{ name: 'items', type: 'object', children: items }]
|
281
282
|
|
282
|
-
var recursiveItems = items ? formatSchema(items) : {}; // 配置组件属性
|
283
|
+
var recursiveItems = items ? formatSchema([items]) : {}; // 配置组件属性
|
283
284
|
|
284
285
|
schemaProperties[name] = _objectSpread(_objectSpread(_objectSpread(_objectSpread({}, otherProps), formatParam), recursiveProperties), recursiveItems);
|
285
286
|
});
|