@oinone/kunlun-vue-admin-base 6.3.3 → 6.3.5

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.
Files changed (33) hide show
  1. package/dist/oinone-kunlun-vue-admin-base.css +1 -1
  2. package/dist/oinone-kunlun-vue-admin-base.esm.js +15109 -15034
  3. package/dist/oinone-kunlun-vue-admin-base.scss +1 -1
  4. package/dist/types/src/field/form/float/Plat.vue.d.ts +2 -2
  5. package/dist/types/src/service/user/UserService.d.ts +2 -2
  6. package/dist/types/src/tags/index.d.ts +1 -2
  7. package/dist/types/src/tags/mixin/index.d.ts +1 -0
  8. package/dist/types/src/tags/resolve/internal/widget-resolve.d.ts +1 -1
  9. package/dist/types/src/view/search/DefaultSearch.vue.d.ts +20 -0
  10. package/dist/types/src/view/search/DefaultSearchTab.vue.d.ts +6 -0
  11. package/dist/types/src/view/search/SearchTabWidget.d.ts +1 -0
  12. package/dist/types/src/view/search/SearchWidget.d.ts +3 -0
  13. package/dist/types/src/view/search/types.d.ts +9 -0
  14. package/dist/types/src/view/table/DefaultTable.vue.d.ts +33 -0
  15. package/dist/types/src/view/table/TableWidget.d.ts +5 -1
  16. package/package.json +8 -8
  17. package/src/container/media/text-info/DefaultTextInfoValue.vue +2 -3
  18. package/src/field/tree/DefaultFieldTree.vue +3 -0
  19. package/src/service/user/UserService.ts +11 -4
  20. package/src/tags/Field.vue +1 -1
  21. package/src/tags/index.ts +2 -3
  22. package/src/tags/mixin/index.ts +1 -0
  23. package/src/tags/resolve/internal/widget-resolve.ts +1 -1
  24. package/src/view/reset-password/ForgetPasswordWidget.ts +5 -1
  25. package/src/view/reset-password/style/index.scss +2 -2
  26. package/src/view/search/DefaultSearch.vue +25 -23
  27. package/src/view/search/DefaultSearchTab.vue +9 -1
  28. package/src/view/search/SearchTabWidget.ts +8 -3
  29. package/src/view/search/SearchWidget.ts +16 -1
  30. package/src/view/search/style/index.scss +31 -9
  31. package/src/view/search/types.ts +9 -0
  32. package/src/view/table/DefaultTable.vue +21 -3
  33. package/src/view/table/TableWidget.ts +26 -38
@@ -47,7 +47,7 @@ declare const _default: import("vue").DefineComponent<{
47
47
  default: boolean;
48
48
  };
49
49
  layout: {
50
- type: PropType<import("@oinone/kunlun-vue-ui-antd").FormLayout>;
50
+ type: PropType<import("@oinone/kunlun-vue-ui-common").FormLayout>;
51
51
  };
