@blueking/ai-ui-sdk 0.2.0-beta.2 → 0.2.0-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.
Files changed (110) hide show
  1. package/dist/common/util.d.ts +5 -0
  2. package/dist/common/util.ts.js +8 -0
  3. package/dist/components/render-auto-height-textarea/index.vue.css +11 -11
  4. package/dist/components/render-auto-height-textarea/index.vue.js +1 -1
  5. package/dist/components/render-auto-refresh/index.vue.css +8 -8
  6. package/dist/components/render-auto-refresh/index.vue.js +1 -1
  7. package/dist/components/render-checkbox/index.script.vue.js.js +30 -5
  8. package/dist/components/render-checkbox/index.vue.css +9 -9
  9. package/dist/components/render-checkbox/index.vue.d.ts +4 -0
  10. package/dist/components/render-checkbox/index.vue.js +1 -1
  11. package/dist/components/render-choose-tag/index.script.vue.js.js +66 -3
  12. package/dist/components/render-choose-tag/index.vue.css +7 -7
  13. package/dist/components/render-choose-tag/index.vue.d.ts +1 -0
  14. package/dist/components/render-choose-tag/index.vue.js +1 -1
  15. package/dist/components/render-collapse/index.vue.css +2 -2
  16. package/dist/components/render-collapse/index.vue.js +1 -1
  17. package/dist/components/render-dataset/components/batch-delete-dataset-data/index.vue.css +3 -3
  18. package/dist/components/render-dataset/components/batch-delete-dataset-data/index.vue.js +1 -1
  19. package/dist/components/render-dataset/components/batch-edit-valid-dataset-data/index.vue.css +1 -1
  20. package/dist/components/render-dataset/components/batch-edit-valid-dataset-data/index.vue.js +1 -1
  21. package/dist/components/render-dataset/components/dataset-data-tool-icons/index.script.vue.js +1 -1
  22. package/dist/components/render-dataset/components/dataset-data-valid/index.vue.css +1 -1
  23. package/dist/components/render-dataset/components/dataset-data-valid/index.vue.js +1 -1
  24. package/dist/components/render-dataset/components/edit-dataset-data/index.vue.css +3 -3
  25. package/dist/components/render-dataset/components/edit-dataset-data/index.vue.js +1 -1
  26. package/dist/components/render-dataset/components/operation-record/index.vue.css +4 -4
  27. package/dist/components/render-dataset/components/operation-record/index.vue.js +1 -1
  28. package/dist/components/render-dataset/components/operation-record/table/index.vue.css +1 -1
  29. package/dist/components/render-dataset/components/operation-record/table/index.vue.js +1 -1
  30. package/dist/components/render-dataset/components/operation-record/view-op-result/index.vue.css +2 -2
  31. package/dist/components/render-dataset/components/operation-record/view-op-result/index.vue.js +1 -1
  32. package/dist/components/render-dataset/components/plus-dataset/index.vue.css +2 -2
  33. package/dist/components/render-dataset/components/plus-dataset/index.vue.js +1 -1
  34. package/dist/components/render-dataset/components/plus-dataset-data/form/api.script.vue.js.js +1 -1
  35. package/dist/components/render-dataset/components/plus-dataset-data/form/api.vue.css +2 -2
  36. package/dist/components/render-dataset/components/plus-dataset-data/form/api.vue.js +1 -1
  37. package/dist/components/render-dataset/components/plus-dataset-data/form/footer.vue.css +1 -1
  38. package/dist/components/render-dataset/components/plus-dataset-data/form/footer.vue.js +1 -1
  39. package/dist/components/render-dataset/components/plus-dataset-data/form/index.vue.css +2 -2
  40. package/dist/components/render-dataset/components/plus-dataset-data/form/index.vue.js +1 -1
  41. package/dist/components/render-dataset/components/review-dataset-data/index.vue.css +10 -10
  42. package/dist/components/render-dataset/components/review-dataset-data/index.vue.js +1 -1
  43. package/dist/components/render-dataset-detail-origin-data/index.vue.css +3 -3
  44. package/dist/components/render-dataset-detail-origin-data/index.vue.js +1 -1
  45. package/dist/components/render-dataset-list/components/main.vue.css +3 -3
  46. package/dist/components/render-dataset-list/components/main.vue.js +1 -1
  47. package/dist/components/render-dataset-list/index.vue.css +2 -2
  48. package/dist/components/render-dataset-list/index.vue.js +1 -1
  49. package/dist/components/render-file-card/index.vue.css +11 -11
  50. package/dist/components/render-file-card/index.vue.d.ts +9 -5
  51. package/dist/components/render-file-card/index.vue.js +1 -1
  52. package/dist/components/render-file-type-icon/index.vue.css +5 -5
  53. package/dist/components/render-file-type-icon/index.vue.js +1 -1
  54. package/dist/components/render-header/index.vue.css +3 -3
  55. package/dist/components/render-header/index.vue.js +1 -1
  56. package/dist/components/render-like/index.vue.css +5 -5
  57. package/dist/components/render-like/index.vue.d.ts +3 -3
  58. package/dist/components/render-like/index.vue.js +1 -1
  59. package/dist/components/render-markdown/common.d.ts +19 -0
  60. package/dist/components/render-markdown/common.ts.js +41 -0
  61. package/dist/components/render-markdown/edit.d.ts +82 -0
  62. package/dist/components/render-markdown/edit.postcss.css +92 -0
  63. package/dist/components/render-markdown/edit.ts.js +226 -0
  64. package/dist/components/render-markdown/mark-down-code-copy.d.ts +7 -0
  65. package/dist/components/render-markdown/mark-down-code-copy.ts.js +73 -0
  66. package/dist/components/render-markdown/{mark-down.d.ts → view.d.ts} +11 -27
  67. package/dist/components/render-markdown/view.postcss.css +91 -0
  68. package/dist/components/render-markdown/view.ts.js +116 -0
  69. package/dist/components/render-router-tab/index.vue.css +3 -3
  70. package/dist/components/render-router-tab/index.vue.js +1 -1
  71. package/dist/components/render-search-empty/index.vue.d.ts +9 -5
  72. package/dist/components/render-search-select/index.script.vue.js.js +176 -20
  73. package/dist/components/render-search-select/index.vue.d.ts +14 -5
  74. package/dist/components/render-t-table/index.vue.css +27 -27
  75. package/dist/components/render-t-table/index.vue.d.ts +9 -5
  76. package/dist/components/render-t-table/index.vue.js +1 -1
  77. package/dist/components/render-tag-tree/index.vue.css +7 -7
  78. package/dist/components/render-tag-tree/index.vue.js +1 -1
  79. package/dist/components/render-tree/index.script.vue.js +23 -1
  80. package/dist/components/render-tree/index.vue.d.ts +9 -5
  81. package/dist/components.d.ts +3 -2
  82. package/dist/components.ts.js +3 -2
  83. package/dist/css/fonts/iconcool.eot +0 -0
  84. package/dist/css/fonts/iconcool.svg +1 -4
  85. package/dist/css/fonts/iconcool.ttf +0 -0
  86. package/dist/css/fonts/iconcool.woff +0 -0
  87. package/dist/css/iconcool.js +1 -1
  88. package/dist/css/style.css +1 -4
  89. package/dist/css/tailwind.css +54 -4
  90. package/dist/hooks/use-chat.d.ts +22 -12
  91. package/dist/hooks/use-ellipsis-tooltip.ts.js +6 -2
  92. package/dist/hooks/use-form-leave-confirm.ts.js +2 -0
  93. package/dist/hooks.d.ts +1 -0
  94. package/dist/hooks.ts.js +1 -0
  95. package/dist/http/helper/agent.ts.js +6 -0
  96. package/dist/http/helper/common.d.ts +7 -1
  97. package/dist/http/helper/common.ts.js +8 -0
  98. package/dist/http/helper/tool.ts.js +2 -1
  99. package/dist/types/agent.d.ts +6 -0
  100. package/dist/types/common.d.ts +5 -0
  101. package/dist/types/enum.d.ts +6 -0
  102. package/dist/types/enum.ts.js +7 -0
  103. package/dist/types/tool.d.ts +4 -1
  104. package/package.json +8 -5
  105. package/dist/components/render-markdown/mark-down-code.d.ts +0 -2
  106. package/dist/components/render-markdown/mark-down-code.ts.js +0 -171
  107. package/dist/components/render-markdown/mark-down-emoji.d.ts +0 -2
  108. package/dist/components/render-markdown/mark-down-emoji.ts.js +0 -4
  109. package/dist/components/render-markdown/mark-down.postcss.css +0 -154
  110. package/dist/components/render-markdown/mark-down.ts.js +0 -145
