qidian-vue-ui 2.0.13 → 2.0.14

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.
@@ -82,6 +82,9 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
82
82
  type: Boolean
83
83
  },
84
84
  emptyText: {},
85
+ emptyImage: {
86
+ type: [Boolean, String]
87
+ },
85
88
  lazyForm: {
86
89
  type: Boolean
87
90
  },
@@ -20,6 +20,7 @@ export declare const qdCrudTableProps: {
20
20
  readonly expandedTreeNodes: () => never[];
21
21
  readonly searchData: () => {};
22
22
  readonly emptyText: undefined;
23
+ readonly emptyImage: true;
23
24
  readonly lazyForm: true;
24
25
  readonly rowKey: "id";
25
26
  readonly expandIcon: true;
@@ -190,6 +190,7 @@ declare const _default: <D extends TableRowData = TableRowData, R = unknown, P =
190
190
  manual?: boolean | undefined;
191
191
  selectType?: "single" | "multiple" | undefined;
192
192
  headerBg?: boolean | undefined;
193
+ emptyImage?: string | boolean | ((h: typeof import("vue").h) => import("tdesign-vue-next").TNodeReturnValue) | import("tdesign-vue-next").TdImageProps | undefined;
193
194
  lazyForm?: boolean | undefined;
194
195
  loadingWithData?: boolean | undefined;
195
196
  disableHorizontalScroll?: boolean | undefined;
@@ -45,6 +45,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
45
45
  selectType: {},
46
46
  headerBg: { type: Boolean },
47
47
  emptyText: {},
48
+ emptyImage: { type: [Boolean, String] },
48
49
  lazyForm: { type: Boolean },
49
50
  scroll: {},
50
51
  tree: {},
@@ -14,6 +14,7 @@ export declare const qdCrudTabsTableProps: {
14
14
  readonly cacheColumnsKey: undefined;
15
15
  readonly searchData: () => {};
16
16
  readonly emptyText: undefined;
17
+ readonly emptyImage: true;
17
18
  readonly lazyForm: true;
18
19
  readonly rowKey: "id";
19
20
  readonly expandIcon: true;
@@ -1,66 +1,78 @@
1
- .qd-service-table[data-v-b3e3c40e] {
1
+ .qd-service-table[data-v-ca5f9486] {
2
2
  height: 100%;
3
3
  display: flex;
4
4
  flex-direction: column;
5
5
  }
6
- .qd-service-table[data-v-b3e3c40e] > .t-table__content {
6
+ .qd-service-table[data-v-ca5f9486] > .t-table__content {
7
7
  flex: 1;
8
8
  }
9
- .qd-service-table--mini[data-v-b3e3c40e] {
9
+ .qd-service-table--mini[data-v-ca5f9486] {
10
10
  font: var(--td-font-body-small);
11
11
  }
12
- .qd-service-table--mini[data-v-b3e3c40e] th,
13
- .qd-service-table--mini[data-v-b3e3c40e] tr:not(.t-table__expanded-row) > td {
12
+ .qd-service-table--mini[data-v-ca5f9486] th,
13
+ .qd-service-table--mini[data-v-ca5f9486] tr:not(.t-table__expanded-row) > td {
14
14
  padding: var(--td-comp-paddingTB-xxs) var(--td-comp-paddingLR-xxs);
15
15
  line-height: var(--td-line-height-body-small);
16
16
  }
17
- .qd-service-table[data-v-b3e3c40e] .t-table__tree-col:not(:has(.t-table__tree-op-icon)) {
17
+ .qd-service-table--hide-empty-image[data-v-ca5f9486] .t-table__empty {
18
+ min-height: auto;
19
+ }
20
+ .qd-service-table--hide-empty-image[data-v-ca5f9486] .t-table__empty .t-empty {
21
+ padding: 0 !important;
22
+ }
23
+ .qd-service-table--hide-empty-image[data-v-ca5f9486] .t-table__empty .t-empty__image {
24
+ display: none;
25
+ }
26
+ .qd-service-table--hide-empty-image[data-v-ca5f9486] .t-table__empty .t-empty__title {
27
+ margin-top: 0;
28
+ }
29
+ .qd-service-table[data-v-ca5f9486] .t-table__tree-col:not(:has(.t-table__tree-op-icon)) {
18
30
  margin-left: calc(var(--td-font-size-body-large) + var(--td-comp-margin-s));
19
31
  }
20
- .qd-service-table[data-v-b3e3c40e] .t-table__tree-leaf-node .t-table__tree-op-icon:empty {
32
+ .qd-service-table[data-v-ca5f9486] .t-table__tree-leaf-node .t-table__tree-op-icon:empty {
21
33
  width: calc(var(--td-font-size-body-large) + var(--td-comp-margin-s));
22
34
  }
23
- .qd-service-table[data-v-b3e3c40e] .t-affix > .t-table__affixed-header-elm-wrap,
24
- .qd-service-table[data-v-b3e3c40e] .t-affix > .t-table__scrollbar--obvious {
25
- transform: var(--eab118ea);
35
+ .qd-service-table[data-v-ca5f9486] .t-affix > .t-table__affixed-header-elm-wrap,
36
+ .qd-service-table[data-v-ca5f9486] .t-affix > .t-table__scrollbar--obvious {
37
+ transform: var(--v2eedd3ee);
26
38
  }
27
- .qd-service-table--horizontal-bar-static[data-v-b3e3c40e] .t-table__scrollbar--obvious {
39
+ .qd-service-table--horizontal-bar-static[data-v-ca5f9486] .t-table__scrollbar--obvious {
28
40
  visibility: hidden;
29
41
  pointer-events: none;
30
42
  }
31
- .qd-service-table[data-v-b3e3c40e] .t-table__affixed-header-elm-wrap {
43
+ .qd-service-table[data-v-ca5f9486] .t-table__affixed-header-elm-wrap {
32
44
  height: auto !important;
33
45
  }
34
- .qd-service-table[data-v-b3e3c40e] .t-table__affixed-header-elm {
46
+ .qd-service-table[data-v-ca5f9486] .t-table__affixed-header-elm {
35
47
  position: relative;
36
48
  scrollbar-width: none;
37
49
  }
38
- .qd-service-table[data-v-b3e3c40e] .t-table__affixed-header-elm::-webkit-scrollbar {
50
+ .qd-service-table[data-v-ca5f9486] .t-table__affixed-header-elm::-webkit-scrollbar {
39
51
  display: none;
40
52
  width: 0;
41
53
  height: 0;
42
54
  }
43
- .qd-service-table[data-v-b3e3c40e] .t-table__virtual-scroll-cursor + table {
55
+ .qd-service-table[data-v-ca5f9486] .t-table__virtual-scroll-cursor + table {
44
56
  border-collapse: separate;
45
57
  }
46
- .qd-service-table[data-v-b3e3c40e] .t-table__expanded-row-inner {
58
+ .qd-service-table[data-v-ca5f9486] .t-table__expanded-row-inner {
47
59
  position: sticky;
48
60
  left: 0;
49
- width: var(--v40cc2280) !important;
61
+ width: var(--v6285d53a) !important;
50
62
  }
51
- .qd-service-table[data-v-b3e3c40e] .t-table__cell-wrap > *:not(.t-switch):not(.t-tag):not(.t-icon):not(.qd-file-icon) {
63
+ .qd-service-table[data-v-ca5f9486] .t-table__cell-wrap > *:not(.t-switch):not(.t-tag):not(.t-icon):not(.qd-file-icon) {
52
64
  width: 100%;
53
65
  }
54
- .qd-service-table[data-v-b3e3c40e] .qd-service-table__non-editable-col {
66
+ .qd-service-table[data-v-ca5f9486] .qd-service-table__non-editable-col {
55
67
  background-color: color-mix(in srgb, var(--td-bg-color-component) 50%, transparent);
56
68
  }
57
- .qd-service-table[data-v-b3e3c40e] .qd-service-table__non-editable-col:is(
69
+ .qd-service-table[data-v-ca5f9486] .qd-service-table__non-editable-col:is(
58
70
  .t-table__cell--fixed-left,
59
71
  .t-table__cell--fixed-right
60
72
  ) {
61
73
  background-color: inherit;
62
74
  background-image: linear-gradient(color-mix(in srgb, var(--td-bg-color-secondarycontainer) 50%, transparent), color-mix(in srgb, var(--td-bg-color-secondarycontainer) 50%, transparent));
63
75
  }
64
- .qd-service-table--disable-horizontal-scroll[data-v-b3e3c40e] colgroup > col {
76
+ .qd-service-table--disable-horizontal-scroll[data-v-ca5f9486] colgroup > col {
65
77
  width: auto !important;
66
78
  }
@@ -2,7 +2,7 @@ import './index.css'
2
2
  import _sfc_main from "./index.vue2.mjs";
3
3
  /* empty css */
4
4
  import _export_sfc from "../../../_virtual/_plugin-vue_export-helper.mjs";
5
- const QdServiceTable = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-b3e3c40e"]]);
5
+ const QdServiceTable = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-ca5f9486"]]);
6
6
  export {
7
7
  QdServiceTable as default
8
8
  };
@@ -35,6 +35,9 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
35
35
  },
36
36
  searchData: {},
37
37
  emptyText: {},
38
+ emptyImage: {
39
+ type: [Boolean, String]
40
+ },
38
41
  lazyForm: {
39
42
  type: Boolean
40
43
  },
@@ -321,8 +324,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
321
324
  emit: __emit
322
325
  }) {
323
326
  useCssVars((_ctx) => ({
324
- "eab118ea": affixedHeaderTransform.value,
325
- "v40cc2280": expandedRowWidth.value
327
+ "v2eedd3ee": affixedHeaderTransform.value,
328
+ "v6285d53a": expandedRowWidth.value
326
329
  }));
327
330
  const props = __props;
328
331
  const emit = __emit;
@@ -502,6 +505,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
502
505
  searchData: _searchData,
503
506
  expandedTreeNodes: expandedTreeNodes2,
504
507
  emptyText,
508
+ emptyImage: _emptyImage,
505
509
  lazyForm: _lazyForm,
506
510
  scroll,
507
511
  selectOnRowClick,
@@ -1914,7 +1918,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
1914
1918
  return (_ctx, _cache) => {
1915
1919
  return withDirectives((openBlock(), createBlock(resolveDynamicComponent(reProps.value.tableOptions.tree ? unref(EnhancedTable) : unref(Table)), mergeProps({
1916
1920
  ref: "table",
1917
- class: ["qd-service-table", __props.headerBg ? "" : "t-table--header-bg-inherit", horizontalScrollAffixed.value ? "t-table--horizontal-bar-affixed" : "", reProps.value.tableOptions.horizontalScrollAffixedBottom && !horizontalScrollAffixed.value ? "qd-service-table--horizontal-bar-static" : "", reProps.value.size === "mini" ? "qd-service-table--mini" : "", __props.disableHorizontalScroll ? "qd-service-table--disable-horizontal-scroll" : ""],
1921
+ class: ["qd-service-table", __props.headerBg ? "" : "t-table--header-bg-inherit", horizontalScrollAffixed.value ? "t-table--horizontal-bar-affixed" : "", reProps.value.tableOptions.horizontalScrollAffixedBottom && !horizontalScrollAffixed.value ? "qd-service-table--horizontal-bar-static" : "", reProps.value.size === "mini" ? "qd-service-table--mini" : "", __props.emptyImage === false ? "qd-service-table--hide-empty-image" : "", __props.disableHorizontalScroll ? "qd-service-table--disable-horizontal-scroll" : ""],
1918
1922
  onMouseenter: handleTableMouseEnter,
1919
1923
  "selected-row-keys": unref(selectedRowKeys),
1920
1924
  "onUpdate:selectedRowKeys": _cache[0] || (_cache[0] = ($event) => isRef(selectedRowKeys) ? selectedRowKeys.value = $event : null),
@@ -1939,10 +1943,12 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
1939
1943
  data: unref(data),
1940
1944
  pagination: rePagination.value
1941
1945
  }), createSlots({
1942
- empty: withCtx(() => [createVNode(unref(Empty), {
1946
+ empty: withCtx(() => [createVNode(unref(Empty), mergeProps({
1943
1947
  class: "qd-service-table__empty",
1944
1948
  title: reProps.value.emptyText ?? unref(t)("emptyText")
1945
- }, null, 8, ["title"])]),
1949
+ }, typeof __props.emptyImage === "boolean" ? {} : {
1950
+ image: __props.emptyImage
1951
+ }), null, 16, ["title"])]),
1946
1952
  _: 2
1947
1953
  }, [renderList(_ctx.$slots, (_, name) => {
1948
1954
  return {
@@ -10,6 +10,7 @@ export declare const qdServiceTableProps: {
10
10
  readonly expandedTreeNodes: () => never[];
11
11
  readonly searchData: () => {};
12
12
  readonly emptyText: undefined;
13
+ readonly emptyImage: true;
13
14
  readonly lazyForm: true;
14
15
  readonly rowKey: "id";
15
16
  readonly expandIcon: true;
@@ -9,6 +9,7 @@ const qdServiceTableProps = {
9
9
  expandedTreeNodes: () => [],
10
10
  searchData: () => ({}),
11
11
  emptyText: void 0,
12
+ emptyImage: true,
12
13
  lazyForm: true,
13
14
  rowKey: "id",
14
15
  expandIcon: true,
@@ -1,5 +1,5 @@
1
1
  import type { ServicePageParams, ServicePageRes, ServicePagination, ServicePaginationOptions, useServicePagination } from 'qidian-shared';
2
- import type { BaseTableCellParams, EnhancedTableInstanceFunctions, ErrorListObjectType, PrimaryTableInstanceFunctions, TableErrorListMap, TableRowData, TableRowValue, TableTreeNodeExpandOptions, TdEnhancedTableProps, TNode } from 'tdesign-vue-next';
2
+ import type { BaseTableCellParams, EnhancedTableInstanceFunctions, ErrorListObjectType, PrimaryTableInstanceFunctions, TableErrorListMap, TableRowData, TableRowValue, TableTreeNodeExpandOptions, TdEmptyProps, TdEnhancedTableProps, TNode } from 'tdesign-vue-next';
3
3
  import type { QdFormItemProps } from '../../form';
4
4
  type TDesignServiceTableCol<D extends TableRowData> = NonNullable<TdEnhancedTableProps<D>['columns']>[number];
5
5
  export type QdServiceTableScroll = NonNullable<TdEnhancedTableProps['scroll']> & {
@@ -59,6 +59,7 @@ export interface QdServiceTableProps<D extends TableRowData = TableRowData, R =
59
59
  headerBg?: boolean;
60
60
  searchData?: Record<string, unknown>;
61
61
  emptyText?: string;
62
+ emptyImage?: boolean | TdEmptyProps['image'];
62
63
  lazyForm?: boolean;
63
64
  scroll?: QdServiceTableScroll;
64
65
  tree?: TdEnhancedTableProps<D>['tree'] & {
@@ -70,6 +70,9 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
70
70
  type: Boolean
71
71
  },
72
72
  emptyText: {},
73
+ emptyImage: {
74
+ type: [Boolean, String]
75
+ },
73
76
  lazyForm: {
74
77
  type: Boolean
75
78
  },
@@ -39,6 +39,7 @@ export declare const qdServiceDialogTableSelectProps: {
39
39
  readonly sort: undefined;
40
40
  readonly expandedTreeNodes: () => never[];
41
41
  readonly emptyText: undefined;
42
+ readonly emptyImage: true;
42
43
  readonly lazyForm: true;
43
44
  readonly expandIcon: true;
44
45
  readonly selectOnRowClick: undefined;
@@ -81,6 +81,9 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
81
81
  type: Boolean
82
82
  },
83
83
  emptyText: {},
84
+ emptyImage: {
85
+ type: [Boolean, String]
86
+ },
84
87
  lazyForm: {
85
88
  type: Boolean
86
89
  },
@@ -13,6 +13,7 @@ export declare const qdServiceDialogTabsTableSelectProps: {
13
13
  readonly tools: undefined;
14
14
  readonly cacheColumnsKey: undefined;
15
15
  readonly emptyText: undefined;
16
+ readonly emptyImage: true;
16
17
  readonly lazyForm: true;
17
18
  readonly expandIcon: true;
18
19
  readonly selectOnRowClick: undefined;
@@ -60,6 +60,9 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
60
60
  type: Boolean
61
61
  },
62
62
  emptyText: {},
63
+ emptyImage: {
64
+ type: [Boolean, String]
65
+ },
63
66
  lazyForm: {
64
67
  type: Boolean
65
68
  },
@@ -13,6 +13,7 @@ export declare const qdServicePopupTableSelectProps: {
13
13
  readonly sort: undefined;
14
14
  readonly expandedTreeNodes: () => never[];
15
15
  readonly emptyText: undefined;
16
+ readonly emptyImage: true;
16
17
  readonly lazyForm: true;
17
18
  readonly expandIcon: true;
18
19
  readonly selectOnRowClick: undefined;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "qidian-vue-ui",
3
- "version": "2.0.13",
3
+ "version": "2.0.14",
4
4
  "description": "基于 TDesign 的 QiDian Vue UI 组件库",
5
5
  "author": "qidian",
6
6
  "license": "MIT",