@oinone/kunlun-vue-admin-base 6.2.2 → 6.2.3
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 +27 -10
- package/dist/oinone-kunlun-vue-admin-base.scss +1 -1
- package/dist/types/src/action/server-actions/ServerActionWidget.d.ts +1 -0
- package/package.json +8 -8
- package/src/action/server-actions/ServerActionWidget.ts +17 -1
- package/src/field/detail/common/DetailCommonField.vue +11 -5
- package/src/field/form/html/richtext/FormHtmlRichTextFieldWidget.ts +1 -1
- package/src/field/table/text/TableTextFieldWidget.ts +7 -4
- package/src/permission/system-permission/style/permission.scss +18 -12
- package/src/spi-register/message-hub.ts +3 -3
|
@@ -16,6 +16,7 @@ export declare class ServerActionWidget extends ActionWidget<RuntimeServerAction
|
|
|
16
16
|
protected clickAction(): Promise<ClickResult>;
|
|
17
17
|
protected formValidateProcess(e: HttpClientError): void;
|
|
18
18
|
protected convertFormValidateResults(e: HttpClientError): FormValidateResult[];
|
|
19
|
+
protected notifyValidateResults(e: HttpClientError): void;
|
|
19
20
|
protected submit(action: RuntimeServerAction): Promise<SubmitValue>;
|
|
20
21
|
protected clickActionAfter(result: ClickResult): Promise<ClickResult>;
|
|
21
22
|
protected clickActionAfterRefreshData(result: ClickResult, refreshParent?: boolean): Promise<ClickResult>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@oinone/kunlun-vue-admin-base",
|
|
3
|
-
"version": "6.2.
|
|
3
|
+
"version": "6.2.3",
|
|
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.2.
|
|
18
|
-
"@oinone/kunlun-vue-router": "6.2.
|
|
19
|
-
"@oinone/kunlun-vue-ui": "6.2.
|
|
20
|
-
"@oinone/kunlun-vue-ui-antd": "6.2.
|
|
21
|
-
"@oinone/kunlun-vue-ui-common": "6.2.
|
|
22
|
-
"@oinone/kunlun-vue-ui-el": "6.2.
|
|
23
|
-
"@oinone/kunlun-vue-widget": "6.2.
|
|
17
|
+
"@oinone/kunlun-vue-admin-layout": "6.2.3",
|
|
18
|
+
"@oinone/kunlun-vue-router": "6.2.3",
|
|
19
|
+
"@oinone/kunlun-vue-ui": "6.2.3",
|
|
20
|
+
"@oinone/kunlun-vue-ui-antd": "6.2.3",
|
|
21
|
+
"@oinone/kunlun-vue-ui-common": "6.2.3",
|
|
22
|
+
"@oinone/kunlun-vue-ui-el": "6.2.3",
|
|
23
|
+
"@oinone/kunlun-vue-widget": "6.2.3",
|
|
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",
|
|
@@ -23,7 +23,7 @@ import {
|
|
|
23
23
|
UpdateOneWithRelationsService
|
|
24
24
|
} from '@oinone/kunlun-engine';
|
|
25
25
|
import { ActionContextType, ActionType, ModelFieldType, ViewType } from '@oinone/kunlun-meta';
|
|
26
|
-
import { HttpClientError, SystemErrorCode } from '@oinone/kunlun-request';
|
|
26
|
+
import { HttpClientError, MessageHub, RequestErrorInterceptor, SystemErrorCode } from '@oinone/kunlun-request';
|
|
27
27
|
import { SPI } from '@oinone/kunlun-spi';
|
|
28
28
|
import { BooleanHelper, CallChaining, debugConsole, OioNotification } from '@oinone/kunlun-vue-ui-antd';
|
|
29
29
|
import { VueWidget, Widget, WidgetSubjection } from '@oinone/kunlun-vue-widget';
|
|
@@ -101,6 +101,7 @@ export class ServerActionWidget extends ActionWidget<RuntimeServerAction> {
|
|
|
101
101
|
|
|
102
102
|
protected formValidateProcess(e: HttpClientError) {
|
|
103
103
|
if (this.view?.type !== ViewType.Form) {
|
|
104
|
+
this.notifyValidateResults(e);
|
|
104
105
|
return;
|
|
105
106
|
}
|
|
106
107
|
const { formValidateCallChaining } = this;
|
|
@@ -141,6 +142,21 @@ export class ServerActionWidget extends ActionWidget<RuntimeServerAction> {
|
|
|
141
142
|
return results;
|
|
142
143
|
}
|
|
143
144
|
|
|
145
|
+
protected notifyValidateResults(e: HttpClientError): void {
|
|
146
|
+
const error = e.errors?.[0];
|
|
147
|
+
if (!error) {
|
|
148
|
+
return;
|
|
149
|
+
}
|
|
150
|
+
if (error.extensions?.errorCode !== SystemErrorCode.FORM_VALIDATE_ERROR) {
|
|
151
|
+
return;
|
|
152
|
+
}
|
|
153
|
+
for (const messageItem of error.extensions?.messages || []) {
|
|
154
|
+
if (RequestErrorInterceptor.ignoredFormValidateMessage(messageItem)) {
|
|
155
|
+
MessageHub.error(messageItem.message);
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
|
|
144
160
|
protected async submit(action: RuntimeServerAction): Promise<SubmitValue> {
|
|
145
161
|
let records: ActiveRecords | undefined;
|
|
146
162
|
let relationRecords: SubmitRelationValue[] | undefined;
|
|
@@ -58,11 +58,17 @@ export default defineComponent({
|
|
|
58
58
|
origin: 'default',
|
|
59
59
|
default: ({ realValue }) => {
|
|
60
60
|
return [
|
|
61
|
-
createVNode(
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
61
|
+
createVNode(
|
|
62
|
+
'div',
|
|
63
|
+
{
|
|
64
|
+
class: 'detail-common-field-value',
|
|
65
|
+
title: realValue,
|
|
66
|
+
style: {
|
|
67
|
+
whiteSpace: 'pre-line'
|
|
68
|
+
}
|
|
69
|
+
},
|
|
70
|
+
realValue
|
|
71
|
+
)
|
|
66
72
|
];
|
|
67
73
|
}
|
|
68
74
|
},
|
|
@@ -26,7 +26,7 @@ export class FormHtmlRichTextFieldWidget extends FormStringFieldWidget {
|
|
|
26
26
|
protected get richTextToolbarExcludeKeys(): string[] | null {
|
|
27
27
|
const { richTextToolbarExcludeKeys } = this.getDsl() as { richTextToolbarExcludeKeys?: string };
|
|
28
28
|
if (!richTextToolbarExcludeKeys) {
|
|
29
|
-
return
|
|
29
|
+
return [];
|
|
30
30
|
}
|
|
31
31
|
|
|
32
32
|
return richTextToolbarExcludeKeys.split(',').map((v) => v.trim());
|
|
@@ -18,10 +18,13 @@ export class TableTextFieldWidget extends TableStringFieldWidget {
|
|
|
18
18
|
const value = this.compute(context);
|
|
19
19
|
|
|
20
20
|
return [
|
|
21
|
-
createVNode(
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
21
|
+
createVNode(
|
|
22
|
+
'span',
|
|
23
|
+
{
|
|
24
|
+
class: 'table-text-field-value'
|
|
25
|
+
},
|
|
26
|
+
value
|
|
27
|
+
)
|
|
25
28
|
];
|
|
26
29
|
}
|
|
27
30
|
}
|
|
@@ -56,15 +56,16 @@
|
|
|
56
56
|
align-items: center;
|
|
57
57
|
}
|
|
58
58
|
|
|
59
|
-
.ant-tree-
|
|
60
|
-
|
|
59
|
+
.ant-tree-list-holder-inner {
|
|
60
|
+
display: block !important;
|
|
61
61
|
}
|
|
62
62
|
|
|
63
63
|
.ant-tree-checkbox {
|
|
64
64
|
margin-top: 12px;
|
|
65
65
|
}
|
|
66
66
|
|
|
67
|
-
.ant-tree-treenode-selected
|
|
67
|
+
.permission-menu .ant-tree-treenode-selected,
|
|
68
|
+
.permission-menu .ant-tree-treenode:hover {
|
|
68
69
|
background: var(--oio-menu-selected-background-color);
|
|
69
70
|
border-radius: 4px;
|
|
70
71
|
.ant-tree-title {
|
|
@@ -72,7 +73,7 @@
|
|
|
72
73
|
}
|
|
73
74
|
}
|
|
74
75
|
|
|
75
|
-
.ant-tree .ant-tree-node-content-wrapper:hover {
|
|
76
|
+
.oio-tree.ant-tree .ant-tree-node-content-wrapper:hover {
|
|
76
77
|
background-color: transparent;
|
|
77
78
|
}
|
|
78
79
|
|
|
@@ -116,7 +117,7 @@
|
|
|
116
117
|
margin-bottom: 10px;
|
|
117
118
|
}
|
|
118
119
|
|
|
119
|
-
.oio-tabs{
|
|
120
|
+
.oio-tabs {
|
|
120
121
|
.oio-tab-content {
|
|
121
122
|
padding: 0;
|
|
122
123
|
}
|
|
@@ -486,11 +487,11 @@
|
|
|
486
487
|
}
|
|
487
488
|
|
|
488
489
|
.permission-dialog-content {
|
|
489
|
-
.oio-modal{
|
|
490
|
+
.oio-modal {
|
|
490
491
|
.ant-modal-body {
|
|
491
492
|
padding: 0 0 var(--oio-margin-md) 0;
|
|
492
493
|
position: relative;
|
|
493
|
-
|
|
494
|
+
|
|
494
495
|
.oio-tabs.ant-tabs-top .ant-tabs-nav .ant-tabs-tab {
|
|
495
496
|
padding: calc(var(--oio-padding) / 2);
|
|
496
497
|
border-top: none;
|
|
@@ -498,7 +499,7 @@
|
|
|
498
499
|
border-bottom: none;
|
|
499
500
|
}
|
|
500
501
|
}
|
|
501
|
-
|
|
502
|
+
|
|
502
503
|
.permission-mode-switch {
|
|
503
504
|
position: absolute;
|
|
504
505
|
right: var(--oio-margin);
|
|
@@ -511,22 +512,27 @@
|
|
|
511
512
|
}
|
|
512
513
|
}
|
|
513
514
|
}
|
|
514
|
-
|
|
515
|
+
|
|
516
|
+
.ant-spin-container {
|
|
517
|
+
width: 100%;
|
|
518
|
+
overflow-x: hidden;
|
|
519
|
+
}
|
|
520
|
+
|
|
515
521
|
.oio-tree {
|
|
516
522
|
max-height: 55vh;
|
|
517
523
|
overflow-y: scroll;
|
|
518
524
|
}
|
|
519
|
-
|
|
525
|
+
|
|
520
526
|
.data-permission-tab {
|
|
521
527
|
&-label {
|
|
522
528
|
font-weight: bold;
|
|
523
529
|
font-size: 16px;
|
|
524
530
|
}
|
|
525
|
-
|
|
531
|
+
|
|
526
532
|
.oio-tab {
|
|
527
533
|
padding: var(--oio-padding) 0 var(--oio-padding) 0;
|
|
528
534
|
}
|
|
529
|
-
|
|
535
|
+
|
|
530
536
|
.data-permission-rsql,
|
|
531
537
|
.data-permission-operator {
|
|
532
538
|
color: var(--oio-text-color-secondary);
|
|
@@ -29,9 +29,9 @@ let titleCache: Record<string, string> | undefined;
|
|
|
29
29
|
function getNotificationTitle(type: string): string {
|
|
30
30
|
if (!titleCache) {
|
|
31
31
|
titleCache = {};
|
|
32
|
-
for (const item
|
|
33
|
-
const key = `kunlun.common.${
|
|
34
|
-
titleCache[
|
|
32
|
+
for (const item in NotificationType) {
|
|
33
|
+
const key = `kunlun.common.${item}`;
|
|
34
|
+
titleCache[item] = translateValueByKey(getValue(zh_CN, key) as string);
|
|
35
35
|
}
|
|
36
36
|
}
|
|
37
37
|
return titleCache[type] as string;
|