@@ -1,5 +1,5 @@
1
1
  import script from './index.script.vue.js.js';
2
- script.__scopeId = "data-v-ii09ja6k";
2
+ script.__scopeId = "data-v-or6whvdj";
3
3
  script.__file = "./src/components/render-router-tab/index.vue";
4
4
  import './index.vue.css';
5
5
  export default script;
@@ -1,11 +1,13 @@
1
- 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<{
2
- props: __VLS_PrettifyLocal<{
1
+ 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<{
2
+ props: import("vue").PublicProps & __VLS_PrettifyLocal<{
3
3
  search?: T;
4
4
  scene?: "page" | "part";
5
5
  description?: string;
6
6
  } & {
7
7
  "onUpdate:search"?: (data: T) => any;
8
- }> & import("vue").PublicProps;
8
+ }> & (typeof globalThis extends {
9
+ __VLS_PROPS_FALLBACK: infer P;
10
+ } ? P : {});
9
11
  expose: (exposed: {}) => void;
10
12
  attrs: any;
11
13
  slots: {};
@@ -15,6 +17,8 @@ declare const __VLS_export: <T>(__VLS_props: NonNullable<Awaited<typeof __VLS_se
15
17
  };
16
18
  declare const _default: typeof __VLS_export;
17
19
  export default _default;
18
- type __VLS_PrettifyLocal<T> = {
20
+ type __VLS_PrettifyLocal<T> = (T extends any ? {
21
+ [K in keyof T]: T[K];
22
+ } : {
19
23
  [K in keyof T as K]: T[K];
20
- } & {};
24
+ }) & {};
@@ -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-jzx5otlr] {
2
+ .t-t-pagination[data-v-k87imc7y] {
3
3
  position: relative;
4
4
  padding: 16px 16px 0 16px;
5
5
  }
6
- .t-t-pagination[data-v-jzx5otlr] .bk-pagination-list.is-last {
6
+ .t-t-pagination[data-v-k87imc7y] .bk-pagination-list.is-last {
7
7
  margin-left: auto;
8
8
  }
9
- .pagination-loading[data-v-jzx5otlr]::after {
9
+ .pagination-loading[data-v-k87imc7y]::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-jzx5otlr] {
19
+ .pagination-border[data-v-k87imc7y] {
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-jzx5otlr] {
25
+ .t-t-table[data-v-k87imc7y] {
26
26
  display: inline;
27
27
  font-size: 12px;
28
28
  }
29
- .t-t-table[data-v-jzx5otlr] .t-table__th-cell-inner {
29
+ .t-t-table[data-v-k87imc7y] .t-table__th-cell-inner {
30
30
  color: #313238;
31
31
  }
32
- .t-t-table[data-v-jzx5otlr] th {
32
+ .t-t-table[data-v-k87imc7y] th {
33
33
  padding: 0 16px;
34
34
  height: 42px;
35
35
  background-color: #FAFBFD !important;
36
36
  }
37
- .t-t-table[data-v-jzx5otlr] .t-table__body tr {
37
+ .t-t-table[data-v-k87imc7y] .t-table__body tr {
38
38
  color: #63656e;
39
39
  font-size: 12px;
40
40
  }
41
- .t-t-table[data-v-jzx5otlr] .t-table__body tr td {
41
+ .t-t-table[data-v-k87imc7y] .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-jzx5otlr] .t-table__body tr:hover td {
46
+ .t-t-table[data-v-k87imc7y] .t-table__body tr:hover td {
47
47
  background-color: #f5f7fa !important;
48
48
  color: #63656E;
49
49
  }
50
- .t-t-table[data-v-jzx5otlr] .t-table__content .t-table__body .t-table__empty-row {
50
+ .t-t-table[data-v-k87imc7y] .t-table__content .t-table__body .t-table__empty-row {
51
51
  background-color: #fff !important;
52
52
  }
53
- .t-t-table[data-v-jzx5otlr] .t-table__content .t-table__body .t-table__empty-row >td {
53
+ .t-t-table[data-v-k87imc7y] .t-table__content .t-table__body .t-table__empty-row >td {
54
54
  border: none;
55
55
  }
56
- .t-t-table[data-v-jzx5otlr] th .t-table__ellipsis {
56
+ .t-t-table[data-v-k87imc7y] th .t-table__ellipsis {
57
57
  width: auto !important;
58
58
  }
59
- .t-t-table[data-v-jzx5otlr] .t-loading__gradient.t-icon-loading {
59
+ .t-t-table[data-v-k87imc7y] .t-loading__gradient.t-icon-loading {
60
60
  display: none;
61
61
  }
62
- .t-t-table[data-v-jzx5otlr]:first-of-type .t-table__affixed-header-elm-wrap{
62
+ .t-t-table[data-v-k87imc7y]:first-of-type .t-table__affixed-header-elm-wrap{
63
63
  width: calc(100% - 6px) !important;
64
64
  }
65
- .t-t-table[data-v-jzx5otlr] .t-table__affixed-header-elm-wrap>div {
65
+ .t-t-table[data-v-k87imc7y] .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-jzx5otlr] .t-table--layout-fixed{
69
+ .t-t-table[data-v-k87imc7y] .t-table--layout-fixed{
70
70
  width: 100% !important;
71
71
  }
72
- .t-t-table[data-v-jzx5otlr] .bk-exception-description{
72
+ .t-t-table[data-v-k87imc7y] .bk-exception-description{
73
73
  margin-bottom: 0;
74
74
  }
75
- .t-t-table[data-v-jzx5otlr] .t-table__content{
75
+ .t-t-table[data-v-k87imc7y] .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-jzx5otlr] .t-table__content::-webkit-scrollbar {
80
+ .t-t-table[data-v-k87imc7y] .t-table__content::-webkit-scrollbar {
81
81
  width: 6px;
82
82
  height: 6px;
83
83
  }
84
- .t-t-table[data-v-jzx5otlr] .t-table__content::-webkit-scrollbar-thumb {
84
+ .t-t-table[data-v-k87imc7y] .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-jzx5otlr] .t-table__content::-webkit-scrollbar-thumb:hover {
90
+ .t-t-table[data-v-k87imc7y] .t-table__content::-webkit-scrollbar-thumb:hover {
91
91
  background-color: #979ba5;
92
92
  }
93
- .t-t-table[data-v-jzx5otlr] .t-table__ellipsis.t-text-ellipsis:has(.checkbox){
93
+ .t-t-table[data-v-k87imc7y] .t-table__ellipsis.t-text-ellipsis:has(.checkbox){
94
94
  line-height: 100%;
95
95
  }
96
- .t-t-table[data-v-jzx5otlr] .t-table__cell--sort-trigger.t-table__double-icons{
96
+ .t-t-table[data-v-k87imc7y] .t-table__cell--sort-trigger.t-table__double-icons{
97
97
  gap: 5px;
98
98
  }
99
- .t-t-table[data-v-jzx5otlr] .t-table__sort-icon--active>i{
99
+ .t-t-table[data-v-k87imc7y] .t-table__sort-icon--active>i{
100
100
  color: #3a84ff !important;
101
101
  }
102
- .t-t-table[data-v-jzx5otlr] .t-table__cell--fixed-left:has(.checkbox){
102
+ .t-t-table[data-v-k87imc7y] .t-table__cell--fixed-left:has(.checkbox){
103
103
  line-height: 100%;
104
104
  }
105
- .t-t-table[data-v-jzx5otlr] .t-table__filter-icon.t-is-focus>span{
105
+ .t-t-table[data-v-k87imc7y] .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-jzx5otlr";
2
+ script.__scopeId = "data-v-k87imc7y";
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-qj2s410t] {
2
+ .tag-tree[data-v-s7tvobku] {
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-qj2s410t] {
7
+ .tag-tree .manage-tree-item[data-v-s7tvobku] {
8
8
  height: 32px;
9
9
  flex: 1;
10
10
  }
11
- .tag-tree .quick-icon[data-v-qj2s410t] {
11
+ .tag-tree .quick-icon[data-v-s7tvobku] {
12
12
  margin-left: -24px;
13
13
  padding-left: 8px;
14
14
  }
15
- .tag-tree[data-v-qj2s410t] .tree-item:has(.bottom-line) {
15
+ .tag-tree[data-v-s7tvobku] .tree-item:has(.bottom-line) {
16
16
  border-bottom: 1px solid #F0F1F5;
17
17
  }
18
- .tag-tree[data-v-qj2s410t] .tree-item.active .quick-icon {
18
+ .tag-tree[data-v-s7tvobku] .tree-item.active .quick-icon {
19
19
  color: #3A84FF;
20
20
  }
21
- .tag-tree[data-v-qj2s410t] .tree-item.active .tag-number {
21
+ .tag-tree[data-v-s7tvobku] .tree-item.active .tag-number {
22
22
  background: #A3C5FD;
23
23
  color: #fff;
24
24
  }
25
- .tag-number[data-v-qj2s410t] {
25
+ .tag-number[data-v-s7tvobku] {
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-qj2s410t";
2
+ script.__scopeId = "data-v-s7tvobku";
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,34 @@ 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)) return;
90
+ if (((_a = data.children) === null || _a === void 0 ? void 0 : _a.length) <= 0) {
91
+ emits('async-load', data);
92
+ }
93
+ // 计算展开的id
94
+ const openedIds = [
95
+ ...props.openedIds
96
+ ];
97
+ const index = openedIds.indexOf(data[props.keyName]);
98
+ if (index < 0) {
99
+ openedIds.push(data[props.keyName]);
100
+ }
101
+ emits('update:openedIds', openedIds);
102
+ };
81
103
  // 展开折叠树组件
82
104
  const handleToggleTreeItem = (data)=>{
83
105
  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
+ }) & {};
@@ -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 RenderMarkdown from './components/render-markdown/mark-down';
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, };
@@ -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 RenderMarkdown from './components/render-markdown/mark-down.ts.js';
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 };
Binary file