@oinone/kunlun-vue-admin-base 6.3.4 → 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.
@@ -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
  }
@@ -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
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@oinone/kunlun-vue-admin-base",
3
- "version": "6.3.4",
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.4",
18
- "@oinone/kunlun-vue-router": "6.3.4",
19
- "@oinone/kunlun-vue-ui": "6.3.4",
20
- "@oinone/kunlun-vue-ui-antd": "6.3.4",
21
- "@oinone/kunlun-vue-ui-common": "6.3.4",
22
- "@oinone/kunlun-vue-ui-el": "6.3.4",
23
- "@oinone/kunlun-vue-widget": "6.3.4",
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,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
 
@@ -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
  },