@blueking/ai-ui-sdk 0.1.19-beta.13 → 0.1.19-beta.15

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 (73) hide show
  1. package/dist/common/util.d.ts +6 -0
  2. package/dist/common/util.ts.js +16 -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.vue.css +9 -9
  8. package/dist/components/render-checkbox/index.vue.js +1 -1
  9. package/dist/components/render-choose-tag/index.vue.css +7 -7
  10. package/dist/components/render-choose-tag/index.vue.js +1 -1
  11. package/dist/components/render-collapse/index.vue.css +2 -2
  12. package/dist/components/render-collapse/index.vue.js +1 -1
  13. package/dist/components/render-dataset/components/dataset-data-tool-icons/index.script.vue.js +1 -1
  14. package/dist/components/render-dataset/components/edit-dataset-data/index.vue.css +3 -3
  15. package/dist/components/render-dataset/components/edit-dataset-data/index.vue.js +1 -1
  16. package/dist/components/render-dataset/components/operation-record/index.vue.css +4 -4
  17. package/dist/components/render-dataset/components/operation-record/index.vue.js +1 -1
  18. package/dist/components/render-dataset/components/operation-record/table/index.vue.css +1 -1
  19. package/dist/components/render-dataset/components/operation-record/table/index.vue.js +1 -1
  20. package/dist/components/render-dataset/components/operation-record/view-op-result/index.vue.css +2 -2
  21. package/dist/components/render-dataset/components/operation-record/view-op-result/index.vue.js +1 -1
  22. package/dist/components/render-dataset/components/plus-dataset/index.script.vue.js.js +24 -6
  23. package/dist/components/render-dataset/components/plus-dataset/index.vue.css +2 -2
  24. package/dist/components/render-dataset/components/plus-dataset/index.vue.js +1 -1
  25. package/dist/components/render-dataset/components/plus-dataset-data/form/api.vue.css +2 -2
  26. package/dist/components/render-dataset/components/plus-dataset-data/form/api.vue.js +1 -1
  27. package/dist/components/render-dataset/components/plus-dataset-data/form/footer.vue.css +1 -1
  28. package/dist/components/render-dataset/components/plus-dataset-data/form/footer.vue.js +1 -1
  29. package/dist/components/render-dataset/components/plus-dataset-data/form/index.vue.css +2 -2
  30. package/dist/components/render-dataset/components/plus-dataset-data/form/index.vue.js +1 -1
  31. package/dist/components/render-dataset/components/review-dataset-data/index.vue.css +10 -10
  32. package/dist/components/render-dataset/components/review-dataset-data/index.vue.js +1 -1
  33. package/dist/components/render-dataset/components/search-dataset/index.script.vue.js.js +3 -26
  34. package/dist/components/render-dataset-detail-origin-data/index.vue.css +3 -3
  35. package/dist/components/render-dataset-detail-origin-data/index.vue.js +1 -1
  36. package/dist/components/render-dataset-list/components/header.script.vue.js.js +0 -1
  37. package/dist/components/render-dataset-list/components/main.vue.css +3 -3
  38. package/dist/components/render-dataset-list/components/main.vue.js +1 -1
  39. package/dist/components/render-dataset-list/components/table.script.vue.js.js +1 -3
  40. package/dist/components/render-dataset-list/index.vue.css +1 -1
  41. package/dist/components/render-dataset-list/index.vue.js +1 -1
  42. package/dist/components/render-file-card/index.vue.css +11 -11
  43. package/dist/components/render-file-card/index.vue.js +1 -1
  44. package/dist/components/render-file-type-icon/index.vue.css +5 -5
  45. package/dist/components/render-file-type-icon/index.vue.js +1 -1
  46. package/dist/components/render-header/index.vue.css +3 -3
  47. package/dist/components/render-header/index.vue.js +1 -1
  48. package/dist/components/render-like/index.vue.css +5 -5
  49. package/dist/components/render-like/index.vue.js +1 -1
  50. package/dist/components/render-router-tab/index.vue.css +3 -3
  51. package/dist/components/render-router-tab/index.vue.js +1 -1
  52. package/dist/components/render-search-empty/index.script.vue.js.js +61 -0
  53. package/dist/components/render-search-empty/index.vue.d.ts +20 -0
  54. package/dist/components/render-search-empty/index.vue.js +3 -0
  55. package/dist/components/render-t-table/index.script.vue.js +311 -0
  56. package/dist/components/render-t-table/index.vue.css +160 -0
  57. package/dist/components/render-t-table/index.vue.d.ts +57 -0
  58. package/dist/components/render-t-table/index.vue.js +5 -0
  59. package/dist/components/render-tag-tree/index.script.vue.js.js +5 -2
  60. package/dist/components/render-tag-tree/index.vue.css +7 -7
  61. package/dist/components/render-tag-tree/index.vue.js +1 -1
  62. package/dist/components/render-tree/index.script.vue.js +17 -8
  63. package/dist/components/render-tree/index.vue.d.ts +4 -1
  64. package/dist/components.d.ts +3 -1
  65. package/dist/components.ts.js +3 -1
  66. package/dist/hooks/use-t-table.d.ts +39 -0
  67. package/dist/hooks/use-t-table.ts.js +86 -0
  68. package/dist/hooks.d.ts +1 -0
  69. package/dist/hooks.ts.js +1 -0
  70. package/dist/http/helper/dataset.ts.js +3 -1
  71. package/dist/types/common.d.ts +17 -0
  72. package/dist/types/dataset.d.ts +2 -0
  73. package/package.json +2 -1
