@blueking/ai-ui-sdk 0.4.3-beta.24 → 0.4.3-beta.25
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/components/render-agent/agent-type.vue.css +4 -4
- package/dist/components/render-agent/agent-type.vue.js +1 -1
- package/dist/components/render-auto-height-textarea/index.vue.css +11 -11
- package/dist/components/render-auto-height-textarea/index.vue.js +1 -1
- package/dist/components/render-auto-refresh/index.vue.css +8 -8
- package/dist/components/render-auto-refresh/index.vue.js +1 -1
- package/dist/components/render-card/agent/prefix-info-tool.vue.css +5 -5
- package/dist/components/render-card/agent/prefix-info-tool.vue.js +1 -1
- package/dist/components/render-card/agent/upgrade.vue.css +2 -2
- package/dist/components/render-card/agent/upgrade.vue.js +1 -1
- package/dist/components/render-card/base.vue.css +12 -12
- package/dist/components/render-card/base.vue.js +1 -1
- package/dist/components/render-card/llm/corner-badge.vue.css +3 -3
- package/dist/components/render-card/llm/corner-badge.vue.js +1 -1
- package/dist/components/render-card/llm/icons.vue.css +2 -2
- package/dist/components/render-card/llm/icons.vue.js +1 -1
- package/dist/components/render-card/llm/info.vue.css +1 -1
- package/dist/components/render-card/llm/info.vue.js +1 -1
- package/dist/components/render-card/llm/tag-prefix.vue.css +2 -2
- package/dist/components/render-card/llm/tag-prefix.vue.js +1 -1
- package/dist/components/render-card/mcp/name-suffix.vue.css +2 -2
- package/dist/components/render-card/mcp/name-suffix.vue.js +1 -1
- package/dist/components/render-card/prompt/icons.vue.css +1 -1
- package/dist/components/render-card/prompt/icons.vue.js +1 -1
- package/dist/components/render-card/skill/scanner.vue.css +3 -3
- package/dist/components/render-card/skill/scanner.vue.js +1 -1
- package/dist/components/render-checkbox/index.vue.css +9 -9
- package/dist/components/render-checkbox/index.vue.js +1 -1
- package/dist/components/render-choose-tag/index.vue.css +7 -7
- package/dist/components/render-choose-tag/index.vue.js +1 -1
- package/dist/components/render-collapse/index.vue.css +2 -2
- package/dist/components/render-collapse/index.vue.js +1 -1
- package/dist/components/render-collection/content/index.vue.css +4 -4
- package/dist/components/render-collection/content/index.vue.js +1 -1
- package/dist/components/render-dataset/components/batch-delete-dataset-data/index.vue.css +3 -3
- package/dist/components/render-dataset/components/batch-delete-dataset-data/index.vue.js +1 -1
- package/dist/components/render-dataset/components/dataset-data-tool-icons/index.script.vue.js +1 -1
- package/dist/components/render-dataset/components/edit-dataset-data/index.vue.css +3 -3
- package/dist/components/render-dataset/components/edit-dataset-data/index.vue.js +1 -1
- package/dist/components/render-dataset/components/operation-record/index.vue.css +4 -4
- package/dist/components/render-dataset/components/operation-record/index.vue.js +1 -1
- package/dist/components/render-dataset/components/operation-record/table/index.vue.css +1 -1
- package/dist/components/render-dataset/components/operation-record/table/index.vue.js +1 -1
- package/dist/components/render-dataset/components/operation-record/view-op-result/index.vue.css +2 -2
- package/dist/components/render-dataset/components/operation-record/view-op-result/index.vue.js +1 -1
- package/dist/components/render-dataset/components/plus-dataset/index.vue.css +1 -1
- package/dist/components/render-dataset/components/plus-dataset/index.vue.js +1 -1
- package/dist/components/render-dataset/components/plus-dataset-data/form/api.vue.css +2 -2
- package/dist/components/render-dataset/components/plus-dataset-data/form/api.vue.js +1 -1
- package/dist/components/render-dataset/components/plus-dataset-data/form/footer.vue.css +1 -1
- package/dist/components/render-dataset/components/plus-dataset-data/form/footer.vue.js +1 -1
- package/dist/components/render-dataset/components/plus-dataset-data/form/index.vue.css +1 -1
- package/dist/components/render-dataset/components/plus-dataset-data/form/index.vue.js +1 -1
- package/dist/components/render-dataset/components/review-dataset-data/index.vue.css +10 -10
- package/dist/components/render-dataset/components/review-dataset-data/index.vue.js +1 -1
- package/dist/components/render-dataset-detail/index.script.vue.js.js +5 -5
- package/dist/components/render-dataset-detail-origin-data/index.vue.css +3 -3
- package/dist/components/render-dataset-detail-origin-data/index.vue.js +1 -1
- package/dist/components/render-dataset-list/components/main.vue.css +3 -3
- package/dist/components/render-dataset-list/components/main.vue.js +1 -1
- package/dist/components/render-dataset-list/index.vue.css +2 -2
- package/dist/components/render-dataset-list/index.vue.js +1 -1
- package/dist/components/render-dialog/choose-resource.vue.css +3 -3
- package/dist/components/render-dialog/choose-resource.vue.js +1 -1
- package/dist/components/render-dialog/choose-result.vue.css +14 -14
- package/dist/components/render-dialog/choose-result.vue.js +1 -1
- package/dist/components/render-dialog/choose-space.vue.css +9 -9
- package/dist/components/render-dialog/choose-space.vue.js +1 -1
- package/dist/components/render-dialog/index.vue.css +6 -6
- package/dist/components/render-dialog/index.vue.js +1 -1
- package/dist/components/render-file-card/index.vue.css +11 -11
- package/dist/components/render-file-card/index.vue.js +1 -1
- package/dist/components/render-file-type-icon/index.vue.css +6 -6
- package/dist/components/render-file-type-icon/index.vue.js +1 -1
- package/dist/components/render-generate-tag/index.vue.css +5 -5
- package/dist/components/render-generate-tag/index.vue.js +1 -1
- package/dist/components/render-knowledge/icon/index.vue.css +1 -1
- package/dist/components/render-knowledge/icon/index.vue.js +1 -1
- package/dist/components/render-prompt/content/index.vue.css +1 -1
- package/dist/components/render-prompt/content/index.vue.js +1 -1
- package/dist/components/render-reference/index.vue.css +2 -2
- package/dist/components/render-reference/index.vue.js +1 -1
- package/dist/components/render-resource-version/index.vue.css +2 -2
- package/dist/components/render-resource-version/index.vue.js +1 -1
- package/dist/components/render-router-tab/index.vue.css +3 -3
- package/dist/components/render-router-tab/index.vue.js +1 -1
- package/dist/components/render-select-plus-extension/index.vue.css +3 -3
- package/dist/components/render-select-plus-extension/index.vue.js +1 -1
- package/dist/components/render-t-table/index.vue.css +32 -32
- package/dist/components/render-t-table/index.vue.js +1 -1
- package/dist/components/render-tag-tree/index.vue.css +7 -7
- package/dist/components/render-tag-tree/index.vue.js +1 -1
- package/dist/components/render-tags/index.vue.css +6 -6
- package/dist/components/render-tags/index.vue.js +1 -1
- package/dist/http/fetch/error-interceptor.ts.js +4 -4
- package/dist/http/fetch/request-error.d.ts +3 -3
- package/dist/http/fetch/request-error.ts.js +3 -3
- package/dist/http/helper/common.d.ts +7 -0
- package/dist/http/helper/common.ts.js +14 -0
- package/package.json +1 -1
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
|
|
2
|
-
.generate-type-tag[data-v-
|
|
2
|
+
.generate-type-tag[data-v-f903ewv0] {
|
|
3
3
|
border-radius: 2px;
|
|
4
4
|
text-align: left;
|
|
5
5
|
white-space: nowrap;
|
|
6
6
|
}
|
|
7
|
-
.generate-type-tag.public[data-v-
|
|
7
|
+
.generate-type-tag.public[data-v-f903ewv0] {
|
|
8
8
|
color: #2CAF5E;
|
|
9
9
|
background-color: #DAF6E5;
|
|
10
10
|
}
|
|
11
|
-
.generate-type-tag.public[data-v-
|
|
11
|
+
.generate-type-tag.public[data-v-f903ewv0]:hover {
|
|
12
12
|
color: #299E56;
|
|
13
13
|
background-color: #CBF0DA;
|
|
14
14
|
}
|
|
15
|
-
.generate-type-tag.space[data-v-
|
|
15
|
+
.generate-type-tag.space[data-v-f903ewv0] {
|
|
16
16
|
color: #45A0A5;
|
|
17
17
|
background-color: #D8F4F5;
|
|
18
18
|
}
|
|
19
|
-
.generate-type-tag.space[data-v-
|
|
19
|
+
.generate-type-tag.space[data-v-f903ewv0]:hover {
|
|
20
20
|
color: #388A8E;
|
|
21
21
|
background-color: #B6E7E9;
|
|
22
22
|
}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
|
|
2
|
-
.resource-version[data-v-
|
|
2
|
+
.resource-version[data-v-w0hkv84j] {
|
|
3
3
|
border-radius: 2px;
|
|
4
4
|
text-align: left;
|
|
5
5
|
color: #4D4F56;
|
|
6
6
|
background-color: #F0F1F5;
|
|
7
7
|
white-space: nowrap;
|
|
8
8
|
}
|
|
9
|
-
.resource-version .bkaidev-rizhifenxi[data-v-
|
|
9
|
+
.resource-version .bkaidev-rizhifenxi[data-v-w0hkv84j] {
|
|
10
10
|
color: #3A84FF;
|
|
11
11
|
}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
|
|
2
|
-
.router-tab[data-v-
|
|
2
|
+
.router-tab[data-v-8wv9eo61] {
|
|
3
3
|
margin-top: 2px;
|
|
4
4
|
height: 42px;
|
|
5
5
|
background: #FFFFFF;
|
|
6
6
|
box-shadow: 0 2px 4px 0 #1919290d;
|
|
7
7
|
padding: 0 24px;
|
|
8
8
|
}
|
|
9
|
-
.router-tab a[data-v-
|
|
9
|
+
.router-tab a[data-v-8wv9eo61] {
|
|
10
10
|
padding: 0 8px;
|
|
11
11
|
margin-right: 24px;
|
|
12
12
|
font-size: 14px;
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
color: #4D4F56;
|
|
16
16
|
box-sizing: border-box;
|
|
17
17
|
}
|
|
18
|
-
.router-tab a.router-link-exact-active[data-v-
|
|
18
|
+
.router-tab a.router-link-exact-active[data-v-8wv9eo61] {
|
|
19
19
|
color: #3A84FF;
|
|
20
20
|
border-bottom: 2px solid #3A84FF;
|
|
21
21
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
|
|
2
|
-
.select-plus-extension[data-v-
|
|
2
|
+
.select-plus-extension[data-v-3d1f6ojv] {
|
|
3
3
|
cursor: pointer;
|
|
4
4
|
width: 100%;
|
|
5
5
|
display: flex;
|
|
@@ -8,10 +8,10 @@
|
|
|
8
8
|
font-size: 12px;
|
|
9
9
|
line-height: 20px;
|
|
10
10
|
}
|
|
11
|
-
.select-plus-extension .ai-ui-sdk-icon[data-v-
|
|
11
|
+
.select-plus-extension .ai-ui-sdk-icon[data-v-3d1f6ojv] {
|
|
12
12
|
font-size: 14px;
|
|
13
13
|
margin-right: 6px;
|
|
14
14
|
}
|
|
15
|
-
.select-plus-extension[data-v-
|
|
15
|
+
.select-plus-extension[data-v-3d1f6ojv]:hover {
|
|
16
16
|
color: #3A84FF;
|
|
17
17
|
}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
|
|
2
|
-
.t-t-pagination[data-v-
|
|
2
|
+
.t-t-pagination[data-v-i4ymd422] {
|
|
3
3
|
position: relative;
|
|
4
4
|
padding: 16px 16px 0 16px;
|
|
5
5
|
}
|
|
6
|
-
.t-t-pagination[data-v-
|
|
6
|
+
.t-t-pagination[data-v-i4ymd422] .bk-pagination-list.is-last {
|
|
7
7
|
margin-left: auto;
|
|
8
8
|
}
|
|
9
|
-
.pagination-loading[data-v-
|
|
9
|
+
.pagination-loading[data-v-i4ymd422]::after {
|
|
10
10
|
content: '';
|
|
11
11
|
position: absolute;
|
|
12
12
|
top: 0;
|
|
@@ -16,105 +16,105 @@
|
|
|
16
16
|
background-color: rgba(255, 255, 255, 0.6);
|
|
17
17
|
z-index: 72;
|
|
18
18
|
}
|
|
19
|
-
.pagination-border[data-v-
|
|
19
|
+
.pagination-border[data-v-i4ymd422] {
|
|
20
20
|
border-right: 1px solid #dcdee5;
|
|
21
21
|
border-left: 1px solid #dcdee5;
|
|
22
22
|
border-bottom: 1px solid #dcdee5;
|
|
23
23
|
padding-bottom: 16px;
|
|
24
24
|
}
|
|
25
|
-
.t-t-table[data-v-
|
|
25
|
+
.t-t-table[data-v-i4ymd422] {
|
|
26
26
|
display: inline;
|
|
27
27
|
font-size: 12px;
|
|
28
28
|
}
|
|
29
|
-
.t-t-table[data-v-
|
|
29
|
+
.t-t-table[data-v-i4ymd422] .t-table__header {
|
|
30
30
|
overflow: visible !important;
|
|
31
31
|
}
|
|
32
|
-
.t-t-table[data-v-
|
|
32
|
+
.t-t-table[data-v-i4ymd422] .t-table__th-cell-inner {
|
|
33
33
|
color: #313238;
|
|
34
34
|
}
|
|
35
|
-
.t-t-table[data-v-
|
|
35
|
+
.t-t-table[data-v-i4ymd422] th {
|
|
36
36
|
padding: 0 16px;
|
|
37
37
|
height: 42px;
|
|
38
38
|
background-color: #FAFBFD !important;
|
|
39
39
|
}
|
|
40
|
-
.t-t-table[data-v-
|
|
40
|
+
.t-t-table[data-v-i4ymd422] .t-table__header th:hover {
|
|
41
41
|
background-color: #f0f1f5 !important;
|
|
42
42
|
}
|
|
43
|
-
.t-t-table[data-v-
|
|
43
|
+
.t-t-table[data-v-i4ymd422] thead.t-table__header:hover th:not(:last-child) {
|
|
44
44
|
border-right-color: transparent !important;
|
|
45
45
|
}
|
|
46
|
-
.t-t-table[data-v-
|
|
46
|
+
.t-t-table[data-v-i4ymd422] thead.t-table__header:hover th {
|
|
47
47
|
border-top-color: transparent !important;
|
|
48
48
|
}
|
|
49
|
-
.t-t-table[data-v-
|
|
49
|
+
.t-t-table[data-v-i4ymd422] .t-table__body tr {
|
|
50
50
|
color: #63656e;
|
|
51
51
|
font-size: 12px;
|
|
52
52
|
}
|
|
53
|
-
.t-t-table[data-v-
|
|
53
|
+
.t-t-table[data-v-i4ymd422] .t-table__body tr td {
|
|
54
54
|
padding: 0 16px;
|
|
55
55
|
height: 40px;
|
|
56
56
|
}
|
|
57
|
-
.t-t-table[data-v-
|
|
57
|
+
.t-t-table[data-v-i4ymd422] .t-table__body tr:hover td {
|
|
58
58
|
background-color: #f5f7fa !important;
|
|
59
59
|
color: #63656E;
|
|
60
60
|
}
|
|
61
|
-
.t-t-table[data-v-
|
|
61
|
+
.t-t-table[data-v-i4ymd422] .t-table__content .t-table__body .t-table__empty-row {
|
|
62
62
|
background-color: #fff !important;
|
|
63
63
|
}
|
|
64
|
-
.t-t-table[data-v-
|
|
64
|
+
.t-t-table[data-v-i4ymd422] .t-table__content .t-table__body .t-table__empty-row >td {
|
|
65
65
|
border: none;
|
|
66
66
|
}
|
|
67
|
-
.t-t-table[data-v-
|
|
67
|
+
.t-t-table[data-v-i4ymd422] th .t-table__ellipsis {
|
|
68
68
|
width: auto !important;
|
|
69
69
|
}
|
|
70
|
-
.t-t-table[data-v-
|
|
70
|
+
.t-t-table[data-v-i4ymd422] .t-loading__gradient.t-icon-loading {
|
|
71
71
|
display: none;
|
|
72
72
|
}
|
|
73
|
-
.t-t-table.t-table__content--scrollable-to-right[data-v-
|
|
74
|
-
.t-t-table.t-table__content--scrollable-to-right[data-v-
|
|
73
|
+
.t-t-table.t-table__content--scrollable-to-right[data-v-i4ymd422] th.t-table__cell--fixed-right-first::after,
|
|
74
|
+
.t-t-table.t-table__content--scrollable-to-right[data-v-i4ymd422] td.t-table__cell--fixed-right-first::after {
|
|
75
75
|
border-left: 2px solid #dcdee5;
|
|
76
76
|
}
|
|
77
|
-
.t-t-table[data-v-
|
|
77
|
+
.t-t-table[data-v-i4ymd422] .t-table__affixed-header-elm-wrap>div {
|
|
78
78
|
width: 100% !important;
|
|
79
79
|
scrollbar-width: none;
|
|
80
80
|
}
|
|
81
|
-
.t-t-table[data-v-
|
|
81
|
+
.t-t-table[data-v-i4ymd422] .t-table--layout-fixed{
|
|
82
82
|
width: 100% !important;
|
|
83
83
|
}
|
|
84
|
-
.t-t-table[data-v-
|
|
84
|
+
.t-t-table[data-v-i4ymd422] .bk-exception-description{
|
|
85
85
|
margin-bottom: 0;
|
|
86
86
|
}
|
|
87
|
-
.t-t-table[data-v-
|
|
87
|
+
.t-t-table[data-v-i4ymd422] .t-table__content{
|
|
88
88
|
z-index: 2;
|
|
89
89
|
max-height: 100%;
|
|
90
90
|
overflow: auto;
|
|
91
91
|
}
|
|
92
|
-
.t-t-table[data-v-
|
|
92
|
+
.t-t-table[data-v-i4ymd422] .t-table__content::-webkit-scrollbar {
|
|
93
93
|
width: 6px;
|
|
94
94
|
height: 6px;
|
|
95
95
|
}
|
|
96
|
-
.t-t-table[data-v-
|
|
96
|
+
.t-t-table[data-v-i4ymd422] .t-table__content::-webkit-scrollbar-thumb {
|
|
97
97
|
width: 6px;
|
|
98
98
|
height: 6px;
|
|
99
99
|
border-radius: 3px;
|
|
100
100
|
background-color: #dcdee5;
|
|
101
101
|
}
|
|
102
|
-
.t-t-table[data-v-
|
|
102
|
+
.t-t-table[data-v-i4ymd422] .t-table__content::-webkit-scrollbar-thumb:hover {
|
|
103
103
|
background-color: #979ba5;
|
|
104
104
|
}
|
|
105
|
-
.t-t-table[data-v-
|
|
105
|
+
.t-t-table[data-v-i4ymd422] .t-table__ellipsis.t-text-ellipsis:has(.checkbox){
|
|
106
106
|
line-height: 100%;
|
|
107
107
|
}
|
|
108
|
-
.t-t-table[data-v-
|
|
108
|
+
.t-t-table[data-v-i4ymd422] .t-table__cell--sort-trigger.t-table__double-icons{
|
|
109
109
|
gap: 5px;
|
|
110
110
|
}
|
|
111
|
-
.t-t-table[data-v-
|
|
111
|
+
.t-t-table[data-v-i4ymd422] .t-table__sort-icon--active>i{
|
|
112
112
|
color: #3a84ff !important;
|
|
113
113
|
}
|
|
114
|
-
.t-t-table[data-v-
|
|
114
|
+
.t-t-table[data-v-i4ymd422] .t-table__cell--fixed-left:has(.checkbox){
|
|
115
115
|
line-height: 100%;
|
|
116
116
|
}
|
|
117
|
-
.t-t-table[data-v-
|
|
117
|
+
.t-t-table[data-v-i4ymd422] .t-table__filter-icon.t-is-focus>span{
|
|
118
118
|
color: #3a84ff !important;
|
|
119
119
|
}
|
|
120
120
|
|
|
@@ -1,28 +1,28 @@
|
|
|
1
1
|
|
|
2
|
-
.tag-tree[data-v-
|
|
2
|
+
.tag-tree[data-v-gsask9iu] {
|
|
3
3
|
font-size: 12px;
|
|
4
4
|
height: auto;
|
|
5
5
|
max-height: calc(100% - 44px);
|
|
6
6
|
}
|
|
7
|
-
.tag-tree .manage-tree-item[data-v-
|
|
7
|
+
.tag-tree .manage-tree-item[data-v-gsask9iu] {
|
|
8
8
|
height: 32px;
|
|
9
9
|
flex: 1;
|
|
10
10
|
}
|
|
11
|
-
.tag-tree .quick-icon[data-v-
|
|
11
|
+
.tag-tree .quick-icon[data-v-gsask9iu] {
|
|
12
12
|
margin-left: -24px;
|
|
13
13
|
padding-left: 8px;
|
|
14
14
|
}
|
|
15
|
-
.tag-tree[data-v-
|
|
15
|
+
.tag-tree[data-v-gsask9iu] .tree-item:has(.bottom-line) {
|
|
16
16
|
border-bottom: 1px solid #F0F1F5;
|
|
17
17
|
}
|
|
18
|
-
.tag-tree[data-v-
|
|
18
|
+
.tag-tree[data-v-gsask9iu] .tree-item.active .quick-icon {
|
|
19
19
|
color: #3A84FF;
|
|
20
20
|
}
|
|
21
|
-
.tag-tree[data-v-
|
|
21
|
+
.tag-tree[data-v-gsask9iu] .tree-item.active .tag-number {
|
|
22
22
|
background: #A3C5FD;
|
|
23
23
|
color: #fff;
|
|
24
24
|
}
|
|
25
|
-
.tag-number[data-v-
|
|
25
|
+
.tag-number[data-v-gsask9iu] {
|
|
26
26
|
line-height: 16px;
|
|
27
27
|
padding: 0 4px;
|
|
28
28
|
background-color: #F0F1F5;
|
|
@@ -1,24 +1,24 @@
|
|
|
1
1
|
|
|
2
|
-
.tag-container[data-v-
|
|
2
|
+
.tag-container[data-v-csc5os1m] {
|
|
3
3
|
visibility: hidden;
|
|
4
4
|
white-space: nowrap;
|
|
5
5
|
column-gap: 4px;
|
|
6
6
|
width: calc(100% - 20px);
|
|
7
7
|
}
|
|
8
|
-
.tag-home[data-v-
|
|
8
|
+
.tag-home[data-v-csc5os1m] {
|
|
9
9
|
vertical-align: sub;
|
|
10
10
|
flex-shrink: 0;
|
|
11
11
|
}
|
|
12
|
-
[is-show="true"][data-v-
|
|
12
|
+
[is-show="true"][data-v-csc5os1m] {
|
|
13
13
|
visibility: visible;
|
|
14
14
|
}
|
|
15
|
-
[is-show="false"][data-v-
|
|
15
|
+
[is-show="false"][data-v-csc5os1m] {
|
|
16
16
|
display: none !important;
|
|
17
17
|
}
|
|
18
|
-
.popover-main[data-v-
|
|
18
|
+
.popover-main[data-v-csc5os1m] {
|
|
19
19
|
padding: 8px 8px 10px;
|
|
20
20
|
}
|
|
21
|
-
.tag-list[data-v-
|
|
21
|
+
.tag-list[data-v-csc5os1m] {
|
|
22
22
|
border-radius: 2px;
|
|
23
23
|
background: #F0F1F5;
|
|
24
24
|
}
|
|
@@ -3,10 +3,10 @@ import { EventType } from '../../types/enum.ts.js';
|
|
|
3
3
|
import RequestError from './request-error.ts.js';
|
|
4
4
|
// 请求执行失败拦截器
|
|
5
5
|
export default ((data, config)=>{
|
|
6
|
-
var _data_error,
|
|
7
|
-
const message = (data === null || data === void 0 ? void 0 : (_data_error = data.error) === null || _data_error === void 0 ? void 0 : _data_error.message) || (data === null || data === void 0 ? void 0 : data.message) || (data === null || data === void 0 ? void 0 : (
|
|
8
|
-
const code = (data === null || data === void 0 ? void 0 : (_data_error1 = data.error) === null || _data_error1 === void 0 ? void 0 : _data_error1.code) || (data === null || data === void 0 ? void 0 : data.code) || (data === null || data === void 0 ? void 0 : (
|
|
9
|
-
const item = (data === null || data === void 0 ? void 0 : (_data_error2 = data.error) === null || _data_error2 === void 0 ? void 0 : _data_error2.data) || (data === null || data === void 0 ? void 0 : data.data)
|
|
6
|
+
var _data_error, _data_data, _data_error1, _data_data1, _data_error2, _data_data2;
|
|
7
|
+
const message = (data === null || data === void 0 ? void 0 : (_data_error = data.error) === null || _data_error === void 0 ? void 0 : _data_error.message) || (data === null || data === void 0 ? void 0 : data.message) || (data === null || data === void 0 ? void 0 : (_data_data = data.data) === null || _data_data === void 0 ? void 0 : _data_data.message) || '系统错误';
|
|
8
|
+
const code = (data === null || data === void 0 ? void 0 : (_data_error1 = data.error) === null || _data_error1 === void 0 ? void 0 : _data_error1.code) || (data === null || data === void 0 ? void 0 : data.code) || (data === null || data === void 0 ? void 0 : (_data_data1 = data.data) === null || _data_data1 === void 0 ? void 0 : _data_data1.code) || -1;
|
|
9
|
+
const item = (data === null || data === void 0 ? void 0 : (_data_error2 = data.error) === null || _data_error2 === void 0 ? void 0 : _data_error2.data) || (data === null || data === void 0 ? void 0 : (_data_data2 = data.data) === null || _data_data2 === void 0 ? void 0 : _data_data2.data) || (data === null || data === void 0 ? void 0 : data.data) || data;
|
|
10
10
|
// 异常情况下,先 emit event
|
|
11
11
|
emitEvent(EventType.Error, {
|
|
12
12
|
code,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export default class RequestError extends Error {
|
|
1
|
+
export default class RequestError<E = unknown> extends Error {
|
|
2
2
|
code: number;
|
|
3
3
|
message: string;
|
|
4
|
-
|
|
5
|
-
constructor(code: number, message: string,
|
|
4
|
+
data: E;
|
|
5
|
+
constructor(code: number, message: string, data?: E);
|
|
6
6
|
}
|
|
@@ -12,14 +12,14 @@ function _define_property(obj, key, value) {
|
|
|
12
12
|
return obj;
|
|
13
13
|
}
|
|
14
14
|
class RequestError extends Error {
|
|
15
|
-
constructor(code, message,
|
|
15
|
+
constructor(code, message, data){
|
|
16
16
|
super();
|
|
17
17
|
_define_property(this, "code", void 0);
|
|
18
18
|
_define_property(this, "message", void 0);
|
|
19
|
-
_define_property(this, "
|
|
19
|
+
_define_property(this, "data", void 0);
|
|
20
20
|
this.code = code;
|
|
21
21
|
this.message = message;
|
|
22
|
-
this.
|
|
22
|
+
this.data = data;
|
|
23
23
|
}
|
|
24
24
|
}
|
|
25
25
|
export { RequestError as default };
|
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
import { ResourceStatus } from '@/enums';
|
|
2
|
+
import RequestError from '@/http/fetch/request-error';
|
|
2
3
|
import type { IApprovalSettingValue, IApprovalSettingValueApi, IBaseCountParam, IBaseCountParamApi, IPaginationParam, IPaginationParamApi, IPaginationResponse, IPaginationResponseApi, IReferringAgent, IReferringAgentApi, IResourceCommon, IResourceCommonApi, IResourceCommonSearchParams, IResourceCommonSearchParamsApi, IResourceCount, IResourceCountApi, IResourceFormCommon, IResourceFormCommonApi, IResourceReference, IResourceReferenceApi, ISortParam, ISortParamApi, ITagTree, ITagTreeApi, ITagTreeNode, ITagTreeNodeApi, IVariable, IVariableApi } from '@/types/common';
|
|
4
|
+
/**
|
|
5
|
+
* 将「错误 data 转换函数」包装成可直接用于 Promise.catch 的错误处理器。
|
|
6
|
+
* code / message 由本函数统一透传,data 交给传入的高阶函数转换,转换后仍以 reject 抛出。
|
|
7
|
+
* @param transferData 把接口错误的 data 转换为 UI 使用的数据(其返回类型即为最终错误的 data 类型)
|
|
8
|
+
*/
|
|
9
|
+
export declare const transferErrorApi2Error: <E, D>(transferData: (data: E) => D) => (error: RequestError<E>) => Promise<RequestError<D>>;
|
|
3
10
|
/**
|
|
4
11
|
* 接口转换为ui使用
|
|
5
12
|
* @param data ITagsTreeApi
|
|
@@ -1,4 +1,18 @@
|
|
|
1
1
|
import { transferResourcePermission2ResourcePermissionApi, transferResourcePermissionApi2ResourcePermission } from './permission.ts.js';
|
|
2
|
+
/**
|
|
3
|
+
* 将「错误 data 转换函数」包装成可直接用于 Promise.catch 的错误处理器。
|
|
4
|
+
* code / message 由本函数统一透传,data 交给传入的高阶函数转换,转换后仍以 reject 抛出。
|
|
5
|
+
* @param transferData 把接口错误的 data 转换为 UI 使用的数据(其返回类型即为最终错误的 data 类型)
|
|
6
|
+
*/ export const transferErrorApi2Error = (transferData)=>{
|
|
7
|
+
return (error)=>{
|
|
8
|
+
const transferedError = {
|
|
9
|
+
code: error.code,
|
|
10
|
+
data: transferData(error.data),
|
|
11
|
+
message: error.message
|
|
12
|
+
};
|
|
13
|
+
return Promise.reject(transferedError);
|
|
14
|
+
};
|
|
15
|
+
};
|
|
2
16
|
/**
|
|
3
17
|
* 接口转换为ui使用
|
|
4
18
|
* @param data ITagsTreeApi
|