@oinone/kunlun-vue-admin-base 6.3.1 → 6.3.2
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/dist/oinone-kunlun-vue-admin-base.css +1 -1
- package/dist/oinone-kunlun-vue-admin-base.esm.js +42 -25
- package/dist/oinone-kunlun-vue-admin-base.scss +1 -1
- package/dist/types/src/view/search/SearchWidget.d.ts +1 -0
- package/package.json +8 -8
- package/src/view/search/DefaultSearch.vue +36 -32
- package/src/view/search/SearchWidget.ts +14 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@oinone/kunlun-vue-admin-base",
|
|
3
|
-
"version": "6.3.
|
|
3
|
+
"version": "6.3.2",
|
|
4
4
|
"main": "index.ts",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"prebuild": "rimraf dist",
|
|
@@ -14,13 +14,13 @@
|
|
|
14
14
|
"doc": "typedoc --out docs src/index.ts"
|
|
15
15
|
},
|
|
16
16
|
"dependencies": {
|
|
17
|
-
"@oinone/kunlun-vue-admin-layout": "6.3.
|
|
18
|
-
"@oinone/kunlun-vue-router": "6.3.
|
|
19
|
-
"@oinone/kunlun-vue-ui": "6.3.
|
|
20
|
-
"@oinone/kunlun-vue-ui-antd": "6.3.
|
|
21
|
-
"@oinone/kunlun-vue-ui-common": "6.3.
|
|
22
|
-
"@oinone/kunlun-vue-ui-el": "6.3.
|
|
23
|
-
"@oinone/kunlun-vue-widget": "6.3.
|
|
17
|
+
"@oinone/kunlun-vue-admin-layout": "6.3.2",
|
|
18
|
+
"@oinone/kunlun-vue-router": "6.3.2",
|
|
19
|
+
"@oinone/kunlun-vue-ui": "6.3.2",
|
|
20
|
+
"@oinone/kunlun-vue-ui-antd": "6.3.2",
|
|
21
|
+
"@oinone/kunlun-vue-ui-common": "6.3.2",
|
|
22
|
+
"@oinone/kunlun-vue-ui-el": "6.3.2",
|
|
23
|
+
"@oinone/kunlun-vue-widget": "6.3.2",
|
|
24
24
|
"@wangeditor/editor": "5.1.23",
|
|
25
25
|
"@wangeditor/editor-for-vue": "5.1.11",
|
|
26
26
|
"@wangeditor/plugin-upload-attachment": "1.1.0",
|
|
@@ -260,39 +260,43 @@ export default defineComponent({
|
|
|
260
260
|
|
|
261
261
|
const finalExpandSize = props.invisibleSearch ? props.foldSize + 1 : props.foldSize;
|
|
262
262
|
appendFieldDslDefinition(fields, widgets, finalExpandSize, props.foldSize, props.cateFields);
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
263
|
+
if (fields.length) {
|
|
264
|
+
hasExpandButton = fields.length > finalExpandSize;
|
|
265
|
+
if (hasExpandButton) {
|
|
266
|
+
fields = fields.slice(0, finalExpandSize);
|
|
267
|
+
}
|
|
268
|
+
if (!props.invisibleSearch) {
|
|
269
|
+
const searchActionBar: VNode[] = createSearchBar(false, {
|
|
270
|
+
hasExpandButton,
|
|
271
|
+
showSearchPrefer: props.showSearchPrefer,
|
|
272
|
+
onSearch,
|
|
273
|
+
onReset,
|
|
274
|
+
onExpand,
|
|
275
|
+
translate: props.translate,
|
|
276
|
+
preferProps: {
|
|
277
|
+
selected: props.selectedPrefer,
|
|
278
|
+
options: props.searchPreferOptions,
|
|
279
|
+
onLoad: props.onLoadSearchPreferOptions,
|
|
280
|
+
onCreate: props.onCreateSearchPrefer,
|
|
281
|
+
onUpdate: props.onUpdateSearchPrefer,
|
|
282
|
+
onRemove: props.onRemoveSearchPrefer,
|
|
283
|
+
onSelect: props.onSelectSearchPrefer,
|
|
284
|
+
onUnselect: props.onUnselectSearchPrefer
|
|
285
|
+
}
|
|
286
|
+
});
|
|
287
|
+
invisible = !fields.length;
|
|
288
288
|
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
289
|
+
const searchBarCol = createSearchBarCol(
|
|
290
|
+
searchActionBar,
|
|
291
|
+
(props.foldSize - fields.length) * (DEFAULT_COLS / (props.foldSize + 1)),
|
|
292
|
+
invisible,
|
|
293
|
+
props.foldSize
|
|
294
|
+
);
|
|
295
|
+
fields.push(searchBarCol);
|
|
296
|
+
}
|
|
297
|
+
} else {
|
|
298
|
+
hasExpandButton = false;
|
|
299
|
+
fields = widgets;
|
|
296
300
|
}
|
|
297
301
|
defaultChildren.push(
|
|
298
302
|
withDirectives(
|
|
@@ -9,9 +9,10 @@ import { getRouterInstance } from '@oinone/kunlun-router';
|
|
|
9
9
|
import { BooleanHelper, NumberHelper } from '@oinone/kunlun-shared';
|
|
10
10
|
import { SPI } from '@oinone/kunlun-spi';
|
|
11
11
|
import { OioMessage } from '@oinone/kunlun-vue-ui-antd';
|
|
12
|
-
import { Widget } from '@oinone/kunlun-vue-widget';
|
|
12
|
+
import { isAllInvisible, Widget } from '@oinone/kunlun-vue-widget';
|
|
13
13
|
import { toString } from 'lodash-es';
|
|
14
14
|
import { BaseElementWidget, BaseSearchWidget } from '../../basic';
|
|
15
|
+
import { DefaultRowWidget } from '../../container';
|
|
15
16
|
import { UserPreferService } from '../../service';
|
|
16
17
|
import { SEARCH_WIDGET, UserSearchPrefer, UserSearchPreferField } from '../../typing';
|
|
17
18
|
import DefaultSearch from './DefaultSearch.vue';
|
|
@@ -244,4 +245,16 @@ export class SearchWidget extends BaseSearchWidget {
|
|
|
244
245
|
super.$$mounted();
|
|
245
246
|
this.isExpand = BooleanHelper.toBoolean(this.urlParameters.expand) || false;
|
|
246
247
|
}
|
|
248
|
+
|
|
249
|
+
protected childrenInvisibleProcess(): boolean {
|
|
250
|
+
if (this.disabledExpand && !this.invisibleSearch) {
|
|
251
|
+
const children = this.getChildren();
|
|
252
|
+
const lastChild = children[children.length - 1];
|
|
253
|
+
if (children.length === 2 && lastChild instanceof DefaultRowWidget) {
|
|
254
|
+
return isAllInvisible(children.slice(0, children.length - 1));
|
|
255
|
+
}
|
|
256
|
+
return isAllInvisible(children);
|
|
257
|
+
}
|
|
258
|
+
return super.childrenInvisibleProcess();
|
|
259
|
+
}
|
|
247
260
|
}
|