@blueking/ai-ui-sdk 0.1.12-beta.37 → 0.1.12-beta.38
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-aside/index.vue.css +9 -9
- package/dist/components/render-aside/index.vue.js +1 -1
- package/dist/components/render-auth/auth-dialog.script.vue.js.js +8 -2
- 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-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-dataset/components/batch-review-dataset-data/index.script.vue.js.js +24 -6
- 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.script.vue.js.js +13 -3
- 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.script.vue.js.js +4 -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/dataset-footer.script.vue.js.js +8 -2
- package/dist/components/render-dataset/components/plus-dataset/index.vue.css +2 -2
- package/dist/components/render-dataset/components/plus-dataset/index.vue.js +1 -1
- package/dist/components/render-dataset/components/plus-dataset-data/form/api.script.vue.js.js +137 -0
- package/dist/components/render-dataset/components/plus-dataset-data/form/api.vue.css +10 -0
- package/dist/components/render-dataset/components/plus-dataset-data/form/api.vue.d.ts +8 -0
- package/dist/components/render-dataset/components/plus-dataset-data/form/api.vue.js +5 -0
- package/dist/components/render-dataset/components/plus-dataset-data/form/category.script.vue.js.js +10 -1
- package/dist/components/render-dataset/components/plus-dataset-data/form/category.vue.d.ts +1 -0
- package/dist/components/render-dataset/components/plus-dataset-data/form/file.script.vue.js.js +12 -3
- package/dist/components/render-dataset/components/plus-dataset-data/form/footer.script.vue.js.js +8 -2
- 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.script.vue.js.js +27 -14
- package/dist/components/render-dataset/components/plus-dataset-data/form/index.vue.css +2 -2
- package/dist/components/render-dataset/components/plus-dataset-data/form/index.vue.js +1 -1
- package/dist/components/render-dataset/components/plus-dataset-data/form/manual.script.vue.js.js +9 -3
- package/dist/components/render-dataset/components/plus-dataset-data/index.script.vue.js.js +4 -1
- package/dist/components/render-dataset/components/review-dataset-data/index.script.vue.js.js +21 -5
- 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/components/source-type-icon/index.script.vue.js.js +3 -0
- package/dist/components/render-dataset/index.vue.css +1 -1
- package/dist/components/render-dataset/index.vue.js +1 -1
- package/dist/components/render-dataset-detail/components/header.script.vue.js.js +5 -1
- package/dist/components/render-dataset-detail-origin-data/components/batch-operation/index.script.vue.js.js +4 -1
- package/dist/components/render-dataset-detail-origin-data/components/table/index.script.vue.js +20 -5
- package/dist/components/render-dataset-detail-origin-data/index.script.vue.js.js +8 -2
- 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.script.vue.js.js +4 -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/components/table.script.vue.js.js +19 -19
- package/dist/components/render-expand-collapse/index.vue.css +3 -3
- package/dist/components/render-expand-collapse/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 +5 -5
- package/dist/components/render-file-type-icon/index.vue.js +1 -1
- package/dist/components/render-header/index.vue.css +5 -5
- package/dist/components/render-header/index.vue.js +1 -1
- package/dist/components/render-markdown/mark-down-code.d.ts +2 -0
- package/dist/components/render-markdown/mark-down-code.ts.js +171 -0
- package/dist/components/render-markdown/mark-down-emoji.d.ts +2 -0
- package/dist/components/render-markdown/mark-down-emoji.ts.js +4 -0
- package/dist/components/render-markdown/mark-down.d.ts +49 -0
- package/dist/components/render-markdown/mark-down.postcss.css +148 -0
- package/dist/components/render-markdown/mark-down.ts.js +145 -0
- 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.d.ts +2 -1
- package/dist/components.ts.js +2 -1
- package/dist/css/fonts/iconcool.eot +0 -0
- package/dist/css/fonts/iconcool.svg +3 -0
- package/dist/css/fonts/iconcool.ttf +0 -0
- package/dist/css/fonts/iconcool.woff +0 -0
- package/dist/css/iconcool.js +2 -2
- package/dist/css/style.css +3 -0
- package/dist/hooks/use-chat.d.ts +4 -0
- package/dist/hooks/use-dataset-http.d.ts +1 -0
- package/dist/hooks/use-dataset-http.ts.js +8 -1
- package/dist/http/helper/agent.ts.js +3 -27
- package/dist/http/helper/dataset.d.ts +7 -1
- package/dist/http/helper/dataset.ts.js +16 -0
- package/dist/http/helper/knowledge.ts.js +4 -1
- package/dist/types/agent.d.ts +0 -52
- package/dist/types/dataset.d.ts +20 -0
- package/dist/types/enum.d.ts +4 -0
- package/dist/types/enum.ts.js +5 -0
- package/dist/types/knowledge.d.ts +3 -1
- package/package.json +4 -2
package/dist/components/render-dataset-detail-origin-data/components/table/index.script.vue.js
CHANGED
|
@@ -473,7 +473,10 @@ export default /*@__PURE__*/ _defineComponent({
|
|
|
473
473
|
default: _withCtx(()=>_cache[10] || (_cache[10] = [
|
|
474
474
|
_createTextVNode(" 编辑 ")
|
|
475
475
|
])),
|
|
476
|
-
_: 2 /* DYNAMIC */
|
|
476
|
+
_: 2 /* DYNAMIC */ ,
|
|
477
|
+
__: [
|
|
478
|
+
10
|
|
479
|
+
]
|
|
477
480
|
}, 1032 /* PROPS, DYNAMIC_SLOTS */ , [
|
|
478
481
|
"class",
|
|
479
482
|
"onMouseleave",
|
|
@@ -489,7 +492,10 @@ export default /*@__PURE__*/ _defineComponent({
|
|
|
489
492
|
default: _withCtx(()=>_cache[11] || (_cache[11] = [
|
|
490
493
|
_createTextVNode(" 人工审核 ")
|
|
491
494
|
])),
|
|
492
|
-
_: 2 /* DYNAMIC */
|
|
495
|
+
_: 2 /* DYNAMIC */ ,
|
|
496
|
+
__: [
|
|
497
|
+
11
|
|
498
|
+
]
|
|
493
499
|
}, 1032 /* PROPS, DYNAMIC_SLOTS */ , [
|
|
494
500
|
"onClick"
|
|
495
501
|
])) : _createCommentVNode("v-if", true),
|
|
@@ -503,7 +509,10 @@ export default /*@__PURE__*/ _defineComponent({
|
|
|
503
509
|
default: _withCtx(()=>_cache[12] || (_cache[12] = [
|
|
504
510
|
_createTextVNode(" 重试 ")
|
|
505
511
|
])),
|
|
506
|
-
_: 2 /* DYNAMIC */
|
|
512
|
+
_: 2 /* DYNAMIC */ ,
|
|
513
|
+
__: [
|
|
514
|
+
12
|
|
515
|
+
]
|
|
507
516
|
}, 1032 /* PROPS, DYNAMIC_SLOTS */ , [
|
|
508
517
|
"onClick"
|
|
509
518
|
])) : _createCommentVNode("v-if", true),
|
|
@@ -533,7 +542,10 @@ export default /*@__PURE__*/ _defineComponent({
|
|
|
533
542
|
default: _withCtx(()=>_cache[13] || (_cache[13] = [
|
|
534
543
|
_createTextVNode(" 操作记录 ")
|
|
535
544
|
])),
|
|
536
|
-
_: 2 /* DYNAMIC */
|
|
545
|
+
_: 2 /* DYNAMIC */ ,
|
|
546
|
+
__: [
|
|
547
|
+
13
|
|
548
|
+
]
|
|
537
549
|
}, 1032 /* PROPS, DYNAMIC_SLOTS */ , [
|
|
538
550
|
"class",
|
|
539
551
|
"onMouseleave",
|
|
@@ -572,7 +584,10 @@ export default /*@__PURE__*/ _defineComponent({
|
|
|
572
584
|
class: "ai-ui-sdk-icon ai-ui-sdk-gengduo-2 g-text-16 g-ml-12 g-cursor-pointer"
|
|
573
585
|
}, null, -1 /* HOISTED */ ))
|
|
574
586
|
]),
|
|
575
|
-
_: 2 /* DYNAMIC */
|
|
587
|
+
_: 2 /* DYNAMIC */ ,
|
|
588
|
+
__: [
|
|
589
|
+
14
|
|
590
|
+
]
|
|
576
591
|
}, 1536 /* NEED_PATCH, DYNAMIC_SLOTS */ )
|
|
577
592
|
]),
|
|
578
593
|
_: 1 /* STABLE */
|
|
@@ -138,7 +138,10 @@ export default /*@__PURE__*/ _defineComponent({
|
|
|
138
138
|
default: _withCtx(()=>_cache[4] || (_cache[4] = [
|
|
139
139
|
_createTextVNode(" 一键失败重试 ")
|
|
140
140
|
])),
|
|
141
|
-
_: 1 /* STABLE */
|
|
141
|
+
_: 1 /* STABLE */ ,
|
|
142
|
+
__: [
|
|
143
|
+
4
|
|
144
|
+
]
|
|
142
145
|
}, 8 /* PROPS */ , [
|
|
143
146
|
"loading"
|
|
144
147
|
])), [
|
|
@@ -156,7 +159,10 @@ export default /*@__PURE__*/ _defineComponent({
|
|
|
156
159
|
default: _withCtx(()=>_cache[5] || (_cache[5] = [
|
|
157
160
|
_createTextVNode(" 导出 ")
|
|
158
161
|
])),
|
|
159
|
-
_: 1 /* STABLE */
|
|
162
|
+
_: 1 /* STABLE */ ,
|
|
163
|
+
__: [
|
|
164
|
+
5
|
|
165
|
+
]
|
|
160
166
|
})
|
|
161
167
|
]),
|
|
162
168
|
_createElementVNode("section", _hoisted_4, [
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
|
|
2
|
-
.origin-data-content[data-v-
|
|
2
|
+
.origin-data-content[data-v-qrws5tfc] {
|
|
3
3
|
padding: 24px;
|
|
4
4
|
height: calc(100% - 52px - 44px);
|
|
5
5
|
}
|
|
6
|
-
.origin-data-panel[data-v-
|
|
6
|
+
.origin-data-panel[data-v-qrws5tfc] {
|
|
7
7
|
height: 100%;
|
|
8
8
|
padding: 20px;
|
|
9
9
|
background: #ffffff;
|
|
10
10
|
box-shadow: 0 2px 4px 0 #1919290d;
|
|
11
11
|
border-radius: 2px;
|
|
12
12
|
}
|
|
13
|
-
.origin-data-panel .toolbar-search[data-v-
|
|
13
|
+
.origin-data-panel .toolbar-search[data-v-qrws5tfc] {
|
|
14
14
|
width: 6.17rem;
|
|
15
15
|
}
|
|
@@ -62,7 +62,10 @@ export default /*@__PURE__*/ _defineComponent({
|
|
|
62
62
|
default: _withCtx(()=>_cache[2] || (_cache[2] = [
|
|
63
63
|
_createTextVNode(" 创建数据集 ")
|
|
64
64
|
])),
|
|
65
|
-
_: 1 /* STABLE */
|
|
65
|
+
_: 1 /* STABLE */ ,
|
|
66
|
+
__: [
|
|
67
|
+
2
|
|
68
|
+
]
|
|
66
69
|
})
|
|
67
70
|
]),
|
|
68
71
|
_createVNode(RenderSearchDataset, {
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
|
|
2
|
-
.main-content[data-v-
|
|
2
|
+
.main-content[data-v-9fkcpcn8] {
|
|
3
3
|
padding: 20px 24px;
|
|
4
4
|
height: calc(100% - 52px);
|
|
5
5
|
}
|
|
6
|
-
.main-panel[data-v-
|
|
6
|
+
.main-panel[data-v-9fkcpcn8] {
|
|
7
7
|
height: 100%;
|
|
8
8
|
padding: 20px 24px 0;
|
|
9
9
|
background: #ffffff;
|
|
10
10
|
box-shadow: 0 2px 4px 0 #1919290d;
|
|
11
11
|
border-radius: 2px;
|
|
12
12
|
}
|
|
13
|
-
.main-search[data-v-
|
|
13
|
+
.main-search[data-v-9fkcpcn8] {
|
|
14
14
|
width: 6.17rem;
|
|
15
15
|
}
|
|
@@ -74,7 +74,7 @@ import RenderPlusDatasetData from '../../render-dataset/components/plus-dataset-
|
|
|
74
74
|
import { useDatasetHttp } from '../../../hooks/use-dataset-http.ts.js';
|
|
75
75
|
import { usePermission } from '../../../hooks/use-permission.ts.js';
|
|
76
76
|
import useTable from '../../../hooks/use-table.ts.js';
|
|
77
|
-
import {
|
|
77
|
+
import { ResourcePermissionAction } from '../../../types/enum.ts.js';
|
|
78
78
|
export default /*@__PURE__*/ _defineComponent({
|
|
79
79
|
props: {
|
|
80
80
|
apiPrefix: {},
|
|
@@ -95,14 +95,6 @@ export default /*@__PURE__*/ _defineComponent({
|
|
|
95
95
|
const tempDataset = ref();
|
|
96
96
|
const deleteRef = ref({});
|
|
97
97
|
const popoverRef = ref({});
|
|
98
|
-
const datasetTypeMap = {
|
|
99
|
-
[DatasetType.MultiTurnChat]: '多轮会话',
|
|
100
|
-
[DatasetType.MultiTurnChatWithReasoning]: '多轮会话(含思考过程)',
|
|
101
|
-
[DatasetType.PretrainedText]: '预训练文本',
|
|
102
|
-
[DatasetType.SingleChoice]: '单项选择',
|
|
103
|
-
[DatasetType.SingleTurnChat]: '单轮会话',
|
|
104
|
-
[DatasetType.SingleTurnChatWithReasoning]: '单轮会话(含思考过程)'
|
|
105
|
-
};
|
|
106
98
|
const settings = {
|
|
107
99
|
fields: [
|
|
108
100
|
{
|
|
@@ -298,12 +290,8 @@ export default /*@__PURE__*/ _defineComponent({
|
|
|
298
290
|
width: "80"
|
|
299
291
|
}),
|
|
300
292
|
_createVNode(_component_bk_table_column, {
|
|
301
|
-
label: "类型"
|
|
302
|
-
|
|
303
|
-
default: _withCtx(({ row })=>[
|
|
304
|
-
_createTextVNode(_toDisplayString(datasetTypeMap[row.type]), 1 /* TEXT */ )
|
|
305
|
-
]),
|
|
306
|
-
_: 1 /* STABLE */
|
|
293
|
+
label: "类型",
|
|
294
|
+
field: "typeName"
|
|
307
295
|
}),
|
|
308
296
|
!_ctx.isInternal ? (_openBlock(), _createBlock(_component_bk_table_column, {
|
|
309
297
|
key: 0,
|
|
@@ -389,7 +377,10 @@ export default /*@__PURE__*/ _defineComponent({
|
|
|
389
377
|
default: _withCtx(()=>_cache[3] || (_cache[3] = [
|
|
390
378
|
_createTextVNode(" 查看详情 ")
|
|
391
379
|
])),
|
|
392
|
-
_: 2 /* DYNAMIC */
|
|
380
|
+
_: 2 /* DYNAMIC */ ,
|
|
381
|
+
__: [
|
|
382
|
+
3
|
|
383
|
+
]
|
|
393
384
|
}, 1032 /* PROPS, DYNAMIC_SLOTS */ , [
|
|
394
385
|
"class",
|
|
395
386
|
"onMouseenter",
|
|
@@ -423,7 +414,10 @@ export default /*@__PURE__*/ _defineComponent({
|
|
|
423
414
|
default: _withCtx(()=>_cache[4] || (_cache[4] = [
|
|
424
415
|
_createTextVNode(" 编辑数据集 ")
|
|
425
416
|
])),
|
|
426
|
-
_: 2 /* DYNAMIC */
|
|
417
|
+
_: 2 /* DYNAMIC */ ,
|
|
418
|
+
__: [
|
|
419
|
+
4
|
|
420
|
+
]
|
|
427
421
|
}, 1032 /* PROPS, DYNAMIC_SLOTS */ , [
|
|
428
422
|
"class",
|
|
429
423
|
"onMouseenter",
|
|
@@ -448,7 +442,10 @@ export default /*@__PURE__*/ _defineComponent({
|
|
|
448
442
|
default: _withCtx(()=>_cache[5] || (_cache[5] = [
|
|
449
443
|
_createTextVNode(" 操作记录 ")
|
|
450
444
|
])),
|
|
451
|
-
_: 2 /* DYNAMIC */
|
|
445
|
+
_: 2 /* DYNAMIC */ ,
|
|
446
|
+
__: [
|
|
447
|
+
5
|
|
448
|
+
]
|
|
452
449
|
}, 1032 /* PROPS, DYNAMIC_SLOTS */ , [
|
|
453
450
|
"class",
|
|
454
451
|
"onMouseenter",
|
|
@@ -489,7 +486,10 @@ export default /*@__PURE__*/ _defineComponent({
|
|
|
489
486
|
class: "ai-ui-sdk-icon ai-ui-sdk-gengduo-2 g-text-16 g-ml-12 g-cursor-pointer"
|
|
490
487
|
}, null, -1 /* HOISTED */ ))
|
|
491
488
|
]),
|
|
492
|
-
_: 2 /* DYNAMIC */
|
|
489
|
+
_: 2 /* DYNAMIC */ ,
|
|
490
|
+
__: [
|
|
491
|
+
6
|
|
492
|
+
]
|
|
493
493
|
}, 1536 /* NEED_PATCH, DYNAMIC_SLOTS */ )
|
|
494
494
|
]),
|
|
495
495
|
_: 1 /* STABLE */
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
|
|
2
|
-
.expend-collapse-home[data-v-
|
|
2
|
+
.expend-collapse-home[data-v-lq48ke6o] {
|
|
3
3
|
width: 16px;
|
|
4
4
|
height: 64px;
|
|
5
5
|
background: #DCDEE5;
|
|
@@ -15,9 +15,9 @@
|
|
|
15
15
|
cursor: pointer;
|
|
16
16
|
z-index: 1550;
|
|
17
17
|
}
|
|
18
|
-
.expend-collapse-home[data-v-
|
|
18
|
+
.expend-collapse-home[data-v-lq48ke6o]:hover {
|
|
19
19
|
background: #979BA5;
|
|
20
20
|
}
|
|
21
|
-
.expend-collapse-home.is-close[data-v-
|
|
21
|
+
.expend-collapse-home.is-close[data-v-lq48ke6o] {
|
|
22
22
|
left: 0;
|
|
23
23
|
}
|
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
|
|
2
|
-
.upload-file-home[data-v-
|
|
2
|
+
.upload-file-home[data-v-1gqmlv7q] {
|
|
3
3
|
position: relative;
|
|
4
4
|
background: #FFFFFF;
|
|
5
5
|
border: 1px solid #DCDEE5;
|
|
6
6
|
border-radius: 4px;
|
|
7
7
|
padding: 12px 12px 10px 12px;
|
|
8
8
|
}
|
|
9
|
-
.upload-file-home[data-v-
|
|
9
|
+
.upload-file-home[data-v-1gqmlv7q]:hover {
|
|
10
10
|
border: 1px solid #3A84FF;
|
|
11
11
|
}
|
|
12
|
-
.upload-file-home:hover .file-icons[data-v-
|
|
12
|
+
.upload-file-home:hover .file-icons[data-v-1gqmlv7q] {
|
|
13
13
|
display: flex;
|
|
14
14
|
}
|
|
15
|
-
.upload-file-home .file-icon[data-v-
|
|
15
|
+
.upload-file-home .file-icon[data-v-1gqmlv7q] {
|
|
16
16
|
font-size: 32px;
|
|
17
17
|
}
|
|
18
|
-
.upload-file-home .file-content[data-v-
|
|
18
|
+
.upload-file-home .file-content[data-v-1gqmlv7q] {
|
|
19
19
|
font-size: 12px;
|
|
20
20
|
flex: 1;
|
|
21
21
|
align-items: flex-start;
|
|
@@ -23,28 +23,28 @@
|
|
|
23
23
|
font-weight: normal;
|
|
24
24
|
width: 0;
|
|
25
25
|
}
|
|
26
|
-
.upload-file-home .file-content .file-name[data-v-
|
|
26
|
+
.upload-file-home .file-content .file-name[data-v-1gqmlv7q] {
|
|
27
27
|
width: 100%;
|
|
28
28
|
font-size: 14px;
|
|
29
29
|
line-height: 20px;
|
|
30
30
|
}
|
|
31
|
-
.upload-file-home .file-content .file-size[data-v-
|
|
31
|
+
.upload-file-home .file-content .file-size[data-v-1gqmlv7q] {
|
|
32
32
|
font-size: 12px;
|
|
33
33
|
color: #979BA5;
|
|
34
34
|
line-height: 20px;
|
|
35
35
|
}
|
|
36
|
-
.upload-file-home .file-icons[data-v-
|
|
36
|
+
.upload-file-home .file-icons[data-v-1gqmlv7q] {
|
|
37
37
|
display: none;
|
|
38
38
|
color: #979BA5;
|
|
39
39
|
}
|
|
40
|
-
.upload-file-home .file-icons .bkaidev-icon[data-v-
|
|
40
|
+
.upload-file-home .file-icons .bkaidev-icon[data-v-1gqmlv7q] {
|
|
41
41
|
cursor: pointer;
|
|
42
42
|
margin-right: 15px;
|
|
43
43
|
font-size: 16px;
|
|
44
44
|
}
|
|
45
|
-
.upload-file-home .file-icons .bkaidev-icon[data-v-
|
|
45
|
+
.upload-file-home .file-icons .bkaidev-icon[data-v-1gqmlv7q]:hover {
|
|
46
46
|
color: #3A84FF;
|
|
47
47
|
}
|
|
48
|
-
.upload-file-home .file-icons .bkaidev-delete[data-v-
|
|
48
|
+
.upload-file-home .file-icons .bkaidev-delete[data-v-1gqmlv7q] {
|
|
49
49
|
margin: 0;
|
|
50
50
|
}
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
|
|
2
|
-
.ai-ui-sdk-icon.ai-ui-sdk-pdf[data-v-
|
|
2
|
+
.ai-ui-sdk-icon.ai-ui-sdk-pdf[data-v-ib2dc96q] {
|
|
3
3
|
color: #EA3636;
|
|
4
4
|
}
|
|
5
|
-
.ai-ui-sdk-icon.ai-ui-sdk-doc-2[data-v-
|
|
5
|
+
.ai-ui-sdk-icon.ai-ui-sdk-doc-2[data-v-ib2dc96q], .ai-ui-sdk-icon.ai-ui-sdk-ppt-2[data-v-ib2dc96q], .ai-ui-sdk-icon.ai-ui-sdk-markdown[data-v-ib2dc96q] {
|
|
6
6
|
color: #3A84FF;
|
|
7
7
|
}
|
|
8
|
-
.ai-ui-sdk-icon.ai-ui-sdk-folder-fill[data-v-
|
|
8
|
+
.ai-ui-sdk-icon.ai-ui-sdk-folder-fill[data-v-ib2dc96q] {
|
|
9
9
|
color: #C4C6CC;
|
|
10
10
|
}
|
|
11
|
-
.ai-ui-sdk-icon.ai-ui-sdk-excel[data-v-
|
|
11
|
+
.ai-ui-sdk-icon.ai-ui-sdk-excel[data-v-ib2dc96q] {
|
|
12
12
|
color: #2DCB56;
|
|
13
13
|
}
|
|
14
|
-
.ai-ui-sdk-icon.ai-ui-sdk-wangye[data-v-
|
|
14
|
+
.ai-ui-sdk-icon.ai-ui-sdk-wangye[data-v-ib2dc96q] {
|
|
15
15
|
color: #14A568;
|
|
16
16
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
|
|
2
|
-
.header-home[data-v-
|
|
2
|
+
.header-home[data-v-x0rl9w0u] {
|
|
3
3
|
width: 100%;
|
|
4
4
|
height: 52px;
|
|
5
5
|
background: #FFFFFF;
|
|
@@ -7,14 +7,14 @@
|
|
|
7
7
|
position: relative;
|
|
8
8
|
z-index: 2;
|
|
9
9
|
}
|
|
10
|
-
.header-title[data-v-
|
|
10
|
+
.header-title[data-v-x0rl9w0u] {
|
|
11
11
|
position: absolute;
|
|
12
12
|
left: 24px;
|
|
13
13
|
top: 14px;
|
|
14
14
|
font-size: 16px;
|
|
15
15
|
color: #313238;
|
|
16
16
|
}
|
|
17
|
-
.header-main[data-v-
|
|
17
|
+
.header-main[data-v-x0rl9w0u] {
|
|
18
18
|
display: flex;
|
|
19
19
|
align-items: center;
|
|
20
20
|
justify-content: flex-end;
|
|
@@ -22,13 +22,13 @@
|
|
|
22
22
|
height: 100%;
|
|
23
23
|
margin: 0 auto;
|
|
24
24
|
}
|
|
25
|
-
.header-select[data-v-
|
|
25
|
+
.header-select[data-v-x0rl9w0u] {
|
|
26
26
|
width: 300px;
|
|
27
27
|
margin-right: 8px;
|
|
28
28
|
z-index: 9;
|
|
29
29
|
font-size: 12px;
|
|
30
30
|
}
|
|
31
|
-
.header-input[data-v-
|
|
31
|
+
.header-input[data-v-x0rl9w0u] {
|
|
32
32
|
width: 300px;
|
|
33
33
|
font-size: 12px;
|
|
34
34
|
}
|
|
@@ -0,0 +1,171 @@
|
|
|
1
|
+
const languageSuffixMap = {
|
|
2
|
+
c: '.c',
|
|
3
|
+
'c++': '.cpp',
|
|
4
|
+
java: '.java',
|
|
5
|
+
python: '.py',
|
|
6
|
+
html: '.html',
|
|
7
|
+
css: '.css',
|
|
8
|
+
javascript: '.js',
|
|
9
|
+
js: '.js',
|
|
10
|
+
php: '.php',
|
|
11
|
+
ruby: '.rb',
|
|
12
|
+
swift: '.swift',
|
|
13
|
+
go: '.go',
|
|
14
|
+
perl: '.pl',
|
|
15
|
+
sql: '.sql',
|
|
16
|
+
xml: '.xml',
|
|
17
|
+
json: '.json',
|
|
18
|
+
vue: '.vue',
|
|
19
|
+
rust: '.rs',
|
|
20
|
+
jsx: '.jsx',
|
|
21
|
+
tsx: '.tsx',
|
|
22
|
+
typescript: '.ts',
|
|
23
|
+
ts: '.ts',
|
|
24
|
+
bash: '.sh'
|
|
25
|
+
};
|
|
26
|
+
const getLanguageSuffix = (name)=>languageSuffixMap[name.toLowerCase()] || '.txt';
|
|
27
|
+
let originalFence;
|
|
28
|
+
// 自定义代码块
|
|
29
|
+
export const MarkDownCodePlugin = (markdownIt)=>{
|
|
30
|
+
// 如果 originalFence 不存在,则获取原始的 fence 函数,防止嵌套调用
|
|
31
|
+
if (!originalFence) {
|
|
32
|
+
originalFence = markdownIt.renderer.rules.fence;
|
|
33
|
+
}
|
|
34
|
+
// 重写 fence 规则
|
|
35
|
+
markdownIt.block.ruler.at('fence', (state, startLine, endLine, silent)=>{
|
|
36
|
+
let pos = state.bMarks[startLine] + state.tShift[startLine];
|
|
37
|
+
let max = state.eMarks[startLine];
|
|
38
|
+
// 检查是否缩进过多
|
|
39
|
+
if (state.sCount[startLine] - state.blkIndent >= 4) {
|
|
40
|
+
return false;
|
|
41
|
+
}
|
|
42
|
+
// 检查是否有足够的字符
|
|
43
|
+
if (pos + 3 > max) {
|
|
44
|
+
return false;
|
|
45
|
+
}
|
|
46
|
+
const marker = state.src.charCodeAt(pos);
|
|
47
|
+
// 检查是否是有效的标记字符
|
|
48
|
+
if (marker !== 0x7E /* ~ */ && marker !== 0x60 /* ` */ ) {
|
|
49
|
+
return false;
|
|
50
|
+
}
|
|
51
|
+
// 获取标记的长度
|
|
52
|
+
let mem = pos;
|
|
53
|
+
pos = state.skipChars(pos, marker);
|
|
54
|
+
const len = pos - mem;
|
|
55
|
+
if (len < 3) {
|
|
56
|
+
return false;
|
|
57
|
+
}
|
|
58
|
+
const markup = state.src.slice(mem, pos);
|
|
59
|
+
const params = state.src.slice(pos, max);
|
|
60
|
+
// 检查参数中是否包含标记字符
|
|
61
|
+
if (marker === 0x60 /* ` */ ) {
|
|
62
|
+
if (params.indexOf(String.fromCharCode(marker)) >= 0) {
|
|
63
|
+
return false;
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
// 验证模式直接返回
|
|
67
|
+
if (silent) {
|
|
68
|
+
return true;
|
|
69
|
+
}
|
|
70
|
+
// 寻找结束标记
|
|
71
|
+
let nextLine = startLine;
|
|
72
|
+
let haveEndMarker = false;
|
|
73
|
+
for(;;){
|
|
74
|
+
nextLine += 1;
|
|
75
|
+
if (nextLine >= endLine) {
|
|
76
|
+
break;
|
|
77
|
+
}
|
|
78
|
+
pos = state.bMarks[nextLine] + state.tShift[nextLine];
|
|
79
|
+
mem = pos;
|
|
80
|
+
max = state.eMarks[nextLine];
|
|
81
|
+
if (pos < max && state.sCount[nextLine] < state.blkIndent) {
|
|
82
|
+
break;
|
|
83
|
+
}
|
|
84
|
+
// 如果不是标记字符,继续
|
|
85
|
+
if (state.src.charCodeAt(pos) !== marker) {
|
|
86
|
+
continue;
|
|
87
|
+
}
|
|
88
|
+
// 检查标记长度
|
|
89
|
+
if (state.sCount[nextLine] - state.blkIndent >= 4) {
|
|
90
|
+
continue;
|
|
91
|
+
}
|
|
92
|
+
pos = state.skipChars(pos, marker);
|
|
93
|
+
// 结束标记必须至少和开始标记一样长
|
|
94
|
+
if (pos - mem < len) {
|
|
95
|
+
continue;
|
|
96
|
+
}
|
|
97
|
+
// 检查标记后是否只有空格
|
|
98
|
+
pos = state.skipSpaces(pos);
|
|
99
|
+
if (pos < max) {
|
|
100
|
+
continue;
|
|
101
|
+
}
|
|
102
|
+
haveEndMarker = true;
|
|
103
|
+
break;
|
|
104
|
+
}
|
|
105
|
+
// 设置结束行
|
|
106
|
+
state.line = nextLine + (haveEndMarker ? 1 : 0);
|
|
107
|
+
// 创建 token
|
|
108
|
+
const token = state.push('fence', 'code', 0);
|
|
109
|
+
token.info = params;
|
|
110
|
+
token.content = state.getLines(startLine + 1, nextLine, state.sCount[startLine], true);
|
|
111
|
+
token.markup = markup;
|
|
112
|
+
token.map = [
|
|
113
|
+
startLine,
|
|
114
|
+
state.line
|
|
115
|
+
];
|
|
116
|
+
token.haveEndMarker = haveEndMarker;
|
|
117
|
+
return true;
|
|
118
|
+
}, {
|
|
119
|
+
alt: [
|
|
120
|
+
'paragraph',
|
|
121
|
+
'reference',
|
|
122
|
+
'blockquote',
|
|
123
|
+
'list'
|
|
124
|
+
]
|
|
125
|
+
});
|
|
126
|
+
// 自定义代码块渲染
|
|
127
|
+
markdownIt.renderer.rules.fence = (tokens, idx, options, env, self)=>{
|
|
128
|
+
const token = tokens[idx];
|
|
129
|
+
const hasEndBlock = token.haveEndMarker;
|
|
130
|
+
let language = token.info.trim();
|
|
131
|
+
let code = token.content;
|
|
132
|
+
// 原始渲染
|
|
133
|
+
const originalCode = originalFence(tokens, idx, options, env, self);
|
|
134
|
+
// 1. 如果代码块和语言不为空,则渲染代码块
|
|
135
|
+
if (code.trim() && language && hasEndBlock) {
|
|
136
|
+
const encodeCode = encodeURIComponent(code);
|
|
137
|
+
return `<section class="full-screen-wrap markdown-body" style="background-color: #2e2e2e;">
|
|
138
|
+
<section class="code-header g-flex-row">
|
|
139
|
+
<span>${language}</span>
|
|
140
|
+
<span class="g-flex-row">
|
|
141
|
+
<i class="ai-ui-sdk-icon ai-ui-sdk-un-full-screen click-un-full-screen"></i>
|
|
142
|
+
<i class="ai-ui-sdk-icon ai-ui-sdk-full-screen click-full-screen"></i>
|
|
143
|
+
<i class="ai-ui-sdk-icon ai-ui-sdk-copy click-copy" data-clipboard-text="${encodeCode}"></i>
|
|
144
|
+
<i class="ai-ui-sdk-icon ai-ui-sdk-dongzuo-xiazai click-download" data-clipboard-text="${encodeCode}" data-file-name="ai${getLanguageSuffix(language)}"></i>
|
|
145
|
+
</span>
|
|
146
|
+
</section>
|
|
147
|
+
${originalCode}
|
|
148
|
+
</section>`;
|
|
149
|
+
}
|
|
150
|
+
// 2. 如果有结束标记并且有代码内容,则返回原始代码块
|
|
151
|
+
if (code.trim() && hasEndBlock) {
|
|
152
|
+
return originalCode;
|
|
153
|
+
}
|
|
154
|
+
// 3. 否则返回原始内容
|
|
155
|
+
// 开始标记
|
|
156
|
+
const start = token.markup;
|
|
157
|
+
// 结束标记
|
|
158
|
+
let end = '';
|
|
159
|
+
// 如果代码块长度大于行数,则添加结束标记(markdown不封闭语法)
|
|
160
|
+
if (hasEndBlock) {
|
|
161
|
+
end = '```';
|
|
162
|
+
}
|
|
163
|
+
// 如果代码块不为空,则添加换行符
|
|
164
|
+
if (code) {
|
|
165
|
+
code = code.replace(/\n/g, '<br>');
|
|
166
|
+
}
|
|
167
|
+
language = `${language}<br>`;
|
|
168
|
+
// 返回原始字符串
|
|
169
|
+
return `${start}${language}${code}${end}`;
|
|
170
|
+
};
|
|
171
|
+
};
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import type MarkdownIt from 'markdown-it';
|
|
2
|
+
import 'x-mavon-editor/dist/css/index.css';
|
|
3
|
+
import 'x-mavon-editor/dist/highlightjs/styles/atom-one-dark.min.css';
|
|
4
|
+
import './mark-down.postcss';
|
|
5
|
+
export type MdProp = {
|
|
6
|
+
modelValue?: string;
|
|
7
|
+
codeStyle?: string;
|
|
8
|
+
previewBackground?: string;
|
|
9
|
+
defaultOpen: string;
|
|
10
|
+
editable: boolean;
|
|
11
|
+
subfield: boolean;
|
|
12
|
+
toolbarsFlag: boolean;
|
|
13
|
+
boxShadow: boolean;
|
|
14
|
+
ref?: (elm: MdRef) => void;
|
|
15
|
+
xssOptions: {
|
|
16
|
+
whiteList: {
|
|
17
|
+
[key: string]: string[];
|
|
18
|
+
};
|
|
19
|
+
};
|
|
20
|
+
externalLink: {
|
|
21
|
+
[key: string]: (param?: string) => string;
|
|
22
|
+
};
|
|
23
|
+
};
|
|
24
|
+
type MdRef = {
|
|
25
|
+
$paste: () => void;
|
|
26
|
+
markdownIt: MarkdownIt;
|
|
27
|
+
};
|
|
28
|
+
declare const _default: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
29
|
+
value: {
|
|
30
|
+
type: StringConstructor;
|
|
31
|
+
};
|
|
32
|
+
previewBackground: {
|
|
33
|
+
type: StringConstructor;
|
|
34
|
+
default: string;
|
|
35
|
+
};
|
|
36
|
+
}>, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
37
|
+
[key: string]: any;
|
|
38
|
+
}>, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
39
|
+
value: {
|
|
40
|
+
type: StringConstructor;
|
|
41
|
+
};
|
|
42
|
+
previewBackground: {
|
|
43
|
+
type: StringConstructor;
|
|
44
|
+
default: string;
|
|
45
|
+
};
|
|
46
|
+
}>> & Readonly<{}>, {
|
|
47
|
+
previewBackground: string;
|
|
48
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
49
|
+
export default _default;
|