qidian-vue-ui 2.0.23 → 2.0.25

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.
@@ -1,36 +1,40 @@
1
- .qd-crud-table[data-v-d070eeff] {
1
+ .qd-crud-table[data-v-cdc7763b] {
2
2
  width: 100%;
3
- height: 100%;
4
3
  display: flex;
5
4
  flex-direction: column;
6
5
  }
7
- .qd-crud-table > .qd-crud-search:not(.qd-crud-search--hide) + .qd-crud-table__body[data-v-d070eeff] {
6
+ .qd-crud-table > .qd-crud-search:not(.qd-crud-search--hide) + .qd-crud-table__body[data-v-cdc7763b] {
8
7
  margin-top: var(--td-comp-margin-l);
9
8
  }
10
- .qd-crud-table__body[data-v-d070eeff] {
9
+ .qd-crud-table__body[data-v-cdc7763b] > .t-loading__parent > .t-card__body {
10
+ display: flex;
11
+ flex-direction: column;
12
+ }
13
+ .qd-crud-table__body[data-v-cdc7763b] > .t-loading__parent > .t-card__body > .qd-service-table .t-table__pagination {
14
+ padding-bottom: 0;
15
+ }
16
+ .qd-crud-table--fit-parent-height[data-v-cdc7763b] {
17
+ height: 100%;
18
+ }
19
+ .qd-crud-table--fit-parent-height > .qd-crud-table__body[data-v-cdc7763b] {
11
20
  flex: auto;
12
21
  }
13
- .qd-crud-table__body[data-v-d070eeff] > .t-loading__parent > .t-card__body {
22
+ .qd-crud-table--fit-parent-height > .qd-crud-table__body[data-v-cdc7763b] > .t-loading__parent > .t-card__body {
14
23
  height: 100%;
15
24
  min-height: 443px;
16
- display: flex;
17
- flex-direction: column;
18
25
  }
19
- .qd-crud-table__body[data-v-d070eeff] > .t-loading__parent > .t-card__body > .qd-service-table {
26
+ .qd-crud-table--fit-parent-height > .qd-crud-table__body[data-v-cdc7763b] > .t-loading__parent > .t-card__body > .qd-service-table {
20
27
  flex: 1 1 0;
21
28
  overflow: hidden;
22
29
  }
23
- .qd-crud-table__body[data-v-d070eeff] > .t-loading__parent > .t-card__body > .qd-service-table .t-table__pagination {
24
- padding-bottom: 0;
25
- }
26
- .qd-crud-table__toolbar[data-v-d070eeff] {
30
+ .qd-crud-table__toolbar[data-v-cdc7763b] {
27
31
  display: flex;
28
32
  justify-content: space-between;
29
33
  }
30
- .qd-crud-table__toolbar--has-space-item + .qd-service-table[data-v-d070eeff] {
34
+ .qd-crud-table__toolbar--has-space-item + .qd-service-table[data-v-cdc7763b] {
31
35
  margin-top: var(--td-comp-margin-l);
32
36
  }
33
- .qd-crud-table__toolbar-separator[data-v-d070eeff] {
37
+ .qd-crud-table__toolbar-separator[data-v-cdc7763b] {
34
38
  display: inline-block;
35
39
  padding-left: var(--td-comp-paddingLR-s);
36
40
  }
@@ -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 QdCrudTable = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-d070eeff"]]);
5
+ const QdCrudTable = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-cdc7763b"]]);
6
6
  export {
7
7
  QdCrudTable as default
8
8
  };
@@ -1,5 +1,5 @@
1
1
  import './index.css'
2
- import { defineComponent, mergeDefaults, computed, reactive, useTemplateRef, ref, watch, onMounted, onBeforeUnmount, createElementBlock, openBlock, renderSlot, createVNode, withDirectives, createCommentVNode, createBlock, unref, mergeProps, isRef, createSlots, renderList, withCtx, normalizeProps, guardReactiveProps, vShow, createElementVNode, normalizeClass, Fragment, withModifiers, nextTick, shallowRef, toRef, triggerRef } from "vue";
2
+ import { defineComponent, mergeDefaults, computed, reactive, useTemplateRef, ref, watch, onMounted, onBeforeUnmount, createElementBlock, openBlock, normalizeClass, renderSlot, createVNode, withDirectives, createCommentVNode, createBlock, unref, mergeProps, isRef, createSlots, renderList, withCtx, normalizeProps, guardReactiveProps, vShow, createElementVNode, Fragment, withModifiers, nextTick, shallowRef, toRef, triggerRef } from "vue";
3
3
  import { useVModels, useLocalStorage } from "../../../node_modules/.pnpm/@vueuse_core@14.2.0_vue@3.5.26_typescript@5.9.3_/node_modules/@vueuse/core/dist/index.mjs";
4
4
  import { MD5, easyCopy, suspectedWrapperPromise, createExposeProxy, extractSlotsWithPrefix, isEmpty, generateRandomString, to } from "qidian-shared";
5
5
  import { SearchIcon, RefreshIcon, UnfoldLessIcon, UnfoldMoreIcon, SettingIcon, AddIcon, DeleteIcon } from "tdesign-icons-vue-next";
@@ -21,13 +21,10 @@ import get from "../../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/loda
21
21
  import QdServiceTable from "../../service/table/index.vue.mjs";
22
22
  import { hasPermiOr } from "../../../utils/auth.mjs";
23
23
  const _hoisted_1 = {
24
- class: "qd-crud-table"
25
- };
26
- const _hoisted_2 = {
27
24
  key: 0,
28
25
  class: "qd-crud-table__toolbar-separator"
29
26
  };
30
- const _hoisted_3 = {
27
+ const _hoisted_2 = {
31
28
  key: 0,
32
29
  class: "qd-crud-table__toolbar-separator"
33
30
  };
@@ -42,6 +39,9 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
42
39
  tableMinHeight: {
43
40
  type: [String, Number, Boolean]
44
41
  },
42
+ fitParentHeight: {
43
+ type: Boolean
44
+ },
45
45
  search: {},
46
46
  searchData: {},
47
47
  form: {},
@@ -411,6 +411,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
411
411
  expandedTreeNodes: expandedTreeNodes2,
412
412
  transformParams,
413
413
  tableMinHeight,
414
+ fitParentHeight,
414
415
  search,
415
416
  form,
416
417
  detail,
@@ -541,6 +542,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
541
542
  },
542
543
  serviceTableOptions: {
543
544
  ...serviceTableOptions,
545
+ maxHeight: fitParentHeight ? serviceTableOptions.maxHeight : void 0,
544
546
  selectType: void 0,
545
547
  transformParams
546
548
  },
@@ -1079,7 +1081,11 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
1079
1081
  refreshAsync
1080
1082
  }, tableRef));
1081
1083
  return (_ctx, _cache) => {
1082
- return openBlock(), createElementBlock("div", _hoisted_1, [renderSlot(_ctx.$slots, "header", {}, () => [reProps.value.searchOptions?.items?.length ? withDirectives((openBlock(), createBlock(unref(QdCrudSearch), mergeProps({
1084
+ return openBlock(), createElementBlock("div", {
1085
+ class: normalizeClass(["qd-crud-table", {
1086
+ "qd-crud-table--fit-parent-height": props.fitParentHeight
1087
+ }])
1088
+ }, [renderSlot(_ctx.$slots, "header", {}, () => [reProps.value.searchOptions?.items?.length ? withDirectives((openBlock(), createBlock(unref(QdCrudSearch), mergeProps({
1083
1089
  key: 0,
1084
1090
  ref: "search",
1085
1091
  data: unref(searchData),
@@ -1113,7 +1119,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
1113
1119
  key: item.uid || index
1114
1120
  }, [getActionSeparator(item, {
1115
1121
  index
1116
- }) ? (openBlock(), createElementBlock("span", _hoisted_2)) : createCommentVNode("", true), withDirectives(createVNode(unref(_sfc_main$1), {
1122
+ }) ? (openBlock(), createElementBlock("span", _hoisted_1)) : createCommentVNode("", true), withDirectives(createVNode(unref(_sfc_main$1), {
1117
1123
  "fn-inject-ctx": "",
1118
1124
  context: getConfigRendererCtx(item),
1119
1125
  config: {
@@ -1139,7 +1145,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
1139
1145
  }, [getActionSeparator(item, {
1140
1146
  index,
1141
1147
  mapKey: "tool"
1142
- }) ? (openBlock(), createElementBlock("span", _hoisted_3)) : createCommentVNode("", true), createVNode(unref(Tooltip), {
1148
+ }) ? (openBlock(), createElementBlock("span", _hoisted_2)) : createCommentVNode("", true), createVNode(unref(Tooltip), {
1143
1149
  content: item.content,
1144
1150
  disabled: !item.content
1145
1151
  }, {
@@ -1313,7 +1319,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
1313
1319
  columns: mergeColumns.value,
1314
1320
  "onUpdate:columns": _cache[11] || (_cache[11] = ($event) => mergeColumns.value = $event),
1315
1321
  "default-columns": reProps.value.columns
1316
- }, null, 8, ["visible", "columns", "default-columns"])]);
1322
+ }, null, 8, ["visible", "columns", "default-columns"])], 2);
1317
1323
  };
1318
1324
  }
1319
1325
  });
@@ -1,6 +1,7 @@
1
1
  export declare const qdCrudTableProps: {
2
2
  readonly resizable: true;
3
3
  readonly hideRefresh: true;
4
+ readonly fitParentHeight: true;
4
5
  readonly form: undefined;
5
6
  readonly add: undefined;
6
7
  readonly actions: undefined;
@@ -3,6 +3,7 @@ const qdCrudTableProps = {
3
3
  ...qdServiceTableProps,
4
4
  resizable: true,
5
5
  hideRefresh: true,
6
+ fitParentHeight: true,
6
7
  form: void 0,
7
8
  add: void 0,
8
9
  actions: void 0,
@@ -71,6 +71,7 @@ export interface QdCrudTableProps<D extends TableRowData = TableRowData, R = unk
71
71
  title?: string;
72
72
  permiPrefix?: string;
73
73
  tableMinHeight?: string | number | boolean;
74
+ fitParentHeight?: boolean;
74
75
  search?: Omit<QdCrudSearchProps, 'data'>;
75
76
  searchData?: QdCrudSearchProps['data'];
76
77
  form?: QdCrudTableWrapper['form'];
@@ -23,6 +23,7 @@ declare const _default: <D extends TableRowData = TableRowData, R = unknown, P =
23
23
  title?: string;
24
24
  permiPrefix?: string;
25
25
  tableMinHeight?: string | number | boolean;
26
+ fitParentHeight?: boolean;
26
27
  searchData?: import("..").QdCrudSearchProps["data"];
27
28
  form?: import("../table/types").QdCrudTableWrapper["form"];
28
29
  detail?: import("../table/types").QdCrudDetail;
@@ -23,6 +23,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
23
23
  title: {},
24
24
  permiPrefix: {},
25
25
  tableMinHeight: { type: [String, Number, Boolean] },
26
+ fitParentHeight: { type: Boolean },
26
27
  search: {},
27
28
  searchData: {},
28
29
  form: {},
@@ -3,6 +3,7 @@ export declare const qdCrudTabsTableProps: {
3
3
  readonly sharedSearch: true;
4
4
  readonly resizable: true;
5
5
  readonly hideRefresh: true;
6
+ readonly fitParentHeight: true;
6
7
  readonly form: undefined;
7
8
  readonly add: undefined;
8
9
  readonly actions: undefined;
@@ -48,6 +48,9 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
48
48
  tableMinHeight: {
49
49
  type: [String, Number, Boolean]
50
50
  },
51
+ fitParentHeight: {
52
+ type: Boolean
53
+ },
51
54
  search: {},
52
55
  searchData: {},
53
56
  detail: {},
@@ -59,6 +59,9 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
59
59
  tableMinHeight: {
60
60
  type: [String, Number, Boolean]
61
61
  },
62
+ fitParentHeight: {
63
+ type: Boolean
64
+ },
62
65
  search: {},
63
66
  searchData: {},
64
67
  detail: {},
@@ -10,6 +10,7 @@ export declare const qdServiceDialogTabsTableSelectProps: {
10
10
  readonly sharedSearch: true;
11
11
  readonly resizable: true;
12
12
  readonly hideRefresh: true;
13
+ readonly fitParentHeight: true;
13
14
  readonly tools: undefined;
14
15
  readonly cacheColumnsKey: undefined;
15
16
  readonly emptyText: undefined;
@@ -38,6 +38,9 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
38
38
  tableMinHeight: {
39
39
  type: [String, Number, Boolean]
40
40
  },
41
+ fitParentHeight: {
42
+ type: Boolean
43
+ },
41
44
  search: {},
42
45
  searchData: {},
43
46
  detail: {},
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "qidian-vue-ui",
3
- "version": "2.0.23",
3
+ "version": "2.0.25",
4
4
  "description": "基于 TDesign 的 QiDian Vue UI 组件库",
5
5
  "author": "qidian",
6
6
  "license": "MIT",