@blueking/ai-ui-sdk 0.2.0-beta.6 → 0.2.0-beta.8

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.
Files changed (80) hide show
  1. package/dist/components/render-auto-height-textarea/index.vue.css +11 -11
  2. package/dist/components/render-auto-height-textarea/index.vue.js +1 -1
  3. package/dist/components/render-auto-refresh/index.vue.css +8 -8
  4. package/dist/components/render-auto-refresh/index.vue.js +1 -1
  5. package/dist/components/render-checkbox/index.script.vue.js.js +23 -4
  6. package/dist/components/render-checkbox/index.vue.css +9 -9
  7. package/dist/components/render-checkbox/index.vue.d.ts +1 -0
  8. package/dist/components/render-checkbox/index.vue.js +1 -1
  9. package/dist/components/render-choose-tag/index.script.vue.js.js +4 -2
  10. package/dist/components/render-choose-tag/index.vue.css +7 -7
  11. package/dist/components/render-choose-tag/index.vue.js +1 -1
  12. package/dist/components/render-collapse/index.vue.css +2 -2
  13. package/dist/components/render-collapse/index.vue.js +1 -1
  14. package/dist/components/render-dataset/components/batch-delete-dataset-data/index.vue.css +3 -3
  15. package/dist/components/render-dataset/components/batch-delete-dataset-data/index.vue.js +1 -1
  16. package/dist/components/render-dataset/components/batch-edit-valid-dataset-data/index.vue.css +1 -1
  17. package/dist/components/render-dataset/components/batch-edit-valid-dataset-data/index.vue.js +1 -1
  18. package/dist/components/render-dataset/components/dataset-data-tool-icons/index.script.vue.js +1 -1
  19. package/dist/components/render-dataset/components/dataset-data-valid/index.vue.css +1 -1
  20. package/dist/components/render-dataset/components/dataset-data-valid/index.vue.js +1 -1
  21. package/dist/components/render-dataset/components/edit-dataset-data/index.vue.css +3 -3
  22. package/dist/components/render-dataset/components/edit-dataset-data/index.vue.js +1 -1
  23. package/dist/components/render-dataset/components/operation-record/index.vue.css +4 -4
  24. package/dist/components/render-dataset/components/operation-record/index.vue.js +1 -1
  25. package/dist/components/render-dataset/components/operation-record/table/index.vue.css +1 -1
  26. package/dist/components/render-dataset/components/operation-record/table/index.vue.js +1 -1
  27. package/dist/components/render-dataset/components/operation-record/view-op-result/index.vue.css +2 -2
  28. package/dist/components/render-dataset/components/operation-record/view-op-result/index.vue.js +1 -1
  29. package/dist/components/render-dataset/components/plus-dataset/index.script.vue.js.js +3 -1
  30. package/dist/components/render-dataset/components/plus-dataset/index.vue.css +2 -2
  31. package/dist/components/render-dataset/components/plus-dataset/index.vue.js +1 -1
  32. package/dist/components/render-dataset/components/plus-dataset-data/form/api.vue.css +2 -2
  33. package/dist/components/render-dataset/components/plus-dataset-data/form/api.vue.js +1 -1
  34. package/dist/components/render-dataset/components/plus-dataset-data/form/footer.vue.css +1 -1
  35. package/dist/components/render-dataset/components/plus-dataset-data/form/footer.vue.js +1 -1
  36. package/dist/components/render-dataset/components/plus-dataset-data/form/index.vue.css +2 -2
  37. package/dist/components/render-dataset/components/plus-dataset-data/form/index.vue.js +1 -1
  38. package/dist/components/render-dataset/components/review-dataset-data/index.vue.css +10 -10
  39. package/dist/components/render-dataset/components/review-dataset-data/index.vue.js +1 -1
  40. package/dist/components/render-dataset-detail-origin-data/index.vue.css +3 -3
  41. package/dist/components/render-dataset-detail-origin-data/index.vue.js +1 -1
  42. package/dist/components/render-dataset-list/components/main.vue.css +3 -3
  43. package/dist/components/render-dataset-list/components/main.vue.js +1 -1
  44. package/dist/components/render-dataset-list/index.vue.css +2 -2
  45. package/dist/components/render-dataset-list/index.vue.js +1 -1
  46. package/dist/components/render-file-card/index.vue.css +11 -11
  47. package/dist/components/render-file-card/index.vue.d.ts +9 -5
  48. package/dist/components/render-file-card/index.vue.js +1 -1
  49. package/dist/components/render-file-type-icon/index.vue.css +5 -5
  50. package/dist/components/render-file-type-icon/index.vue.js +1 -1
  51. package/dist/components/render-header/index.vue.css +3 -3
  52. package/dist/components/render-header/index.vue.js +1 -1
  53. package/dist/components/render-like/index.vue.css +5 -5
  54. package/dist/components/render-like/index.vue.d.ts +3 -3
  55. package/dist/components/render-like/index.vue.js +1 -1
  56. package/dist/components/render-markdown/mark-down.d.ts +9 -0
  57. package/dist/components/render-markdown/mark-down.postcss.css +1 -1
  58. package/dist/components/render-markdown/mark-down.ts.js +8 -1
  59. package/dist/components/render-router-tab/index.vue.css +3 -3
  60. package/dist/components/render-router-tab/index.vue.js +1 -1
  61. package/dist/components/render-search-empty/index.vue.d.ts +9 -5
  62. package/dist/components/render-search-select/index.script.vue.js.js +176 -20
  63. package/dist/components/render-search-select/index.vue.d.ts +14 -5
  64. package/dist/components/render-t-table/index.vue.css +27 -27
  65. package/dist/components/render-t-table/index.vue.d.ts +9 -5
  66. package/dist/components/render-t-table/index.vue.js +1 -1
  67. package/dist/components/render-tag-tree/index.vue.css +7 -7
  68. package/dist/components/render-tag-tree/index.vue.js +1 -1
  69. package/dist/components/render-tree/index.script.vue.js +22 -1
  70. package/dist/components/render-tree/index.vue.d.ts +9 -5
  71. package/dist/css/tailwind.css +29 -1
  72. package/dist/hooks/use-chat.d.ts +20 -12
  73. package/dist/hooks.d.ts +1 -0
  74. package/dist/hooks.ts.js +1 -0
  75. package/dist/http/helper/agent.ts.js +2 -0
  76. package/dist/types/agent.d.ts +2 -0
  77. package/dist/types/enum.d.ts +5 -0
  78. package/dist/types/enum.ts.js +6 -0
  79. package/dist/types/tool.d.ts +2 -1
  80. package/package.json +2 -2
