@jetlinks-web/components 2.7.0 → 3.0.0
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 +2 -3
- package/es/BadgeStatus/Badge.js +2 -3
- package/es/CardSelect/CardSelect.js +23 -18
- 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/ConfigProvider/index.js +1 -1
- package/es/DragModal/DragModal.js +15 -9
- package/es/DragModal/style/index.js +64 -1
- package/es/EditTable/Body.js +10 -3
- package/es/EditTable/EditTable.js +14 -8
- package/es/EditTable/FormItem.js +15 -10
- package/es/EditTable/Header.js +16 -6
- package/es/EditTable/components/ContextMenu/Menu.js +12 -6
- package/es/EditTable/components/Search/search.js +1 -2
- package/es/EditTable/components/Search/sort.js +1 -3
- package/es/EditTable/group.js +24 -19
- 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 +1 -1
- package/es/Ellipsis/Ellipsis.js +11 -3
- package/es/Ellipsis/style/index.js +24 -1
- package/es/Empty/Empty.js +1 -1
- package/es/FullPage/FullPage.js +1 -2
- package/es/LocaleProvider/index.js +1 -2
- package/es/PermissionButton/index.js +4 -5
- package/es/ProLayout/Basic/BasicLayout.js +46 -42
- package/es/ProLayout/Basic/BasicLayoutStyle.js +39 -0
- package/es/ProLayout/Basic/Header.js +4 -8
- package/es/ProLayout/Basic/HeaderStyle.js +10 -0
- package/es/ProLayout/PageContainer/index.js +20 -16
- package/es/ProLayout/PageContainer/style.js +46 -0
- package/es/ProLayout/SiderMenu/BaseMenu.js +14 -37
- package/es/ProLayout/SiderMenu/SiderMenu.js +25 -36
- package/es/ProLayout/SiderMenu/style.js +166 -0
- package/es/ProLayout/TopHeader/index.js +12 -11
- 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 +13 -5
- package/es/ProTable/Content.js +22 -14
- package/es/ProTable/Header.js +22 -12
- package/es/ProTable/Pagination.js +13 -5
- package/es/ProTable/ProTable.js +43 -27
- 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 +24 -17
- package/es/Search/Advanced/SaveHistory.js +2 -3
- package/es/Search/Advanced/index.js +213 -293
- 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 +64 -0
- package/es/Skeleton/components/DashBoardChart.js +96 -0
- package/es/Skeleton/components/Detail.js +110 -0
- package/es/Skeleton/components/Drawer.js +91 -0
- package/es/Skeleton/components/Item.js +68 -0
- package/es/Skeleton/components/List.js +45 -0
- package/es/Skeleton/components/ListCard.js +63 -0
- package/es/Skeleton/components/ListCardItem.js +86 -0
- package/es/Skeleton/components/ListTable.js +76 -0
- package/es/Skeleton/components/Page.js +62 -0
- package/es/Skeleton/components/Search.js +54 -0
- package/es/Skeleton/components/Tree.js +72 -0
- package/es/Skeleton/index.js +15 -0
- package/es/Skeleton/skeleton.js +58 -0
- package/es/Skeleton/style/index.js +132 -0
- package/es/Title/style/index.js +29 -1
- package/es/Title/title.js +13 -5
- package/es/ValueItem/ValueItem.js +29 -72
- package/es/components.js +0 -3
- package/es/locale/en-US.js +0 -7
- package/es/locale/zh-CN.js +0 -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 -12
- package/lib/AutoComplete/AutoComplete.js +1 -2
- package/lib/BadgeStatus/Badge.js +2 -3
- package/lib/CardSelect/CardSelect.js +23 -18
- 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/ConfigProvider/context.js +1 -1
- package/lib/ConfigProvider/index.js +3 -3
- package/lib/DragModal/DragModal.js +15 -9
- 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 +16 -11
- package/lib/EditTable/Header.js +16 -6
- package/lib/EditTable/components/ContextMenu/Menu.js +12 -6
- package/lib/EditTable/components/Search/search.js +1 -2
- package/lib/EditTable/components/Search/sort.js +1 -3
- package/lib/EditTable/group.js +24 -19
- 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 +1 -1
- package/lib/Ellipsis/Ellipsis.js +11 -3
- package/lib/Ellipsis/style/index.js +29 -1
- package/lib/Empty/Empty.js +1 -1
- package/lib/FullPage/FullPage.js +1 -2
- package/lib/LocaleProvider/index.js +1 -2
- package/lib/PermissionButton/index.js +9 -10
- package/lib/ProLayout/Basic/BasicLayout.js +55 -51
- package/lib/ProLayout/Basic/BasicLayoutStyle.js +46 -0
- package/lib/ProLayout/Basic/Header.js +6 -10
- package/lib/ProLayout/Basic/HeaderStyle.js +17 -0
- package/lib/ProLayout/PageContainer/index.js +24 -20
- package/lib/ProLayout/PageContainer/style.js +53 -0
- package/lib/ProLayout/SiderMenu/BaseMenu.js +18 -40
- package/lib/ProLayout/SiderMenu/SiderMenu.js +28 -39
- package/lib/ProLayout/SiderMenu/style.js +173 -0
- package/lib/ProLayout/TopHeader/index.js +12 -10
- package/lib/ProLayout/TopHeader/style.js +133 -0
- package/lib/ProLayout/defaultSettings.js +1 -1
- package/lib/ProLayout/style/index.js +12 -1
- package/lib/ProLayout/util.js +5 -5
- package/lib/ProTable/Alert.js +13 -5
- package/lib/ProTable/Content.js +22 -14
- package/lib/ProTable/Header.js +22 -12
- package/lib/ProTable/Pagination.js +13 -5
- package/lib/ProTable/ProTable.js +43 -27
- package/lib/ProTable/setting.js +3 -3
- 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 +24 -17
- package/lib/Search/Advanced/SaveHistory.js +2 -3
- package/lib/Search/Advanced/index.js +213 -293
- 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 +64 -0
- package/lib/Skeleton/components/DashBoardChart.js +96 -0
- package/lib/Skeleton/components/Detail.js +110 -0
- package/lib/Skeleton/components/Drawer.js +91 -0
- package/lib/Skeleton/components/Item.js +68 -0
- package/lib/Skeleton/components/List.js +45 -0
- package/lib/Skeleton/components/ListCard.js +63 -0
- package/lib/Skeleton/components/ListCardItem.js +86 -0
- package/lib/Skeleton/components/ListTable.js +76 -0
- package/lib/Skeleton/components/Page.js +62 -0
- package/lib/Skeleton/components/Search.js +54 -0
- package/lib/Skeleton/components/Tree.js +72 -0
- package/lib/Skeleton/index.js +75 -0
- package/lib/Skeleton/skeleton.js +58 -0
- package/lib/Skeleton/style/index.js +139 -0
- package/lib/Title/style/index.js +34 -1
- package/lib/Title/title.js +13 -5
- package/lib/ValueItem/ValueItem.js +29 -72
- package/lib/components.js +0 -21
- package/lib/locale/en-US.js +0 -7
- package/lib/locale/zh-CN.js +0 -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 -14
- package/package.json +13 -14
- 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/MonacoEditor/Monaco.js +0 -242
- package/es/MonacoEditor/index.js +0 -5
- package/es/MonacoEditor/style/index.css +0 -4
- package/es/MonacoEditor/style/index.js +0 -1
- package/es/MonacoEditor/style/index.less +0 -4
- 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 -141
- 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/Title/style/index.css +0 -23
- package/es/Title/style/index.less +0 -25
- package/es/style/index.css +0 -5197
- package/es/style/index.less +0 -13
- 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/MonacoEditor/Monaco.js +0 -242
- package/lib/MonacoEditor/index.js +0 -12
- package/lib/MonacoEditor/style/index.css +0 -4
- package/lib/MonacoEditor/style/index.js +0 -3
- package/lib/MonacoEditor/style/index.less +0 -4
- 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 -141
- 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/Title/style/index.css +0 -23
- package/lib/Title/style/index.less +0 -25
- package/lib/style/index.css +0 -5197
- package/lib/style/index.less +0 -13
- package/lib/style/variable.css +0 -4
- package/lib/style/variable.less +0 -4
package/es/Search/Item.js
CHANGED
|
@@ -1,351 +1,218 @@
|
|
|
1
|
-
function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) {
|
|
2
|
-
const op = ops[i];
|
|
3
|
-
const fn = ops[i + 1];
|
|
4
|
-
i += 2;
|
|
5
|
-
if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) {
|
|
6
|
-
return undefined;
|
|
7
|
-
}
|
|
8
|
-
if (op === 'access' || op === 'optionalAccess') {
|
|
9
|
-
lastAccessLHS = value;
|
|
10
|
-
value = fn(value);
|
|
11
|
-
}
|
|
12
|
-
else if (op === 'call' || op === 'optionalCall') {
|
|
13
|
-
value = fn((...args) => value.call(lastAccessLHS, ...args));
|
|
14
|
-
lastAccessLHS = undefined;
|
|
15
|
-
}
|
|
16
|
-
} return value; }
|
|
17
1
|
/* Analyzed bindings: {
|
|
18
|
-
"
|
|
19
|
-
"
|
|
2
|
+
"column": "props",
|
|
3
|
+
"value": "props",
|
|
4
|
+
"termType": "props",
|
|
5
|
+
"type": "props",
|
|
20
6
|
"expand": "props",
|
|
21
|
-
"termsItem": "props",
|
|
22
|
-
"componentProps": "props",
|
|
23
7
|
"onlyValue": "props",
|
|
24
|
-
"reset": "setup-const",
|
|
25
8
|
"labelWidth": "props",
|
|
26
|
-
"
|
|
27
|
-
"
|
|
28
|
-
"componentType": "setup-maybe-ref",
|
|
29
|
-
"optionsMapKey": "setup-maybe-ref",
|
|
9
|
+
"index": "props",
|
|
10
|
+
"computed": "setup-const",
|
|
30
11
|
"ref": "setup-const",
|
|
31
12
|
"reactive": "setup-const",
|
|
32
|
-
"nextTick": "setup-const",
|
|
33
13
|
"watch": "setup-const",
|
|
34
|
-
"
|
|
35
|
-
"inject": "setup-const",
|
|
36
|
-
"cloneDeep": "setup-maybe-ref",
|
|
37
|
-
"debounce": "setup-maybe-ref",
|
|
38
|
-
"isArray": "setup-maybe-ref",
|
|
39
|
-
"isFunction": "setup-maybe-ref",
|
|
40
|
-
"omit": "setup-maybe-ref",
|
|
41
|
-
"filterTreeSelectNode": "setup-maybe-ref",
|
|
42
|
-
"filterSelectNode": "setup-maybe-ref",
|
|
43
|
-
"getTermTypeFn": "setup-maybe-ref",
|
|
44
|
-
"getTermOptions": "setup-maybe-ref",
|
|
45
|
-
"getTermTypes": "setup-maybe-ref",
|
|
46
|
-
"TreeSelect": "setup-maybe-ref",
|
|
14
|
+
"isRef": "setup-const",
|
|
47
15
|
"Select": "setup-maybe-ref",
|
|
48
|
-
"
|
|
49
|
-
"
|
|
50
|
-
"
|
|
51
|
-
"
|
|
52
|
-
"
|
|
53
|
-
"RangePicker": "setup-maybe-ref",
|
|
54
|
-
"TimeRangePicker": "setup-maybe-ref",
|
|
55
|
-
"FormItem": "setup-maybe-ref",
|
|
56
|
-
"isPromise": "setup-maybe-ref",
|
|
16
|
+
"componentProps": "setup-maybe-ref",
|
|
17
|
+
"componentType": "setup-maybe-ref",
|
|
18
|
+
"typeOptions": "setup-maybe-ref",
|
|
19
|
+
"getTermOptions": "setup-maybe-ref",
|
|
20
|
+
"getItemDefaultValue": "setup-maybe-ref",
|
|
57
21
|
"useLocaleReceiver": "setup-maybe-ref",
|
|
58
|
-
"
|
|
22
|
+
"useColumnsMap": "setup-maybe-ref",
|
|
23
|
+
"useDefaultValue": "setup-maybe-ref",
|
|
24
|
+
"useOptionMap": "setup-maybe-ref",
|
|
25
|
+
"isArray": "setup-maybe-ref",
|
|
26
|
+
"isFunction": "setup-maybe-ref",
|
|
27
|
+
"useSearchStyle": "setup-maybe-ref",
|
|
59
28
|
"props": "setup-reactive-const",
|
|
60
29
|
"emit": "setup-const",
|
|
61
30
|
"termsModel": "setup-reactive-const",
|
|
62
|
-
"
|
|
63
|
-
"
|
|
64
|
-
"
|
|
65
|
-
"
|
|
66
|
-
"
|
|
31
|
+
"contextLocale": "setup-maybe-ref",
|
|
32
|
+
"optionsMap": "setup-maybe-ref",
|
|
33
|
+
"columnsMap": "setup-maybe-ref",
|
|
34
|
+
"columnsValues": "setup-maybe-ref",
|
|
35
|
+
"targetComponents": "setup-ref",
|
|
36
|
+
"valueOptions": "setup-ref",
|
|
37
|
+
"prefixCls": "setup-ref",
|
|
38
|
+
"wrapSSR": "setup-maybe-ref",
|
|
39
|
+
"hashId": "setup-maybe-ref",
|
|
40
|
+
"termTypeOptions": "setup-ref",
|
|
67
41
|
"columnOptions": "setup-ref",
|
|
68
|
-
"
|
|
69
|
-
"
|
|
70
|
-
"
|
|
71
|
-
"
|
|
72
|
-
"
|
|
73
|
-
"
|
|
74
|
-
"
|
|
75
|
-
"initModel": "setup-const",
|
|
76
|
-
"columnChange": "setup-const",
|
|
77
|
-
"handleItem": "setup-const",
|
|
78
|
-
"termTypeChange": "setup-const",
|
|
79
|
-
"valueChange": "setup-const"
|
|
42
|
+
"findItemByColumn": "setup-const",
|
|
43
|
+
"findOptionsByColumn": "setup-const",
|
|
44
|
+
"handleColumnsOptions": "setup-const",
|
|
45
|
+
"onTypeChange": "setup-const",
|
|
46
|
+
"onColumnChange": "setup-const",
|
|
47
|
+
"onTermTypeChange": "setup-const",
|
|
48
|
+
"onValueChange": "setup-const"
|
|
80
49
|
} */
|
|
81
50
|
import { defineComponent as _defineComponent } from 'vue';
|
|
82
|
-
import { unref as _unref,
|
|
83
|
-
const
|
|
84
|
-
const _hoisted_1 = { class: "JSearch-item" };
|
|
85
|
-
const _hoisted_2 = {
|
|
51
|
+
import { unref as _unref, toDisplayString as _toDisplayString, normalizeStyle as _normalizeStyle, openBlock as _openBlock, createElementBlock as _createElementBlock, createCommentVNode as _createCommentVNode, createBlock as _createBlock, createVNode as _createVNode, Fragment as _Fragment, resolveDynamicComponent as _resolveDynamicComponent, mergeProps as _mergeProps, createElementVNode as _createElementVNode, normalizeClass as _normalizeClass } from "vue";
|
|
52
|
+
const _hoisted_1 = {
|
|
86
53
|
key: 0,
|
|
87
54
|
class: "JSearch-item--type"
|
|
88
55
|
};
|
|
89
|
-
const
|
|
90
|
-
const
|
|
91
|
-
import {
|
|
92
|
-
import {
|
|
93
|
-
import {
|
|
94
|
-
import {
|
|
95
|
-
import {
|
|
96
|
-
import {
|
|
97
|
-
import {
|
|
56
|
+
const _hoisted_2 = { key: 1 };
|
|
57
|
+
const _hoisted_3 = { class: "JSearch-item--value" };
|
|
58
|
+
import { computed, ref, reactive, watch, isRef } from 'vue';
|
|
59
|
+
import { Select } from 'ant-design-vue';
|
|
60
|
+
import { componentProps, componentType, typeOptions } from "./setting";
|
|
61
|
+
import { getTermOptions, getItemDefaultValue } from "./util";
|
|
62
|
+
import { useLocaleReceiver } from "../LocaleReciver";
|
|
63
|
+
import { useColumnsMap, useDefaultValue, useOptionMap } from "./hooks";
|
|
64
|
+
import { isArray, isFunction } from "lodash-es";
|
|
65
|
+
import useSearchStyle from './style';
|
|
98
66
|
const __sfc_main__ = _defineComponent({
|
|
67
|
+
...{
|
|
68
|
+
name: 'JSearchItem'
|
|
69
|
+
},
|
|
99
70
|
props: {
|
|
100
|
-
|
|
101
|
-
type:
|
|
102
|
-
default: () => [],
|
|
103
|
-
required: true,
|
|
71
|
+
column: {
|
|
72
|
+
type: String,
|
|
104
73
|
},
|
|
105
|
-
|
|
106
|
-
type:
|
|
107
|
-
|
|
74
|
+
value: {
|
|
75
|
+
type: String
|
|
76
|
+
},
|
|
77
|
+
termType: {
|
|
78
|
+
type: String,
|
|
79
|
+
default: 'like'
|
|
80
|
+
},
|
|
81
|
+
type: {
|
|
82
|
+
type: String,
|
|
83
|
+
default: 'or'
|
|
108
84
|
},
|
|
109
85
|
expand: {
|
|
110
86
|
type: Boolean,
|
|
111
87
|
default: false,
|
|
112
88
|
},
|
|
113
|
-
termsItem: {
|
|
114
|
-
type: Object,
|
|
115
|
-
default: () => ({}),
|
|
116
|
-
},
|
|
117
|
-
componentProps: {
|
|
118
|
-
type: Object,
|
|
119
|
-
default: () => ({}),
|
|
120
|
-
},
|
|
121
89
|
onlyValue: {
|
|
122
90
|
type: Boolean,
|
|
123
|
-
default:
|
|
124
|
-
},
|
|
125
|
-
reset: {
|
|
126
|
-
type: Number,
|
|
127
|
-
default: 1,
|
|
91
|
+
default: true,
|
|
128
92
|
},
|
|
129
93
|
labelWidth: {
|
|
130
94
|
type: Number,
|
|
131
95
|
default: 40,
|
|
132
96
|
},
|
|
97
|
+
index: {
|
|
98
|
+
type: Number,
|
|
99
|
+
default: 1
|
|
100
|
+
}
|
|
133
101
|
},
|
|
134
|
-
emits: [
|
|
102
|
+
emits: ['update:value', 'update:termType', 'update:type', 'update:column'],
|
|
135
103
|
setup(__props, { emit: __emit }) {
|
|
136
|
-
const [contextLocale] = useLocaleReceiver('Search');
|
|
137
104
|
const props = __props;
|
|
138
105
|
const emit = __emit;
|
|
139
106
|
const termsModel = reactive({
|
|
140
|
-
type:
|
|
141
|
-
value:
|
|
142
|
-
termType:
|
|
143
|
-
column:
|
|
107
|
+
type: props.type || 'or',
|
|
108
|
+
value: props.value || '',
|
|
109
|
+
termType: props.termType || 'like',
|
|
110
|
+
column: props.column || undefined,
|
|
111
|
+
});
|
|
112
|
+
const [contextLocale] = useLocaleReceiver('Search');
|
|
113
|
+
const optionsMap = useOptionMap();
|
|
114
|
+
const columnsMap = useColumnsMap();
|
|
115
|
+
const columnsValues = useDefaultValue();
|
|
116
|
+
const targetComponents = ref({});
|
|
117
|
+
const valueOptions = ref();
|
|
118
|
+
const prefixCls = computed(() => 'JSearch');
|
|
119
|
+
const [wrapSSR, hashId] = useSearchStyle(prefixCls);
|
|
120
|
+
const termTypeOptions = computed(() => {
|
|
121
|
+
return getTermOptions(targetComponents.value.type, contextLocale.value);
|
|
144
122
|
});
|
|
145
|
-
const
|
|
146
|
-
return
|
|
123
|
+
const columnOptions = computed(() => {
|
|
124
|
+
return Object.values(columnsMap.value).sort((a, b) => a._sort_index - b._sort_index).map(item => ({ label: item.title, value: item.dataIndex }));
|
|
147
125
|
});
|
|
148
|
-
const
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
const
|
|
152
|
-
|
|
153
|
-
const columnOptionMap = inject(optionsMapKey, new Map());
|
|
154
|
-
const termTypeOptions = reactive({ option: termType(contextLocale.value) });
|
|
155
|
-
const optionLoading = ref(false);
|
|
156
|
-
/**
|
|
157
|
-
* 根据类型切换默termType值
|
|
158
|
-
* @param type {}
|
|
159
|
-
* @param column {}
|
|
160
|
-
* @param options {}
|
|
161
|
-
* @param defaultTermType {}
|
|
162
|
-
* @param termFilter {}
|
|
163
|
-
*/
|
|
164
|
-
const getTermType = (type, column, options, defaultTermType, termFilter) => {
|
|
165
|
-
termTypeOptions.option = _optionalChain([options, 'optionalAccess', _10 => _10.length])
|
|
166
|
-
? getTermTypes(options, contextLocale.value)
|
|
167
|
-
: getTermOptions(type, column, contextLocale.value);
|
|
168
|
-
if (_optionalChain([termFilter, 'optionalAccess', _11 => _11.length])) {
|
|
169
|
-
termTypeOptions.option = termTypeOptions.option.filter((item) => !termFilter.includes(item.value));
|
|
170
|
-
}
|
|
171
|
-
return defaultTermType || _optionalChain([options, 'optionalAccess', _12 => _12.length])
|
|
172
|
-
? termTypeOptions.option[0].value
|
|
173
|
-
: getTermTypeFn(type, column);
|
|
126
|
+
const findItemByColumn = () => {
|
|
127
|
+
return columnsMap.value[termsModel.column];
|
|
128
|
+
};
|
|
129
|
+
const findOptionsByColumn = () => {
|
|
130
|
+
return optionsMap.value[termsModel.column];
|
|
174
131
|
};
|
|
175
132
|
/**
|
|
176
|
-
*
|
|
177
|
-
* @param
|
|
133
|
+
* 处理options
|
|
134
|
+
* @param _options
|
|
178
135
|
*/
|
|
179
|
-
const
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
break;
|
|
184
|
-
case 'treeSelect':
|
|
185
|
-
component.value = componentType.treeSelect;
|
|
186
|
-
break;
|
|
187
|
-
case 'date':
|
|
188
|
-
component.value = componentType.date;
|
|
189
|
-
break;
|
|
190
|
-
case 'time':
|
|
191
|
-
component.value = componentType.time;
|
|
192
|
-
break;
|
|
193
|
-
case 'number':
|
|
194
|
-
component.value = componentType.inputNumber;
|
|
195
|
-
break;
|
|
196
|
-
case 'timeRange':
|
|
197
|
-
component.value = componentType.timeRange;
|
|
198
|
-
break;
|
|
199
|
-
case 'rangePicker':
|
|
200
|
-
component.value = componentType.rangePicker;
|
|
201
|
-
break;
|
|
202
|
-
case 'component':
|
|
203
|
-
component.value = componentType.component;
|
|
204
|
-
break;
|
|
205
|
-
default:
|
|
206
|
-
component.value = componentType.input;
|
|
207
|
-
break;
|
|
136
|
+
const handleColumnsOptions = async (_options) => {
|
|
137
|
+
if (isFunction(_options)) {
|
|
138
|
+
valueOptions.value = await _options();
|
|
139
|
+
optionsMap.value[props.column] = [...valueOptions.value];
|
|
208
140
|
}
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
return options.map((item) => {
|
|
212
|
-
if (item.children) {
|
|
213
|
-
item.children = removeOptionByKey(item.children);
|
|
214
|
-
}
|
|
215
|
-
return omit(item, ['key']);
|
|
216
|
-
});
|
|
217
|
-
};
|
|
218
|
-
const handleItemOptions = debounce((option) => {
|
|
219
|
-
options.value = [];
|
|
220
|
-
if (isArray(option)) {
|
|
221
|
-
options.value = option;
|
|
141
|
+
else if (isArray(_options)) {
|
|
142
|
+
valueOptions.value = _options;
|
|
222
143
|
}
|
|
223
|
-
else if (
|
|
224
|
-
|
|
225
|
-
const fn = option();
|
|
226
|
-
if (isPromise(fn)) {
|
|
227
|
-
(fn)
|
|
228
|
-
.then((res) => {
|
|
229
|
-
optionLoading.value = false;
|
|
230
|
-
options.value = removeOptionByKey(res);
|
|
231
|
-
})
|
|
232
|
-
.catch((_) => {
|
|
233
|
-
optionLoading.value = false;
|
|
234
|
-
});
|
|
235
|
-
}
|
|
236
|
-
else {
|
|
237
|
-
optionLoading.value = false;
|
|
238
|
-
options.value = removeOptionByKey(fn || []);
|
|
239
|
-
}
|
|
144
|
+
else if (isRef(_options) || (typeof _options === 'object' && 'value' in _options)) {
|
|
145
|
+
valueOptions.value = _options.value;
|
|
240
146
|
}
|
|
241
|
-
}, 100);
|
|
242
|
-
const initModel = () => {
|
|
243
|
-
termsModel.type = 'or';
|
|
244
|
-
termsModel.column = undefined;
|
|
245
|
-
termsModel.value = undefined;
|
|
246
|
-
termsModel.termType = undefined;
|
|
247
|
-
termTypeOptions.option = termType(contextLocale.value);
|
|
248
147
|
};
|
|
249
|
-
const
|
|
250
|
-
|
|
251
|
-
if (!item) {
|
|
252
|
-
initModel();
|
|
253
|
-
return;
|
|
254
|
-
}
|
|
255
|
-
cProps.value = item.componentProps;
|
|
256
|
-
optionLoading.value = false;
|
|
257
|
-
// 设置value为undefined
|
|
258
|
-
termsModel.column = value;
|
|
259
|
-
getComponent(item.type); // 处理Item的组件类型
|
|
260
|
-
componentName.value = item.components;
|
|
261
|
-
// 处理options 以及 request
|
|
262
|
-
if ('options' in item) {
|
|
263
|
-
handleItemOptions(item.options);
|
|
264
|
-
}
|
|
265
|
-
const termsTypeValue = getTermType(item.type, value, item.termOptions, item.defaultTermType, item.termFilter);
|
|
266
|
-
if (changeValue) {
|
|
267
|
-
termsModel.value = undefined;
|
|
268
|
-
termsModel.termType = termsTypeValue;
|
|
269
|
-
}
|
|
270
|
-
if (isChange) {
|
|
271
|
-
valueChange();
|
|
272
|
-
}
|
|
148
|
+
const onTypeChange = () => {
|
|
149
|
+
emit('update:type', termsModel.type);
|
|
273
150
|
};
|
|
274
|
-
const
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
});
|
|
285
|
-
if (!props.onlyValue) {
|
|
286
|
-
// 获取第一个值
|
|
287
|
-
const sortColumn = cloneDeep(props.columns);
|
|
288
|
-
_optionalChain([sortColumn, 'optionalAccess', _16 => _16.sort, 'call', _17 => _17((a, b) => a.sortIndex - b.sortIndex)]);
|
|
289
|
-
const _index = props.index > sortColumn.length
|
|
290
|
-
? sortColumn.length - 1
|
|
291
|
-
: props.index;
|
|
292
|
-
if (props.index <= sortColumn.length) {
|
|
293
|
-
const _itemColumn = sortColumn[_index - 1];
|
|
294
|
-
columnChange(_itemColumn.column, false);
|
|
295
|
-
}
|
|
296
|
-
else {
|
|
297
|
-
columnChange(null, false);
|
|
298
|
-
}
|
|
299
|
-
}
|
|
300
|
-
else {
|
|
301
|
-
columnChange(_optionalChain([props, 'access', _18 => _18.columns, 'access', _19 => _19[props.index - 1], 'optionalAccess', _20 => _20.column]), false);
|
|
302
|
-
}
|
|
151
|
+
const onColumnChange = () => {
|
|
152
|
+
const record = findItemByColumn();
|
|
153
|
+
const defaultValue = getItemDefaultValue(record, columnsValues.value);
|
|
154
|
+
// 处理默认选项
|
|
155
|
+
termsModel.termType = defaultValue.termType;
|
|
156
|
+
// 处理默认值
|
|
157
|
+
termsModel.value = defaultValue.value;
|
|
158
|
+
emit('update:column', termsModel.column);
|
|
159
|
+
onTermTypeChange();
|
|
160
|
+
onValueChange();
|
|
303
161
|
};
|
|
304
|
-
const
|
|
305
|
-
|
|
306
|
-
const isValueMultiple = ['in', 'nin'].includes(v);
|
|
307
|
-
if (isOldValueMultiple !== isValueMultiple) {
|
|
308
|
-
termsModel.value = isValueMultiple ? [] : undefined;
|
|
309
|
-
}
|
|
310
|
-
valueChange();
|
|
311
|
-
};
|
|
312
|
-
const valueChange = () => {
|
|
313
|
-
emit('change', {
|
|
314
|
-
type: props.onlyValue ? 'and' : termsModel.type || 'or',
|
|
315
|
-
value: termsModel.value,
|
|
316
|
-
termType: termsModel.termType || 'like',
|
|
317
|
-
column: termsModel.column,
|
|
318
|
-
});
|
|
162
|
+
const onTermTypeChange = () => {
|
|
163
|
+
emit('update:termType', termsModel.termType);
|
|
319
164
|
};
|
|
320
|
-
const
|
|
321
|
-
termsModel.value
|
|
165
|
+
const onValueChange = () => {
|
|
166
|
+
emit('update:value', termsModel.value);
|
|
322
167
|
};
|
|
323
|
-
watch(() =>
|
|
324
|
-
|
|
325
|
-
|
|
168
|
+
watch(() => termsModel.termType, () => {
|
|
169
|
+
const isBtw = ['in', 'nin'].includes(termsModel.termType);
|
|
170
|
+
if (targetComponents.value.type === componentType.treeSelect) {
|
|
171
|
+
targetComponents.value.props = {
|
|
172
|
+
...targetComponents.value.props,
|
|
173
|
+
multiple: isBtw
|
|
174
|
+
};
|
|
326
175
|
}
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
176
|
+
else if (targetComponents.value.type === componentType.select) {
|
|
177
|
+
targetComponents.value.props = {
|
|
178
|
+
...targetComponents.value.props,
|
|
179
|
+
mode: isBtw ? 'multiple' : 'combobox'
|
|
180
|
+
};
|
|
181
|
+
}
|
|
182
|
+
}, { immediate: true });
|
|
183
|
+
watch(() => termsModel.column, async () => {
|
|
184
|
+
// 根据column从map中获取record,再解析search属性
|
|
185
|
+
const record = findItemByColumn();
|
|
186
|
+
const options = findOptionsByColumn();
|
|
187
|
+
targetComponents.value = componentProps(record.search);
|
|
188
|
+
targetComponents.value.label = record.title;
|
|
189
|
+
// 处理options
|
|
190
|
+
if (options) {
|
|
191
|
+
valueOptions.value = options;
|
|
338
192
|
}
|
|
339
193
|
else {
|
|
340
|
-
|
|
194
|
+
await handleColumnsOptions(record.search.options);
|
|
341
195
|
}
|
|
342
|
-
}, { immediate: true
|
|
196
|
+
}, { immediate: true });
|
|
197
|
+
watch(() => [props.value, props.termType, props.column, props.type], () => {
|
|
198
|
+
termsModel.value = props.value;
|
|
199
|
+
termsModel.termType = props.termType;
|
|
200
|
+
termsModel.column = props.column;
|
|
201
|
+
termsModel.type = props.type;
|
|
202
|
+
});
|
|
343
203
|
return (_ctx, _cache) => {
|
|
344
|
-
return (_openBlock(), _createElementBlock("div",
|
|
345
|
-
(
|
|
346
|
-
|
|
204
|
+
return (_openBlock(), _createElementBlock("div", {
|
|
205
|
+
class: _normalizeClass(['JSearch-item', _unref(hashId)])
|
|
206
|
+
}, [
|
|
207
|
+
(__props.onlyValue)
|
|
208
|
+
? (_openBlock(), _createElementBlock("div", {
|
|
209
|
+
key: 0,
|
|
210
|
+
class: "JSearch-item--label",
|
|
211
|
+
style: _normalizeStyle({ minWidth: `${__props.labelWidth}px` })
|
|
212
|
+
}, _toDisplayString(targetComponents.value.label), 5 /* TEXT, STYLE */))
|
|
213
|
+
: (_openBlock(), _createElementBlock(_Fragment, { key: 1 }, [
|
|
347
214
|
(__props.expand)
|
|
348
|
-
? (_openBlock(), _createElementBlock("div",
|
|
215
|
+
? (_openBlock(), _createElementBlock("div", _hoisted_1, [
|
|
349
216
|
(__props.index !== 1 && __props.index !== 4)
|
|
350
217
|
? (_openBlock(), _createBlock(_unref(Select), {
|
|
351
218
|
key: 0,
|
|
@@ -353,9 +220,9 @@ const __sfc_main__ = _defineComponent({
|
|
|
353
220
|
"onUpdate:value": _cache[0] || (_cache[0] = ($event) => ((termsModel.type) = $event)),
|
|
354
221
|
options: _unref(typeOptions)(_unref(contextLocale)),
|
|
355
222
|
style: { "width": "100%" },
|
|
356
|
-
onChange:
|
|
223
|
+
onChange: onTypeChange
|
|
357
224
|
}, null, 8 /* PROPS */, ["value", "options"]))
|
|
358
|
-
: (_openBlock(), _createElementBlock("span",
|
|
225
|
+
: (_openBlock(), _createElementBlock("span", _hoisted_2, _toDisplayString(__props.index === 1 ? _unref(contextLocale).item.firstGroup : _unref(contextLocale).item.secondGroup), 1 /* TEXT */))
|
|
359
226
|
]))
|
|
360
227
|
: _createCommentVNode("v-if", true),
|
|
361
228
|
_createVNode(_unref(Select), {
|
|
@@ -364,136 +231,29 @@ const __sfc_main__ = _defineComponent({
|
|
|
364
231
|
placeholder: _unref(contextLocale).item.placeholder,
|
|
365
232
|
class: "JSearch-item--column",
|
|
366
233
|
options: columnOptions.value,
|
|
367
|
-
onChange:
|
|
234
|
+
onChange: onColumnChange
|
|
368
235
|
}, null, 8 /* PROPS */, ["value", "placeholder", "options"]),
|
|
369
236
|
_createVNode(_unref(Select), {
|
|
370
237
|
value: termsModel.termType,
|
|
371
238
|
"onUpdate:value": _cache[2] || (_cache[2] = ($event) => ((termsModel.termType) = $event)),
|
|
372
239
|
placeholder: _unref(contextLocale).item.placeholder,
|
|
373
240
|
class: "JSearch-item--termType",
|
|
374
|
-
options: termTypeOptions.
|
|
375
|
-
onChange:
|
|
241
|
+
options: termTypeOptions.value,
|
|
242
|
+
onChange: onTermTypeChange
|
|
376
243
|
}, null, 8 /* PROPS */, ["value", "placeholder", "options"])
|
|
377
|
-
], 64 /* STABLE_FRAGMENT */))
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
style:
|
|
382
|
-
},
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
key: 0,
|
|
389
|
-
value: termsModel.value,
|
|
390
|
-
"onUpdate:value": _cache[3] || (_cache[3] = ($event) => ((termsModel.value) = $event)),
|
|
391
|
-
"allow-clear": ""
|
|
392
|
-
}, cProps.value, {
|
|
393
|
-
style: { "width": "100%" },
|
|
394
|
-
onChange: valueChange
|
|
395
|
-
}), null, 16 /* FULL_PROPS */, ["value"]))
|
|
396
|
-
: (component.value === _unref(componentType).select)
|
|
397
|
-
? (_openBlock(), _createBlock(_unref(Select), _mergeProps({
|
|
398
|
-
key: 1,
|
|
399
|
-
value: termsModel.value,
|
|
400
|
-
"onUpdate:value": _cache[4] || (_cache[4] = ($event) => ((termsModel.value) = $event)),
|
|
401
|
-
"allow-clear": "",
|
|
402
|
-
"show-search": "",
|
|
403
|
-
mode: isBtw.value ? 'multiple' : 'combobox'
|
|
404
|
-
}, cProps.value, {
|
|
405
|
-
style: { "width": "100%", "min-width": "80px" },
|
|
406
|
-
loading: optionLoading.value,
|
|
407
|
-
options: options.value,
|
|
408
|
-
"filter-option": (v, option) => _unref(filterSelectNode)(v, option, 'label'),
|
|
409
|
-
onChange: valueChange
|
|
410
|
-
}), null, 16 /* FULL_PROPS */, ["value", "mode", "loading", "options", "filter-option"]))
|
|
411
|
-
: (component.value === _unref(componentType).inputNumber)
|
|
412
|
-
? (_openBlock(), _createBlock(_unref(InputNumber), _mergeProps({
|
|
413
|
-
key: 2,
|
|
414
|
-
value: termsModel.value,
|
|
415
|
-
"onUpdate:value": _cache[5] || (_cache[5] = ($event) => ((termsModel.value) = $event)),
|
|
416
|
-
"allow-clear": ""
|
|
417
|
-
}, cProps.value, {
|
|
418
|
-
style: { "width": "100%" },
|
|
419
|
-
onChange: valueChange
|
|
420
|
-
}), null, 16 /* FULL_PROPS */, ["value"]))
|
|
421
|
-
: (component.value === _unref(componentType).password)
|
|
422
|
-
? (_openBlock(), _createBlock(_unref(InputPassword), _mergeProps({
|
|
423
|
-
key: 3,
|
|
424
|
-
value: termsModel.value,
|
|
425
|
-
"onUpdate:value": _cache[6] || (_cache[6] = ($event) => ((termsModel.value) = $event)),
|
|
426
|
-
"allow-clear": ""
|
|
427
|
-
}, cProps.value, {
|
|
428
|
-
style: { "width": "100%" },
|
|
429
|
-
onChange: valueChange
|
|
430
|
-
}), null, 16 /* FULL_PROPS */, ["value"]))
|
|
431
|
-
: (component.value === _unref(componentType).time)
|
|
432
|
-
? (_openBlock(), _createBlock(_unref(TimePicker), _mergeProps({
|
|
433
|
-
key: 4,
|
|
434
|
-
value: termsModel.value,
|
|
435
|
-
"onUpdate:value": _cache[7] || (_cache[7] = ($event) => ((termsModel.value) = $event)),
|
|
436
|
-
"allow-clear": "",
|
|
437
|
-
"value-format": "HH:mm:ss",
|
|
438
|
-
style: { "width": "100%" }
|
|
439
|
-
}, cProps.value, { onChange: valueChange }), null, 16 /* FULL_PROPS */, ["value"]))
|
|
440
|
-
: (component.value === _unref(componentType).timeRange)
|
|
441
|
-
? (_openBlock(), _createBlock(_unref(TimeRangePicker), _mergeProps({
|
|
442
|
-
key: 5,
|
|
443
|
-
value: termsModel.value,
|
|
444
|
-
"onUpdate:value": _cache[8] || (_cache[8] = ($event) => ((termsModel.value) = $event)),
|
|
445
|
-
"allow-clear": "",
|
|
446
|
-
"value-format": "HH:mm:ss",
|
|
447
|
-
style: { "width": "100%" }
|
|
448
|
-
}, cProps.value, { onChange: valueChange }), null, 16 /* FULL_PROPS */, ["value"]))
|
|
449
|
-
: (component.value === _unref(componentType).date)
|
|
450
|
-
? (_openBlock(), _createBlock(_unref(DatePicker), _mergeProps({
|
|
451
|
-
key: 6,
|
|
452
|
-
value: termsModel.value,
|
|
453
|
-
"onUpdate:value": _cache[9] || (_cache[9] = ($event) => ((termsModel.value) = $event)),
|
|
454
|
-
"allow-clear": "",
|
|
455
|
-
"show-time": "",
|
|
456
|
-
"value-format": "YYYY-MM-DD HH:mm:ss",
|
|
457
|
-
style: { "width": "100%" }
|
|
458
|
-
}, cProps.value, { onChange: valueChange }), null, 16 /* FULL_PROPS */, ["value"]))
|
|
459
|
-
: (component.value === _unref(componentType).rangePicker)
|
|
460
|
-
? (_openBlock(), _createBlock(_unref(RangePicker), _mergeProps({
|
|
461
|
-
key: 7,
|
|
462
|
-
value: termsModel.value,
|
|
463
|
-
"onUpdate:value": _cache[10] || (_cache[10] = ($event) => ((termsModel.value) = $event)),
|
|
464
|
-
"allow-clear": "",
|
|
465
|
-
"show-time": "",
|
|
466
|
-
"value-format": "YYYY-MM-DD HH:mm:ss",
|
|
467
|
-
style: { "width": "100%" }
|
|
468
|
-
}, cProps.value, { onChange: valueChange }), null, 16 /* FULL_PROPS */, ["value"]))
|
|
469
|
-
: (component.value === _unref(componentType).treeSelect)
|
|
470
|
-
? (_openBlock(), _createBlock(_unref(TreeSelect), _mergeProps({
|
|
471
|
-
key: 8,
|
|
472
|
-
value: termsModel.value,
|
|
473
|
-
"onUpdate:value": _cache[11] || (_cache[11] = ($event) => ((termsModel.value) = $event)),
|
|
474
|
-
"allow-clear": "",
|
|
475
|
-
"show-search": "",
|
|
476
|
-
style: { "width": "100%" },
|
|
477
|
-
height: 350,
|
|
478
|
-
"field-names": { label: 'name', value: 'id' },
|
|
479
|
-
multiple: isBtw.value,
|
|
480
|
-
"filter-tree-node": (v, option) => _unref(filterTreeSelectNode)(v, option)
|
|
481
|
-
}, cProps.value, {
|
|
482
|
-
"tree-data": options.value,
|
|
483
|
-
onChange: valueChange
|
|
484
|
-
}), null, 16 /* FULL_PROPS */, ["value", "multiple", "filter-tree-node", "tree-data"]))
|
|
485
|
-
: (component.value === _unref(componentType).component && componentName.value)
|
|
486
|
-
? (_openBlock(), _createBlock(_resolveDynamicComponent(componentName.value), _mergeProps({ key: 9 }, cProps.value, {
|
|
487
|
-
value: termsModel.value,
|
|
488
|
-
"onUpdate:value": _cache[12] || (_cache[12] = ($event) => ((termsModel.value) = $event)),
|
|
489
|
-
onChange: valueChange
|
|
490
|
-
}), null, 16 /* FULL_PROPS */, ["value"]))
|
|
491
|
-
: _createCommentVNode("v-if", true)
|
|
492
|
-
]),
|
|
493
|
-
_: 1 /* STABLE */
|
|
494
|
-
})
|
|
244
|
+
], 64 /* STABLE_FRAGMENT */)),
|
|
245
|
+
_createElementVNode("div", _hoisted_3, [
|
|
246
|
+
(_openBlock(), _createBlock(_resolveDynamicComponent(targetComponents.value.name), _mergeProps({
|
|
247
|
+
"allow-clear": "",
|
|
248
|
+
style: { "width": "100%", "min-width": "80px" }
|
|
249
|
+
}, targetComponents.value.props, {
|
|
250
|
+
options: valueOptions.value,
|
|
251
|
+
value: termsModel.value,
|
|
252
|
+
"onUpdate:value": _cache[3] || (_cache[3] = ($event) => ((termsModel.value) = $event)),
|
|
253
|
+
onChange: onValueChange
|
|
254
|
+
}), null, 16 /* FULL_PROPS */, ["options", "value"]))
|
|
495
255
|
])
|
|
496
|
-
]));
|
|
256
|
+
], 2 /* CLASS */));
|
|
497
257
|
};
|
|
498
258
|
}
|
|
499
259
|
});
|