@jetlinks-web/components 3.0.1-rc → 3.0.1
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/es/AutoComplete/AutoComplete.js +13 -9
- package/es/BadgeStatus/Badge.js +1 -2
- package/es/BadgeStatus/color.js +3 -3
- package/es/CardSelect/CardSelect.js +23 -13
- package/es/CardSelect/style/index.js +25 -1
- package/es/CheckButton/CheckButton.js +12 -4
- package/es/CheckButton/style/index.js +41 -1
- package/es/DragModal/DragModal.js +14 -8
- package/es/DragModal/style/index.js +64 -1
- package/es/EditTable/Body.js +10 -3
- package/es/EditTable/EditTable.js +13 -7
- package/es/EditTable/FormItem.js +18 -19
- package/es/EditTable/Header.js +16 -6
- package/es/EditTable/components/ContextMenu/Menu.js +11 -5
- package/es/EditTable/components/Search/search.js +1 -2
- package/es/EditTable/components/Search/sort.js +1 -3
- package/es/EditTable/group.js +23 -18
- package/es/EditTable/hooks/useValidate.js +1 -1
- package/es/EditTable/style/body.js +53 -0
- package/es/EditTable/style/form.js +24 -0
- package/es/EditTable/style/group.js +25 -0
- package/es/EditTable/style/header.js +58 -0
- package/es/EditTable/style/index.js +42 -1
- package/es/EditTable/style/menu.js +27 -0
- package/es/EditTable/style/table.js +46 -0
- package/es/EditTable/utils.js +30 -3
- package/es/Ellipsis/Ellipsis.js +10 -2
- package/es/Ellipsis/style/index.js +24 -1
- package/es/FullPage/FullPage.js +1 -2
- package/es/LocaleProvider/index.js +1 -2
- package/es/PermissionButton/index.js +6 -7
- package/es/ProLayout/Basic/BasicLayout.js +45 -41
- package/es/ProLayout/Basic/BasicLayoutStyle.js +39 -0
- package/es/ProLayout/Basic/Header.js +3 -7
- package/es/ProLayout/Basic/HeaderStyle.js +10 -0
- package/es/ProLayout/PageContainer/index.js +21 -17
- package/es/ProLayout/PageContainer/style.js +46 -0
- package/es/ProLayout/SiderMenu/BaseMenu.js +18 -42
- package/es/ProLayout/SiderMenu/SiderMenu.js +24 -36
- package/es/ProLayout/SiderMenu/style.js +166 -0
- package/es/ProLayout/TopHeader/index.js +13 -12
- package/es/ProLayout/TopHeader/style.js +126 -0
- package/es/ProLayout/style/index.js +7 -1
- package/es/ProLayout/util.js +5 -5
- package/es/ProTable/Alert.js +12 -4
- package/es/ProTable/Content.js +108 -28
- package/es/ProTable/Header.js +21 -11
- package/es/ProTable/Pagination.js +12 -4
- package/es/ProTable/ProTable.js +46 -34
- package/es/ProTable/hooks/index.js +2 -0
- package/es/ProTable/hooks/useTableInject.js +5 -0
- package/es/ProTable/hooks/useTableSelection.js +95 -0
- package/es/ProTable/setting.js +1 -1
- package/es/ProTable/style/index.js +109 -1
- package/es/RadioButton/RadioButton.js +10 -4
- package/es/RadioButton/style/index.js +23 -1
- package/es/Scrollbar/Scrollbar.js +10 -3
- package/es/Scrollbar/Thumb.js +36 -25
- package/es/Scrollbar/style/index.js +63 -1
- package/es/Search/Advanced/History.js +23 -16
- package/es/Search/Advanced/SaveHistory.js +1 -2
- package/es/Search/Advanced/index.js +212 -292
- package/es/Search/Item.js +175 -415
- package/es/Search/Search.js +78 -172
- package/es/Search/hooks/index.js +108 -1
- package/es/Search/hooks/useRouteQuery.js +57 -0
- package/es/Search/setting.js +132 -14
- package/es/Search/style/index.js +4 -2
- package/es/Search/style/item.js +28 -0
- package/es/Search/style/search.js +133 -0
- package/es/Search/util.js +116 -124
- package/es/Skeleton/components/DashBoardCard.js +19 -12
- package/es/Skeleton/components/DashBoardChart.js +48 -45
- package/es/Skeleton/components/Detail.js +27 -21
- package/es/Skeleton/components/Drawer.js +23 -14
- package/es/Skeleton/components/Item.js +9 -1
- package/es/Skeleton/components/List.js +0 -1
- package/es/Skeleton/components/ListCard.js +20 -13
- package/es/Skeleton/components/ListCardItem.js +12 -13
- package/es/Skeleton/components/ListTable.js +19 -10
- package/es/Skeleton/components/Page.js +0 -1
- package/es/Skeleton/components/Tree.js +21 -14
- package/es/Skeleton/skeleton.js +17 -8
- package/es/Skeleton/style/index.js +132 -1
- package/es/Title/style/index.js +29 -1
- package/es/Title/title.js +13 -5
- package/es/ValueItem/ValueItem.js +44 -39
- package/es/components.js +1 -5
- package/es/locale/en-US.js +3 -7
- package/es/locale/zh-CN.js +3 -7
- package/es/style/index.js +0 -3
- package/es/style/styleRegister.js +21 -0
- package/es/style/variable.js +4 -0
- package/es/style.js +0 -13
- package/lib/AutoComplete/AutoComplete.js +13 -9
- package/lib/BadgeStatus/Badge.js +1 -2
- package/lib/BadgeStatus/color.js +3 -3
- package/lib/CardSelect/CardSelect.js +23 -13
- package/lib/CardSelect/style/index.js +30 -1
- package/lib/CheckButton/CheckButton.js +12 -4
- package/lib/CheckButton/style/index.js +46 -1
- package/lib/DragModal/DragModal.js +14 -8
- package/lib/DragModal/style/index.js +69 -1
- package/lib/EditTable/Body.js +10 -3
- package/lib/EditTable/EditTable.js +13 -7
- package/lib/EditTable/FormItem.js +18 -19
- package/lib/EditTable/Header.js +16 -6
- package/lib/EditTable/components/ContextMenu/Menu.js +11 -5
- package/lib/EditTable/components/Search/search.js +1 -2
- package/lib/EditTable/components/Search/sort.js +1 -3
- package/lib/EditTable/group.js +23 -18
- package/lib/EditTable/hooks/useValidate.js +1 -1
- package/lib/EditTable/style/body.js +60 -0
- package/lib/EditTable/style/form.js +31 -0
- package/lib/EditTable/style/group.js +32 -0
- package/lib/EditTable/style/header.js +65 -0
- package/lib/EditTable/style/index.js +47 -1
- package/lib/EditTable/style/menu.js +33 -0
- package/lib/EditTable/style/table.js +52 -0
- package/lib/EditTable/utils.js +31 -3
- package/lib/Ellipsis/Ellipsis.js +10 -2
- package/lib/Ellipsis/style/index.js +29 -1
- package/lib/FullPage/FullPage.js +1 -2
- package/lib/Icon/icon.js +1 -2
- package/lib/LocaleProvider/index.js +1 -2
- package/lib/PermissionButton/index.js +6 -7
- package/lib/ProLayout/Basic/BasicLayout.js +45 -42
- package/lib/ProLayout/Basic/BasicLayoutStyle.js +46 -0
- package/lib/ProLayout/Basic/Header.js +2 -6
- package/lib/ProLayout/Basic/HeaderStyle.js +17 -0
- package/lib/ProLayout/PageContainer/index.js +19 -15
- package/lib/ProLayout/PageContainer/style.js +53 -0
- package/lib/ProLayout/SiderMenu/BaseMenu.js +19 -42
- package/lib/ProLayout/SiderMenu/SiderMenu.js +24 -37
- package/lib/ProLayout/SiderMenu/style.js +173 -0
- package/lib/ProLayout/TopHeader/index.js +14 -12
- package/lib/ProLayout/TopHeader/style.js +133 -0
- package/lib/ProLayout/style/index.js +12 -1
- package/lib/ProLayout/util.js +5 -5
- package/lib/ProTable/Alert.js +12 -4
- package/lib/ProTable/Content.js +108 -28
- package/lib/ProTable/Header.js +21 -11
- package/lib/ProTable/Pagination.js +12 -4
- package/lib/ProTable/ProTable.js +46 -34
- package/lib/ProTable/hooks/index.js +27 -0
- package/lib/ProTable/hooks/useTableInject.js +11 -0
- package/lib/ProTable/hooks/useTableSelection.js +102 -0
- package/lib/ProTable/setting.js +1 -1
- package/lib/ProTable/style/index.js +114 -1
- package/lib/RadioButton/RadioButton.js +10 -4
- package/lib/RadioButton/style/index.js +28 -1
- package/lib/Scrollbar/Scrollbar.js +10 -3
- package/lib/Scrollbar/Thumb.js +36 -25
- package/lib/Scrollbar/style/index.js +68 -1
- package/lib/Search/Advanced/History.js +23 -16
- package/lib/Search/Advanced/SaveHistory.js +1 -2
- package/lib/Search/Advanced/index.js +212 -292
- package/lib/Search/Item.js +175 -415
- package/lib/Search/Search.js +78 -172
- package/lib/Search/hooks/index.js +130 -1
- package/lib/Search/hooks/useRouteQuery.js +64 -0
- package/lib/Search/setting.js +133 -15
- package/lib/Search/style/index.js +9 -2
- package/lib/Search/style/item.js +35 -0
- package/lib/Search/style/search.js +140 -0
- package/lib/Search/util.js +116 -124
- package/lib/Skeleton/components/DashBoardCard.js +19 -12
- package/lib/Skeleton/components/DashBoardChart.js +48 -45
- package/lib/Skeleton/components/Detail.js +27 -21
- package/lib/Skeleton/components/Drawer.js +23 -14
- package/lib/Skeleton/components/Item.js +9 -1
- package/lib/Skeleton/components/List.js +0 -1
- package/lib/Skeleton/components/ListCard.js +20 -13
- package/lib/Skeleton/components/ListCardItem.js +12 -13
- package/lib/Skeleton/components/ListTable.js +19 -10
- package/lib/Skeleton/components/Page.js +0 -1
- package/lib/Skeleton/components/Tree.js +21 -14
- package/lib/Skeleton/skeleton.js +17 -8
- package/lib/Skeleton/style/index.js +137 -1
- package/lib/Title/style/index.js +34 -1
- package/lib/Title/title.js +13 -5
- package/lib/ValueItem/ValueItem.js +44 -39
- package/lib/components.js +1 -30
- package/lib/index.js +1 -2
- package/lib/locale/en-US.js +3 -7
- package/lib/locale/zh-CN.js +3 -7
- package/lib/style/components.less +0 -1
- package/lib/style/index.js +1 -4
- package/lib/style/styleRegister.js +28 -0
- package/lib/style/variable.js +10 -0
- package/lib/style.js +1 -15
- package/package.json +170 -173
- package/es/AMap/Map.js +0 -133
- package/es/AMap/index.js +0 -5
- package/es/AMap/util.js +0 -56
- package/es/CardSelect/style/index.css +0 -24
- package/es/CardSelect/style/index.less +0 -26
- package/es/CheckButton/style/index.css +0 -37
- package/es/CheckButton/style/index.less +0 -40
- package/es/DragModal/style/index.css +0 -82
- package/es/DragModal/style/index.less +0 -97
- package/es/Echarts/Echarts.js +0 -48
- package/es/Echarts/index.js +0 -5
- package/es/EditTable/style/body.less +0 -66
- package/es/EditTable/style/form.less +0 -33
- package/es/EditTable/style/group.less +0 -32
- package/es/EditTable/style/header.less +0 -77
- package/es/EditTable/style/index.css +0 -267
- package/es/EditTable/style/index.less +0 -41
- package/es/EditTable/style/menu.less +0 -25
- package/es/EditTable/style/table.less +0 -47
- package/es/Ellipsis/style/index.css +0 -17
- package/es/Ellipsis/style/index.less +0 -20
- package/es/FlameGraph/FlameGraph.js +0 -136
- package/es/FlameGraph/index.js +0 -5
- package/es/FlameGraph/style/index.css +0 -43
- package/es/FlameGraph/style/index.js +0 -1
- package/es/FlameGraph/style/index.less +0 -52
- package/es/ProLayout/Basic/BasicLayout.less +0 -66
- package/es/ProLayout/Basic/Header.less +0 -8
- package/es/ProLayout/PageContainer/index.less +0 -103
- package/es/ProLayout/SiderMenu/index.less +0 -231
- package/es/ProLayout/TopHeader/index.less +0 -174
- package/es/ProLayout/style/default.less +0 -4
- package/es/ProLayout/style/style.less +0 -7
- package/es/ProTable/style/ProTable.less +0 -139
- package/es/RadioButton/style/index.css +0 -20
- package/es/RadioButton/style/index.less +0 -19
- package/es/Scrollbar/style/index.css +0 -65
- package/es/Scrollbar/style/index.less +0 -83
- package/es/Search/style/Item.less +0 -33
- package/es/Search/style/Search.less +0 -179
- package/es/Skeleton/style/Skeleton.less +0 -166
- package/es/Title/style/index.css +0 -27
- package/es/Title/style/index.less +0 -27
- package/es/style/index.css +0 -5375
- package/es/style/index.less +0 -14
- package/es/style/variable.css +0 -4
- package/es/style/variable.less +0 -4
- package/lib/AMap/Map.js +0 -133
- package/lib/AMap/index.js +0 -12
- package/lib/AMap/util.js +0 -62
- package/lib/CardSelect/style/index.css +0 -24
- package/lib/CardSelect/style/index.less +0 -26
- package/lib/CheckButton/style/index.css +0 -37
- package/lib/CheckButton/style/index.less +0 -40
- package/lib/DragModal/style/index.css +0 -82
- package/lib/DragModal/style/index.less +0 -97
- package/lib/Echarts/Echarts.js +0 -48
- package/lib/Echarts/index.js +0 -12
- package/lib/EditTable/style/body.less +0 -66
- package/lib/EditTable/style/form.less +0 -33
- package/lib/EditTable/style/group.less +0 -32
- package/lib/EditTable/style/header.less +0 -77
- package/lib/EditTable/style/index.css +0 -267
- package/lib/EditTable/style/index.less +0 -41
- package/lib/EditTable/style/menu.less +0 -25
- package/lib/EditTable/style/table.less +0 -47
- package/lib/Ellipsis/style/index.css +0 -17
- package/lib/Ellipsis/style/index.less +0 -20
- package/lib/FlameGraph/FlameGraph.js +0 -136
- package/lib/FlameGraph/index.js +0 -12
- package/lib/FlameGraph/style/index.css +0 -43
- package/lib/FlameGraph/style/index.js +0 -3
- package/lib/FlameGraph/style/index.less +0 -52
- package/lib/ProLayout/Basic/BasicLayout.less +0 -66
- package/lib/ProLayout/Basic/Header.less +0 -8
- package/lib/ProLayout/PageContainer/index.less +0 -103
- package/lib/ProLayout/SiderMenu/index.less +0 -231
- package/lib/ProLayout/TopHeader/index.less +0 -174
- package/lib/ProLayout/style/default.less +0 -4
- package/lib/ProLayout/style/style.less +0 -7
- package/lib/ProTable/style/ProTable.less +0 -139
- package/lib/RadioButton/style/index.css +0 -20
- package/lib/RadioButton/style/index.less +0 -19
- package/lib/Scrollbar/style/index.css +0 -65
- package/lib/Scrollbar/style/index.less +0 -83
- package/lib/Search/style/Item.less +0 -33
- package/lib/Search/style/Search.less +0 -179
- package/lib/Skeleton/style/Skeleton.less +0 -166
- package/lib/Title/style/index.css +0 -27
- package/lib/Title/style/index.less +0 -27
- package/lib/style/index.css +0 -5375
- package/lib/style/index.less +0 -14
- package/lib/style/variable.css +0 -4
- package/lib/style/variable.less +0 -4
package/lib/Search/setting.js
CHANGED
|
@@ -3,22 +3,47 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.typeOptions = exports.termType = exports.optionsMapKey = exports.componentType = exports.
|
|
7
|
-
require("vue");
|
|
8
|
-
require("./
|
|
6
|
+
exports.typeOptions = exports.termType = exports.searchProps = exports.optionsMapKey = exports.componentType = exports.componentProps = exports.TermTypeMap = void 0;
|
|
7
|
+
var _antDesignVue = require("ant-design-vue");
|
|
8
|
+
var _util = require("./util");
|
|
9
9
|
var optionsMapKey = exports.optionsMapKey = Symbol('searchOptionsMap');
|
|
10
|
-
var
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
type:
|
|
20
|
-
|
|
21
|
-
|
|
10
|
+
var searchProps = exports.searchProps = function searchProps() {
|
|
11
|
+
return {
|
|
12
|
+
columns: {
|
|
13
|
+
type: Array,
|
|
14
|
+
default: function _default() {
|
|
15
|
+
return [];
|
|
16
|
+
},
|
|
17
|
+
required: true
|
|
18
|
+
},
|
|
19
|
+
type: {
|
|
20
|
+
type: String,
|
|
21
|
+
default: 'terms',
|
|
22
|
+
required: true
|
|
23
|
+
},
|
|
24
|
+
mode: {
|
|
25
|
+
type: String,
|
|
26
|
+
default: 'default'
|
|
27
|
+
},
|
|
28
|
+
column: {
|
|
29
|
+
type: Number,
|
|
30
|
+
default: 4
|
|
31
|
+
},
|
|
32
|
+
labelWidth: {
|
|
33
|
+
type: Number,
|
|
34
|
+
default: 40
|
|
35
|
+
},
|
|
36
|
+
resetText: {
|
|
37
|
+
type: String
|
|
38
|
+
},
|
|
39
|
+
submitText: {
|
|
40
|
+
type: String
|
|
41
|
+
},
|
|
42
|
+
align: {
|
|
43
|
+
type: String,
|
|
44
|
+
default: 'value'
|
|
45
|
+
}
|
|
46
|
+
};
|
|
22
47
|
};
|
|
23
48
|
var typeOptions = exports.typeOptions = function typeOptions(locale) {
|
|
24
49
|
return [{
|
|
@@ -100,4 +125,97 @@ var componentType = exports.componentType = {
|
|
|
100
125
|
tree: 'tree',
|
|
101
126
|
select: 'select',
|
|
102
127
|
component: 'component'
|
|
128
|
+
};
|
|
129
|
+
var componentProps = exports.componentProps = function componentProps(record) {
|
|
130
|
+
var type = record.type;
|
|
131
|
+
switch (type) {
|
|
132
|
+
case 'string':
|
|
133
|
+
case componentType.input:
|
|
134
|
+
return {
|
|
135
|
+
type: type,
|
|
136
|
+
name: _antDesignVue.Input
|
|
137
|
+
};
|
|
138
|
+
case componentType.inputNumber:
|
|
139
|
+
return {
|
|
140
|
+
type: type,
|
|
141
|
+
name: _antDesignVue.InputNumber
|
|
142
|
+
};
|
|
143
|
+
case componentType.password:
|
|
144
|
+
return {
|
|
145
|
+
type: type,
|
|
146
|
+
name: _antDesignVue.InputPassword
|
|
147
|
+
};
|
|
148
|
+
case componentType.time:
|
|
149
|
+
return {
|
|
150
|
+
type: type,
|
|
151
|
+
name: _antDesignVue.TimePicker,
|
|
152
|
+
props: {
|
|
153
|
+
valueFormat: 'HH:mm:ss'
|
|
154
|
+
}
|
|
155
|
+
};
|
|
156
|
+
case componentType.date:
|
|
157
|
+
return {
|
|
158
|
+
type: type,
|
|
159
|
+
name: _antDesignVue.DatePicker,
|
|
160
|
+
props: {
|
|
161
|
+
valueFormat: 'YYYY-MM-DD HH:mm:ss'
|
|
162
|
+
}
|
|
163
|
+
};
|
|
164
|
+
case componentType.timeRange:
|
|
165
|
+
return {
|
|
166
|
+
type: type,
|
|
167
|
+
name: _antDesignVue.TimeRangePicker,
|
|
168
|
+
props: {
|
|
169
|
+
valueFormat: 'HH:mm:ss'
|
|
170
|
+
}
|
|
171
|
+
};
|
|
172
|
+
case componentType.rangePicker:
|
|
173
|
+
return {
|
|
174
|
+
type: type,
|
|
175
|
+
name: _antDesignVue.RangePicker,
|
|
176
|
+
props: {
|
|
177
|
+
valueFormat: 'YYYY-MM-DD HH:mm:ss',
|
|
178
|
+
showTime: true
|
|
179
|
+
}
|
|
180
|
+
};
|
|
181
|
+
case componentType.treeSelect:
|
|
182
|
+
return {
|
|
183
|
+
type: type,
|
|
184
|
+
name: _antDesignVue.TreeSelect,
|
|
185
|
+
props: {
|
|
186
|
+
showSearch: true,
|
|
187
|
+
height: 350,
|
|
188
|
+
fieldNames: {
|
|
189
|
+
label: 'name',
|
|
190
|
+
value: 'id'
|
|
191
|
+
},
|
|
192
|
+
filterTreeNode: function filterTreeNode(v, option) {
|
|
193
|
+
return (0, _util.filterTreeSelectNode)(v, option);
|
|
194
|
+
}
|
|
195
|
+
}
|
|
196
|
+
};
|
|
197
|
+
case componentType.select:
|
|
198
|
+
return {
|
|
199
|
+
type: type,
|
|
200
|
+
name: _antDesignVue.Select,
|
|
201
|
+
props: {
|
|
202
|
+
showSearch: true,
|
|
203
|
+
// mode: isBtw ? 'multiple' : 'combobox',
|
|
204
|
+
filterOption: function filterOption(v, option) {
|
|
205
|
+
return (0, _util.filterSelectNode)(v, option, 'label');
|
|
206
|
+
},
|
|
207
|
+
style: {
|
|
208
|
+
width: '100%',
|
|
209
|
+
minWidth: '80px'
|
|
210
|
+
}
|
|
211
|
+
}
|
|
212
|
+
};
|
|
213
|
+
case componentType.component:
|
|
214
|
+
return {
|
|
215
|
+
type: type,
|
|
216
|
+
name: record.components
|
|
217
|
+
};
|
|
218
|
+
default:
|
|
219
|
+
return {};
|
|
220
|
+
}
|
|
103
221
|
};
|
|
@@ -1,4 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
require("
|
|
4
|
-
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports.default = void 0;
|
|
8
|
+
var _styleRegister = _interopRequireDefault(require("../../style/styleRegister"));
|
|
9
|
+
var _search = require("./search");
|
|
10
|
+
var _item = require("./item");
|
|
11
|
+
var _default = exports.default = (0, _styleRegister.default)([_search.genSearchStyle, _item.genItemStyle]);
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports.genItemStyle = void 0;
|
|
8
|
+
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
9
|
+
var genItemStyle = exports.genItemStyle = function genItemStyle(config) {
|
|
10
|
+
var componentCls = config.componentCls;
|
|
11
|
+
return (0, _defineProperty2.default)({}, "".concat(componentCls, "-item"), (0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)({
|
|
12
|
+
display: 'flex',
|
|
13
|
+
gap: '16px',
|
|
14
|
+
alignItems: 'center'
|
|
15
|
+
}, "".concat(componentCls, "-item--type"), {
|
|
16
|
+
width: '90px',
|
|
17
|
+
minWidth: '0',
|
|
18
|
+
'> span': {
|
|
19
|
+
lineHeight: '34px',
|
|
20
|
+
fontWeight: 'bold'
|
|
21
|
+
}
|
|
22
|
+
}), "".concat(componentCls, "-item--column"), {
|
|
23
|
+
width: '130px',
|
|
24
|
+
minWidth: '0'
|
|
25
|
+
}), "".concat(componentCls, "-item--termType"), {
|
|
26
|
+
width: '110px',
|
|
27
|
+
minWidth: '0'
|
|
28
|
+
}), "".concat(componentCls, "-item--label"), {
|
|
29
|
+
minWidth: '40px'
|
|
30
|
+
}), "".concat(componentCls, "-item--value"), {
|
|
31
|
+
display: 'flex',
|
|
32
|
+
width: '0',
|
|
33
|
+
flexGrow: 1
|
|
34
|
+
}));
|
|
35
|
+
};
|
|
@@ -0,0 +1,140 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports.genSearchStyle = void 0;
|
|
8
|
+
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
9
|
+
var genSearchStyle = exports.genSearchStyle = function genSearchStyle(config) {
|
|
10
|
+
var componentCls = config.componentCls,
|
|
11
|
+
token = config.token;
|
|
12
|
+
return (0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)({}, "".concat(componentCls, "-warp"), (0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)({
|
|
13
|
+
padding: '24px',
|
|
14
|
+
backgroundColor: '#fff',
|
|
15
|
+
marginBottom: '24px',
|
|
16
|
+
'.pack-up': (0, _defineProperty2.default)({}, "".concat(componentCls, "-items"), {
|
|
17
|
+
flex: '1 1 auto',
|
|
18
|
+
'.left': {
|
|
19
|
+
minWidth: '380px',
|
|
20
|
+
maxWidth: '580px'
|
|
21
|
+
}
|
|
22
|
+
}),
|
|
23
|
+
'&.senior': (0, _defineProperty2.default)({}, "> ".concat(componentCls, "-content"), (0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)({
|
|
24
|
+
display: 'flex'
|
|
25
|
+
}, "".concat(componentCls, "-footer"), (0, _defineProperty2.default)({
|
|
26
|
+
display: 'flex',
|
|
27
|
+
gap: '64px',
|
|
28
|
+
position: 'relative',
|
|
29
|
+
'.more-btn': {
|
|
30
|
+
'.more-text': {
|
|
31
|
+
paddingRight: '24px'
|
|
32
|
+
},
|
|
33
|
+
'.more-icon': {
|
|
34
|
+
transition: 'transform 0.3s',
|
|
35
|
+
transform: 'rotateZ(90deg)',
|
|
36
|
+
fontSize: '14px',
|
|
37
|
+
'&.more-up': {
|
|
38
|
+
transform: 'rotateZ(-90deg)'
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
},
|
|
42
|
+
'&.expand': {
|
|
43
|
+
marginTop: '16px',
|
|
44
|
+
width: '100%',
|
|
45
|
+
justifyContent: 'space-between'
|
|
46
|
+
}
|
|
47
|
+
}, "".concat(componentCls, "-footer--btns"), {
|
|
48
|
+
display: 'flex',
|
|
49
|
+
gap: '12px'
|
|
50
|
+
})), '.items-expand', {
|
|
51
|
+
display: 'flex',
|
|
52
|
+
gap: '16px',
|
|
53
|
+
'.left,& .right': {
|
|
54
|
+
minWidth: 0,
|
|
55
|
+
flex: '1 1 0'
|
|
56
|
+
},
|
|
57
|
+
'.left-items, & .right-items': {
|
|
58
|
+
display: 'flex',
|
|
59
|
+
gap: '16px',
|
|
60
|
+
flexDirection: 'column'
|
|
61
|
+
},
|
|
62
|
+
'.center': {
|
|
63
|
+
display: 'flex',
|
|
64
|
+
flexDirection: 'column',
|
|
65
|
+
justifyContent: 'center'
|
|
66
|
+
},
|
|
67
|
+
'&.vertical': {
|
|
68
|
+
flexDirection: 'column',
|
|
69
|
+
'.center': {
|
|
70
|
+
flexDirection: 'row',
|
|
71
|
+
justifyContent: 'center'
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
}), '&.senior-expand', {
|
|
75
|
+
flexDirection: 'column'
|
|
76
|
+
}), '&.small', (0, _defineProperty2.default)({
|
|
77
|
+
gap: '12px'
|
|
78
|
+
}, "".concat(componentCls, "-footre"), {
|
|
79
|
+
gap: '4px'
|
|
80
|
+
})))
|
|
81
|
+
}, "".concat(componentCls, "-content"), {
|
|
82
|
+
'&.simple': (0, _defineProperty2.default)((0, _defineProperty2.default)({}, "".concat(componentCls, "-footer--btns"), {
|
|
83
|
+
display: 'flex'
|
|
84
|
+
}), "".concat(componentCls, "-item"), (0, _defineProperty2.default)({
|
|
85
|
+
gap: '8px'
|
|
86
|
+
}, "".concat(componentCls, "-item--label"), {
|
|
87
|
+
textAlign: 'right'
|
|
88
|
+
}))
|
|
89
|
+
}), '.no-radius', {
|
|
90
|
+
borderRadius: 0,
|
|
91
|
+
borderColor: '#f1f1f1'
|
|
92
|
+
}), '.search-history-warp', {
|
|
93
|
+
position: 'relative',
|
|
94
|
+
'.search-history-button': {
|
|
95
|
+
paddingRight: '32px'
|
|
96
|
+
},
|
|
97
|
+
'.search-history-button-icon': {
|
|
98
|
+
position: 'absolute',
|
|
99
|
+
width: '24px',
|
|
100
|
+
height: '18px',
|
|
101
|
+
right: '6px',
|
|
102
|
+
top: '8px',
|
|
103
|
+
color: '#fff',
|
|
104
|
+
lineHeight: '18px',
|
|
105
|
+
textAlign: 'center',
|
|
106
|
+
fontWeight: 'bold',
|
|
107
|
+
'> span': {
|
|
108
|
+
fontSize: '14px'
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
})), '.search-history-empty', {
|
|
112
|
+
padding: '12px 12px 6px 12px',
|
|
113
|
+
backgroundColor: '#fff'
|
|
114
|
+
}), '.search-history-items', {
|
|
115
|
+
width: '120px',
|
|
116
|
+
maxHeight: '300px',
|
|
117
|
+
overflowY: 'auto',
|
|
118
|
+
'.search-history-item': {
|
|
119
|
+
display: 'flex',
|
|
120
|
+
padding: '4px 0px 4px 4px',
|
|
121
|
+
alignItems: 'center',
|
|
122
|
+
gap: '4px',
|
|
123
|
+
'&:hover': {
|
|
124
|
+
backgroundColor: '#f1f1f1'
|
|
125
|
+
},
|
|
126
|
+
'.history-item--title': {
|
|
127
|
+
width: 'calc(100% - 30px)',
|
|
128
|
+
cursor: 'pointer'
|
|
129
|
+
},
|
|
130
|
+
'.delete': {
|
|
131
|
+
padding: '0 6px',
|
|
132
|
+
flex: '0 0 28px'
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
}), '.search-history-list-pop', {
|
|
136
|
+
'.ant-popover-inner-content': {
|
|
137
|
+
padding: 0
|
|
138
|
+
}
|
|
139
|
+
});
|
|
140
|
+
};
|
package/lib/Search/util.js
CHANGED
|
@@ -4,12 +4,11 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
|
|
|
4
4
|
Object.defineProperty(exports, "__esModule", {
|
|
5
5
|
value: true
|
|
6
6
|
});
|
|
7
|
-
exports.
|
|
8
|
-
var
|
|
9
|
-
var
|
|
7
|
+
exports.termsParamsFormat = exports.hasExpand = exports.handleLikeValue = exports.getTermTypes = exports.getTermTypeFn = exports.getTermOptions = exports.getItemDefaultValue = exports.filterTreeSelectNode = exports.filterSelectNode = exports.compatibleOldTerms = void 0;
|
|
8
|
+
var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/objectSpread2"));
|
|
9
|
+
var _toConsumableArray2 = _interopRequireDefault(require("@babel/runtime/helpers/toConsumableArray"));
|
|
10
10
|
var _lodashEs = require("lodash");
|
|
11
11
|
var _setting = require("./setting");
|
|
12
|
-
require("./typing");
|
|
13
12
|
/**
|
|
14
13
|
* 处理like,nlike特殊值
|
|
15
14
|
* @param v
|
|
@@ -29,8 +28,8 @@ var handleLikeValue = exports.handleLikeValue = function handleLikeValue(v) {
|
|
|
29
28
|
return v;
|
|
30
29
|
};
|
|
31
30
|
var handleItemValue = function handleItemValue(item, columnOptionMap) {
|
|
32
|
-
var _item = columnOptionMap
|
|
33
|
-
if (
|
|
31
|
+
var _item = columnOptionMap[item.column].search;
|
|
32
|
+
if (_item === null || _item === '' || _item === undefined) return item;
|
|
34
33
|
if (_item.rename) {
|
|
35
34
|
item.column = _item.rename;
|
|
36
35
|
}
|
|
@@ -40,26 +39,16 @@ var handleItemValue = function handleItemValue(item, columnOptionMap) {
|
|
|
40
39
|
if (['like', 'nlike'].includes(item.termType) && !!item.value) {
|
|
41
40
|
item.value = "%".concat(handleLikeValue(item.value), "%");
|
|
42
41
|
}
|
|
42
|
+
if (_item.handleTerms && (0, _lodashEs.isFunction)(_item.handleTerms)) {
|
|
43
|
+
return _item.handleTerms(item);
|
|
44
|
+
}
|
|
43
45
|
return item;
|
|
44
46
|
};
|
|
45
47
|
var isEmpty = function isEmpty(v) {
|
|
46
48
|
return v === undefined || v === null || v === '' || (0, _lodashEs.isArray)(v) && v.length === 0;
|
|
47
49
|
};
|
|
48
|
-
var
|
|
49
|
-
return
|
|
50
|
-
if (item.terms) {
|
|
51
|
-
var filterTerms = item.terms.filter(function (filterItem) {
|
|
52
|
-
return filterItem && !isEmpty(filterItem.value) && filterItem.termType !== undefined && filterItem.column !== undefined;
|
|
53
|
-
});
|
|
54
|
-
item.terms = filterTerms.map(function (result) {
|
|
55
|
-
return handleItemValue(result, columnOptionMap);
|
|
56
|
-
});
|
|
57
|
-
}
|
|
58
|
-
return item;
|
|
59
|
-
}).filter(function (item) {
|
|
60
|
-
var _item$terms;
|
|
61
|
-
return (_item$terms = item.terms) === null || _item$terms === void 0 ? void 0 : _item$terms.length;
|
|
62
|
-
});
|
|
50
|
+
var isFilterItem = function isFilterItem(item) {
|
|
51
|
+
return !isEmpty(item.value) && item.column !== undefined;
|
|
63
52
|
};
|
|
64
53
|
/**
|
|
65
54
|
* 处理为外部使用
|
|
@@ -68,26 +57,50 @@ var handleArrayToTerms = function handleArrayToTerms(terms, columnOptionMap) {
|
|
|
68
57
|
*/
|
|
69
58
|
var termsParamsFormat = exports.termsParamsFormat = function termsParamsFormat(terms, columnOptionMap) {
|
|
70
59
|
var type = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 'adv';
|
|
71
|
-
var
|
|
60
|
+
var dataFormat = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 'terms';
|
|
72
61
|
// 过滤掉terms中value无效的item
|
|
73
|
-
var cloneParams = (0, _lodashEs.cloneDeep)(terms);
|
|
74
|
-
|
|
75
|
-
return
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
62
|
+
var cloneParams = (0, _lodashEs.cloneDeep)(terms.terms);
|
|
63
|
+
var handleParamsValue = cloneParams.map(function (item) {
|
|
64
|
+
return (0, _lodashEs.omit)(handleItemValue(item, columnOptionMap), ['_span']);
|
|
65
|
+
});
|
|
66
|
+
var filterParams = handleParamsValue.filter(isFilterItem);
|
|
67
|
+
if (dataFormat === 'terms') {
|
|
68
|
+
// terms格式
|
|
69
|
+
// 过滤,并处理值
|
|
70
|
+
if (type === 'adv') {
|
|
71
|
+
if (cloneParams.length > 1) {
|
|
72
|
+
// 拓展开
|
|
73
|
+
var array_A = handleParamsValue.slice(0, 3).filter(isFilterItem);
|
|
74
|
+
var array_B = handleParamsValue.slice(3, 6).filter(isFilterItem);
|
|
75
|
+
var _terms = [];
|
|
76
|
+
if (array_A.length > 0) {
|
|
77
|
+
_terms.push({
|
|
78
|
+
terms: array_A
|
|
79
|
+
});
|
|
80
|
+
}
|
|
81
|
+
if (array_B.length > 0) {
|
|
82
|
+
_terms.push({
|
|
83
|
+
terms: array_B,
|
|
84
|
+
type: handleParamsValue[3].type
|
|
85
|
+
});
|
|
86
|
+
}
|
|
87
|
+
return {
|
|
88
|
+
terms: _terms
|
|
89
|
+
};
|
|
90
|
+
}
|
|
91
|
+
return {
|
|
92
|
+
terms: [{
|
|
93
|
+
terms: filterParams
|
|
94
|
+
}]
|
|
95
|
+
};
|
|
96
|
+
}
|
|
97
|
+
return filterParams;
|
|
90
98
|
}
|
|
99
|
+
// dataFormat === 'object'
|
|
100
|
+
return filterParams.reduce(function (pre, item) {
|
|
101
|
+
pre[item.column] = item;
|
|
102
|
+
return pre;
|
|
103
|
+
}, {});
|
|
91
104
|
};
|
|
92
105
|
/**
|
|
93
106
|
* TreeSelect过滤
|
|
@@ -111,21 +124,6 @@ var filterSelectNode = exports.filterSelectNode = function filterSelectNode(valu
|
|
|
111
124
|
var key = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 'label';
|
|
112
125
|
return (_option$key = option[key]) === null || _option$key === void 0 ? void 0 : _option$key.includes(value);
|
|
113
126
|
};
|
|
114
|
-
var handleQData = exports.handleQData = function handleQData(terms) {
|
|
115
|
-
// 排序, null 往后放
|
|
116
|
-
terms.terms.forEach(function (a) {
|
|
117
|
-
for (var i = 0; i < a.terms.length; i++) {
|
|
118
|
-
for (var j = 0; j < a.terms.length - i - 1; j++) {
|
|
119
|
-
if (!a.terms[j] && a.terms[j + 1]) {
|
|
120
|
-
var temp = a.terms[j];
|
|
121
|
-
a.terms[j] = a.terms[j + 1];
|
|
122
|
-
a.terms[j + 1] = temp;
|
|
123
|
-
}
|
|
124
|
-
}
|
|
125
|
-
}
|
|
126
|
-
});
|
|
127
|
-
return terms;
|
|
128
|
-
};
|
|
129
127
|
var hasExpand = exports.hasExpand = function hasExpand(terms) {
|
|
130
128
|
var itemCount = 0;
|
|
131
129
|
terms.forEach(function (a) {
|
|
@@ -137,62 +135,59 @@ var hasExpand = exports.hasExpand = function hasExpand(terms) {
|
|
|
137
135
|
});
|
|
138
136
|
return itemCount >= 2;
|
|
139
137
|
};
|
|
140
|
-
|
|
141
|
-
var
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
138
|
+
function shouldExpand(a, b) {
|
|
139
|
+
var isAFirstHasValue = a[0] !== null && a[0] !== undefined;
|
|
140
|
+
var isARestNull = a.slice(1).every(function (item) {
|
|
141
|
+
return item === null || item === undefined;
|
|
142
|
+
});
|
|
143
|
+
var isBAllNull = b.every(function (item) {
|
|
144
|
+
return item === null || item === undefined;
|
|
145
|
+
});
|
|
146
|
+
return !(isAFirstHasValue && isARestNull && isBAllNull);
|
|
147
|
+
}
|
|
148
|
+
var compatibleOldTerms = exports.compatibleOldTerms = function compatibleOldTerms(q, columnsMap, defaultCacheValues) {
|
|
147
149
|
try {
|
|
148
|
-
var _terms$terms;
|
|
149
150
|
var terms = JSON.parse(q || '{}');
|
|
150
|
-
(
|
|
151
|
-
var
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
_terms[
|
|
151
|
+
if (terms.terms.length === 2) {
|
|
152
|
+
var expand = shouldExpand(terms.terms[0].terms, terms.terms[1].terms);
|
|
153
|
+
var _terms = [];
|
|
154
|
+
if (!expand) {
|
|
155
|
+
_terms = [terms.terms[0].terms[0]];
|
|
156
|
+
} else {
|
|
157
|
+
_terms = [].concat((0, _toConsumableArray2.default)(terms.terms[0].terms), (0, _toConsumableArray2.default)(terms.terms[1].terms));
|
|
158
|
+
// 重新
|
|
159
|
+
var arr = Object.values(columnsMap);
|
|
160
|
+
for (var i = 0; i < _terms.length; i++) {
|
|
161
|
+
if (_terms[i] === null) {
|
|
162
|
+
var indexIn = i % arr.length;
|
|
163
|
+
var obj = getItemDefaultValue(arr[indexIn], defaultCacheValues);
|
|
164
|
+
if (i === 3) {
|
|
165
|
+
obj.type = terms.terms[1].type;
|
|
166
|
+
}
|
|
167
|
+
_terms[i] = obj;
|
|
168
|
+
}
|
|
169
|
+
}
|
|
157
170
|
}
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
171
|
+
return {
|
|
172
|
+
terms: _terms,
|
|
173
|
+
expand: expand
|
|
174
|
+
};
|
|
175
|
+
} else {
|
|
176
|
+
var hasTermsKey = Reflect.has(terms.terms[0], 'terms'); // 兼容历史数据
|
|
177
|
+
return {
|
|
178
|
+
terms: hasTermsKey ? terms.terms[0].terms : terms.terms,
|
|
179
|
+
expand: terms.terms.length > 1
|
|
180
|
+
};
|
|
181
|
+
}
|
|
162
182
|
} catch (e) {
|
|
163
183
|
console.warn('[Pro Search Error] > ', e);
|
|
164
184
|
return {
|
|
165
|
-
terms:
|
|
185
|
+
terms: [],
|
|
186
|
+
expand: false
|
|
166
187
|
};
|
|
167
188
|
}
|
|
168
189
|
};
|
|
169
|
-
var handleParamsToString = exports.handleParamsToString = function handleParamsToString() {
|
|
170
|
-
var terms = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
|
|
171
|
-
var type = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'and';
|
|
172
|
-
var _terms = [{
|
|
173
|
-
terms: [null, null, null]
|
|
174
|
-
}, {
|
|
175
|
-
terms: [null, null, null],
|
|
176
|
-
type: type
|
|
177
|
-
}];
|
|
178
|
-
var termsIndex = 0;
|
|
179
|
-
var termsStar = 0;
|
|
180
|
-
terms.forEach(function (item, index) {
|
|
181
|
-
if (index > 2) {
|
|
182
|
-
termsIndex = 1;
|
|
183
|
-
termsStar = 4;
|
|
184
|
-
}
|
|
185
|
-
_terms[termsIndex].terms[index - termsStar] = item;
|
|
186
|
-
});
|
|
187
|
-
return JSON.stringify({
|
|
188
|
-
terms: _terms
|
|
189
|
-
});
|
|
190
|
-
};
|
|
191
190
|
var getTermTypeFn = exports.getTermTypeFn = function getTermTypeFn(type) {
|
|
192
|
-
// if (column?.includes('id') && type === 'string') {
|
|
193
|
-
// // 默认id为 eq
|
|
194
|
-
// return 'eq';
|
|
195
|
-
// }
|
|
196
191
|
switch (type) {
|
|
197
192
|
case 'select':
|
|
198
193
|
case 'treeSelect':
|
|
@@ -209,11 +204,14 @@ var getTermTypeFn = exports.getTermTypeFn = function getTermTypeFn(type) {
|
|
|
209
204
|
}
|
|
210
205
|
};
|
|
211
206
|
var getTermTypes = exports.getTermTypes = function getTermTypes(types, locale) {
|
|
212
|
-
|
|
213
|
-
|
|
207
|
+
var termTypes = (0, _setting.termType)(locale);
|
|
208
|
+
return types.map(function (code) {
|
|
209
|
+
return termTypes.find(function (item) {
|
|
210
|
+
return item.value === code;
|
|
211
|
+
});
|
|
214
212
|
});
|
|
215
213
|
};
|
|
216
|
-
var getTermOptions = exports.getTermOptions = function getTermOptions(type,
|
|
214
|
+
var getTermOptions = exports.getTermOptions = function getTermOptions(type, locale) {
|
|
217
215
|
var keys = [];
|
|
218
216
|
switch (type) {
|
|
219
217
|
case 'select':
|
|
@@ -232,7 +230,7 @@ var getTermOptions = exports.getTermOptions = function getTermOptions(type, colu
|
|
|
232
230
|
keys = ['eq', 'not', 'gt', 'lt', 'gte', 'lte'];
|
|
233
231
|
break;
|
|
234
232
|
default:
|
|
235
|
-
keys = ['like', 'nlike'];
|
|
233
|
+
keys = ['like', 'nlike', 'eq', 'not'];
|
|
236
234
|
// column?.includes('id') && type === 'string'
|
|
237
235
|
// ? ['eq']
|
|
238
236
|
// : ['like', 'nlike'];
|
|
@@ -240,24 +238,18 @@ var getTermOptions = exports.getTermOptions = function getTermOptions(type, colu
|
|
|
240
238
|
}
|
|
241
239
|
return keys.length ? getTermTypes(keys, locale) : (0, _setting.termType)(locale);
|
|
242
240
|
};
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
return item.column === targetItem.column;
|
|
258
|
-
});
|
|
259
|
-
if (!targetItem.termType) {
|
|
260
|
-
targetItem.termType = getTermTypeFn(searchItem.type);
|
|
261
|
-
}
|
|
262
|
-
return targetItem;
|
|
241
|
+
/**
|
|
242
|
+
* 获取单项默认值,仅初始化使用
|
|
243
|
+
* @param record
|
|
244
|
+
* @param defaultCacheValues
|
|
245
|
+
*/
|
|
246
|
+
var getItemDefaultValue = exports.getItemDefaultValue = function getItemDefaultValue(record, defaultCacheValues) {
|
|
247
|
+
var defaultValue = (0, _objectSpread2.default)({}, defaultCacheValues[record.dataIndex]);
|
|
248
|
+
return {
|
|
249
|
+
column: record.dataIndex,
|
|
250
|
+
termType: defaultValue.defaultTermType || getTermTypeFn(record.search.type),
|
|
251
|
+
value: defaultValue.defaultValue,
|
|
252
|
+
type: 'or',
|
|
253
|
+
_span: record.search.span
|
|
254
|
+
};
|
|
263
255
|
};
|