@@ -1,6 +1,63 @@
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
+ function ownKeys(object, enumerableOnly) {
30
+ var keys = Object.keys(object);
31
+ if (Object.getOwnPropertySymbols) {
32
+ var symbols = Object.getOwnPropertySymbols(object);
33
+ if (enumerableOnly) {
34
+ symbols = symbols.filter(function(sym) {
35
+ return Object.getOwnPropertyDescriptor(object, sym).enumerable;
36
+ });
37
+ }
38
+ keys.push.apply(keys, symbols);
39
+ }
40
+ return keys;
41
+ }
42
+ function _object_spread_props(target, source) {
43
+ source = source != null ? source : {};
44
+ if (Object.getOwnPropertyDescriptors) {
45
+ Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
46
+ } else {
47
+ ownKeys(Object(source)).forEach(function(key) {
48
+ Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
49
+ });
50
+ }
51
+ return target;
52
+ }
1
53
  import { defineComponent as _defineComponent } from 'vue';
2
- import { resolveComponent as _resolveComponent, openBlock as _openBlock, createBlock as _createBlock } from "vue";
3
- import { computed } from 'vue';
54
+ import { resolveComponent as _resolveComponent, createVNode as _createVNode, openBlock as _openBlock, createBlock as _createBlock, createCommentVNode as _createCommentVNode, createElementBlock as _createElementBlock } from "vue";
55
+ const _hoisted_1 = {
56
+ class: "g-flex-row"
57
+ };
58
+ import { computed, onBeforeMount, ref, toRef } from 'vue';
59
+ import { useCommonHttp } from '../../hooks/use-common-http.ts.js';
60
+ import { GroupType, Module } from '../../types/enum.ts.js';
4
61
  export default /*@__PURE__*/ _defineComponent({
5
62
  props: {
6
63
  data: {},
@@ -11,7 +68,13 @@ export default /*@__PURE__*/ _defineComponent({
11
68
  },
12
69
  getMenuList: {
13
70
  type: Function
14
- }
71
+ },
72
+ isShowTagSearch: {
73
+ type: Boolean
74
+ },
75
+ apiPrefix: {},
76
+ spaceId: {},
77
+ module: {}
15
78
  },
16
79
  emits: [
17
80
  "update:modelValue"
@@ -19,7 +82,11 @@ export default /*@__PURE__*/ _defineComponent({
19
82
  setup (__props, { emit: __emit }) {
20
83
  const props = __props;
21
84
  const emits = __emit;
22
- const renderValue = computed(()=>Object.keys(props.modelValue || {}).reduce((acc, cur)=>{
85
+ const { getTagTree } = useCommonHttp(props.apiPrefix, toRef(props, 'spaceId'));
86
+ const tagList = ref([]);
87
+ const isLoadingTagList = ref(false);
88
+ const renderSearchSelectValue = computed(()=>Object.keys(props.modelValue || {}).reduce((acc, cur)=>{
89
+ if (cur === 'tagId') return acc;
23
90
  const item = props.data.find((item)=>item.id === cur || (item === null || item === void 0 ? void 0 : item.multipleKey) === cur);
24
91
  const value = props.modelValue[cur];
25
92
  if (item === null || item === void 0 ? void 0 : item.multiple) {
@@ -71,6 +138,28 @@ export default /*@__PURE__*/ _defineComponent({
71
138
  }
72
139
  return acc;
73
140
  }, []));
141
+ const getTagIds = ()=>{
142
+ const tagId = props.modelValue.tagId;
143
+ if (tagId) {
144
+ const tagIds = [];
145
+ const buildTagIds = (tag)=>{
146
+ const currentTagId = tag.tagId;
147
+ tagIds.push(currentTagId);
148
+ if (currentTagId === tagId) {
149
+ return true;
150
+ }
151
+ const isHit = (tag.children || []).some(buildTagIds);
152
+ if (isHit) {
153
+ return true;
154
+ }
155
+ tagIds.pop();
156
+ return false;
157
+ };
158
+ tagList.value.some(buildTagIds);
159
+ return tagIds;
160
+ }
161
+ return [];
162
+ };
74
163
  const hackValue = (value, valueType)=>{
75
164
  switch(valueType){
76
165
  case 'number':
@@ -79,7 +168,7 @@ export default /*@__PURE__*/ _defineComponent({
79
168
  return typeof value === 'string' ? String(value).trim() : value;
80
169
  }
81
170
  };
82
- const handleUpdate = (values)=>{
171
+ const handleUpdateSearchSelectValue = (values)=>{
83
172
  // 不在模型中的数据,直接保留
84
173
  const keepModelValue = Object.keys(props.modelValue).reduce((acc, cur)=>{
85
174
  const item = props.data.find((item)=>item.id === cur || (item === null || item === void 0 ? void 0 : item.multipleKey) === cur);
@@ -115,23 +204,90 @@ export default /*@__PURE__*/ _defineComponent({
115
204
  }, keepModelValue);
116
205
  emits('update:modelValue', modelValue);
117
206
  };
207
+ const handleUpdateCascaderValue = (tagIds)=>{
208
+ const tagId = tagIds[tagIds.length - 1];
209
+ // 防止组件误触发
210
+ if (tagId !== props.modelValue.tagId) {
211
+ emits('update:modelValue', _object_spread_props(_object_spread({}, props.modelValue), {
212
+ tagId
213
+ }));
214
+ }
215
+ };
216
+ const handleGetTagTree = ()=>{
217
+ if (!props.isShowTagSearch) return;
218
+ const tagTreeModuleMap = {
219
+ [Module.Tool]: {
220
+ module: Module.Tool,
221
+ subModule: Module.Tool
222
+ },
223
+ [Module.Mcp]: {
224
+ module: Module.Mcp,
225
+ subModule: Module.Mcp
226
+ },
227
+ [Module.Agent]: {
228
+ module: Module.Agent,
229
+ subModule: Module.Agent
230
+ },
231
+ [Module.Collection]: {
232
+ module: Module.Collection,
233
+ subModule: Module.Collection
234
+ },
235
+ [Module.Prompt]: {
236
+ module: Module.Prompt,
237
+ subModule: Module.Prompt
238
+ },
239
+ [Module.Skill]: {
240
+ module: Module.Skill,
241
+ subModule: Module.Skill
242
+ }
243
+ };
244
+ const tagTreeModuleConfig = tagTreeModuleMap[props.module];
245
+ isLoadingTagList.value = true;
246
+ getTagTree(tagTreeModuleConfig.module, tagTreeModuleConfig.subModule, '', GroupType.All).then((data)=>{
247
+ tagList.value = data.tree;
248
+ }).finally(()=>{
249
+ isLoadingTagList.value = false;
250
+ });
251
+ };
252
+ onBeforeMount(handleGetTagTree);
118
253
  return (_ctx, _cache)=>{
119
254
  const _component_bk_search_select = _resolveComponent("bk-search-select");
120
- return _openBlock(), _createBlock(_component_bk_search_select, {
121
- "unique-select": "",
122
- "value-behavior": "need-key",
123
- "model-value": renderValue.value,
124
- data: _ctx.data,
125
- placeholder: _ctx.placeholder,
126
- "validate-values": _ctx.validateValues,
127
- "get-menu-list": _ctx.getMenuList,
128
- "onUpdate:modelValue": handleUpdate
129
- }, null, 8 /* PROPS */ , [
130
- "model-value",
131
- "data",
132
- "placeholder",
133
- "validate-values",
134
- "get-menu-list"
255
+ const _component_bk_cascader = _resolveComponent("bk-cascader");
256
+ return _openBlock(), _createElementBlock("section", _hoisted_1, [
257
+ _createVNode(_component_bk_search_select, {
258
+ "unique-select": "",
259
+ "value-behavior": "need-key",
260
+ class: "g-flex-1",
261
+ "model-value": renderSearchSelectValue.value,
262
+ data: _ctx.data,
263
+ placeholder: _ctx.placeholder,
264
+ "validate-values": _ctx.validateValues,
265
+ "get-menu-list": _ctx.getMenuList,
266
+ "onUpdate:modelValue": handleUpdateSearchSelectValue
267
+ }, null, 8 /* PROPS */ , [
268
+ "model-value",
269
+ "data",
270
+ "placeholder",
271
+ "validate-values",
272
+ "get-menu-list"
273
+ ]),
274
+ _ctx.isShowTagSearch ? (_openBlock(), _createBlock(_component_bk_cascader, {
275
+ key: 0,
276
+ class: "g-width-200 g-ml-8",
277
+ clearable: "",
278
+ placeholder: "搜索标签",
279
+ "id-key": "tagId",
280
+ "name-key": "tagName",
281
+ "show-complete-name": false,
282
+ loading: isLoadingTagList.value,
283
+ list: tagList.value,
284
+ "model-value": getTagIds(),
285
+ "onUpdate:modelValue": handleUpdateCascaderValue
286
+ }, null, 8 /* PROPS */ , [
287
+ "loading",
288
+ "list",
289
+ "model-value"
290
+ ])) : _createCommentVNode("v-if", true)
135
291
  ]);
136
292
  };
137
293
  }
@@ -1,6 +1,7 @@
1
1
  import type { ISearchSelectItem } from '@/types/common';
2
- declare const __VLS_export: <T>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_expose?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
3
- props: __VLS_PrettifyLocal<{
2
+ import { Module } from '@/types/enum';
3
+ declare const __VLS_export: <T>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_exposed?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
4
+ props: import("vue").PublicProps & __VLS_PrettifyLocal<{
4
5
  data: ISearchSelectItem[];
5
6
  modelValue: T;
6
7
  placeholder?: string;
@@ -12,9 +13,15 @@ declare const __VLS_export: <T>(__VLS_props: NonNullable<Awaited<typeof __VLS_se
12
13
  id: number;
13
14
  }[]) => Promise<boolean | string> | boolean | string;
14
15
  getMenuList?: Function;
16
+ isShowTagSearch?: boolean;
17
+ apiPrefix?: string;
18
+ spaceId?: string;
19
+ module?: Module;
15
20
  } & {
16
21
  "onUpdate:modelValue"?: (value: T) => any;
17
- }> & import("vue").PublicProps;
22
+ }> & (typeof globalThis extends {
23
+ __VLS_PROPS_FALLBACK: infer P;
24
+ } ? P : {});
18
25
  expose: (exposed: {}) => void;
19
26
  attrs: any;
20
27
  slots: {};
@@ -24,6 +31,8 @@ declare const __VLS_export: <T>(__VLS_props: NonNullable<Awaited<typeof __VLS_se
24
31
  };
25
32
  declare const _default: typeof __VLS_export;
26
33
  export default _default;
27
- type __VLS_PrettifyLocal<T> = {
34
+ type __VLS_PrettifyLocal<T> = (T extends any ? {
35
+ [K in keyof T]: T[K];
36
+ } : {
28
37
  [K in keyof T as K]: T[K];
29
- } & {};
38
+ }) & {};
@@ -1,12 +1,12 @@
1
1
 
2
- .t-t-pagination[data-v-i1a0p7fy] {
2
+ .t-t-pagination[data-v-4w7irnx2] {
3
3
  position: relative;
4
4
  padding: 16px 16px 0 16px;
5
5
  }
6
- .t-t-pagination[data-v-i1a0p7fy] .bk-pagination-list.is-last {
6
+ .t-t-pagination[data-v-4w7irnx2] .bk-pagination-list.is-last {
7
7
  margin-left: auto;
8
8
  }
9
- .pagination-loading[data-v-i1a0p7fy]::after {
9
+ .pagination-loading[data-v-4w7irnx2]::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-i1a0p7fy] {
19
+ .pagination-border[data-v-4w7irnx2] {
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-i1a0p7fy] {
25
+ .t-t-table[data-v-4w7irnx2] {
26
26
  display: inline;
27
27
  font-size: 12px;
28
28
  }
29
- .t-t-table[data-v-i1a0p7fy] .t-table__th-cell-inner {
29
+ .t-t-table[data-v-4w7irnx2] .t-table__th-cell-inner {
30
30
  color: #313238;
31
31
  }
32
- .t-t-table[data-v-i1a0p7fy] th {
32
+ .t-t-table[data-v-4w7irnx2] th {
33
33
  padding: 0 16px;
34
34
  height: 42px;
35
35
  background-color: #FAFBFD !important;
36
36
  }
37
- .t-t-table[data-v-i1a0p7fy] .t-table__body tr {
37
+ .t-t-table[data-v-4w7irnx2] .t-table__body tr {
38
38
  color: #63656e;
39
39
  font-size: 12px;
40
40
  }
41
- .t-t-table[data-v-i1a0p7fy] .t-table__body tr td {
41
+ .t-t-table[data-v-4w7irnx2] .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-i1a0p7fy] .t-table__body tr:hover td {
46
+ .t-t-table[data-v-4w7irnx2] .t-table__body tr:hover td {
47
47
  background-color: #f5f7fa !important;
48
48
  color: #63656E;
49
49
  }
50
- .t-t-table[data-v-i1a0p7fy] .t-table__content .t-table__body .t-table__empty-row {
50
+ .t-t-table[data-v-4w7irnx2] .t-table__content .t-table__body .t-table__empty-row {
51
51
  background-color: #fff !important;
52
52
  }
53
- .t-t-table[data-v-i1a0p7fy] .t-table__content .t-table__body .t-table__empty-row >td {
53
+ .t-t-table[data-v-4w7irnx2] .t-table__content .t-table__body .t-table__empty-row >td {
54
54
  border: none;
55
55
  }
56
- .t-t-table[data-v-i1a0p7fy] th .t-table__ellipsis {
56
+ .t-t-table[data-v-4w7irnx2] th .t-table__ellipsis {
57
57
  width: auto !important;
58
58
  }
59
- .t-t-table[data-v-i1a0p7fy] .t-loading__gradient.t-icon-loading {
59
+ .t-t-table[data-v-4w7irnx2] .t-loading__gradient.t-icon-loading {
60
60
  display: none;
61
61
  }
62
- .t-t-table[data-v-i1a0p7fy]:first-of-type .t-table__affixed-header-elm-wrap{
62
+ .t-t-table[data-v-4w7irnx2]:first-of-type .t-table__affixed-header-elm-wrap{
63
63
  width: calc(100% - 6px) !important;
64
64
  }
65
- .t-t-table[data-v-i1a0p7fy] .t-table__affixed-header-elm-wrap>div {
65
+ .t-t-table[data-v-4w7irnx2] .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-i1a0p7fy] .t-table--layout-fixed{
69
+ .t-t-table[data-v-4w7irnx2] .t-table--layout-fixed{
70
70
  width: 100% !important;
71
71
  }
72
- .t-t-table[data-v-i1a0p7fy] .bk-exception-description{
72
+ .t-t-table[data-v-4w7irnx2] .bk-exception-description{
73
73
  margin-bottom: 0;
74
74
  }
75
- .t-t-table[data-v-i1a0p7fy] .t-table__content{
75
+ .t-t-table[data-v-4w7irnx2] .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-i1a0p7fy] .t-table__content::-webkit-scrollbar {
80
+ .t-t-table[data-v-4w7irnx2] .t-table__content::-webkit-scrollbar {
81
81
  width: 6px;
82
82
  height: 6px;
83
83
  }
84
- .t-t-table[data-v-i1a0p7fy] .t-table__content::-webkit-scrollbar-thumb {
84
+ .t-t-table[data-v-4w7irnx2] .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-i1a0p7fy] .t-table__content::-webkit-scrollbar-thumb:hover {
90
+ .t-t-table[data-v-4w7irnx2] .t-table__content::-webkit-scrollbar-thumb:hover {
91
91
  background-color: #979ba5;
92
92
  }
93
- .t-t-table[data-v-i1a0p7fy] .t-table__ellipsis.t-text-ellipsis:has(.checkbox){
93
+ .t-t-table[data-v-4w7irnx2] .t-table__ellipsis.t-text-ellipsis:has(.checkbox){
94
94
  line-height: 100%;
95
95
  }
96
- .t-t-table[data-v-i1a0p7fy] .t-table__cell--sort-trigger.t-table__double-icons{
96
+ .t-t-table[data-v-4w7irnx2] .t-table__cell--sort-trigger.t-table__double-icons{
97
97
  gap: 5px;
98
98
  }
99
- .t-t-table[data-v-i1a0p7fy] .t-table__sort-icon--active>i{
99
+ .t-t-table[data-v-4w7irnx2] .t-table__sort-icon--active>i{
100
100
  color: #3a84ff !important;
101
101
  }
102
- .t-t-table[data-v-i1a0p7fy] .t-table__cell--fixed-left:has(.checkbox){
102
+ .t-t-table[data-v-4w7irnx2] .t-table__cell--fixed-left:has(.checkbox){
103
103
  line-height: 100%;
104
104
  }
105
- .t-t-table[data-v-i1a0p7fy] .t-table__filter-icon.t-is-focus>span{
105
+ .t-t-table[data-v-4w7irnx2] .t-table__filter-icon.t-is-focus>span{
106
106
  color: #3a84ff !important;
107
107
  }
108
108
 
@@ -1,6 +1,6 @@
1
1
  import type { IPagination, ITTableCol } from '@/types/common';
2
- declare const __VLS_export: <T, S>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_expose?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
3
- props: __VLS_PrettifyLocal<{
2
+ declare const __VLS_export: <T, S>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_exposed?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
3
+ props: import("vue").PublicProps & __VLS_PrettifyLocal<{
4
4
  columns: Array<ITTableCol<T>>;
5
5
  isLoading?: boolean;
6
6
  tableData: T[];
@@ -27,7 +27,9 @@ declare const __VLS_export: <T, S>(__VLS_props: NonNullable<Awaited<typeof __VLS
27
27
  "onPage-size-change"?: (val: number) => any;
28
28
  "onRow-click"?: (row: T) => any;
29
29
  "onRow-mouseenter"?: (row: T) => any;
30
- }> & import("vue").PublicProps;
30
+ }> & (typeof globalThis extends {
31
+ __VLS_PROPS_FALLBACK: infer P;
32
+ } ? P : {});
31
33
  expose: (exposed: {}) => void;
32
34
  attrs: any;
33
35
  slots: {
@@ -54,6 +56,8 @@ declare const __VLS_export: <T, S>(__VLS_props: NonNullable<Awaited<typeof __VLS
54
56
  };
55
57
  declare const _default: typeof __VLS_export;
56
58
  export default _default;
57
- type __VLS_PrettifyLocal<T> = {
59
+ type __VLS_PrettifyLocal<T> = (T extends any ? {
60
+ [K in keyof T]: T[K];
61
+ } : {
58
62
  [K in keyof T as K]: T[K];
59
- } & {};
63
+ }) & {};
@@ -1,5 +1,5 @@
1
1
  import script from './index.script.vue.js';
2
- script.__scopeId = "data-v-i1a0p7fy";
2
+ script.__scopeId = "data-v-4w7irnx2";
3
3
  script.__file = "./src/components/render-t-table/index.vue";
4
4
  import './index.vue.css';
5
5
  export default script;
@@ -1,28 +1,28 @@
1
1
 
2
- .tag-tree[data-v-8tnhhdf9] {
2
+ .tag-tree[data-v-htqsefat] {
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-8tnhhdf9] {
7
+ .tag-tree .manage-tree-item[data-v-htqsefat] {
8
8
  height: 32px;
9
9
  flex: 1;
10
10
  }
11
- .tag-tree .quick-icon[data-v-8tnhhdf9] {
11
+ .tag-tree .quick-icon[data-v-htqsefat] {
12
12
  margin-left: -24px;
13
13
  padding-left: 8px;
14
14
  }
15
- .tag-tree[data-v-8tnhhdf9] .tree-item:has(.bottom-line) {
15
+ .tag-tree[data-v-htqsefat] .tree-item:has(.bottom-line) {
16
16
  border-bottom: 1px solid #F0F1F5;
17
17
  }
18
- .tag-tree[data-v-8tnhhdf9] .tree-item.active .quick-icon {
18
+ .tag-tree[data-v-htqsefat] .tree-item.active .quick-icon {
19
19
  color: #3A84FF;
20
20
  }
21
- .tag-tree[data-v-8tnhhdf9] .tree-item.active .tag-number {
21
+ .tag-tree[data-v-htqsefat] .tree-item.active .tag-number {
22
22
  background: #A3C5FD;
23
23
  color: #fff;
24
24
  }
25
- .tag-number[data-v-8tnhhdf9] {
25
+ .tag-number[data-v-htqsefat] {
26
26
  line-height: 16px;
27
27
  padding: 0 4px;
28
28
  background-color: #F0F1F5;
@@ -1,5 +1,5 @@
1
1
  import script from './index.script.vue.js.js';
2
- script.__scopeId = "data-v-8tnhhdf9";
2
+ script.__scopeId = "data-v-htqsefat";
3
3
  script.__file = "./src/components/render-tag-tree/index.vue";
4
4
  import './index.vue.css';
5
5
  export default script;
@@ -72,12 +72,33 @@ export default /*@__PURE__*/ _defineComponent({
72
72
  emits('update:search', value);
73
73
  };
74
74
  // 点击树组件
75
- const handleClickTreeItem = (data)=>__awaiter(this, void 0, void 0, function*() {
75
+ const handleClickTreeItem = (data)=>{
76
+ handleChooseTreeItem(data);
77
+ handleShowTreeChildren(data);
78
+ };
79
+ // 选择树组件
80
+ const handleChooseTreeItem = (data)=>__awaiter(this, void 0, void 0, function*() {
76
81
  const allowed = yield props.chooseCheck(data);
77
82
  if (allowed) {
78
83
  emits('select', data);
79
84
  }
80
85
  });
86
+ // 显示树子节点
87
+ const handleShowTreeChildren = (data)=>{
88
+ var _a;
89
+ if (props.isNodeHasChildren(data) && ((_a = data.children) === null || _a === void 0 ? void 0 : _a.length) <= 0) {
90
+ emits('async-load', data);
91
+ }
92
+ // 计算展开的id
93
+ const openedIds = [
94
+ ...props.openedIds
95
+ ];
96
+ const index = openedIds.indexOf(data[props.keyName]);
97
+ if (index < 0) {
98
+ openedIds.push(data[props.keyName]);
99
+ }
100
+ emits('update:openedIds', openedIds);
101
+ };
81
102
  // 展开折叠树组件
82
103
  const handleToggleTreeItem = (data)=>{
83
104
  var _a;
@@ -3,8 +3,8 @@ declare const __VLS_export: <S, T extends {
3
3
  id?: number;
4
4
  name?: string;
5
5
  children?: T[];
6
- }>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_expose?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
7
- props: __VLS_PrettifyLocal<{
6
+ }>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_exposed?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
7
+ props: import("vue").PublicProps & __VLS_PrettifyLocal<{
8
8
  data: Array<T>;
9
9
  search?: S;
10
10
  apiPrefix: string;
@@ -24,7 +24,9 @@ declare const __VLS_export: <S, T extends {
24
24
  "onUpdate:loadingIds"?: (value: (string | number)[]) => any;
25
25
  "onUpdate:openedIds"?: (value: (string | number)[]) => any;
26
26
  "onAsync-load"?: (node: T) => any;
27
- }> & import("vue").PublicProps;
27
+ }> & (typeof globalThis extends {
28
+ __VLS_PROPS_FALLBACK: infer P;
29
+ } ? P : {});
28
30
  expose: (exposed: {}) => void;
29
31
  attrs: any;
30
32
  slots: {
@@ -41,6 +43,8 @@ declare const __VLS_export: <S, T extends {
41
43
  };
42
44
  declare const _default: typeof __VLS_export;
43
45
  export default _default;
44
- type __VLS_PrettifyLocal<T> = {
46
+ type __VLS_PrettifyLocal<T> = (T extends any ? {
47
+ [K in keyof T]: T[K];
48
+ } : {
45
49
  [K in keyof T as K]: T[K];
46
- } & {};
50
+ }) & {};
@@ -694,6 +694,10 @@
694
694
  width: 108px;
695
695
  }
696
696
 
697
+ .g-width-200 {
698
+ width: 200px;
699
+ }
700
+
697
701
  .g-width-5rem {
698
702
  width: 5rem !important;
699
703
  }
@@ -782,8 +786,12 @@
782
786
  background-color: #fff !important;
783
787
  }
784
788
 
789
+ .g-bg-e1ecff {
790
+ background-color: #e1ecff !important;
791
+ }
792
+
785
793
  .g-cursor-pointer {
786
- cursor: pointer;
794
+ cursor: pointer !important;
787
795
  }
788
796
 
789
797
  .g-cursor-grab {
@@ -842,6 +850,12 @@
842
850
  }
843
851
  }
844
852
 
853
+ .g-hover-bg-pale-blue {
854
+ &:hover {
855
+ background-color: #cddffe !important;
856
+ }
857
+ }
858
+
845
859
  .g-hover-bg-light-gray {
846
860
  &:hover {
847
861
  background-color: #dcdee5 !important;
@@ -854,6 +868,12 @@
854
868
  }
855
869
  }
856
870
 
871
+ .G-HOVER-BG-F0F0F6 {
872
+ &:hover {
873
+ background-color: #f0f0f6 !important;
874
+ }
875
+ }
876
+
857
877
  .g-hover-round {
858
878
  &:hover {
859
879
  border-radius: 100%;
@@ -914,6 +934,10 @@
914
934
  color: #ff9c01;
915
935
  }
916
936
 
937
+ .g-text-f59500 {
938
+ color: #f59500;
939
+ }
940
+
917
941
  .g-font-bold {
918
942
  font-weight: bold;
919
943
  }
@@ -982,6 +1006,10 @@
982
1006
  gap: 12px;
983
1007
  }
984
1008
 
1009
+ .g-gap-20 {
1010
+ gap: 20px;
1011
+ }
1012
+
985
1013
  .g-gap-24 {
986
1014
  gap: 24px;
987
1015
  }