@jetlinks-web/components 3.2.3 → 3.2.6
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 +151 -41
- package/es/EditTable/EditTable.js +68 -41
- package/es/ProLayout/Basic/BasicLayout.js +2 -0
- package/es/ProLayout/Basic/Header.js +7 -0
- package/es/ProLayout/TopHeader/index.js +10 -1
- package/es/ProLayout/TopHeader/style.js +5 -1
- package/es/Search/Advanced/History.js +1 -1
- package/es/Search/Advanced/index.js +25 -26
- package/lib/AutoComplete/AutoComplete.js +151 -41
- package/lib/EditTable/EditTable.js +68 -41
- package/lib/ProLayout/Basic/BasicLayout.js +2 -0
- package/lib/ProLayout/Basic/Header.js +7 -0
- package/lib/ProLayout/TopHeader/index.js +10 -1
- package/lib/ProLayout/TopHeader/style.js +5 -1
- package/lib/Search/Advanced/History.js +1 -1
- package/lib/Search/Advanced/index.js +25 -26
- package/package.json +1 -1
|
@@ -32,6 +32,12 @@ var headerViewProps = exports.headerViewProps = (0, _objectSpread2.default)((0,
|
|
|
32
32
|
return undefined;
|
|
33
33
|
}
|
|
34
34
|
},
|
|
35
|
+
leftContentRender: {
|
|
36
|
+
type: [Object, Function, Boolean],
|
|
37
|
+
default: function _default() {
|
|
38
|
+
return undefined;
|
|
39
|
+
}
|
|
40
|
+
},
|
|
35
41
|
hasSiderMenu: _vueTypes.default.looseBool,
|
|
36
42
|
siderWidth: _vueTypes.default.number.def(208)
|
|
37
43
|
});
|
|
@@ -62,6 +68,7 @@ var _default2 = exports.default = (0, _vue.defineComponent)({
|
|
|
62
68
|
"theme": theme.value,
|
|
63
69
|
"mode": "horizontal"
|
|
64
70
|
}, props), {}, {
|
|
71
|
+
"leftContentRender": props.leftContentRender,
|
|
65
72
|
"onCollapse": onCollapse.value,
|
|
66
73
|
"menuData": context.menuData
|
|
67
74
|
}), null);
|
|
@@ -56,6 +56,12 @@ var baseHeaderProps = exports.baseHeaderProps = (0, _objectSpread2.default)((0,
|
|
|
56
56
|
return undefined;
|
|
57
57
|
}
|
|
58
58
|
},
|
|
59
|
+
leftContentRender: {
|
|
60
|
+
type: [Object, Function],
|
|
61
|
+
default: function _default() {
|
|
62
|
+
return undefined;
|
|
63
|
+
}
|
|
64
|
+
},
|
|
59
65
|
collapsedButtonRender: _SiderMenu.siderMenuProps.collapsedButtonRender,
|
|
60
66
|
matchMenuKeys: _SiderMenu.siderMenuProps.matchMenuKeys,
|
|
61
67
|
// events
|
|
@@ -96,6 +102,7 @@ var TopNavHeader = exports.TopNavHeader = function TopNavHeader(props) {
|
|
|
96
102
|
onOpenKeys = props.onOpenKeys,
|
|
97
103
|
onSelect = props.onSelect,
|
|
98
104
|
contentWidth = props.contentWidth,
|
|
105
|
+
leftContentRender = props.leftContentRender,
|
|
99
106
|
rightContentRender = props.rightContentRender,
|
|
100
107
|
topHeaderMenuRender = props.topHeaderMenuRender,
|
|
101
108
|
layout = props.layout,
|
|
@@ -152,7 +159,9 @@ var TopNavHeader = exports.TopNavHeader = function TopNavHeader(props) {
|
|
|
152
159
|
"class": "".concat(prefixCls, "-logo"),
|
|
153
160
|
"key": "logo",
|
|
154
161
|
"id": "logo"
|
|
155
|
-
}, [headerDom])]), (0, _vue.createVNode)("div", {
|
|
162
|
+
}, [headerDom])]), leftContentRender && (0, _vue.createVNode)("div", {
|
|
163
|
+
"class": "".concat(prefixCls, "-left-content")
|
|
164
|
+
}, [typeof leftContentRender === 'function' ? leftContentRender((0, _objectSpread2.default)({}, props)) : leftContentRender]), (0, _vue.createVNode)("div", {
|
|
156
165
|
"style": {
|
|
157
166
|
flex: 1
|
|
158
167
|
},
|
|
@@ -91,13 +91,17 @@ var genTopHeaderStyle = exports.genTopHeaderStyle = function genTopHeaderStyle(c
|
|
|
91
91
|
}
|
|
92
92
|
}), '.anticon', {
|
|
93
93
|
color: 'inherit'
|
|
94
|
-
})), "".concat(topNavHeaderCls, "-main"), (0, _defineProperty2.default)({
|
|
94
|
+
})), "".concat(topNavHeaderCls, "-main"), (0, _defineProperty2.default)((0, _defineProperty2.default)({
|
|
95
95
|
display: 'flex',
|
|
96
96
|
height: '100%',
|
|
97
97
|
paddingLeft: '16px'
|
|
98
98
|
}, "".concat(topNavHeaderCls, "-main-left"), {
|
|
99
99
|
display: 'flex',
|
|
100
100
|
minWidth: '192px'
|
|
101
|
+
}), "".concat(topNavHeaderCls, "-left-content"), {
|
|
102
|
+
display: 'flex',
|
|
103
|
+
alignItems: 'center',
|
|
104
|
+
marginInlineEnd: '16px'
|
|
101
105
|
})), '.anticon', {
|
|
102
106
|
color: '#fff'
|
|
103
107
|
}), "".concat(topNavHeaderCls, "-logo"), {
|
|
@@ -41,7 +41,7 @@ const _hoisted_3 = {
|
|
|
41
41
|
};
|
|
42
42
|
import { computed, ref } from 'vue';
|
|
43
43
|
import { isFunction } from 'lodash-es';
|
|
44
|
-
import { AIcon, Empty, Ellipsis } from '
|
|
44
|
+
import { AIcon, Empty, Ellipsis } from '../../';
|
|
45
45
|
import { Popconfirm, Button, FormItemRest, Popover, message } from 'ant-design-vue';
|
|
46
46
|
import { useLocaleReceiver } from "../../LocaleReciver";
|
|
47
47
|
import useSearchStyle from '../style';
|
|
@@ -7,6 +7,7 @@
|
|
|
7
7
|
"deleteRequest": "props",
|
|
8
8
|
"deleteKey": "props",
|
|
9
9
|
"defaultValues": "props",
|
|
10
|
+
"saveButton": "props",
|
|
10
11
|
"SearchItem": "setup-const",
|
|
11
12
|
"typeOptions": "setup-maybe-ref",
|
|
12
13
|
"useHandleColumns": "setup-maybe-ref",
|
|
@@ -92,14 +93,14 @@ import History from './History.js';
|
|
|
92
93
|
import { compatibleOldTerms, getItemDefaultValue, termsParamsFormat, } from '../util';
|
|
93
94
|
import { Select, Button, Form, FormItemRest } from 'ant-design-vue';
|
|
94
95
|
import { AIcon } from '../../components';
|
|
95
|
-
import { useLocaleReceiver } from
|
|
96
|
-
import { SearchConfig } from
|
|
97
|
-
import { isObject } from
|
|
96
|
+
import { useLocaleReceiver } from '../../LocaleReciver';
|
|
97
|
+
import { SearchConfig } from '../../utils/constants';
|
|
98
|
+
import { isObject } from 'lodash-es';
|
|
98
99
|
import useSearchStyle from '../style';
|
|
99
100
|
const __sfc_main__ = _defineComponent({
|
|
100
101
|
...{
|
|
101
102
|
name: 'JAdvancedSearch',
|
|
102
|
-
inheritAttrs: false
|
|
103
|
+
inheritAttrs: false,
|
|
103
104
|
},
|
|
104
105
|
props: {
|
|
105
106
|
columns: {
|
|
@@ -135,7 +136,11 @@ const __sfc_main__ = _defineComponent({
|
|
|
135
136
|
defaultValues: {
|
|
136
137
|
type: Object,
|
|
137
138
|
default: undefined,
|
|
138
|
-
}
|
|
139
|
+
},
|
|
140
|
+
saveButton: {
|
|
141
|
+
type: Boolean,
|
|
142
|
+
default: true,
|
|
143
|
+
},
|
|
139
144
|
},
|
|
140
145
|
emits: ['search', 'reset'],
|
|
141
146
|
setup(__props, { expose: __expose, emit: __emit }) {
|
|
@@ -159,7 +164,8 @@ const __sfc_main__ = _defineComponent({
|
|
|
159
164
|
const expandChange = () => {
|
|
160
165
|
expand.value = !expand.value;
|
|
161
166
|
terms.terms.length = 1;
|
|
162
|
-
if (expand.value) {
|
|
167
|
+
if (expand.value) {
|
|
168
|
+
// 展开
|
|
163
169
|
let arr = Object.values(columnsMap.value);
|
|
164
170
|
const mergeArr = [];
|
|
165
171
|
for (let i = 1; i < 6; i++) {
|
|
@@ -266,11 +272,11 @@ const __sfc_main__ = _defineComponent({
|
|
|
266
272
|
watch(() => props.target, () => {
|
|
267
273
|
clearValue();
|
|
268
274
|
}, {
|
|
269
|
-
immediate: true
|
|
275
|
+
immediate: true,
|
|
270
276
|
});
|
|
271
277
|
__expose({
|
|
272
278
|
setValues: handleDefaultValues,
|
|
273
|
-
reset
|
|
279
|
+
reset,
|
|
274
280
|
});
|
|
275
281
|
return (_ctx, _cache) => {
|
|
276
282
|
return (_openBlock(), _createBlock(_unref(Form), {
|
|
@@ -295,11 +301,7 @@ const __sfc_main__ = _defineComponent({
|
|
|
295
301
|
])
|
|
296
302
|
}, [
|
|
297
303
|
_createElementVNode("div", {
|
|
298
|
-
class: _normalizeClass([
|
|
299
|
-
'JSearch-items',
|
|
300
|
-
expand.value ? 'items-expand' : '',
|
|
301
|
-
layout.value,
|
|
302
|
-
])
|
|
304
|
+
class: _normalizeClass(['JSearch-items', expand.value ? 'items-expand' : '', layout.value])
|
|
303
305
|
}, [
|
|
304
306
|
_createElementVNode("div", _hoisted_1, [
|
|
305
307
|
_createElementVNode("div", _hoisted_2, [
|
|
@@ -359,10 +361,7 @@ const __sfc_main__ = _defineComponent({
|
|
|
359
361
|
: _createCommentVNode("v-if", true)
|
|
360
362
|
], 2 /* CLASS */),
|
|
361
363
|
_createElementVNode("div", {
|
|
362
|
-
class: _normalizeClass([
|
|
363
|
-
'JSearch-footer',
|
|
364
|
-
expand.value || compatible.value ? 'expand' : '',
|
|
365
|
-
])
|
|
364
|
+
class: _normalizeClass(['JSearch-footer', expand.value || compatible.value ? 'expand' : ''])
|
|
366
365
|
}, [
|
|
367
366
|
_renderSlot(_ctx.$slots, "footerRender", {
|
|
368
367
|
reset: reset,
|
|
@@ -376,11 +375,14 @@ const __sfc_main__ = _defineComponent({
|
|
|
376
375
|
]),
|
|
377
376
|
_: 1 /* STABLE */
|
|
378
377
|
}),
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
378
|
+
(__props.saveButton !== false)
|
|
379
|
+
? (_openBlock(), _createBlock(SaveHistory, {
|
|
380
|
+
key: 0,
|
|
381
|
+
terms: terms,
|
|
382
|
+
target: _unref(target),
|
|
383
|
+
request: __props.request || _unref(context).saveRequest
|
|
384
|
+
}, null, 8 /* PROPS */, ["terms", "target", "request"]))
|
|
385
|
+
: _createCommentVNode("v-if", true),
|
|
384
386
|
_createVNode(History, {
|
|
385
387
|
target: _unref(target),
|
|
386
388
|
request: __props.historyRequest || _unref(context).historyRequest,
|
|
@@ -399,10 +401,7 @@ const __sfc_main__ = _defineComponent({
|
|
|
399
401
|
_createElementVNode("span", _hoisted_7, _toDisplayString(_unref(contextLocale).advanced.more), 1 /* TEXT */),
|
|
400
402
|
_createVNode(_unref(AIcon), {
|
|
401
403
|
type: "DoubleRightOutlined",
|
|
402
|
-
class: _normalizeClass([
|
|
403
|
-
'more-icon',
|
|
404
|
-
expand.value ? 'more-up' : 'more-down',
|
|
405
|
-
])
|
|
404
|
+
class: _normalizeClass(['more-icon', expand.value ? 'more-up' : 'more-down'])
|
|
406
405
|
}, null, 8 /* PROPS */, ["class"])
|
|
407
406
|
]),
|
|
408
407
|
_: 1 /* STABLE */
|