@@ -0,0 +1,311 @@
1
+ import { defineComponent as _defineComponent, createVNode as _createVNode2, resolveComponent as _resolveComponent2, createTextVNode as _createTextVNode2 } from 'vue';
2
+ import { createTextVNode as _createTextVNode, resolveComponent as _resolveComponent, withCtx as _withCtx, createVNode as _createVNode, createElementVNode as _createElementVNode, renderSlot as _renderSlot, mergeProps as _mergeProps, openBlock as _openBlock, createBlock as _createBlock, createCommentVNode as _createCommentVNode, normalizeStyle as _normalizeStyle } from "vue";
3
+ const _hoisted_1 = {
4
+ class: "t-table-row-height"
5
+ };
6
+ import { ref, watch } from 'vue';
7
+ import RenderSearchEmpty from '../render-search-empty/index.vue.js';
8
+ export default /*@__PURE__*/ _defineComponent({
9
+ props: {
10
+ columns: {},
11
+ isLoading: {
12
+ type: Boolean
13
+ },
14
+ tableData: {},
15
+ pagination: {},
16
+ layout: {
17
+ default: (props)=>props.pagination ? [
18
+ 'total',
19
+ 'limit',
20
+ 'list'
21
+ ] : []
22
+ },
23
+ containerHeight: {},
24
+ search: {},
25
+ rowClassName: {},
26
+ rowKey: {}
27
+ },
28
+ emits: [
29
+ "sort-change",
30
+ "page-change",
31
+ "page-size-change",
32
+ "row-mouseleave",
33
+ "select-change",
34
+ "row-click",
35
+ "row-mouseenter",
36
+ "update:search"
37
+ ],
38
+ setup (__props, { emit: __emit }) {
39
+ const props = __props;
40
+ const emits = __emit;
41
+ const rowHeight = ref('g-height-32');
42
+ const columnControllerVisible = ref(false);
43
+ const getDefaultColumns = ()=>{
44
+ // 只要有一项配置了 defaultShow 则需要列配置按钮
45
+ const isSetting = props.columns.some((column)=>column.defaultShow);
46
+ if (isSetting) {
47
+ return props.columns.filter((column)=>column.defaultShow).map((item)=>item.colKey);
48
+ }
49
+ return props.columns.map((column)=>column.colKey);
50
+ };
51
+ const displayColumns = ref(getDefaultColumns());
52
+ const getRowClassName = ({ row, rowIndex })=>{
53
+ if (!row || rowIndex === undefined) {
54
+ return;
55
+ }
56
+ const heightClass = rowHeight.value;
57
+ const customRowClass = typeof props.rowClassName === 'function' ? props.rowClassName(row, rowIndex) : props.rowClassName;
58
+ const classList = [];
59
+ if (typeof customRowClass === 'string') {
60
+ classList.push(...customRowClass.split(/\s+/).filter(Boolean));
61
+ } else if (Array.isArray(customRowClass)) {
62
+ classList.push(...customRowClass.filter((c)=>typeof c === 'string' && c));
63
+ } else if (customRowClass && typeof customRowClass === 'object') {
64
+ classList.push(...Object.keys(customRowClass).filter((key)=>customRowClass[key]));
65
+ }
66
+ return [
67
+ ...new Set([
68
+ ...classList,
69
+ heightClass
70
+ ])
71
+ ].join(' ');
72
+ };
73
+ const getSettingColumns = ()=>{
74
+ if (getDefaultColumns().length === props.columns.length) {
75
+ return props.columns;
76
+ }
77
+ const columns = [
78
+ ...props.columns
79
+ ];
80
+ const lastColKey = displayColumns.value[displayColumns.value.length - 1];
81
+ const lastIndex = columns.findIndex((col)=>col.colKey === lastColKey);
82
+ if (lastIndex === -1) return columns;
83
+ const lastColumn = columns[lastIndex];
84
+ const newColumn = Object.assign(Object.assign({
85
+ minWidth: '120'
86
+ }, lastColumn), {
87
+ title: (...args)=>{
88
+ let originalContent;
89
+ if (typeof lastColumn.title === 'function') {
90
+ originalContent = lastColumn.title(...args);
91
+ } else {
92
+ originalContent = lastColumn.title || '--';
93
+ }
94
+ return _createVNode2("div", {
95
+ "class": "g-flex-row g-gap-x-4"
96
+ }, [
97
+ _createVNode2("span", null, [
98
+ originalContent
99
+ ]),
100
+ _createVNode2(_resolveComponent2("bk-button"), {
101
+ "text": true,
102
+ "onClick": ()=>showSetting()
103
+ }, {
104
+ default: ()=>[
105
+ _createVNode2("i", {
106
+ "class": 'bkaidev-icon bkaidev-shezhi g-text-14 g-text-light-gray g-hover-text-blue'
107
+ }, null)
108
+ ]
109
+ })
110
+ ]);
111
+ }
112
+ });
113
+ columns[lastIndex] = newColumn;
114
+ return columns;
115
+ };
116
+ const handleColumnChange = (columns)=>{
117
+ const colKeyColumns = props.columns.filter((column)=>column.colKey);
118
+ if (!columns.length) {
119
+ return displayColumns.value = colKeyColumns.map((column)=>column.colKey);
120
+ }
121
+ // 根据 columns 重新定义 展示列顺序
122
+ displayColumns.value = colKeyColumns.filter((column)=>columns.includes(column.colKey)).map((item)=>item.colKey);
123
+ };
124
+ const showSetting = ()=>{
125
+ columnControllerVisible.value = true;
126
+ };
127
+ const getColumnControllerConfig = ()=>({
128
+ // 隐藏组件内部的 列配置按钮
129
+ hideTriggerButton: true,
130
+ // 允许哪些列参与显示-隐藏控制
131
+ fields: props.columns.map((item)=>item.colKey),
132
+ // 透传弹框组件全部属性
133
+ dialogProps: {
134
+ preventScrollThrough: true,
135
+ dialogClassName: 't-table-dialog',
136
+ showOverlay: false,
137
+ header: ()=>_createVNode2("span", {
138
+ "class": "t-table-dialog-header"
139
+ }, [
140
+ _createTextVNode2("\u8868\u683C\u8BBE\u7F6E")
141
+ ])
142
+ }
143
+ });
144
+ const handleSelectChange = (keys, { selectedRowData })=>{
145
+ emits('select-change', keys, selectedRowData);
146
+ };
147
+ const handlePageChange = (page)=>{
148
+ emits('page-change', page);
149
+ };
150
+ const handlePageSizeChange = (pageSize)=>{
151
+ emits('page-size-change', pageSize);
152
+ };
153
+ const handleSortChange = (config, { col })=>{
154
+ emits('sort-change', config, {
155
+ col
156
+ });
157
+ };
158
+ const handleRowClick = ({ row })=>{
159
+ emits('row-click', row);
160
+ };
161
+ const handleRowMouseenter = ({ row })=>{
162
+ emits('row-mouseenter', row);
163
+ };
164
+ const handleRowMouseleave = ()=>{
165
+ emits('row-mouseleave');
166
+ };
167
+ const handleUpdateSearch = (search)=>{
168
+ emits('update:search', search);
169
+ };
170
+ watch(()=>props.columns.map((col)=>col.colKey), (newColKeys, oldColKeys)=>{
171
+ if (newColKeys.some((colKey, index)=>colKey !== oldColKeys[index])) {
172
+ displayColumns.value = getDefaultColumns();
173
+ }
174
+ });
175
+ return (_ctx, _cache)=>{
176
+ const _component_bk_radio_button = _resolveComponent("bk-radio-button");
177
+ const _component_bk_radio_group = _resolveComponent("bk-radio-group");
178
+ const _component_t_enhanced_table = _resolveComponent("t-enhanced-table");
179
+ const _component_bk_pagination = _resolveComponent("bk-pagination");
180
+ const _component_bk_loading = _resolveComponent("bk-loading");
181
+ return _openBlock(), _createBlock(_component_bk_loading, {
182
+ loading: _ctx.isLoading,
183
+ "z-index": 31,
184
+ style: _normalizeStyle({
185
+ height: _ctx.containerHeight
186
+ })
187
+ }, {
188
+ default: _withCtx(()=>[
189
+ _createVNode(_component_t_enhanced_table, _mergeProps(_ctx.$attrs, {
190
+ "column-controller-visible": columnControllerVisible.value,
191
+ "onUpdate:columnControllerVisible": _cache[1] || (_cache[1] = ($event)=>columnControllerVisible.value = $event),
192
+ "cell-empty-content": "--",
193
+ "row-key": _ctx.rowKey,
194
+ "header-affixed-top": true,
195
+ stripe: true,
196
+ "display-columns": displayColumns.value,
197
+ "column-controller": getColumnControllerConfig(),
198
+ class: `g-t-table t-t-table g-light-head-table ${_ctx.$attrs.class}`,
199
+ data: _ctx.tableData,
200
+ columns: getSettingColumns(),
201
+ "row-class-name": getRowClassName,
202
+ "expand-icon": false,
203
+ onSortChange: handleSortChange,
204
+ onDisplayColumnsChange: handleColumnChange,
205
+ onSelectChange: handleSelectChange,
206
+ onRowClick: handleRowClick,
207
+ onRowMouseenter: handleRowMouseenter,
208
+ onRowMouseleave: handleRowMouseleave
209
+ }), {
210
+ columnControllerBottomContent: _withCtx(()=>[
211
+ _createElementVNode("section", _hoisted_1, [
212
+ _cache[5] || (_cache[5] = _createTextVNode(" 表格行高: ")),
213
+ _createVNode(_component_bk_radio_group, {
214
+ modelValue: rowHeight.value,
215
+ "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event)=>rowHeight.value = $event)
216
+ }, {
217
+ default: _withCtx(()=>[
218
+ _createVNode(_component_bk_radio_button, {
219
+ label: "g-height-42"
220
+ }, {
221
+ default: _withCtx(()=>_cache[2] || (_cache[2] = [
222
+ _createTextVNode(" 小 ")
223
+ ])),
224
+ _: 1 /* STABLE */ ,
225
+ __: [
226
+ 2
227
+ ]
228
+ }),
229
+ _createVNode(_component_bk_radio_button, {
230
+ label: "g-height-60"
231
+ }, {
232
+ default: _withCtx(()=>_cache[3] || (_cache[3] = [
233
+ _createTextVNode(" 中 ")
234
+ ])),
235
+ _: 1 /* STABLE */ ,
236
+ __: [
237
+ 3
238
+ ]
239
+ }),
240
+ _createVNode(_component_bk_radio_button, {
241
+ label: "g-height-78"
242
+ }, {
243
+ default: _withCtx(()=>_cache[4] || (_cache[4] = [
244
+ _createTextVNode(" 大 ")
245
+ ])),
246
+ _: 1 /* STABLE */ ,
247
+ __: [
248
+ 4
249
+ ]
250
+ })
251
+ ]),
252
+ _: 1 /* STABLE */
253
+ }, 8 /* PROPS */ , [
254
+ "modelValue"
255
+ ])
256
+ ])
257
+ ]),
258
+ empty: _withCtx(()=>[
259
+ _createVNode(RenderSearchEmpty, {
260
+ scene: "part",
261
+ search: _ctx.search,
262
+ "onUpdate:search": handleUpdateSearch
263
+ }, null, 8 /* PROPS */ , [
264
+ "search"
265
+ ])
266
+ ]),
267
+ expandedRow: _withCtx(({ row })=>[
268
+ _renderSlot(_ctx.$slots, "expandedRow", {
269
+ row: row
270
+ }, undefined, true)
271
+ ]),
272
+ sortIcon: _withCtx(()=>_cache[6] || (_cache[6] = [
273
+ _createElementVNode("i", {
274
+ class: "bkaidev-icon bkaidev-angle-up-fill-3 g-text-light-gray"
275
+ }, null, -1 /* HOISTED */ )
276
+ ])),
277
+ _: 3 /* FORWARDED */
278
+ }, 16 /* FULL_PROPS */ , [
279
+ "column-controller-visible",
280
+ "row-key",
281
+ "display-columns",
282
+ "column-controller",
283
+ "class",
284
+ "data",
285
+ "columns"
286
+ ]),
287
+ _ctx.pagination ? (_openBlock(), _createBlock(_component_bk_pagination, {
288
+ key: 0,
289
+ size: "small",
290
+ class: "t-t-pagination g-p-16",
291
+ "model-value": _ctx.pagination.current,
292
+ count: _ctx.pagination.count,
293
+ limit: _ctx.pagination.limit,
294
+ layout: _ctx.layout,
295
+ onChange: handlePageChange,
296
+ onLimitChange: handlePageSizeChange
297
+ }, null, 8 /* PROPS */ , [
298
+ "model-value",
299
+ "count",
300
+ "limit",
301
+ "layout"
302
+ ])) : _createCommentVNode("v-if", true)
303
+ ]),
304
+ _: 3 /* FORWARDED */
305
+ }, 8 /* PROPS */ , [
306
+ "loading",
307
+ "style"
308
+ ]);
309
+ };
310
+ }
311
+ });
@@ -0,0 +1,160 @@
1
+
2
+ .t-t-pagination[data-v-fyj82wsl] {
3
+ position: sticky;
4
+ bottom: 0;
5
+ }
6
+ .t-t-pagination[data-v-fyj82wsl] .bk-pagination-list.is-last {
7
+ margin-left: auto;
8
+ }
9
+ .t-t-table[data-v-fyj82wsl] {
10
+ display: inline;
11
+ height: calc(100% - 64px);
12
+ }
13
+ .t-t-table[data-v-fyj82wsl] .t-table__affixed-header-elm-wrap{
14
+ width: 100% !important;
15
+ top: -2px;
16
+ }
17
+ .t-t-table[data-v-fyj82wsl] .t-table__affixed-header-elm-wrap>div {
18
+ width: 100% !important;
19
+ top: -2px;
20
+ scrollbar-width: none;
21
+ }
22
+ .t-t-table[data-v-fyj82wsl] .t-table--layout-fixed{
23
+ width: 100% !important;
24
+ }
25
+ .t-t-table[data-v-fyj82wsl] .bk-exception-description{
26
+ margin-bottom: 0;
27
+ }
28
+ .t-t-table[data-v-fyj82wsl] .t-table--layout-fixed .t-table__header{
29
+ position: sticky;
30
+ top: -4px;
31
+ }
32
+ .t-t-table[data-v-fyj82wsl] .t-table__content{
33
+ z-index: 2;
34
+ max-height: 100%;
35
+ overflow: auto;
36
+ }
37
+ .t-t-table[data-v-fyj82wsl] .t-table__content::-webkit-scrollbar {
38
+ width: 6px;
39
+ height: 6px;
40
+ }
41
+ .t-t-table[data-v-fyj82wsl] .t-table__content::-webkit-scrollbar-thumb {
42
+ width: 6px;
43
+ height: 6px;
44
+ border-radius: 3px;
45
+ background-color: #dcdee5;
46
+ }
47
+ .t-t-table[data-v-fyj82wsl] .t-table__content::-webkit-scrollbar-thumb:hover {
48
+ background-color: #979ba5;
49
+ }
50
+ .t-t-table[data-v-fyj82wsl] .t-table__ellipsis.t-text-ellipsis:has(.checkbox){
51
+ line-height: 100%;
52
+ }
53
+ .t-t-table[data-v-fyj82wsl] .t-table__cell--sort-trigger.t-table__double-icons{
54
+ gap: 5px;
55
+ }
56
+ .t-t-table[data-v-fyj82wsl] .t-table__sort-icon--active>i{
57
+ color: #3a84ff !important;
58
+ }
59
+ .t-t-table[data-v-fyj82wsl] .t-table__cell--fixed-left:has(.checkbox){
60
+ line-height: 100%;
61
+ }
62
+
63
+
64
+ .t-table-dialog {
65
+ padding: 0px;
66
+ border-radius: 0px;
67
+ box-shadow: 0 0 6px #dcdee5;
68
+ color: #26323d;
69
+ }
70
+ .t-table-dialog .t-table-dialog-header {
71
+ margin: 24px;
72
+ font-weight: 400;
73
+ display: inline-block;
74
+ height: 26px;
75
+ font-size: 20px;
76
+ line-height: 26px;
77
+ color: #313238;
78
+ }
79
+ .t-table-dialog .t-dialog__close {
80
+ width: 30px;
81
+ height: 30px;
82
+ position: absolute;
83
+ top: 2px;
84
+ right: 9px;
85
+ }
86
+ .t-table-dialog .t-checkbox__label {
87
+ display: flex;
88
+ align-items: center;
89
+ color: #63656e;
90
+ }
91
+ .t-table-dialog .t-table__column-controller-block {
92
+ justify-content: end;
93
+ display: flex;
94
+ border: none;
95
+ padding: 0;
96
+ }
97
+ .t-table-dialog .t-table__column-controller-desc {
98
+ font-size: 14px;
99
+ line-height: 22px;
100
+ color: #313238;
101
+ text-align: left;
102
+ position: absolute;
103
+ top: 74px;
104
+ left: 24px;
105
+ font-weight: 400;
106
+ }
107
+ .t-table-dialog .t-table__column-controller-body {
108
+ padding: 0 24px;
109
+ }
110
+ .t-table-dialog .t-table-row-height {
111
+ display: flex;
112
+ height: 76px;
113
+ font-size: 14px;
114
+ border-top: solid 1px #f0f1f5;
115
+ align-items: center;
116
+ color: #26323d;
117
+ }
118
+ .t-table-dialog .t-table-row-height .bk-radio-button {
119
+ width: 68px;
120
+ height: 26px;
121
+ }
122
+ .t-table-dialog .t-table-row-height .bk-radio-button .bk-radio-button-label {
123
+ line-height: 26px;
124
+ height: 100%;
125
+ }
126
+ .t-table-dialog .t-dialog__footer {
127
+ display: flex;
128
+ height: 50px;
129
+ padding: 0 24px;
130
+ background: #fafbfd;
131
+ border: 1px solid #dcdee5;
132
+ border-radius: 0 0 2px 2px;
133
+ justify-content: flex-end;
134
+ align-items: center;
135
+ }
136
+ .t-table-dialog .t-dialog__footer .t-button--theme-primary {
137
+ background-color: #3a84ff;
138
+ border: none;
139
+ }
140
+ .t-table-dialog .t-dialog__footer .t-button--theme-default {
141
+ background-color: #fff;
142
+ color: #63656e;
143
+ border: 1px solid #c4c6cc;
144
+ }
145
+ .t-table-dialog .t-dialog__body {
146
+ padding: 0;
147
+ }
148
+ .t-table-dialog .t-table__column-controller-item {
149
+ display: flex;
150
+ flex-direction: column;
151
+ gap: 16px;
152
+ }
153
+ .t-table-dialog .t-checkbox.t-is-checked .t-checkbox__input {
154
+ background: #3a84ff;
155
+ border: 1px solid hsl(223, 7%, 62%);
156
+ }
157
+ .t-table-dialog .t-checkbox.t-is-indeterminate .t-checkbox__input {
158
+ background: #3a84ff;
159
+ border: 1px solid #979ba5;
160
+ }
@@ -0,0 +1,57 @@
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<{
4
+ columns: Array<ITTableCol<T>>;
5
+ isLoading?: boolean;
6
+ tableData: T[];
7
+ pagination?: IPagination;
8
+ layout?: string[];
9
+ containerHeight?: string;
10
+ search?: S;
11
+ rowClassName?: string | string[] | Record<string, boolean> | ((row: T, index: number) => string | number | string[] | Record<string, boolean>);
12
+ rowKey: string;
13
+ } & {
14
+ "onUpdate:search"?: (search: S) => any;
15
+ "onRow-mouseleave"?: () => any;
16
+ "onSort-change"?: (config: {
17
+ descending: boolean;
18
+ }, val: {
19
+ col: {
20
+ sortKey: string;
21
+ };
22
+ }) => any;
23
+ "onSelect-change"?: (keys: string | number[], selectedRowData: T[]) => any;
24
+ "onPage-change"?: (val: number) => any;
25
+ "onPage-size-change"?: (val: number) => any;
26
+ "onRow-click"?: (row: T) => any;
27
+ "onRow-mouseenter"?: (row: T) => any;
28
+ }> & import("vue").PublicProps;
29
+ expose: (exposed: {}) => void;
30
+ attrs: any;
31
+ slots: {
32
+ expandedRow?: (props: {
33
+ row: T;
34
+ }) => any;
35
+ };
36
+ emit: {
37
+ (event: "sort-change", config: {
38
+ descending: boolean;
39
+ }, val: {
40
+ col: {
41
+ sortKey: string;
42
+ };
43
+ }): void;
44
+ (event: "page-change" | "page-size-change", val: number): void;
45
+ (event: "row-mouseleave"): void;
46
+ (event: "select-change", keys: string | number[], selectedRowData: T[]): void;
47
+ (event: "row-click" | "row-mouseenter", row: T): void;
48
+ (event: "update:search", search: S): void;
49
+ };
50
+ }>) => import("vue").VNode & {
51
+ __ctx?: Awaited<typeof __VLS_setup>;
52
+ };
53
+ declare const _default: typeof __VLS_export;
54
+ export default _default;
55
+ type __VLS_PrettifyLocal<T> = {
56
+ [K in keyof T as K]: T[K];
57
+ } & {};
@@ -0,0 +1,5 @@
1
+ import script from './index.script.vue.js';
2
+ script.__scopeId = "data-v-fyj82wsl";
3
+ script.__file = "./src/components/render-t-table/index.vue";
4
+ import './index.vue.css';
5
+ export default script;
@@ -67,7 +67,7 @@ export default /*@__PURE__*/ _defineComponent({
67
67
  loadingTagsTree.value = true;
68
68
  getTagTree(props.module, props.subModule, props.tagName, props.groupType).then((data)=>{
69
69
  allDataMap.value.count = data.all;
70
- tags.value = [
70
+ tags.value = data.all <= 0 ? data.tree : [
71
71
  allDataMap.value,
72
72
  ...data.tree
73
73
  ];
@@ -102,6 +102,7 @@ export default /*@__PURE__*/ _defineComponent({
102
102
  _withDirectives((_openBlock(), _createBlock(RenderTree, {
103
103
  "opened-ids": openedIds.value,
104
104
  "onUpdate:openedIds": _cache[0] || (_cache[0] = ($event)=>openedIds.value = $event),
105
+ search: props.tagName,
105
106
  "api-prefix": props.apiPrefix,
106
107
  "space-id": props.spaceId,
107
108
  "selected-id": props.tagId,
@@ -109,7 +110,8 @@ export default /*@__PURE__*/ _defineComponent({
109
110
  "is-node-has-children": isNodeHasChildren,
110
111
  class: "tag-tree",
111
112
  "key-name": "tagId",
112
- onSelect: _cache[1] || (_cache[1] = (data)=>handleUpdateTagId(data.tagId))
113
+ onSelect: _cache[1] || (_cache[1] = (data)=>handleUpdateTagId(data.tagId)),
114
+ "onUpdate:search": handleUpdateTagName
113
115
  }, {
114
116
  default: _withCtx((data)=>[
115
117
  data.tagId === undefined ? (_openBlock(), _createElementBlock("i", _hoisted_2)) : _createCommentVNode("v-if", true),
@@ -125,6 +127,7 @@ export default /*@__PURE__*/ _defineComponent({
125
127
  _: 1 /* STABLE */
126
128
  }, 8 /* PROPS */ , [
127
129
  "opened-ids",
130
+ "search",
128
131
  "api-prefix",
129
132
  "space-id",
130
133
  "selected-id",
@@ -1,27 +1,27 @@
1
1
 
2
- .tag-tree[data-v-udyvuyvf] {
2
+ .tag-tree[data-v-a26j7dbe] {
3
3
  font-size: 12px;
4
4
  height: auto;
5
5
  }
6
- .tag-tree .manage-tree-item[data-v-udyvuyvf] {
6
+ .tag-tree .manage-tree-item[data-v-a26j7dbe] {
7
7
  height: 32px;
8
8
  flex: 1;
9
9
  }
10
- .tag-tree .quick-icon[data-v-udyvuyvf] {
10
+ .tag-tree .quick-icon[data-v-a26j7dbe] {
11
11
  margin-left: -24px;
12
12
  padding-left: 8px;
13
13
  }
14
- .tag-tree[data-v-udyvuyvf] .tree-item:has(.quick-icon.ai-ui-sdk-wubiaoqian) {
14
+ .tag-tree[data-v-a26j7dbe] .tree-item:has(.quick-icon.ai-ui-sdk-wubiaoqian) {
15
15
  border-bottom: 1px solid #F0F1F5;
16
16
  }
17
- .tag-tree[data-v-udyvuyvf] .tree-item.active .quick-icon {
17
+ .tag-tree[data-v-a26j7dbe] .tree-item.active .quick-icon {
18
18
  color: #3A84FF;
19
19
  }
20
- .tag-tree[data-v-udyvuyvf] .tree-item.active .tag-number {
20
+ .tag-tree[data-v-a26j7dbe] .tree-item.active .tag-number {
21
21
  background: #A3C5FD;
22
22
  color: #fff;
23
23
  }
24
- .tag-number[data-v-udyvuyvf] {
24
+ .tag-number[data-v-a26j7dbe] {
25
25
  line-height: 16px;
26
26
  padding: 0 4px;
27
27
  background-color: #F0F1F5;
@@ -1,5 +1,5 @@
1
1
  import script from './index.script.vue.js.js';
2
- script.__scopeId = "data-v-udyvuyvf";
2
+ script.__scopeId = "data-v-a26j7dbe";
3
3
  script.__file = "./src/components/render-tag-tree/index.vue";
4
4
  import './index.vue.css';
5
5
  export default script;