@blueking/ai-ui-sdk 0.2.1 → 0.2.2
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/common/util.d.ts +5 -0
- package/dist/common/util.ts.js +8 -0
- 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.script.vue.js.js +62 -1
- package/dist/components/render-choose-tag/index.vue.css +7 -7
- package/dist/components/render-choose-tag/index.vue.d.ts +1 -0
- 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-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/batch-edit-valid-dataset-data/index.vue.css +1 -1
- package/dist/components/render-dataset/components/batch-edit-valid-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/dataset-data-valid/index.vue.css +1 -1
- package/dist/components/render-dataset/components/dataset-data-valid/index.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.script.vue.js +1 -4
- 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.script.vue.js.js +1 -3
- 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 +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 +2 -2
- 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/components/search-dataset/index.script.vue.js.js +2 -3
- package/dist/components/render-dataset/components/search-dataset/index.vue.d.ts +0 -1
- package/dist/components/render-dataset-detail-origin-data/components/table/index.script.vue.js +2 -8
- 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 +2 -5
- package/dist/components/render-dataset-list/components/main.vue.css +3 -3
- package/dist/components/render-dataset-list/components/main.vue.d.ts +0 -1
- package/dist/components/render-dataset-list/components/main.vue.js +1 -1
- package/dist/components/render-dataset-list/components/table.script.vue.js +1 -4
- package/dist/components/render-dataset-list/index.script.vue.js.js +2 -5
- package/dist/components/render-dataset-list/index.vue.css +2 -2
- package/dist/components/render-dataset-list/index.vue.d.ts +0 -1
- package/dist/components/render-dataset-list/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 +3 -3
- package/dist/components/render-header/index.vue.js +1 -1
- package/dist/components/render-like/index.vue.css +5 -5
- package/dist/components/render-like/index.vue.js +1 -1
- package/dist/components/render-markdown/common.d.ts +19 -0
- package/dist/components/render-markdown/common.ts.js +74 -0
- package/dist/components/render-markdown/edit.d.ts +82 -0
- package/dist/components/render-markdown/edit.postcss.css +92 -0
- package/dist/components/render-markdown/edit.ts.js +228 -0
- package/dist/components/render-markdown/filter-css.d.ts +3 -0
- package/dist/components/render-markdown/filter-css.ts.js +119 -0
- package/dist/components/render-markdown/katex.d.ts +83 -0
- package/dist/components/render-markdown/katex.ts.js +309 -0
- package/dist/components/render-markdown/mark-down-code-copy.d.ts +7 -0
- package/dist/components/render-markdown/mark-down-code-copy.ts.js +73 -0
- package/dist/components/render-markdown/prism-atom-one-dark.postcss.css +192 -0
- package/dist/components/render-markdown/{mark-down.d.ts → view.d.ts} +2 -27
- package/dist/components/render-markdown/view.postcss.css +99 -0
- package/dist/components/render-markdown/view.ts.js +167 -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/render-t-table/index.vue.css +27 -27
- 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.d.ts +3 -2
- package/dist/components.ts.js +3 -2
- package/dist/css/tailwind.css +4 -0
- package/dist/hooks/use-form-leave-confirm.ts.js +2 -0
- package/dist/hooks/use-member-http.d.ts +1 -2
- package/dist/hooks/use-member-http.ts.js +23 -27
- package/dist/hooks.d.ts +0 -1
- package/dist/hooks.ts.js +0 -1
- package/dist/http/fetch/index.d.ts +0 -2
- package/dist/http/fetch/index.ts.js +2 -4
- package/dist/http/fetch/success-interceptor.ts.js +1 -5
- package/package.json +8 -5
- package/dist/components/render-markdown/mark-down-code.d.ts +0 -2
- package/dist/components/render-markdown/mark-down-code.ts.js +0 -171
- package/dist/components/render-markdown/mark-down-emoji.d.ts +0 -2
- package/dist/components/render-markdown/mark-down-emoji.ts.js +0 -4
- package/dist/components/render-markdown/mark-down.postcss.css +0 -154
- package/dist/components/render-markdown/mark-down.ts.js +0 -152
- package/dist/hooks/use-display-name.d.ts +0 -3
- package/dist/hooks/use-display-name.ts.js +0 -14
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
.aidev-markdown-preview .toastui-editor-contents,
|
|
2
|
+
.toastui-editor .toastui-editor-contents,
|
|
3
|
+
.toastui-editor-md-preview .toastui-editor-contents {
|
|
4
|
+
font-family: -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Microsoft YaHei', 'Helvetica Neue', Arial, sans-serif;
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
.aidev-markdown-preview .toastui-editor-contents pre, .toastui-editor .toastui-editor-contents pre, .toastui-editor-md-preview .toastui-editor-contents pre {
|
|
8
|
+
max-height: 500px;
|
|
9
|
+
overflow-y: auto;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
.aidev-markdown-preview .toastui-editor-contents pre::-webkit-scrollbar, .toastui-editor .toastui-editor-contents pre::-webkit-scrollbar, .toastui-editor-md-preview .toastui-editor-contents pre::-webkit-scrollbar {
|
|
13
|
+
width: 6px;
|
|
14
|
+
height: 6px;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
.aidev-markdown-preview .toastui-editor-contents pre::-webkit-scrollbar-thumb, .toastui-editor .toastui-editor-contents pre::-webkit-scrollbar-thumb, .toastui-editor-md-preview .toastui-editor-contents pre::-webkit-scrollbar-thumb {
|
|
18
|
+
width: 6px;
|
|
19
|
+
height: 6px;
|
|
20
|
+
border-radius: 3px;
|
|
21
|
+
background-color: #dcdee5;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
.aidev-markdown-preview .toastui-editor-contents pre::-webkit-scrollbar-thumb:hover, .toastui-editor .toastui-editor-contents pre::-webkit-scrollbar-thumb:hover, .toastui-editor-md-preview .toastui-editor-contents pre::-webkit-scrollbar-thumb:hover {
|
|
25
|
+
background-color: #979ba5;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
.aidev-markdown-preview .toastui-editor-contents p,
|
|
29
|
+
.aidev-markdown-preview .toastui-editor-contents td,
|
|
30
|
+
.toastui-editor .toastui-editor-contents p,
|
|
31
|
+
.toastui-editor .toastui-editor-contents td,
|
|
32
|
+
.toastui-editor-md-preview .toastui-editor-contents p,
|
|
33
|
+
.toastui-editor-md-preview .toastui-editor-contents td {
|
|
34
|
+
color: #4d4f56;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
.aidev-markdown-preview .toastui-editor-contents h1, .toastui-editor .toastui-editor-contents h1, .toastui-editor-md-preview .toastui-editor-contents h1 {
|
|
38
|
+
margin: 32px 0 20px;
|
|
39
|
+
border-bottom: 2px solid #eaecef;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
.aidev-markdown-preview .toastui-editor-contents h2, .toastui-editor .toastui-editor-contents h2, .toastui-editor-md-preview .toastui-editor-contents h2 {
|
|
43
|
+
margin: 24px 0 16px;
|
|
44
|
+
border-bottom: 1px solid #eaecef;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
.aidev-markdown-preview .toastui-editor-contents h3, .toastui-editor .toastui-editor-contents h3, .toastui-editor-md-preview .toastui-editor-contents h3 {
|
|
48
|
+
margin: 18px 0 12px;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
.aidev-markdown-preview .toastui-editor-contents h4, .toastui-editor .toastui-editor-contents h4, .toastui-editor-md-preview .toastui-editor-contents h4 {
|
|
52
|
+
margin: 14px 0 8px;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
.aidev-markdown-preview .toastui-editor-contents h5,
|
|
56
|
+
.aidev-markdown-preview .toastui-editor-contents h6,
|
|
57
|
+
.toastui-editor .toastui-editor-contents h5,
|
|
58
|
+
.toastui-editor .toastui-editor-contents h6,
|
|
59
|
+
.toastui-editor-md-preview .toastui-editor-contents h5,
|
|
60
|
+
.toastui-editor-md-preview .toastui-editor-contents h6 {
|
|
61
|
+
margin: 10px 0 4px;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
.aidev-markdown-preview .toastui-editor-contents i, .toastui-editor .toastui-editor-contents i, .toastui-editor-md-preview .toastui-editor-contents i {
|
|
65
|
+
font-style: normal;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
.aidev-markdown-preview .toastui-editor-contents table th, .toastui-editor .toastui-editor-contents table th, .toastui-editor-md-preview .toastui-editor-contents table th {
|
|
69
|
+
background-color: #fff;
|
|
70
|
+
color: #4d4f56;
|
|
71
|
+
font-weight: bold;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
.aidev-markdown-preview .toastui-editor-contents table tr:nth-of-type(odd), .toastui-editor .toastui-editor-contents table tr:nth-of-type(odd), .toastui-editor-md-preview .toastui-editor-contents table tr:nth-of-type(odd) {
|
|
75
|
+
background-color: #f6f8fa;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
.aidev-markdown-preview .toastui-editor-contents table tr:nth-of-type(even), .toastui-editor .toastui-editor-contents table tr:nth-of-type(even), .toastui-editor-md-preview .toastui-editor-contents table tr:nth-of-type(even) {
|
|
79
|
+
background-color: #fff;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
.aidev-markdown-preview .toastui-editor-contents .markdown-code-copy-wrap, .toastui-editor .toastui-editor-contents .markdown-code-copy-wrap, .toastui-editor-md-preview .toastui-editor-contents .markdown-code-copy-wrap {
|
|
83
|
+
position: relative;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
.aidev-markdown-preview .toastui-editor-contents .markdown-code-copy-button, .toastui-editor .toastui-editor-contents .markdown-code-copy-button, .toastui-editor-md-preview .toastui-editor-contents .markdown-code-copy-button {
|
|
87
|
+
position: sticky;
|
|
88
|
+
top: -16px;
|
|
89
|
+
float: right;
|
|
90
|
+
margin: -25px -12px 0 0;
|
|
91
|
+
font-size: 14px;
|
|
92
|
+
color: #979ba5;
|
|
93
|
+
cursor: pointer;
|
|
94
|
+
user-select: none;
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
.aidev-markdown-preview .toastui-editor-contents .markdown-code-copy-button:hover, .toastui-editor .toastui-editor-contents .markdown-code-copy-button:hover, .toastui-editor-md-preview .toastui-editor-contents .markdown-code-copy-button:hover {
|
|
98
|
+
color: #3a84ff;
|
|
99
|
+
}
|
|
@@ -0,0 +1,167 @@
|
|
|
1
|
+
function _define_property(obj, key, value) {
|
|
2
|
+
if (key in obj) {
|
|
3
|
+
Object.defineProperty(obj, key, {
|
|
4
|
+
value: value,
|
|
5
|
+
enumerable: true,
|
|
6
|
+
configurable: true,
|
|
7
|
+
writable: true
|
|
8
|
+
});
|
|
9
|
+
} else {
|
|
10
|
+
obj[key] = value;
|
|
11
|
+
}
|
|
12
|
+
return obj;
|
|
13
|
+
}
|
|
14
|
+
function _object_spread(target) {
|
|
15
|
+
for(var i = 1; i < arguments.length; i++){
|
|
16
|
+
var source = arguments[i] != null ? arguments[i] : {};
|
|
17
|
+
var ownKeys = Object.keys(source);
|
|
18
|
+
if (typeof Object.getOwnPropertySymbols === "function") {
|
|
19
|
+
ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {
|
|
20
|
+
return Object.getOwnPropertyDescriptor(source, sym).enumerable;
|
|
21
|
+
}));
|
|
22
|
+
}
|
|
23
|
+
ownKeys.forEach(function(key) {
|
|
24
|
+
_define_property(target, key, source[key]);
|
|
25
|
+
});
|
|
26
|
+
}
|
|
27
|
+
return target;
|
|
28
|
+
}
|
|
29
|
+
import { defineComponent, h, onMounted, onUnmounted, ref, watch } from 'vue';
|
|
30
|
+
import { filterXss } from '@blueking/xss-filter';
|
|
31
|
+
import Viewer from '@toast-ui/editor/dist/toastui-editor-viewer';
|
|
32
|
+
import { commonConfig } from './common.ts.js';
|
|
33
|
+
import { filterCSS } from './filter-css.ts.js';
|
|
34
|
+
import '@toast-ui/editor/dist/toastui-editor-viewer.css';
|
|
35
|
+
import './view.postcss.css';
|
|
36
|
+
export default defineComponent({
|
|
37
|
+
props: {
|
|
38
|
+
value: {
|
|
39
|
+
type: String
|
|
40
|
+
},
|
|
41
|
+
previewBackground: {
|
|
42
|
+
type: String,
|
|
43
|
+
default: '#fff'
|
|
44
|
+
},
|
|
45
|
+
padding: {
|
|
46
|
+
type: String,
|
|
47
|
+
default: '12px 16px'
|
|
48
|
+
}
|
|
49
|
+
},
|
|
50
|
+
setup (props) {
|
|
51
|
+
const viewerRef = ref();
|
|
52
|
+
let viewer;
|
|
53
|
+
const handleInit = ()=>{
|
|
54
|
+
viewer = new Viewer(_object_spread({
|
|
55
|
+
el: viewerRef.value,
|
|
56
|
+
initialValue: props.value,
|
|
57
|
+
customHTMLSanitizer: (html)=>filterCSS(filterXss(html, {
|
|
58
|
+
whiteList: {
|
|
59
|
+
a: [
|
|
60
|
+
'href',
|
|
61
|
+
'target',
|
|
62
|
+
'class',
|
|
63
|
+
'title',
|
|
64
|
+
'rel'
|
|
65
|
+
],
|
|
66
|
+
section: [
|
|
67
|
+
'class'
|
|
68
|
+
],
|
|
69
|
+
i: [
|
|
70
|
+
'class'
|
|
71
|
+
],
|
|
72
|
+
span: [
|
|
73
|
+
'class',
|
|
74
|
+
'style',
|
|
75
|
+
'data-variable-index',
|
|
76
|
+
'aria-hidden'
|
|
77
|
+
],
|
|
78
|
+
div: [
|
|
79
|
+
'class',
|
|
80
|
+
'style'
|
|
81
|
+
],
|
|
82
|
+
svg: [
|
|
83
|
+
'class'
|
|
84
|
+
],
|
|
85
|
+
use: [
|
|
86
|
+
'href'
|
|
87
|
+
],
|
|
88
|
+
ul: [
|
|
89
|
+
'class'
|
|
90
|
+
],
|
|
91
|
+
li: [
|
|
92
|
+
'class',
|
|
93
|
+
'title'
|
|
94
|
+
],
|
|
95
|
+
p: [
|
|
96
|
+
'class'
|
|
97
|
+
],
|
|
98
|
+
br: [],
|
|
99
|
+
strong: [
|
|
100
|
+
'class'
|
|
101
|
+
],
|
|
102
|
+
b: [
|
|
103
|
+
'class'
|
|
104
|
+
],
|
|
105
|
+
em: [
|
|
106
|
+
'class'
|
|
107
|
+
],
|
|
108
|
+
code: [
|
|
109
|
+
'class'
|
|
110
|
+
],
|
|
111
|
+
pre: [
|
|
112
|
+
'class'
|
|
113
|
+
],
|
|
114
|
+
blockquote: [
|
|
115
|
+
'class'
|
|
116
|
+
],
|
|
117
|
+
table: [
|
|
118
|
+
'class'
|
|
119
|
+
],
|
|
120
|
+
thead: [
|
|
121
|
+
'class'
|
|
122
|
+
],
|
|
123
|
+
tbody: [
|
|
124
|
+
'class'
|
|
125
|
+
],
|
|
126
|
+
tr: [
|
|
127
|
+
'class'
|
|
128
|
+
],
|
|
129
|
+
th: [
|
|
130
|
+
'class',
|
|
131
|
+
'align'
|
|
132
|
+
],
|
|
133
|
+
td: [
|
|
134
|
+
'class',
|
|
135
|
+
'align'
|
|
136
|
+
]
|
|
137
|
+
},
|
|
138
|
+
css: false,
|
|
139
|
+
onTagAttr: (_tag, name, value)=>{
|
|
140
|
+
if (name === 'data-nodeid') {
|
|
141
|
+
return `${name}="${value}"`;
|
|
142
|
+
}
|
|
143
|
+
return undefined;
|
|
144
|
+
}
|
|
145
|
+
}))
|
|
146
|
+
}, commonConfig));
|
|
147
|
+
};
|
|
148
|
+
const handleDestroy = ()=>{
|
|
149
|
+
viewer.destroy();
|
|
150
|
+
viewer = null;
|
|
151
|
+
};
|
|
152
|
+
watch(()=>props.value, (value)=>{
|
|
153
|
+
if (!viewer) return;
|
|
154
|
+
viewer.setMarkdown(value || '');
|
|
155
|
+
});
|
|
156
|
+
onMounted(handleInit);
|
|
157
|
+
onUnmounted(handleDestroy);
|
|
158
|
+
return ()=>h('section', {
|
|
159
|
+
ref: viewerRef,
|
|
160
|
+
class: 'g-height-full g-scrollbar aidev-markdown-preview',
|
|
161
|
+
style: {
|
|
162
|
+
'background-color': props.previewBackground,
|
|
163
|
+
padding: props.padding
|
|
164
|
+
}
|
|
165
|
+
});
|
|
166
|
+
}
|
|
167
|
+
});
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
|
|
2
|
-
.router-tab[data-v-
|
|
2
|
+
.router-tab[data-v-kb357znv] {
|
|
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-kb357znv] {
|
|
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-kb357znv] {
|
|
19
19
|
color: #3A84FF;
|
|
20
20
|
border-bottom: 2px solid #3A84FF;
|
|
21
21
|
}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
|
|
2
|
-
.t-t-pagination[data-v-
|
|
2
|
+
.t-t-pagination[data-v-fcgsynrk] {
|
|
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-fcgsynrk] .bk-pagination-list.is-last {
|
|
7
7
|
margin-left: auto;
|
|
8
8
|
}
|
|
9
|
-
.pagination-loading[data-v-
|
|
9
|
+
.pagination-loading[data-v-fcgsynrk]::after {
|
|
10
10
|
content: '';
|
|
11
11
|
position: absolute;
|
|
12
12
|
top: 0;
|
|
@@ -16,93 +16,93 @@
|
|
|
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-fcgsynrk] {
|
|
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-fcgsynrk] {
|
|
26
26
|
display: inline;
|
|
27
27
|
font-size: 12px;
|
|
28
28
|
}
|
|
29
|
-
.t-t-table[data-v-
|
|
29
|
+
.t-t-table[data-v-fcgsynrk] .t-table__th-cell-inner {
|
|
30
30
|
color: #313238;
|
|
31
31
|
}
|
|
32
|
-
.t-t-table[data-v-
|
|
32
|
+
.t-t-table[data-v-fcgsynrk] th {
|
|
33
33
|
padding: 0 16px;
|
|
34
34
|
height: 42px;
|
|
35
35
|
background-color: #FAFBFD !important;
|
|
36
36
|
}
|
|
37
|
-
.t-t-table[data-v-
|
|
37
|
+
.t-t-table[data-v-fcgsynrk] .t-table__body tr {
|
|
38
38
|
color: #63656e;
|
|
39
39
|
font-size: 12px;
|
|
40
40
|
}
|
|
41
|
-
.t-t-table[data-v-
|
|
41
|
+
.t-t-table[data-v-fcgsynrk] .t-table__body tr td {
|
|
42
42
|
padding: 0 16px;
|
|
43
43
|
height: 40px;
|
|
44
44
|
background-color: #fff;
|
|
45
45
|
}
|
|
46
|
-
.t-t-table[data-v-
|
|
46
|
+
.t-t-table[data-v-fcgsynrk] .t-table__body tr:hover td {
|
|
47
47
|
background-color: #f5f7fa !important;
|
|
48
48
|
color: #63656E;
|
|
49
49
|
}
|
|
50
|
-
.t-t-table[data-v-
|
|
50
|
+
.t-t-table[data-v-fcgsynrk] .t-table__content .t-table__body .t-table__empty-row {
|
|
51
51
|
background-color: #fff !important;
|
|
52
52
|
}
|
|
53
|
-
.t-t-table[data-v-
|
|
53
|
+
.t-t-table[data-v-fcgsynrk] .t-table__content .t-table__body .t-table__empty-row >td {
|
|
54
54
|
border: none;
|
|
55
55
|
}
|
|
56
|
-
.t-t-table[data-v-
|
|
56
|
+
.t-t-table[data-v-fcgsynrk] th .t-table__ellipsis {
|
|
57
57
|
width: auto !important;
|
|
58
58
|
}
|
|
59
|
-
.t-t-table[data-v-
|
|
59
|
+
.t-t-table[data-v-fcgsynrk] .t-loading__gradient.t-icon-loading {
|
|
60
60
|
display: none;
|
|
61
61
|
}
|
|
62
|
-
.t-t-table[data-v-
|
|
62
|
+
.t-t-table[data-v-fcgsynrk]:first-of-type .t-table__affixed-header-elm-wrap{
|
|
63
63
|
width: calc(100% - 6px) !important;
|
|
64
64
|
}
|
|
65
|
-
.t-t-table[data-v-
|
|
65
|
+
.t-t-table[data-v-fcgsynrk] .t-table__affixed-header-elm-wrap>div {
|
|
66
66
|
width: 100% !important;
|
|
67
67
|
scrollbar-width: none;
|
|
68
68
|
}
|
|
69
|
-
.t-t-table[data-v-
|
|
69
|
+
.t-t-table[data-v-fcgsynrk] .t-table--layout-fixed{
|
|
70
70
|
width: 100% !important;
|
|
71
71
|
}
|
|
72
|
-
.t-t-table[data-v-
|
|
72
|
+
.t-t-table[data-v-fcgsynrk] .bk-exception-description{
|
|
73
73
|
margin-bottom: 0;
|
|
74
74
|
}
|
|
75
|
-
.t-t-table[data-v-
|
|
75
|
+
.t-t-table[data-v-fcgsynrk] .t-table__content{
|
|
76
76
|
z-index: 2;
|
|
77
77
|
max-height: 100%;
|
|
78
78
|
overflow: auto;
|
|
79
79
|
}
|
|
80
|
-
.t-t-table[data-v-
|
|
80
|
+
.t-t-table[data-v-fcgsynrk] .t-table__content::-webkit-scrollbar {
|
|
81
81
|
width: 6px;
|
|
82
82
|
height: 6px;
|
|
83
83
|
}
|
|
84
|
-
.t-t-table[data-v-
|
|
84
|
+
.t-t-table[data-v-fcgsynrk] .t-table__content::-webkit-scrollbar-thumb {
|
|
85
85
|
width: 6px;
|
|
86
86
|
height: 6px;
|
|
87
87
|
border-radius: 3px;
|
|
88
88
|
background-color: #dcdee5;
|
|
89
89
|
}
|
|
90
|
-
.t-t-table[data-v-
|
|
90
|
+
.t-t-table[data-v-fcgsynrk] .t-table__content::-webkit-scrollbar-thumb:hover {
|
|
91
91
|
background-color: #979ba5;
|
|
92
92
|
}
|
|
93
|
-
.t-t-table[data-v-
|
|
93
|
+
.t-t-table[data-v-fcgsynrk] .t-table__ellipsis.t-text-ellipsis:has(.checkbox){
|
|
94
94
|
line-height: 100%;
|
|
95
95
|
}
|
|
96
|
-
.t-t-table[data-v-
|
|
96
|
+
.t-t-table[data-v-fcgsynrk] .t-table__cell--sort-trigger.t-table__double-icons{
|
|
97
97
|
gap: 5px;
|
|
98
98
|
}
|
|
99
|
-
.t-t-table[data-v-
|
|
99
|
+
.t-t-table[data-v-fcgsynrk] .t-table__sort-icon--active>i{
|
|
100
100
|
color: #3a84ff !important;
|
|
101
101
|
}
|
|
102
|
-
.t-t-table[data-v-
|
|
102
|
+
.t-t-table[data-v-fcgsynrk] .t-table__cell--fixed-left:has(.checkbox){
|
|
103
103
|
line-height: 100%;
|
|
104
104
|
}
|
|
105
|
-
.t-t-table[data-v-
|
|
105
|
+
.t-t-table[data-v-fcgsynrk] .t-table__filter-icon.t-is-focus>span{
|
|
106
106
|
color: #3a84ff !important;
|
|
107
107
|
}
|
|
108
108
|
|
|
@@ -1,28 +1,28 @@
|
|
|
1
1
|
|
|
2
|
-
.tag-tree[data-v-
|
|
2
|
+
.tag-tree[data-v-r5nqf63v] {
|
|
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-r5nqf63v] {
|
|
8
8
|
height: 32px;
|
|
9
9
|
flex: 1;
|
|
10
10
|
}
|
|
11
|
-
.tag-tree .quick-icon[data-v-
|
|
11
|
+
.tag-tree .quick-icon[data-v-r5nqf63v] {
|
|
12
12
|
margin-left: -24px;
|
|
13
13
|
padding-left: 8px;
|
|
14
14
|
}
|
|
15
|
-
.tag-tree[data-v-
|
|
15
|
+
.tag-tree[data-v-r5nqf63v] .tree-item:has(.bottom-line) {
|
|
16
16
|
border-bottom: 1px solid #F0F1F5;
|
|
17
17
|
}
|
|
18
|
-
.tag-tree[data-v-
|
|
18
|
+
.tag-tree[data-v-r5nqf63v] .tree-item.active .quick-icon {
|
|
19
19
|
color: #3A84FF;
|
|
20
20
|
}
|
|
21
|
-
.tag-tree[data-v-
|
|
21
|
+
.tag-tree[data-v-r5nqf63v] .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-r5nqf63v] {
|
|
26
26
|
line-height: 16px;
|
|
27
27
|
padding: 0 4px;
|
|
28
28
|
background-color: #F0F1F5;
|
package/dist/components.d.ts
CHANGED
|
@@ -10,10 +10,11 @@ import RenderDatasetList from './components/render-dataset-list/index.vue';
|
|
|
10
10
|
import RenderDropdown from './components/render-dropdown/index.vue';
|
|
11
11
|
import RenderHeader from './components/render-header/index.vue';
|
|
12
12
|
import RenderLike from './components/render-like/index.vue';
|
|
13
|
-
import
|
|
13
|
+
import RenderMarkdownEdit from './components/render-markdown/edit';
|
|
14
|
+
import RenderMarkdown from './components/render-markdown/view';
|
|
14
15
|
import RenderSearchEmpty from './components/render-search-empty/index.vue';
|
|
15
16
|
import RenderSearchSelect from './components/render-search-select/index.vue';
|
|
16
17
|
import RenderTTable from './components/render-t-table/index.vue';
|
|
17
18
|
import RenderTagTree from './components/render-tag-tree/index.vue';
|
|
18
19
|
import RenderTree from './components/render-tree/index.vue';
|
|
19
|
-
export { renderAuthDialog, RenderAutoRefresh, RenderDataset, RenderDatasetDetail, RenderDatasetList, RenderHeader, RenderAutoHeightTextarea, RenderDatasetDetailOriginData, RenderCheckbox, RenderChooseTag, RenderMarkdown, RenderSearchEmpty, RenderSearchSelect, RenderLike, RenderTree, RenderTagTree, RenderTTable, RenderDropdown, };
|
|
20
|
+
export { renderAuthDialog, RenderAutoRefresh, RenderDataset, RenderDatasetDetail, RenderDatasetList, RenderHeader, RenderAutoHeightTextarea, RenderDatasetDetailOriginData, RenderCheckbox, RenderChooseTag, RenderMarkdown, RenderMarkdownEdit, RenderSearchEmpty, RenderSearchSelect, RenderLike, RenderTree, RenderTagTree, RenderTTable, RenderDropdown, };
|
package/dist/components.ts.js
CHANGED
|
@@ -11,10 +11,11 @@ import RenderDatasetList from './components/render-dataset-list/index.vue.js';
|
|
|
11
11
|
import RenderDropdown from './components/render-dropdown/index.vue.js';
|
|
12
12
|
import RenderHeader from './components/render-header/index.vue.js';
|
|
13
13
|
import RenderLike from './components/render-like/index.vue.js';
|
|
14
|
-
import
|
|
14
|
+
import RenderMarkdownEdit from './components/render-markdown/edit.ts.js';
|
|
15
|
+
import RenderMarkdown from './components/render-markdown/view.ts.js';
|
|
15
16
|
import RenderSearchEmpty from './components/render-search-empty/index.vue.js';
|
|
16
17
|
import RenderSearchSelect from './components/render-search-select/index.vue.js';
|
|
17
18
|
import RenderTTable from './components/render-t-table/index.vue.js';
|
|
18
19
|
import RenderTagTree from './components/render-tag-tree/index.vue.js';
|
|
19
20
|
import RenderTree from './components/render-tree/index.vue.js';
|
|
20
|
-
export { renderAuthDialog, RenderAutoRefresh, RenderDataset, RenderDatasetDetail, RenderDatasetList, RenderHeader, RenderAutoHeightTextarea, RenderDatasetDetailOriginData, RenderCheckbox, RenderChooseTag, RenderMarkdown, RenderSearchEmpty, RenderSearchSelect, RenderLike, RenderTree, RenderTagTree, RenderTTable, RenderDropdown };
|
|
21
|
+
export { renderAuthDialog, RenderAutoRefresh, RenderDataset, RenderDatasetDetail, RenderDatasetList, RenderHeader, RenderAutoHeightTextarea, RenderDatasetDetailOriginData, RenderCheckbox, RenderChooseTag, RenderMarkdown, RenderMarkdownEdit, RenderSearchEmpty, RenderSearchSelect, RenderLike, RenderTree, RenderTagTree, RenderTTable, RenderDropdown };
|
package/dist/css/tailwind.css
CHANGED
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
import { InfoBox } from 'bkui-vue';
|
|
2
|
+
import { hideTargetPopover } from '../util.ts.js';
|
|
2
3
|
export const useFormLeaveConfirm = ()=>{
|
|
3
4
|
let copyValue;
|
|
4
5
|
const handleInitFormLeaveConfirm = (val)=>{
|
|
5
6
|
copyValue = JSON.parse(JSON.stringify(val));
|
|
6
7
|
};
|
|
7
8
|
const handleFormLeaveConfirm = (leaveCallBack, val, noValidate)=>{
|
|
9
|
+
hideTargetPopover();
|
|
8
10
|
if (!noValidate && copyValue && JSON.stringify(copyValue) !== JSON.stringify(val)) {
|
|
9
11
|
InfoBox({
|
|
10
12
|
title: '确认离开当前页?',
|
|
@@ -2,8 +2,7 @@ interface IMember {
|
|
|
2
2
|
id: string;
|
|
3
3
|
name: string;
|
|
4
4
|
}
|
|
5
|
-
type GetMemberList = (memberUrl: string, tenantId: string, search: string) => Promise<IMember[]>;
|
|
6
5
|
export declare const useMemberHttp: () => {
|
|
7
|
-
getMemberList:
|
|
6
|
+
getMemberList: (memberUrl: string, search: string) => Promise<IMember[]>;
|
|
8
7
|
};
|
|
9
8
|
export {};
|
|
@@ -1,31 +1,27 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { Message } from 'bkui-vue';
|
|
2
2
|
export const useMemberHttp = ()=>{
|
|
3
|
-
const
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
return res.data.map((item)=>({
|
|
26
|
-
id: item.bk_username,
|
|
27
|
-
name: item.display_name
|
|
28
|
-
}));
|
|
3
|
+
const getMemberList = (memberUrl, search)=>{
|
|
4
|
+
return new Promise((resolve, reject)=>{
|
|
5
|
+
const callback = `jsonp_init_bk_member_${Math.ceil(Math.random() * 1000)}`;
|
|
6
|
+
const script = document.createElement('script');
|
|
7
|
+
script.src = `${memberUrl}?callback=${callback}&app_code=bk-magicbox&fuzzy_lookups=${search}`;
|
|
8
|
+
script.onerror = reject;
|
|
9
|
+
document.body.appendChild(script);
|
|
10
|
+
// @ts-ignore
|
|
11
|
+
window[callback] = (res)=>{
|
|
12
|
+
if (!res.code) {
|
|
13
|
+
resolve(res.data.results.map((item)=>({
|
|
14
|
+
id: item.username,
|
|
15
|
+
name: `${item.username}(${item.display_name})`
|
|
16
|
+
})));
|
|
17
|
+
} else {
|
|
18
|
+
reject(res.message);
|
|
19
|
+
Message({
|
|
20
|
+
theme: 'error',
|
|
21
|
+
message: res.message
|
|
22
|
+
});
|
|
23
|
+
}
|
|
24
|
+
};
|
|
29
25
|
});
|
|
30
26
|
};
|
|
31
27
|
return {
|
package/dist/hooks.d.ts
CHANGED
package/dist/hooks.ts.js
CHANGED
|
@@ -6,8 +6,6 @@ export interface IFetchConfig extends RequestInit {
|
|
|
6
6
|
signal?: AbortSignal;
|
|
7
7
|
withoutSpace?: boolean;
|
|
8
8
|
noCheckPermission?: boolean;
|
|
9
|
-
noCheckBusiness?: boolean;
|
|
10
|
-
noTraceparent?: boolean;
|
|
11
9
|
beforeRequest?: (data: RequestHookData) => RequestHookData | undefined;
|
|
12
10
|
afterRequest?: (data: RequestHookData, response: Response) => void;
|
|
13
11
|
}
|
|
@@ -108,11 +108,9 @@ const allMethods = [
|
|
|
108
108
|
const getFetchConfig = (method, payload, config)=>{
|
|
109
109
|
const headers = {
|
|
110
110
|
'X-Requested-With': 'fetch',
|
|
111
|
-
'X-CSRFToken': getCookies('aidev_csrftoken') || ''
|
|
111
|
+
'X-CSRFToken': getCookies('aidev_csrftoken') || '',
|
|
112
|
+
traceparent: getTraceparent()
|
|
112
113
|
};
|
|
113
|
-
if (!config.noTraceparent) {
|
|
114
|
-
headers.traceparent = getTraceparent();
|
|
115
|
-
}
|
|
116
114
|
if (config.requestType !== 'formData') {
|
|
117
115
|
headers['Content-Type'] = contentTypeMap[config.requestType] || 'application/json';
|
|
118
116
|
}
|
|
@@ -35,12 +35,8 @@ const handleData = function() {
|
|
|
35
35
|
const data = result.error || result;
|
|
36
36
|
const code = data.code || response.code || -1;
|
|
37
37
|
const message = data.message || response.statusText || '系统错误';
|
|
38
|
-
// 对应 HTTP 请求的状态码 200 到 299
|
|
39
38
|
if (response.ok) {
|
|
40
|
-
//
|
|
41
|
-
if (config.noCheckBusiness) {
|
|
42
|
-
return Promise.resolve(data);
|
|
43
|
-
}
|
|
39
|
+
// 对应 HTTP 请求的状态码 200 到 299
|
|
44
40
|
// 校验接口返回的数据,status 为 success 表示业务成功
|
|
45
41
|
switch(code){
|
|
46
42
|
// 接口请求成功
|