@blueking/ai-ui-sdk 0.1.12-beta.2 → 0.1.12-beta.21
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 +7 -0
- package/dist/common/util.ts.js +18 -0
- package/dist/components/render-aside/index.vue.css +9 -9
- package/dist/components/render-aside/index.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-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 +22 -9
- 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.script.vue.js.js +3 -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/dataset-data-tool-icons/index.script.vue.js +1 -1
- package/dist/components/render-dataset/components/edit-dataset-data/index.script.vue.js.js +41 -15
- 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.d.ts +2 -0
- 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 +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/file.script.vue.js.js +4 -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.script.vue.js.js +1 -0
- package/dist/components/render-dataset/components/review-dataset-data/index.vue.css +11 -11
- package/dist/components/render-dataset/components/review-dataset-data/index.vue.js +1 -1
- 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 +77 -2
- package/dist/components/render-dataset-detail/components/header.vue.d.ts +3 -0
- package/dist/components/render-dataset-detail/index.script.vue.js.js +8 -2
- package/dist/components/render-dataset-detail-origin-data/components/table/index.script.vue.js +111 -7
- package/dist/components/render-dataset-detail-origin-data/components/table/index.vue.css +1 -1
- package/dist/components/render-dataset-detail-origin-data/components/table/index.vue.js +1 -1
- package/dist/components/render-dataset-detail-origin-data/index.script.vue.js.js +20 -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.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 -22
- 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.script.vue.js.js +3 -3
- package/dist/components/render-header/index.vue.css +5 -5
- package/dist/components/render-header/index.vue.d.ts +3 -3
- package/dist/components/render-header/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.d.ts +2 -1
- package/dist/components.ts.js +2 -1
- package/dist/hooks/use-chat.d.ts +3 -1
- package/dist/hooks/use-dataset-http.d.ts +3 -1
- package/dist/hooks/use-dataset-http.ts.js +13 -0
- package/dist/http/helper/dataset.ts.js +3 -1
- package/dist/http/helper/knowledge.ts.js +4 -2
- package/dist/http/helper/session.ts.js +2 -0
- package/dist/types/agent.ts.js +1 -0
- package/dist/types/common.d.ts +4 -0
- package/dist/types/common.ts.js +1 -0
- package/dist/types/dataset.d.ts +6 -5
- package/dist/types/enum.d.ts +2 -0
- package/dist/types/enum.ts.js +2 -0
- package/dist/types/knowledge.d.ts +2 -0
- package/dist/types/session.d.ts +2 -2
- package/dist/types.d.ts +2 -0
- package/dist/types.ts.js +2 -0
- package/package.json +2 -2
- package/dist/hooks/use-form-rule.ts.js +0 -101
package/dist/common/util.d.ts
CHANGED
|
@@ -88,3 +88,10 @@ export declare const processPromptTemplate: (prompt: string, selectedText: strin
|
|
|
88
88
|
* @returns 全屏的父元素
|
|
89
89
|
*/
|
|
90
90
|
export declare const getFullScreenWrap: (target: HTMLElement) => HTMLElement;
|
|
91
|
+
/**
|
|
92
|
+
* 判断元素的父节点们有没有某个class
|
|
93
|
+
* @param ele 当前元素
|
|
94
|
+
* @param cls class名
|
|
95
|
+
* @returns 是否有
|
|
96
|
+
*/
|
|
97
|
+
export declare const isParentHasClass: (ele: HTMLElement, cls: string) => boolean;
|
package/dist/common/util.ts.js
CHANGED
|
@@ -233,3 +233,21 @@ export const handleCopy = (text)=>{
|
|
|
233
233
|
}
|
|
234
234
|
return parentElement;
|
|
235
235
|
};
|
|
236
|
+
/**
|
|
237
|
+
* 判断元素的父节点们有没有某个class
|
|
238
|
+
* @param ele 当前元素
|
|
239
|
+
* @param cls class名
|
|
240
|
+
* @returns 是否有
|
|
241
|
+
*/ export const isParentHasClass = (ele, cls)=>{
|
|
242
|
+
let result = false;
|
|
243
|
+
let current = ele;
|
|
244
|
+
while(current){
|
|
245
|
+
var _current_className_includes, _current_className;
|
|
246
|
+
if ((_current_className = current.className) === null || _current_className === void 0 ? void 0 : (_current_className_includes = _current_className.includes) === null || _current_className_includes === void 0 ? void 0 : _current_className_includes.call(_current_className, cls)) {
|
|
247
|
+
result = true;
|
|
248
|
+
break;
|
|
249
|
+
}
|
|
250
|
+
current = current.parentElement;
|
|
251
|
+
}
|
|
252
|
+
return result;
|
|
253
|
+
};
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
|
|
2
|
-
.aside-home[data-v-
|
|
2
|
+
.aside-home[data-v-zz5jhk78] {
|
|
3
3
|
width: 300px;
|
|
4
4
|
height: 100%;
|
|
5
5
|
background: #FFFFFF;
|
|
6
6
|
padding: 16px;
|
|
7
7
|
border-right: 1px solid #eaebf0;
|
|
8
8
|
}
|
|
9
|
-
[data-v-
|
|
9
|
+
[data-v-zz5jhk78] .aside-item {
|
|
10
10
|
width: 268px;
|
|
11
11
|
line-height: 36px;
|
|
12
12
|
border-radius: 2px;
|
|
@@ -16,30 +16,30 @@
|
|
|
16
16
|
justify-content: space-between;
|
|
17
17
|
color: #979BA5;
|
|
18
18
|
}
|
|
19
|
-
[data-v-
|
|
19
|
+
[data-v-zz5jhk78] .aside-item.is-tab {
|
|
20
20
|
background: #F5F7FA;
|
|
21
21
|
cursor: pointer;
|
|
22
22
|
color: #4D4F56;
|
|
23
23
|
}
|
|
24
|
-
[data-v-
|
|
24
|
+
[data-v-zz5jhk78] .aside-item.is-tab:hover {
|
|
25
25
|
background: #F0F5FF;
|
|
26
26
|
}
|
|
27
|
-
[data-v-
|
|
27
|
+
[data-v-zz5jhk78] .aside-item.active {
|
|
28
28
|
background: #F0F5FF;
|
|
29
29
|
color: #3A84FF;
|
|
30
30
|
font-weight: 700;
|
|
31
31
|
}
|
|
32
|
-
[data-v-
|
|
32
|
+
[data-v-zz5jhk78] .aside-item.active .tab-num {
|
|
33
33
|
background: #3A84FF;
|
|
34
34
|
color: #fff;
|
|
35
35
|
}
|
|
36
|
-
[data-v-
|
|
36
|
+
[data-v-zz5jhk78] .aside-item.active .active-text {
|
|
37
37
|
color: #3A84FF;
|
|
38
38
|
}
|
|
39
|
-
[data-v-
|
|
39
|
+
[data-v-zz5jhk78] .aside-item .tab-name {
|
|
40
40
|
flex: 1;
|
|
41
41
|
}
|
|
42
|
-
[data-v-
|
|
42
|
+
[data-v-zz5jhk78] .aside-item .tab-num {
|
|
43
43
|
background: #EAEBF0;
|
|
44
44
|
border-radius: 2px;
|
|
45
45
|
margin-left: 5px;
|
|
@@ -1,40 +1,40 @@
|
|
|
1
1
|
|
|
2
|
-
.send-container[data-v-
|
|
2
|
+
.send-container[data-v-e23z413o] {
|
|
3
3
|
position: relative;
|
|
4
4
|
}
|
|
5
|
-
.send-container[data-v-
|
|
5
|
+
.send-container[data-v-e23z413o]:has(textarea:focus) {
|
|
6
6
|
z-index: 2;
|
|
7
7
|
}
|
|
8
|
-
.send-container:hover .send-clear[data-v-
|
|
8
|
+
.send-container:hover .send-clear[data-v-e23z413o] {
|
|
9
9
|
display: inline-flex !important;
|
|
10
10
|
}
|
|
11
|
-
.send-input[data-v-
|
|
11
|
+
.send-input[data-v-e23z413o] {
|
|
12
12
|
width: 100%;
|
|
13
13
|
flex-direction: row;
|
|
14
14
|
height: var(--origin-height);
|
|
15
15
|
}
|
|
16
|
-
.send-input[data-v-
|
|
16
|
+
.send-input[data-v-e23z413o]:has(textarea:focus) {
|
|
17
17
|
height: var(--text-height);
|
|
18
18
|
}
|
|
19
|
-
.send-input[data-v-
|
|
19
|
+
.send-input[data-v-e23z413o] textarea {
|
|
20
20
|
font-size: 12px;
|
|
21
21
|
line-height: 16px;
|
|
22
22
|
padding: 7px;
|
|
23
23
|
resize: none !important;
|
|
24
24
|
}
|
|
25
|
-
.send-input[data-v-
|
|
25
|
+
.send-input[data-v-e23z413o] textarea::-webkit-scrollbar {
|
|
26
26
|
width: 4px;
|
|
27
27
|
height: 4px;
|
|
28
28
|
}
|
|
29
|
-
.send-input[data-v-
|
|
29
|
+
.send-input[data-v-e23z413o] textarea::-webkit-scrollbar-thumb {
|
|
30
30
|
height: 5px;
|
|
31
31
|
border-radius: 3px;
|
|
32
32
|
background-color: #dcdee5;
|
|
33
33
|
}
|
|
34
|
-
.send-input[data-v-
|
|
34
|
+
.send-input[data-v-e23z413o] textarea::placeholder {
|
|
35
35
|
line-height: 16px;
|
|
36
36
|
}
|
|
37
|
-
.send-clear[data-v-
|
|
37
|
+
.send-clear[data-v-e23z413o] {
|
|
38
38
|
display: none !important;
|
|
39
39
|
position: absolute;
|
|
40
40
|
right: 10px;
|
|
@@ -43,6 +43,6 @@
|
|
|
43
43
|
font-size: 14px;
|
|
44
44
|
cursor: pointer;
|
|
45
45
|
}
|
|
46
|
-
.send-clear[data-v-
|
|
46
|
+
.send-clear[data-v-e23z413o]:hover {
|
|
47
47
|
color: #313238;
|
|
48
48
|
}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
|
|
2
|
-
.auto-refresh[data-v-
|
|
2
|
+
.auto-refresh[data-v-mjyzxbmk] {
|
|
3
3
|
position: relative;
|
|
4
4
|
cursor: pointer;
|
|
5
5
|
line-height: 26px;
|
|
6
6
|
padding: 0 4px;
|
|
7
7
|
}
|
|
8
|
-
.auto-refresh[data-v-
|
|
8
|
+
.auto-refresh[data-v-mjyzxbmk]:after {
|
|
9
9
|
content: '';
|
|
10
10
|
position: absolute;
|
|
11
11
|
top: 5px;
|
|
@@ -15,31 +15,31 @@
|
|
|
15
15
|
background-color: #dcdee5;
|
|
16
16
|
z-index: 1;
|
|
17
17
|
}
|
|
18
|
-
.auto-refresh[data-v-
|
|
18
|
+
.auto-refresh[data-v-mjyzxbmk]:hover {
|
|
19
19
|
color: #3A84FF;
|
|
20
20
|
background-color: #E1ECFF;
|
|
21
21
|
}
|
|
22
|
-
.refresh[data-v-
|
|
22
|
+
.refresh[data-v-mjyzxbmk] {
|
|
23
23
|
cursor: pointer;
|
|
24
24
|
line-height: 26px;
|
|
25
25
|
padding: 0 4px;
|
|
26
26
|
}
|
|
27
|
-
.refresh[data-v-
|
|
27
|
+
.refresh[data-v-mjyzxbmk]:hover {
|
|
28
28
|
color: #3A84FF;
|
|
29
29
|
background-color: #E1ECFF;
|
|
30
30
|
}
|
|
31
|
-
.textarea-list[data-v-
|
|
31
|
+
.textarea-list[data-v-mjyzxbmk] {
|
|
32
32
|
padding: 4px 0;
|
|
33
33
|
line-height: 32px;
|
|
34
34
|
max-height: 300px;
|
|
35
35
|
position: relative;
|
|
36
36
|
z-index: 2;
|
|
37
37
|
}
|
|
38
|
-
.textarea-list .textarea-item[data-v-
|
|
38
|
+
.textarea-list .textarea-item[data-v-mjyzxbmk] {
|
|
39
39
|
padding: 0 12px;
|
|
40
40
|
cursor: pointer;
|
|
41
41
|
}
|
|
42
|
-
.textarea-list .textarea-item[data-v-
|
|
42
|
+
.textarea-list .textarea-item[data-v-mjyzxbmk]:hover {
|
|
43
43
|
background: #E1ECFF;
|
|
44
44
|
color: #3A84FF;
|
|
45
45
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
|
|
2
|
-
.checkbox[data-v-
|
|
2
|
+
.checkbox[data-v-hy813srl] {
|
|
3
3
|
position: relative;
|
|
4
4
|
display: inline-block;
|
|
5
5
|
width: 16px;
|
|
@@ -8,27 +8,27 @@
|
|
|
8
8
|
border-radius: 2px;
|
|
9
9
|
cursor: pointer;
|
|
10
10
|
}
|
|
11
|
-
.checkbox.disabled[data-v-
|
|
11
|
+
.checkbox.disabled[data-v-hy813srl] {
|
|
12
12
|
cursor: not-allowed;
|
|
13
13
|
background: #fafbfd;
|
|
14
14
|
border-color: #dcdee5;
|
|
15
15
|
}
|
|
16
|
-
.checkbox.disabled.checked[data-v-
|
|
16
|
+
.checkbox.disabled.checked[data-v-hy813srl] {
|
|
17
17
|
background-color: #a3c5fd;
|
|
18
18
|
border-color: #a3c5fd;
|
|
19
19
|
}
|
|
20
|
-
.checkbox.disabled.indeterminate[data-v-
|
|
20
|
+
.checkbox.disabled.indeterminate[data-v-hy813srl] {
|
|
21
21
|
background-color: #fafbfd;
|
|
22
22
|
border-color: #dcdee5;
|
|
23
23
|
}
|
|
24
|
-
.checkbox.disabled.indeterminate[data-v-
|
|
24
|
+
.checkbox.disabled.indeterminate[data-v-hy813srl]:after {
|
|
25
25
|
background: #dcdee5;
|
|
26
26
|
}
|
|
27
|
-
.checkbox.checked[data-v-
|
|
27
|
+
.checkbox.checked[data-v-hy813srl] {
|
|
28
28
|
background-color: #3a84ff;
|
|
29
29
|
border: 1px solid #3a84ff;
|
|
30
30
|
}
|
|
31
|
-
.checkbox.checked[data-v-
|
|
31
|
+
.checkbox.checked[data-v-hy813srl]:after {
|
|
32
32
|
position: absolute;
|
|
33
33
|
top: 50%;
|
|
34
34
|
left: 50%;
|
|
@@ -41,11 +41,11 @@
|
|
|
41
41
|
transform: translate(-50%, -60%) rotate(45deg);
|
|
42
42
|
transform-origin: center;
|
|
43
43
|
}
|
|
44
|
-
.checkbox.indeterminate[data-v-
|
|
44
|
+
.checkbox.indeterminate[data-v-hy813srl] {
|
|
45
45
|
background-color: #3a84ff;
|
|
46
46
|
border: 1px solid #3a84ff;
|
|
47
47
|
}
|
|
48
|
-
.checkbox.indeterminate[data-v-
|
|
48
|
+
.checkbox.indeterminate[data-v-hy813srl]:after {
|
|
49
49
|
position: absolute;
|
|
50
50
|
top: 50%;
|
|
51
51
|
left: 50%;
|
|
@@ -36,7 +36,6 @@ const _hoisted_1 = {
|
|
|
36
36
|
import { Done, Error } from 'bkui-vue/lib/icon';
|
|
37
37
|
import { onBeforeMount, ref, toRef, watch } from 'vue';
|
|
38
38
|
import { useDatasetHttp } from '../../hooks/use-dataset-http.ts.js';
|
|
39
|
-
import { useFormRule } from '../../hooks/use-form-rule.ts.js';
|
|
40
39
|
import { useMetaHttp } from '../../hooks/use-meta-http.ts.js';
|
|
41
40
|
export default /*@__PURE__*/ _defineComponent({
|
|
42
41
|
props: {
|
|
@@ -54,7 +53,6 @@ export default /*@__PURE__*/ _defineComponent({
|
|
|
54
53
|
setup (__props, { emit: __emit }) {
|
|
55
54
|
const props = __props;
|
|
56
55
|
const emits = __emit;
|
|
57
|
-
const { getLengthRule } = useFormRule(props.apiPrefix, toRef(props, 'spaceId'));
|
|
58
56
|
const { getTags, plusTag, checkTag } = useMetaHttp(props.apiPrefix, toRef(props, 'spaceId'));
|
|
59
57
|
const { getTags: getDatasetTags, plusTag: plusDatasetTag, checkTag: checkDatasetTag } = useDatasetHttp(props.apiPrefix, toRef(props, 'spaceId'));
|
|
60
58
|
const isShowEdit = ref(false);
|
|
@@ -65,15 +63,30 @@ export default /*@__PURE__*/ _defineComponent({
|
|
|
65
63
|
const isLoadingTag = ref(false);
|
|
66
64
|
const isShow = ref(false);
|
|
67
65
|
const tags = ref([]);
|
|
66
|
+
let templateTagNameErrorMessage = '';
|
|
68
67
|
const checkTagRule = {
|
|
69
|
-
validator: (
|
|
70
|
-
|
|
68
|
+
validator: function() {
|
|
69
|
+
var _ref = _async_to_generator(function*(value) {
|
|
70
|
+
const fun = props.isDataset ? checkDatasetTag : checkTag;
|
|
71
|
+
const tagNames = handleGetTagNames(value);
|
|
72
|
+
try {
|
|
73
|
+
templateTagNameErrorMessage = '';
|
|
74
|
+
yield fun(tagNames);
|
|
75
|
+
} catch (error) {
|
|
76
|
+
templateTagNameErrorMessage = error.message;
|
|
77
|
+
return false;
|
|
78
|
+
}
|
|
79
|
+
});
|
|
80
|
+
return function(value) {
|
|
81
|
+
return _ref.apply(this, arguments);
|
|
82
|
+
};
|
|
83
|
+
}(),
|
|
84
|
+
message: ()=>templateTagNameErrorMessage,
|
|
71
85
|
trigger: 'change'
|
|
72
86
|
};
|
|
73
87
|
const tagRules = {
|
|
74
88
|
tempTagName: [
|
|
75
|
-
checkTagRule
|
|
76
|
-
getLengthRule('标签名称', 16)
|
|
89
|
+
checkTagRule
|
|
77
90
|
]
|
|
78
91
|
};
|
|
79
92
|
const handleFocus = ()=>{
|
|
@@ -105,8 +118,9 @@ export default /*@__PURE__*/ _defineComponent({
|
|
|
105
118
|
try {
|
|
106
119
|
isPulsingTag.value = true;
|
|
107
120
|
const tagNames = handleGetTagNames(tempTagName.value);
|
|
121
|
+
const plusTagFun = props.isDataset ? plusDatasetTag : plusTag;
|
|
108
122
|
yield tagFormRef.value.validate();
|
|
109
|
-
|
|
123
|
+
yield plusTagFun(tagNames);
|
|
110
124
|
emits('update:modelValue', [
|
|
111
125
|
...props.modelValue,
|
|
112
126
|
...tagNames
|
|
@@ -132,7 +146,7 @@ export default /*@__PURE__*/ _defineComponent({
|
|
|
132
146
|
};
|
|
133
147
|
const handleGetTags = ()=>{
|
|
134
148
|
isLoadingTag.value = true;
|
|
135
|
-
props.isDataset ? getDatasetTags() : getTags().then((result)=>{
|
|
149
|
+
(props.isDataset ? getDatasetTags() : getTags()).then((result)=>{
|
|
136
150
|
tags.value = result;
|
|
137
151
|
}).finally(()=>{
|
|
138
152
|
isLoadingTag.value = false;
|
|
@@ -190,7 +204,6 @@ export default /*@__PURE__*/ _defineComponent({
|
|
|
190
204
|
_createVNode(_component_bk_input, {
|
|
191
205
|
modelValue: tempTagName.value,
|
|
192
206
|
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event)=>tempTagName.value = $event),
|
|
193
|
-
maxlength: 20,
|
|
194
207
|
ref_key: "tagRef",
|
|
195
208
|
ref: tagRef,
|
|
196
209
|
placeholder: "如需定义层级标签,以英文“/”分割层级,多个标签以“、”分隔",
|
|
@@ -1,29 +1,29 @@
|
|
|
1
1
|
|
|
2
|
-
.plus-tag-input[data-v-
|
|
2
|
+
.plus-tag-input[data-v-rro39nua] {
|
|
3
3
|
padding: 7px 12px;
|
|
4
4
|
height: 40px;
|
|
5
5
|
background: #FAFBFD;
|
|
6
6
|
border-top: 1px solid #DCDEE5;
|
|
7
7
|
}
|
|
8
|
-
.plus-tag-input .plus-tag-done[data-v-
|
|
8
|
+
.plus-tag-input .plus-tag-done[data-v-rro39nua] {
|
|
9
9
|
cursor: pointer;
|
|
10
10
|
font-size: 22px;
|
|
11
11
|
color: #2DCB56;
|
|
12
12
|
margin: 0 5px 0 10px;
|
|
13
13
|
}
|
|
14
|
-
.plus-tag-input .plus-tag-error[data-v-
|
|
14
|
+
.plus-tag-input .plus-tag-error[data-v-rro39nua] {
|
|
15
15
|
cursor: pointer;
|
|
16
16
|
font-size: 16px;
|
|
17
17
|
color: #C4C6CC;
|
|
18
18
|
margin-right: 5px;
|
|
19
19
|
}
|
|
20
|
-
.plus-tag-input .plus-tag-form[data-v-
|
|
20
|
+
.plus-tag-input .plus-tag-form[data-v-rro39nua] {
|
|
21
21
|
flex: 1;
|
|
22
22
|
}
|
|
23
|
-
.plus-tag-input .plus-tag-form-item[data-v-
|
|
23
|
+
.plus-tag-input .plus-tag-form-item[data-v-rro39nua] {
|
|
24
24
|
margin-bottom: 0;
|
|
25
25
|
}
|
|
26
|
-
.plus-tag[data-v-
|
|
26
|
+
.plus-tag[data-v-rro39nua] {
|
|
27
27
|
cursor: pointer;
|
|
28
28
|
width: 100%;
|
|
29
29
|
height: 40px;
|
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
font-size: 12px;
|
|
37
37
|
line-height: 20px;
|
|
38
38
|
}
|
|
39
|
-
.plus-tag[data-v-
|
|
39
|
+
.plus-tag[data-v-rro39nua]:hover {
|
|
40
40
|
color: #3A84FF;
|
|
41
41
|
}
|
|
42
42
|
|
|
@@ -8,6 +8,7 @@ const _hoisted_2 = {
|
|
|
8
8
|
class: "bkaidev-icon bkaidev-help g-text-14 g-ml-4"
|
|
9
9
|
};
|
|
10
10
|
import { ref } from 'vue';
|
|
11
|
+
import { isParentHasClass } from '../../common/util.ts.js';
|
|
11
12
|
export default /*@__PURE__*/ _defineComponent({
|
|
12
13
|
props: {
|
|
13
14
|
title: {},
|
|
@@ -15,7 +16,8 @@ export default /*@__PURE__*/ _defineComponent({
|
|
|
15
16
|
},
|
|
16
17
|
setup (__props) {
|
|
17
18
|
const isShow = ref(true);
|
|
18
|
-
const toggleShow = ()=>{
|
|
19
|
+
const toggleShow = (event)=>{
|
|
20
|
+
if (isParentHasClass(event.target, 'disable-click-toggle')) return;
|
|
19
21
|
isShow.value = !isShow.value;
|
|
20
22
|
};
|
|
21
23
|
return (_ctx, _cache)=>{
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
|
|
2
|
-
.collapse-title[data-v-
|
|
2
|
+
.collapse-title[data-v-derqt8ql] {
|
|
3
3
|
height: 28px;
|
|
4
4
|
background: #F0F1F5;
|
|
5
5
|
border-radius: 2px;
|
|
6
6
|
padding: 0 12px;
|
|
7
7
|
}
|
|
8
|
-
.collapse-title .is-hidden[data-v-
|
|
8
|
+
.collapse-title .is-hidden[data-v-derqt8ql] {
|
|
9
9
|
transform: rotate(-90deg);
|
|
10
10
|
}
|
package/dist/components/render-dataset/components/dataset-data-tool-icons/index.script.vue.js
CHANGED
|
@@ -39,7 +39,7 @@ export default /*@__PURE__*/ _defineComponent({
|
|
|
39
39
|
}
|
|
40
40
|
]
|
|
41
41
|
]),
|
|
42
|
-
_cache[1] || (_cache[1] = _createStaticVNode("<span class=\"click-full-screen g-cursor-pointer g-flex-row\" data-v-
|
|
42
|
+
_cache[1] || (_cache[1] = _createStaticVNode("<span class=\"click-full-screen g-cursor-pointer g-flex-row\" data-v-kf2re4nr><i class=\"ai-ui-sdk-icon ai-ui-sdk-full-screen click-full-screen g-text-14 g-ml-24 g-mr-2\" data-v-kf2re4nr></i><span class=\"g-text-12 click-full-screen\" data-v-kf2re4nr>全屏</span></span><span class=\"click-un-full-screen g-cursor-pointer g-flex-row\" data-v-kf2re4nr><i class=\"ai-ui-sdk-icon ai-ui-sdk-un-full-screen click-un-full-screen g-text-14 g-ml-24 g-mr-2\" data-v-kf2re4nr></i><span class=\"g-text-12 click-un-full-screen\" data-v-kf2re4nr>取消全屏</span></span>", 2))
|
|
43
43
|
]);
|
|
44
44
|
};
|
|
45
45
|
}
|
|
@@ -80,7 +80,7 @@ function _object_spread_props(target, source) {
|
|
|
80
80
|
return target;
|
|
81
81
|
}
|
|
82
82
|
import { defineComponent as _defineComponent } from 'vue';
|
|
83
|
-
import { unref as _unref, createElementVNode as _createElementVNode, toDisplayString as _toDisplayString, openBlock as _openBlock, createElementBlock as _createElementBlock, createCommentVNode as _createCommentVNode, resolveComponent as _resolveComponent, withCtx as _withCtx, createVNode as _createVNode, createBlock as _createBlock, renderList as _renderList, Fragment as _Fragment,
|
|
83
|
+
import { unref as _unref, createElementVNode as _createElementVNode, toDisplayString as _toDisplayString, openBlock as _openBlock, createElementBlock as _createElementBlock, createCommentVNode as _createCommentVNode, resolveComponent as _resolveComponent, withCtx as _withCtx, createVNode as _createVNode, createBlock as _createBlock, renderList as _renderList, Fragment as _Fragment, normalizeClass as _normalizeClass, createTextVNode as _createTextVNode, resolveDirective as _resolveDirective, withDirectives as _withDirectives, createSlots as _createSlots } from "vue";
|
|
84
84
|
const _hoisted_1 = {
|
|
85
85
|
key: 0,
|
|
86
86
|
class: "g-text-14"
|
|
@@ -98,7 +98,9 @@ import RenderAutoHeightTextarea from '../../../render-auto-height-textarea/index
|
|
|
98
98
|
import Collapse from '../../../render-collapse/index.vue.js';
|
|
99
99
|
import DatasetDataToolIcons from '../dataset-data-tool-icons/index.vue.js';
|
|
100
100
|
import { useDatasetHttp } from '../../../../hooks/use-dataset-http.ts.js';
|
|
101
|
+
import { usePermission } from '../../../../hooks/use-permission.ts.js';
|
|
101
102
|
import useTable from '../../../../hooks/use-table.ts.js';
|
|
103
|
+
import { ResourcePermissionAction } from '../../../../types/enum.ts.js';
|
|
102
104
|
export default /*@__PURE__*/ _defineComponent({
|
|
103
105
|
props: {
|
|
104
106
|
modelValue: {
|
|
@@ -109,7 +111,13 @@ export default /*@__PURE__*/ _defineComponent({
|
|
|
109
111
|
apiPrefix: {},
|
|
110
112
|
schema: {},
|
|
111
113
|
spaceId: {},
|
|
112
|
-
search: {}
|
|
114
|
+
search: {},
|
|
115
|
+
manageDataset: {
|
|
116
|
+
type: Boolean
|
|
117
|
+
},
|
|
118
|
+
isInternal: {
|
|
119
|
+
type: Boolean
|
|
120
|
+
}
|
|
113
121
|
},
|
|
114
122
|
emits: [
|
|
115
123
|
"success-edit",
|
|
@@ -119,11 +127,20 @@ export default /*@__PURE__*/ _defineComponent({
|
|
|
119
127
|
const props = __props;
|
|
120
128
|
const emits = __emit;
|
|
121
129
|
const { updateDatasetData, getDatasetDataList } = useDatasetHttp(props.apiPrefix, toRef(props, 'spaceId'));
|
|
130
|
+
const { handleMouseEnter, handleMouseMove, handleMouseLeave, handleMouseClick } = usePermission(props.apiPrefix, toRef(props, 'spaceId'), '#4d4f56');
|
|
122
131
|
const renderFormData = ref();
|
|
123
132
|
const editFormData = ref();
|
|
124
133
|
const loading = ref(false);
|
|
125
134
|
const showEditKeys = ref([]);
|
|
126
135
|
const formRef = ref();
|
|
136
|
+
const handleCalcHasManagePermission = ()=>{
|
|
137
|
+
return !props.isInternal || props.manageDataset;
|
|
138
|
+
};
|
|
139
|
+
const handlePermissionMouseClick = (callBack)=>{
|
|
140
|
+
handleMouseClick(callBack, handleCalcHasManagePermission(), [
|
|
141
|
+
ResourcePermissionAction.ManageDataset
|
|
142
|
+
], props.datasetId);
|
|
143
|
+
};
|
|
127
144
|
const handleGetDatasetDataList = (params)=>{
|
|
128
145
|
return getDatasetDataList(_object_spread({
|
|
129
146
|
datasetId: props.datasetId
|
|
@@ -219,16 +236,16 @@ export default /*@__PURE__*/ _defineComponent({
|
|
|
219
236
|
loading: _unref(isLoading)
|
|
220
237
|
}, {
|
|
221
238
|
default: _withCtx(()=>[
|
|
222
|
-
_cache[
|
|
223
|
-
_cache[
|
|
239
|
+
_cache[2] || (_cache[2] = _createElementVNode("span", null, "编辑数据", -1 /* HOISTED */ )),
|
|
240
|
+
_cache[3] || (_cache[3] = _createElementVNode("span", {
|
|
224
241
|
class: "g-gap g-ml-14 g-mr-8"
|
|
225
242
|
}, null, -1 /* HOISTED */ )),
|
|
226
243
|
_unref(tableData)[0] ? (_openBlock(), _createElementBlock("span", _hoisted_1, _toDisplayString(`#${_unref(tableData)[0].id}`), 1 /* TEXT */ )) : _createCommentVNode("v-if", true)
|
|
227
244
|
]),
|
|
228
245
|
_: 1 /* STABLE */ ,
|
|
229
246
|
__: [
|
|
230
|
-
|
|
231
|
-
|
|
247
|
+
2,
|
|
248
|
+
3
|
|
232
249
|
]
|
|
233
250
|
}, 8 /* PROPS */ , [
|
|
234
251
|
"loading"
|
|
@@ -276,14 +293,21 @@ export default /*@__PURE__*/ _defineComponent({
|
|
|
276
293
|
suffix: _withCtx(()=>[
|
|
277
294
|
_createElementVNode("span", _hoisted_2, [
|
|
278
295
|
_createVNode(_unref(EditLine), {
|
|
279
|
-
class:
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
296
|
+
class: _normalizeClass({
|
|
297
|
+
'g-disabled': !handleCalcHasManagePermission(),
|
|
298
|
+
'g-ml-10 g-text-blue g-cursor-pointer disable-click-toggle': true
|
|
299
|
+
}),
|
|
300
|
+
onMouseenter: _cache[0] || (_cache[0] = ($event)=>_unref(handleMouseEnter)(handleCalcHasManagePermission())),
|
|
301
|
+
onMousemove: _cache[1] || (_cache[1] = (event)=>_unref(handleMouseMove)(event, handleCalcHasManagePermission())),
|
|
302
|
+
onMouseleave: _unref(handleMouseLeave),
|
|
303
|
+
onClick: ($event)=>handlePermissionMouseClick(()=>handleEdit(key))
|
|
283
304
|
}, null, 8 /* PROPS */ , [
|
|
305
|
+
"class",
|
|
306
|
+
"onMouseleave",
|
|
284
307
|
"onClick"
|
|
285
308
|
]),
|
|
286
309
|
_createVNode(DatasetDataToolIcons, {
|
|
310
|
+
class: "disable-click-toggle",
|
|
287
311
|
tips: _ctx.schema[key]
|
|
288
312
|
}, null, 8 /* PROPS */ , [
|
|
289
313
|
"tips"
|
|
@@ -300,10 +324,12 @@ export default /*@__PURE__*/ _defineComponent({
|
|
|
300
324
|
_createVNode(RenderAutoHeightTextarea, {
|
|
301
325
|
modelValue: editFormData.value[key],
|
|
302
326
|
"onUpdate:modelValue": ($event)=>editFormData.value[key] = $event,
|
|
327
|
+
placeholder: _ctx.schema[key],
|
|
303
328
|
height: 300
|
|
304
329
|
}, null, 8 /* PROPS */ , [
|
|
305
330
|
"modelValue",
|
|
306
|
-
"onUpdate:modelValue"
|
|
331
|
+
"onUpdate:modelValue",
|
|
332
|
+
"placeholder"
|
|
307
333
|
])
|
|
308
334
|
]),
|
|
309
335
|
_: 2 /* DYNAMIC */
|
|
@@ -339,12 +365,12 @@ export default /*@__PURE__*/ _defineComponent({
|
|
|
339
365
|
loading: loading.value,
|
|
340
366
|
onClick: handleConfirm
|
|
341
367
|
}, {
|
|
342
|
-
default: _withCtx(()=>_cache[
|
|
368
|
+
default: _withCtx(()=>_cache[4] || (_cache[4] = [
|
|
343
369
|
_createTextVNode(" 保存 ")
|
|
344
370
|
])),
|
|
345
371
|
_: 1 /* STABLE */ ,
|
|
346
372
|
__: [
|
|
347
|
-
|
|
373
|
+
4
|
|
348
374
|
]
|
|
349
375
|
}, 8 /* PROPS */ , [
|
|
350
376
|
"loading"
|
|
@@ -362,12 +388,12 @@ export default /*@__PURE__*/ _defineComponent({
|
|
|
362
388
|
disabled: loading.value,
|
|
363
389
|
onClick: handleCancel
|
|
364
390
|
}, {
|
|
365
|
-
default: _withCtx(()=>_cache[
|
|
391
|
+
default: _withCtx(()=>_cache[5] || (_cache[5] = [
|
|
366
392
|
_createTextVNode(" 取消 ")
|
|
367
393
|
])),
|
|
368
394
|
_: 1 /* STABLE */ ,
|
|
369
395
|
__: [
|
|
370
|
-
|
|
396
|
+
5
|
|
371
397
|
]
|
|
372
398
|
}, 8 /* PROPS */ , [
|
|
373
399
|
"disabled"
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
|
|
2
|
-
.content[data-v-
|
|
2
|
+
.content[data-v-9lo3eut0] {
|
|
3
3
|
padding: 18px 24px 0;
|
|
4
4
|
height: 100%;
|
|
5
5
|
overflow: auto;
|
|
6
6
|
}
|
|
7
|
-
.data-set-edit-slider .value-content[data-v-
|
|
7
|
+
.data-set-edit-slider .value-content[data-v-9lo3eut0] {
|
|
8
8
|
padding: 16px;
|
|
9
9
|
border: 1px solid #DCDEE5;
|
|
10
10
|
line-height: 22px;
|
|
11
11
|
}
|
|
12
|
-
.data-set-edit-slider[data-v-
|
|
12
|
+
.data-set-edit-slider[data-v-9lo3eut0] .bk-sideslider-title {
|
|
13
13
|
justify-content: space-between;
|
|
14
14
|
width: 100%;
|
|
15
15
|
}
|
|
@@ -7,6 +7,8 @@ interface IProps {
|
|
|
7
7
|
schema: Record<string, string>;
|
|
8
8
|
spaceId?: string;
|
|
9
9
|
search: IDatasetDataParam;
|
|
10
|
+
manageDataset?: boolean;
|
|
11
|
+
isInternal?: boolean;
|
|
10
12
|
}
|
|
11
13
|
declare const _default: import("vue").DefineComponent<IProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
12
14
|
"update:modelValue": (modelValue: boolean) => any;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import script from './index.script.vue.js.js';
|
|
2
|
-
script.__scopeId = "data-v-
|
|
2
|
+
script.__scopeId = "data-v-9lo3eut0";
|
|
3
3
|
script.__file = "./src/components/render-dataset/components/edit-dataset-data/index.vue";
|
|
4
4
|
import './index.vue.css';
|
|
5
5
|
export default script;
|