52
52
  label: {
53
53
  type: (BooleanConstructor | StringConstructor)[];
@@ -141,7 +141,7 @@ declare const _default: import("vue").DefineComponent<{
141
141
  default: boolean;
142
142
  };
143
143
  layout: {
144
- type: PropType<import("@oinone/kunlun-vue-ui-antd").FormLayout>;
144
+ type: PropType<import("@oinone/kunlun-vue-ui-common").FormLayout>;
145
145
  };
146
146
  label: {
147
147
  type: (BooleanConstructor | StringConstructor)[];
@@ -18,8 +18,8 @@ export interface UserServiceResponse {
18
18
  };
19
19
  }
20
20
  export declare class UserService {
21
- static sendSmsVerificationCodeByPhone(eventType: UserBehaviorEventEnum, phone: string, picCode?: string): Promise<UserServiceResponse>;
22
- static fetchVerificationCodeByForget(phone: string, picCode?: string): Promise<UserServiceResponse>;
21
+ static sendSmsVerificationCodeByPhone(eventType: UserBehaviorEventEnum, phone: string, picCode?: string, phoneCode?: string): Promise<UserServiceResponse>;
22
+ static fetchVerificationCodeByForget(phone: string, picCode?: string, phoneCode?: string): Promise<UserServiceResponse>;
23
23
  static resetPasswordByPhone(phone: string, verificationCode: any, password: string, confirmPassword: any, inviteCode: any): Promise<UserServiceResponse>;
24
24
  static resetPasswordByFirst(password: string, confirmPassword: any): Promise<UserServiceResponse>;
25
25
  }
@@ -2,7 +2,6 @@ import Action from './Action.vue';
2
2
  import ActionBar from './ActionBar.vue';
3
3
  import ActionColumn from './ActionColumn.vue';
4
4
  import Col from './Col.vue';
5
- import { Tabs } from './combination';
6
5
  import Container from './Container.vue';
7
6
  import Containers from './Containers.vue';
8
7
  import Custom from './Custom.vue';
@@ -21,7 +20,7 @@ import TextInfo from './TextInfo.vue';
21
20
  import Tree from './Tree.vue';
22
21
  import View from './View.vue';
23
22
  export declare function install(): void;
24
- export { View, Field, Action, Element, Pack, Custom, ActionBar, ActionColumn, Col, Container, Containers, Dropdown, Group, Icon, Paragraph, Picture, Row, Search, Table, TextInfo, Tree, Tabs };
23
+ export { View, Field, Action, Element, Pack, Custom, ActionBar, ActionColumn, Col, Container, Containers, Dropdown, Group, Icon, Paragraph, Picture, Row, Search, Table, TextInfo, Tree };
25
24
  export * from './combination';
26
25
  export * from './context';
27
26
  export * from './mixin';
@@ -1,2 +1,3 @@
1
1
  export * from './BaseWidgetTagMixin';
2
+ export * from './typing';
2
3
  export * from './use-widget-tag';
@@ -1,5 +1,5 @@
1
1
  import { RenderWidget, VueWidget } from '@oinone/kunlun-vue-widget';
2
- import { DefaultColWidget, DefaultRowWidget } from '../../../container';
2
+ import { DefaultColWidget, DefaultRowWidget } from '../../../container/block';
3
3
  import { CustomWidgetProps } from '../typing';
4
4
  import { ActionWidgetProps, ElementWidgetProps, FieldWidgetProps, PackWidgetProps, ViewWidgetProps } from './typing';
5
5
  export declare function createDefaultCol(rowWidget: DefaultRowWidget, props: PackWidgetProps): DefaultColWidget;
@@ -86,6 +86,15 @@ declare const _default: import("vue").DefineComponent<{
86
86
  type: import("vue").PropType<any[]>;
87
87
  default: () => never[];
88
88
  };
89
+ showTopCateAll: {
90
+ type: BooleanConstructor;
91
+ };
92
+ showSecondCateAll: {
93
+ type: BooleanConstructor;
94
+ };
95
+ topCateJustify: {
96
+ type: StringConstructor;
97
+ };
89
98
  cateFields: {
90
99
  type: import("vue").PropType<string[]>;
91
100
  };
@@ -230,6 +239,15 @@ declare const _default: import("vue").DefineComponent<{
230
239
  type: import("vue").PropType<any[]>;
231
240
  default: () => never[];
232
241
  };
242
+ showTopCateAll: {
243
+ type: BooleanConstructor;
244
+ };
245
+ showSecondCateAll: {
246
+ type: BooleanConstructor;
247
+ };
248
+ topCateJustify: {
249
+ type: StringConstructor;
250
+ };
233
251
  cateFields: {
234
252
  type: import("vue").PropType<string[]>;
235
253
  };
@@ -291,6 +309,8 @@ declare const _default: import("vue").DefineComponent<{
291
309
  showSearchPrefer: boolean;
292
310
  topCateFieldOptions: any[];
293
311
  secondCateFieldOptions: any[];
312
+ showTopCateAll: boolean;
313
+ showSecondCateAll: boolean;
294
314
  loading: boolean;
295
315
  colon: boolean;
296
316
  validateOnRuleChange: boolean;
@@ -19,6 +19,9 @@ declare const _default: import("vue").DefineComponent<{
19
19
  type: PropType<any[]>;
20
20
  default: () => never[];
21
21
  };
22
+ topCateJustify: {
23
+ type: StringConstructor;
24
+ };
22
25
  cateFields: {
23
26
  type: PropType<string[]>;
24
27
  };
@@ -50,6 +53,9 @@ declare const _default: import("vue").DefineComponent<{
50
53
  type: PropType<any[]>;
51
54
  default: () => never[];
52
55
  };
56
+ topCateJustify: {
57
+ type: StringConstructor;
58
+ };
53
59
  cateFields: {
54
60
  type: PropType<string[]>;
55
61
  };
@@ -10,6 +10,7 @@ export declare class SearchTabWidget extends BaseElementWidget {
10
10
  protected get showTopCateAll(): boolean;
11
11
  protected get topCateFieldOptions(): IModelFieldOption[];
12
12
  protected get secondCateModelField(): RuntimeModelField | undefined;
13
+ protected get topCateJustify(): string | undefined;
13
14
  protected get showSecondCateAll(): boolean;
14
15
  protected get secondCateFieldOptions(): IModelFieldOption[];
15
16
  onCateSearch: any;
@@ -8,6 +8,9 @@ export declare class SearchWidget extends BaseSearchWidget {
8
8
  protected get disabledExpand(): boolean;
9
9
  protected get foldSize(): number;
10
10
  protected get cateFields(): string[];
11
+ protected get topCateJustify(): string | undefined;
12
+ protected get showTopCateAll(): boolean;
13
+ protected get showSecondCateAll(): boolean;
11
14
  initialize(props: any): this;
12
15
  onExpand(expand: boolean): void;
13
16
  onSearch(): void;
@@ -89,6 +89,15 @@ export declare const DefaultSearchProps: {
89
89
  type: PropType<any[]>;
90
90
  default: () => never[];
91
91
  };
92
+ showTopCateAll: {
93
+ type: BooleanConstructor;
94
+ };
95
+ showSecondCateAll: {
96
+ type: BooleanConstructor;
97
+ };
98
+ topCateJustify: {
99
+ type: StringConstructor;
100
+ };
92
101
  cateFields: {
93
102
  type: PropType<string[]>;
94
103
  };
@@ -234,6 +234,21 @@ declare const __default__: import("vue").DefineComponent<{
234
234
  type: BooleanConstructor;
235
235
  default: undefined;
236
236
  };
237
+ border: {
238
+ type: StringConstructor;
239
+ };
240
+ stripe: {
241
+ type: BooleanConstructor;
242
+ default: boolean;
243
+ };
244
+ isCurrent: {
245
+ type: BooleanConstructor;
246
+ default: boolean;
247
+ };
248
+ isHover: {
249
+ type: BooleanConstructor;
250
+ default: boolean;
251
+ };
237
252
  }, {
238
253
  defaultTableRef: import("vue").Ref<HTMLElement>;
239
254
  table: import("vue").Ref<OioTableInstance | undefined>;
@@ -477,6 +492,21 @@ declare const __default__: import("vue").DefineComponent<{
477
492
  type: BooleanConstructor;
478
493
  default: undefined;
479
494
  };
495
+ border: {
496
+ type: StringConstructor;
497
+ };
498
+ stripe: {
499
+ type: BooleanConstructor;
500
+ default: boolean;
501
+ };
502
+ isCurrent: {
503
+ type: BooleanConstructor;
504
+ default: boolean;
505
+ };
506
+ isHover: {
507
+ type: BooleanConstructor;
508
+ default: boolean;
509
+ };
480
510
  }>>, {
481
511
  checkbox: boolean;
482
512
  loading: boolean;
@@ -494,5 +524,8 @@ declare const __default__: import("vue").DefineComponent<{
494
524
  emptyImage: string;
495
525
  autoLineHeight: boolean;
496
526
  enableSequence: boolean;
527
+ stripe: boolean;
528
+ isCurrent: boolean;
529
+ isHover: boolean;
497
530
  }>;
498
531
  export default __default__;
@@ -14,10 +14,14 @@ export declare class TableWidget<Props extends TableWidgetProps = TableWidgetPro
14
14
  initialize(props: Props): this;
15
15
  protected get cellWidth(): "auto" | undefined;
16
16
  protected get cellMinWidth(): string | undefined;
17
- protected get tableConfig(): import("./config").TableConfig;
17
+ protected get tableConfig(): Record<string, any>;
18
18
  protected get checkbox(): boolean;
19
19
  protected get lineHeight(): number | undefined;
20
20
  protected get minLineHeight(): number | undefined;
21
+ protected get border(): any;
22
+ protected get stripe(): any;
23
+ protected get isCurrent(): any;
24
+ protected get isHover(): any;
21
25
  /**
22
26
  * 表格行高是否自适应,默认开启
23
27
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@oinone/kunlun-vue-admin-base",
3
- "version": "6.3.3",
3
+ "version": "6.3.5",
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.3",
18
- "@oinone/kunlun-vue-router": "6.3.3",
19
- "@oinone/kunlun-vue-ui": "6.3.3",
20
- "@oinone/kunlun-vue-ui-antd": "6.3.3",
21
- "@oinone/kunlun-vue-ui-common": "6.3.3",
22
- "@oinone/kunlun-vue-ui-el": "6.3.3",
23
- "@oinone/kunlun-vue-widget": "6.3.3",
17
+ "@oinone/kunlun-vue-admin-layout": "6.3.5",
18
+ "@oinone/kunlun-vue-router": "6.3.5",
19
+ "@oinone/kunlun-vue-ui": "6.3.5",
20
+ "@oinone/kunlun-vue-ui-antd": "6.3.5",
21
+ "@oinone/kunlun-vue-ui-common": "6.3.5",
22
+ "@oinone/kunlun-vue-ui-el": "6.3.5",
23
+ "@oinone/kunlun-vue-widget": "6.3.5",
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",
@@ -1,7 +1,6 @@
1
1
  <script lang="ts">
2
- import { computed, createVNode, defineComponent, PropType } from 'vue';
3
- import Field from '../../../tags/Field.vue';
4
- import { TextInfoJustifyContent } from './typing';
2
+ import { createVNode, defineComponent, PropType } from 'vue';
3
+ import { Field } from '../../../tags';
5
4
 
6
5
  export default defineComponent({
7
6
  name: 'DefaultTextInfoValue',
@@ -339,6 +339,9 @@ export default defineComponent({
339
339
  ])
340
340
  ];
341
341
  }
342
+ if (typeof nodeChildren === 'string') {
343
+ nodeChildren = translateValueByKey(nodeChildren);
344
+ }
342
345
  return nodeChildren;
343
346
  },
344
347
  icon: ({ value }) => {
@@ -1,5 +1,5 @@
1
- import { GQL } from '@oinone/kunlun-request';
2
1
  import { SYSTEM_MODULE_NAME, UserBehaviorEventEnum, ViewActionTarget } from '@oinone/kunlun-meta';
2
+ import { GQL } from '@oinone/kunlun-request';
3
3
  import { encrypt } from '../../util';
4
4
 
5
5
  export interface UserServiceResponse {
@@ -32,12 +32,14 @@ export class UserService {
32
32
  public static sendSmsVerificationCodeByPhone(
33
33
  eventType: UserBehaviorEventEnum,
34
34
  phone: string,
35
- picCode?: string
35
+ picCode?: string,
36
+ phoneCode?: string
36
37
  ): Promise<UserServiceResponse> {
37
38
  return GQL.mutation('pamirsUserTransient', 'sendSmsVerificationCode')
38
39
  .buildRequest((builder) =>
39
40
  builder.buildObjectParameter('user', (dataBuilder) => {
40
41
  dataBuilder.stringParameter('phone', phone);
42
+ dataBuilder.stringParameter('inviteCode', phoneCode);
41
43
  dataBuilder.stringParameter('picCode', picCode);
42
44
  dataBuilder.enumerationParameter('userBehaviorEvent', eventType);
43
45
  })
@@ -48,11 +50,16 @@ export class UserService {
48
50
  .request(SYSTEM_MODULE_NAME.USER);
49
51
  }
50
52
 
51
- public static fetchVerificationCodeByForget(phone: string, picCode?: string): Promise<UserServiceResponse> {
53
+ public static fetchVerificationCodeByForget(
54
+ phone: string,
55
+ picCode?: string,
56
+ phoneCode?: string
57
+ ): Promise<UserServiceResponse> {
52
58
  return UserService.sendSmsVerificationCodeByPhone(
53
59
  UserBehaviorEventEnum.PHONE_MODIFY_PASSWORD_BY_PHONE_SEND_CODE,
54
60
  phone,
55
- picCode
61
+ picCode,
62
+ phoneCode
56
63
  );
57
64
  }
58
65
 
@@ -1,7 +1,7 @@
1
1
  <script lang="ts">
2
2
  import { defineComponent, Slots } from 'vue';
3
- import { InternalWidget } from './resolve';
4
3
  import { BaseWidgetTagMixin } from './mixin';
4
+ import { InternalWidget } from './resolve';
5
5
 
6
6
  export default defineComponent({
7
7
  name: 'Field',
package/src/tags/index.ts CHANGED
@@ -5,7 +5,7 @@ import Action from './Action.vue';
5
5
  import ActionBar from './ActionBar.vue';
6
6
  import ActionColumn from './ActionColumn.vue';
7
7
  import Col from './Col.vue';
8
- import { PackCombination, Tabs } from './combination';
8
+ import { PackCombination } from './combination';
9
9
  import Container from './Container.vue';
10
10
  import Containers from './Containers.vue';
11
11
  import Custom from './Custom.vue';
@@ -93,8 +93,7 @@ export {
93
93
  Search,
94
94
  Table,
95
95
  TextInfo,
96
- Tree,
97
- Tabs
96
+ Tree
98
97
  };
99
98
 
100
99
  export * from './combination';
@@ -1,2 +1,3 @@
1
1
  export * from './BaseWidgetTagMixin';
2
+ export * from './typing';
2
3
  export * from './use-widget-tag';
@@ -23,7 +23,7 @@ import {
23
23
  BaseViewOptions,
24
24
  CustomWidget as CommonCustomWidget
25
25
  } from '../../../basic';
26
- import { DefaultColWidget, DefaultContainerColWidget, DefaultRowWidget } from '../../../container';
26
+ import { DefaultColWidget, DefaultContainerColWidget, DefaultRowWidget } from '../../../container/block';
27
27
  import { FieldMixinComponentOptions, selectorFieldMixinComponent } from '../../../spi';
28
28
  import { ActiveLayoutEffectOpt } from '../../context/active';
29
29
  import { isCreateFlexElement } from '../helper';
@@ -101,7 +101,11 @@ export class ForgetPasswordWidget extends BaseI18nRouterWidget {
101
101
  if (!phone) {
102
102
  return false;
103
103
  }
104
- const { broken, errorMsg } = await UserService.fetchVerificationCodeByForget(phone);
104
+ const { broken, errorMsg } = await UserService.fetchVerificationCodeByForget(
105
+ phone,
106
+ undefined,
107
+ this.selectedCountry?.data?.phoneCode
108
+ );
105
109
  if (broken) {
106
110
  if (errorMsg) {
107
111
  OioMessage.error(errorMsg);
@@ -66,7 +66,7 @@
66
66
  background: #fafafc;
67
67
  }
68
68
 
69
- .ant-input-affix-wrapper {
69
+ .oio-input.ant-input-affix-wrapper {
70
70
  background-color: #fafafc;
71
71
  border-radius: 4px;
72
72
  border: solid 1px #e6e6e6;
@@ -86,7 +86,7 @@
86
86
  }
87
87
  }
88
88
 
89
- .ant-input-affix-wrapper > input.ant-input {
89
+ .oio-input.ant-input-affix-wrapper > input.ant-input {
90
90
  height: 46px !important;
91
91
  box-shadow: 0 0 0 1000px #fafafc inset;
92
92
  background-color: #fafafc;
@@ -165,6 +165,7 @@ function createSearchBar(
165
165
  type: ButtonType.link,
166
166
  iconPlacement: IconPlacement.AFTER,
167
167
  icon: 'oinone-xiala',
168
+ iconColor: 'var(--oio-primary-color)',
168
169
  onClick: options.onExpand
169
170
  },
170
171
  { default: () => expandText }
@@ -241,7 +242,7 @@ export default defineComponent({
241
242
  let invisible = false;
242
243
  let hasExpandButton = false;
243
244
 
244
- if (props.template && !props.disabledExpand) {
245
+ if (props.template) {
245
246
  const { widgets } = props.template;
246
247
  if (widgets && widgets.length) {
247
248
  let fields: DslDefinition[] = [];
@@ -253,18 +254,22 @@ export default defineComponent({
253
254
  cateFields: props.cateFields,
254
255
  dslNodeType: DslDefinitionType.ELEMENT,
255
256
  widget: 'SearchTab',
256
- widgets: cateWidgets
257
+ widgets: cateWidgets,
258
+ showTopCateAll: props.showTopCateAll,
259
+ showSecondCateAll: props.showSecondCateAll,
260
+ topCateJustify: props.topCateJustify
257
261
  })!
258
262
  );
259
263
  }
260
264
 
261
- const finalExpandSize = props.invisibleSearch ? props.foldSize + 1 : props.foldSize;
262
- appendFieldDslDefinition(fields, widgets, finalExpandSize, props.foldSize, props.cateFields);
263
- if (fields.length) {
265
+ if (!props.disabledExpand) {
266
+ const finalExpandSize = props.invisibleSearch ? props.foldSize + 1 : props.foldSize;
267
+ appendFieldDslDefinition(fields, widgets, finalExpandSize, props.foldSize, props.cateFields);
264
268
  hasExpandButton = fields.length > finalExpandSize;
265
269
  if (hasExpandButton) {
266
270
  fields = fields.slice(0, finalExpandSize);
267
271
  }
272
+
268
273
  if (!props.invisibleSearch) {
269
274
  const searchActionBar: VNode[] = createSearchBar(false, {
270
275
  hasExpandButton,
@@ -294,25 +299,22 @@ export default defineComponent({
294
299
  );
295
300
  fields.push(searchBarCol);
296
301
  }
297
- } else {
298
- hasExpandButton = false;
299
- fields = widgets;
302
+ defaultChildren.push(
303
+ withDirectives(
304
+ DslRender.render({
305
+ internal: true,
306
+ dslNodeType: DslDefinitionType.PACK,
307
+ widgets: fields,
308
+ widget: InternalWidget.Row,
309
+ cols: DEFAULT_COLS,
310
+ resolveOptions: {
311
+ mode: ResolveMode.NORMAL
312
+ }
313
+ })!,
314
+ [[vShow, !props.isExpand]]
315
+ )
316
+ );
300
317
  }
301
- defaultChildren.push(
302
- withDirectives(
303
- DslRender.render({
304
- internal: true,
305
- dslNodeType: DslDefinitionType.PACK,
306
- widgets: fields,
307
- widget: InternalWidget.Row,
308
- cols: DEFAULT_COLS,
309
- resolveOptions: {
310
- mode: ResolveMode.NORMAL
311
- }
312
- })!,
313
- [[vShow, !props.isExpand]]
314
- )
315
- );
316
318
  }
317
319
  }
318
320
 
@@ -27,6 +27,9 @@ export default defineComponent({
27
27
  type: Array as PropType<any[]>,
28
28
  default: () => []
29
29
  },
30
+ topCateJustify: {
31
+ type: String
32
+ },
30
33
  cateFields: {
31
34
  type: Array as PropType<string[]>
32
35
  },
@@ -104,11 +107,16 @@ export default defineComponent({
104
107
  render() {
105
108
  const cateSearchNodes = [] as VNode[];
106
109
  if (this.topCateFieldOptions?.length) {
110
+ const className = ['oio-cate-search'];
111
+ if (this.topCateJustify) {
112
+ className.push(`oio-cate-search-${this.topCateJustify.toLocaleLowerCase()}`);
113
+ }
114
+
107
115
  cateSearchNodes.push(
108
116
  createVNode(
109
117
  OioTabs,
110
118
  {
111
- class: 'oio-cate-search',
119
+ class: className,
112
120
  activeKey: this.topCateActive,
113
121
  'onUpdate:activeKey': (val) => (this.topCateActive = val),
114
122
  onChange: this.onChangeTopCate
@@ -2,7 +2,7 @@ import { SPI } from '@oinone/kunlun-spi';
2
2
  import { IModelField, IModelFieldOption, ModelFieldType, ViewType } from '@oinone/kunlun-meta';
3
3
  import { Widget } from '@oinone/kunlun-vue-widget';
4
4
  import { ActiveRecord, RuntimeModelField } from '@oinone/kunlun-engine';
5
- import { BooleanHelper, CallChaining } from '@oinone/kunlun-shared';
5
+ import { BooleanHelper, CallChaining, Optional } from '@oinone/kunlun-shared';
6
6
  import DefaultSearchTab from './DefaultSearchTab.vue';
7
7
  import { BaseElementWidget } from '../../basic';
8
8
  import { CATE_ALL_OPTION } from './types';
@@ -43,7 +43,7 @@ export class SearchTabWidget extends BaseElementWidget {
43
43
 
44
44
  @Widget.Reactive()
45
45
  protected get showTopCateAll(): boolean {
46
- return BooleanHelper.toBoolean(this.getDsl().showTopCateAll) || true;
46
+ return Optional.ofNullable(BooleanHelper.toBoolean(this.getDsl().showTopCateAll)).orElse(true);
47
47
  }
48
48
 
49
49
  @Widget.Reactive()
@@ -64,9 +64,14 @@ export class SearchTabWidget extends BaseElementWidget {
64
64
  );
65
65
  }
66
66
 
67
+ @Widget.Reactive()
68
+ protected get topCateJustify(): string | undefined {
69
+ return this.getDsl().topCateJustify;
70
+ }
71
+
67
72
  @Widget.Reactive()
68
73
  protected get showSecondCateAll(): boolean {
69
- return BooleanHelper.toBoolean(this.getDsl().showSecondCateAll) || true;
74
+ return Optional.ofNullable(BooleanHelper.toBoolean(this.getDsl().showSecondCateAll)).orElse(true);
70
75
  }
71
76
 
72
77
  @Widget.Reactive()
@@ -6,7 +6,7 @@ import {
6
6
  } from '@oinone/kunlun-engine';
7
7
  import { Entity, ViewType } from '@oinone/kunlun-meta';
8
8
  import { getRouterInstance } from '@oinone/kunlun-router';
9
- import { BooleanHelper, NumberHelper } from '@oinone/kunlun-shared';
9
+ import { BooleanHelper, NumberHelper, Optional } from '@oinone/kunlun-shared';
10
10
  import { SPI } from '@oinone/kunlun-spi';
11
11
  import { OioMessage } from '@oinone/kunlun-vue-ui-antd';
12
12
  import { isAllInvisible, Widget } from '@oinone/kunlun-vue-widget';
@@ -57,6 +57,21 @@ export class SearchWidget extends BaseSearchWidget {
57
57
  return [topCateField, secondCateField];
58
58
  }
59
59
 
60
+ @Widget.Reactive()
61
+ protected get topCateJustify(): string | undefined {
62
+ return this.getDsl().topCateJustify;
63
+ }
64
+
65
+ @Widget.Reactive()
66
+ protected get showTopCateAll(): boolean {
67
+ return Optional.ofNullable(BooleanHelper.toBoolean(this.getDsl().showTopCateAll)).orElse(true);
68
+ }
69
+
70
+ @Widget.Reactive()
71
+ protected get showSecondCateAll(): boolean {
72
+ return Optional.ofNullable(BooleanHelper.toBoolean(this.getDsl().showSecondCateAll)).orElse(true);
73
+ }
74
+
60
75
  public initialize(props) {
61
76
  super.initialize(props);
62
77
  this.setComponent(DefaultSearch);
@@ -10,10 +10,29 @@ $labelMarginRight: 16px;
10
10
  box-shadow: none;
11
11
  margin-bottom: var(--oio-margin-md);
12
12
  height: auto;
13
- &.oio-tabs.ant-tabs-top .ant-tabs-nav .ant-tabs-tab {
14
- padding: var(--oio-padding-md) 0;
15
- font-size: var(--oio-font-size-lg);
16
- font-weight: bold;
13
+
14
+ &.oio-cate-search-center {
15
+ .ant-tabs-nav-wrap {
16
+ justify-content: center;
17
+ }
18
+ }
19
+
20
+ &.oio-cate-search-end {
21
+ .ant-tabs-nav-wrap {
22
+ justify-content: end;
23
+ }
24
+ }
25
+ &.oio-tabs.ant-tabs-top {
26
+ .ant-tabs-tab + .ant-tabs-tab {
27
+ margin-left: 40px;
28
+ }
29
+
30
+ .ant-tabs-nav {
31
+ .ant-tabs-tab {
32
+ padding: var(--oio-padding-md) 0;
33
+ font-size: var(--oio-font-size-lg);
34
+ }
35
+ }
17
36
  }
18
37
  .ant-tabs-content-holder {
19
38
  display: none;
@@ -28,9 +47,8 @@ $labelMarginRight: 16px;
28
47
  padding: 0 var(--oio-padding-md);
29
48
  margin-right: var(--oio-margin-md);
30
49
  border-radius: var(--oio-border-radius);
31
- background: var(--oio-tag-select-background);
32
50
  font-size: var(--oio-font-size);
33
- color: var(--oio-text-color);
51
+ color: var(--oio-text-color-secondary);
34
52
  height: var(--oio-height);
35
53
  line-height: var(--oio-height);
36
54
  font-weight: 400;
@@ -39,10 +57,14 @@ $labelMarginRight: 16px;
39
57
  margin-right: 0;
40
58
  }
41
59
 
42
- &:hover,
60
+ &:hover {
61
+ background: var(--oio-hover-background-color);
62
+ color: var(--oio-hover-text-color);
63
+ }
64
+
43
65
  &.active {
44
- color: #fff;
45
- background: var(--oio-primary-color);
66
+ color: var(--oio-selected-text-color);
67
+ background: var(--oio-selected-background-color);
46
68
  }
47
69
  }
48
70
  }
@@ -93,6 +93,15 @@ export const DefaultSearchProps = {
93
93
  type: Array as PropType<any[]>,
94
94
  default: () => []
95
95
  },
96
+ showTopCateAll: {
97
+ type: Boolean
98
+ },
99
+ showSecondCateAll: {
100
+ type: Boolean
101
+ },
102
+ topCateJustify: {
103
+ type: String
104
+ },
96
105
  cateFields: {
97
106
  type: Array as PropType<string[]>
98
107
  },