qidian-vue-ui 2.0.44 → 2.0.46

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,40 +1,40 @@
1
- .qd-crud-table[data-v-336e27b9] {
1
+ .qd-crud-table[data-v-caa57b85] {
2
2
  width: 100%;
3
3
  display: flex;
4
4
  flex-direction: column;
5
5
  }
6
- .qd-crud-table > .qd-crud-search:not(.qd-crud-search--hide) + .qd-crud-table__body[data-v-336e27b9] {
6
+ .qd-crud-table > .qd-crud-search:not(.qd-crud-search--hide) + .qd-crud-table__body[data-v-caa57b85] {
7
7
  margin-top: var(--td-comp-margin-l);
8
8
  }
9
- .qd-crud-table__body[data-v-336e27b9] > .t-loading__parent > .t-card__body {
9
+ .qd-crud-table__body[data-v-caa57b85] > .t-loading__parent > .t-card__body {
10
10
  display: flex;
11
11
  flex-direction: column;
12
12
  }
13
- .qd-crud-table__body[data-v-336e27b9] > .t-loading__parent > .t-card__body > .qd-service-table .t-table__pagination {
13
+ .qd-crud-table__body[data-v-caa57b85] > .t-loading__parent > .t-card__body > .qd-service-table .t-table__pagination {
14
14
  padding-bottom: 0;
15
15
  }
16
- .qd-crud-table--fit-parent-height[data-v-336e27b9] {
16
+ .qd-crud-table--fit-parent-height[data-v-caa57b85] {
17
17
  height: 100%;
18
18
  }
19
- .qd-crud-table--fit-parent-height > .qd-crud-table__body[data-v-336e27b9] {
19
+ .qd-crud-table--fit-parent-height > .qd-crud-table__body[data-v-caa57b85] {
20
20
  flex: auto;
21
21
  }
22
- .qd-crud-table--fit-parent-height > .qd-crud-table__body[data-v-336e27b9] > .t-loading__parent > .t-card__body {
22
+ .qd-crud-table--fit-parent-height > .qd-crud-table__body[data-v-caa57b85] > .t-loading__parent > .t-card__body {
23
23
  height: 100%;
24
24
  min-height: 443px;
25
25
  }
26
- .qd-crud-table--fit-parent-height > .qd-crud-table__body[data-v-336e27b9] > .t-loading__parent > .t-card__body > .qd-service-table {
26
+ .qd-crud-table--fit-parent-height > .qd-crud-table__body[data-v-caa57b85] > .t-loading__parent > .t-card__body > .qd-service-table {
27
27
  flex: 1 1 0;
28
28
  overflow: hidden;
29
29
  }
30
- .qd-crud-table__toolbar[data-v-336e27b9] {
30
+ .qd-crud-table__toolbar[data-v-caa57b85] {
31
31
  display: flex;
32
32
  justify-content: space-between;
33
33
  }
34
- .qd-crud-table__toolbar--has-space-item + .qd-service-table[data-v-336e27b9] {
34
+ .qd-crud-table__toolbar--has-space-item + .qd-service-table[data-v-caa57b85] {
35
35
  margin-top: var(--td-comp-margin-l);
36
36
  }
37
- .qd-crud-table__toolbar-separator[data-v-336e27b9] {
37
+ .qd-crud-table__toolbar-separator[data-v-caa57b85] {
38
38
  display: inline-block;
39
39
  padding-left: var(--td-comp-paddingLR-s);
40
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-336e27b9"]]);
5
+ const QdCrudTable = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-caa57b85"]]);
6
6
  export {
7
7
  QdCrudTable as default
8
8
  };
@@ -731,10 +731,13 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
731
731
  if (currentOptions === false) return;
732
732
  const mergeOptions = merge({}, defaultOptions, currentOptions);
733
733
  if (mergeOptions.crudMode !== "view" && !currentOptions) return;
734
+ if (typeof currentOptions === "object" && currentOptions.component) {
735
+ mergeOptions.component = currentOptions.component;
736
+ }
734
737
  mergeOptions.permi = buildActionPermi(mergeOptions);
735
738
  if (mergeOptions.crudMode !== "del") {
736
739
  const form = buildActionForm(mergeOptions, crudForm);
737
- if (!form && !mergeOptions.onClick) return;
740
+ if (!form && !mergeOptions.onClick && !mergeOptions.component) return;
738
741
  mergeOptions.form = form;
739
742
  }
740
743
  return mergeOptions;
@@ -985,6 +988,55 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
985
988
  return false;
986
989
  }
987
990
  }
991
+ function buildActionComponent(action, defaultComponent, originalParams) {
992
+ const {
993
+ component,
994
+ ...actionProps
995
+ } = action;
996
+ const onClick = buildActionOnClick(action, originalParams);
997
+ const disabled = defaultComponent === Button ? buildActionDisabled(action) : action.disabled;
998
+ const ifRender = "ifRender" in action ? action.ifRender : void 0;
999
+ if (!component) {
1000
+ return {
1001
+ is: defaultComponent,
1002
+ ...actionProps,
1003
+ form: defaultComponent === Button ? void 0 : action.form,
1004
+ onClick,
1005
+ disabled
1006
+ };
1007
+ }
1008
+ return {
1009
+ ...component,
1010
+ ifRender: component.ifRender ?? ifRender,
1011
+ onClick: component.onClick ?? onClick,
1012
+ disabled: component.disabled ?? disabled
1013
+ };
1014
+ }
1015
+ function buildToolComponent(tool) {
1016
+ const {
1017
+ component,
1018
+ ...toolProps
1019
+ } = tool;
1020
+ const action = tool;
1021
+ const onClick = buildActionOnClick(action);
1022
+ const disabled = buildActionDisabled(action);
1023
+ if (!component) {
1024
+ return {
1025
+ is: Button,
1026
+ ...toolProps,
1027
+ content: "",
1028
+ variant: "text",
1029
+ shape: "square",
1030
+ onClick,
1031
+ disabled
1032
+ };
1033
+ }
1034
+ return {
1035
+ ...component,
1036
+ onClick: component.onClick ?? onClick,
1037
+ disabled: component.disabled ?? disabled
1038
+ };
1039
+ }
988
1040
  async function getDetail(action, params) {
989
1041
  const {
990
1042
  detailOptions
@@ -1135,13 +1187,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
1135
1187
  }) ? (openBlock(), createElementBlock("span", _hoisted_1)) : createCommentVNode("", true), withDirectives(createVNode(unref(_sfc_main$1), {
1136
1188
  "fn-inject-ctx": "",
1137
1189
  context: getConfigRendererCtx(item),
1138
- config: {
1139
- is: unref(Button),
1140
- ...item,
1141
- form: void 0,
1142
- onClick: buildActionOnClick(item),
1143
- disabled: buildActionDisabled(item)
1144
- },
1190
+ config: buildActionComponent(item, unref(Button)),
1145
1191
  onIfRenderChange: (ifRender) => setActionIfRender(ifRender, item, {
1146
1192
  index
1147
1193
  })
@@ -1165,15 +1211,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
1165
1211
  default: withCtx(() => [withDirectives(createVNode(unref(_sfc_main$1), {
1166
1212
  "fn-inject-ctx": "",
1167
1213
  context: getConfigRendererCtx(item),
1168
- config: {
1169
- is: unref(Button),
1170
- ...item,
1171
- content: "",
1172
- variant: "text",
1173
- shape: "square",
1174
- onClick: buildActionOnClick(item),
1175
- disabled: buildActionDisabled(item)
1176
- },
1214
+ config: buildToolComponent(item),
1177
1215
  onIfRenderChange: (ifRender) => setActionIfRender(ifRender, item, {
1178
1216
  index,
1179
1217
  mapKey: "tool"
@@ -1292,11 +1330,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
1292
1330
  key: `${slotProps.colIndex}.${slotProps.rowIndex}.${index}.renderer`,
1293
1331
  "fn-inject-ctx": "",
1294
1332
  context: getConfigRendererCtx(item, slotProps),
1295
- config: {
1296
- is: unref(Link),
1297
- ...item,
1298
- onClick: buildActionOnClick(item, slotProps)
1299
- },
1333
+ config: buildActionComponent(item, unref(Link), slotProps),
1300
1334
  onIfRenderChange: (ifRender) => setActionIfRender(ifRender, item, {
1301
1335
  colIndex: slotProps.colIndex,
1302
1336
  rowIndex: slotProps.rowIndex,
@@ -34,6 +34,7 @@ export interface QdCrudTableAction<D extends TableRowData = TableRowData, R = un
34
34
  uid?: string;
35
35
  permiID?: string;
36
36
  permi?: string[];
37
+ component?: QdComponentConfig;
37
38
  selectType?: QdServiceTableProps['selectType'];
38
39
  onClick?: (context: QdCrudTableActionContext<D> & Partial<PrimaryTableCellParams<D>>, e: MouseEvent) => void | Promise<void>;
39
40
  }
@@ -41,6 +42,7 @@ export interface QdCrudTableRowAction<D extends TableRowData = TableRowData, R =
41
42
  uid?: string;
42
43
  permiID?: string;
43
44
  permi?: string[];
45
+ component?: QdComponentConfig;
44
46
  selectType?: QdServiceTableProps['selectType'];
45
47
  detail?: QdCrudDetail;
46
48
  onClick?: (context: QdCrudTableActionContext<D> & PrimaryTableCellParams<D>, e: MouseEvent) => void | Promise<void>;
@@ -62,6 +64,7 @@ export interface QdCrudTableToolContext<D extends TableRowData = TableRowData> {
62
64
  export interface QdCrudTableTool<D extends TableRowData = TableRowData> {
63
65
  content?: string;
64
66
  icon?: TNode;
67
+ component?: QdComponentConfig;
65
68
  permiID?: string;
66
69
  permi?: string[];
67
70
  disabled?: boolean | ((ctx: QdCrudTableToolContext<D>) => boolean);
@@ -1,165 +1,165 @@
1
- .qd-service-table[data-v-f28c006f] {
1
+ .qd-service-table[data-v-a601e747] {
2
2
  height: 100%;
3
3
  display: flex;
4
4
  flex-direction: column;
5
5
  }
6
- .qd-service-table[data-v-f28c006f] > .t-table__content {
6
+ .qd-service-table[data-v-a601e747] > .t-table__content {
7
7
  flex: 1;
8
8
  }
9
- .qd-service-table--mini[data-v-f28c006f] {
9
+ .qd-service-table--mini[data-v-a601e747] {
10
10
  font: var(--td-font-body-small);
11
11
  }
12
- .qd-service-table--mini[data-v-f28c006f] th,
13
- .qd-service-table--mini[data-v-f28c006f] tr:not(.t-table__expanded-row) > td {
12
+ .qd-service-table--mini[data-v-a601e747] th,
13
+ .qd-service-table--mini[data-v-a601e747] 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--mini[data-v-f28c006f] .t-table__row-full-element {
17
+ .qd-service-table--mini[data-v-a601e747] .t-table__row-full-element {
18
18
  padding: var(--td-comp-paddingTB-xs) var(--td-comp-paddingLR-s);
19
19
  }
20
- .qd-service-table--hide-empty-image[data-v-f28c006f] .t-table__empty {
20
+ .qd-service-table--hide-empty-image[data-v-a601e747] .t-table__empty {
21
21
  min-height: auto;
22
22
  }
23
- .qd-service-table--hide-empty-image[data-v-f28c006f] .t-table__empty .t-empty {
23
+ .qd-service-table--hide-empty-image[data-v-a601e747] .t-table__empty .t-empty {
24
24
  padding: 0 !important;
25
25
  }
26
- .qd-service-table--hide-empty-image[data-v-f28c006f] .t-table__empty .t-empty__image {
26
+ .qd-service-table--hide-empty-image[data-v-a601e747] .t-table__empty .t-empty__image {
27
27
  display: none;
28
28
  }
29
- .qd-service-table--hide-empty-image[data-v-f28c006f] .t-table__empty .t-empty__title {
29
+ .qd-service-table--hide-empty-image[data-v-a601e747] .t-table__empty .t-empty__title {
30
30
  margin-top: 0;
31
31
  }
32
- .qd-service-table[data-v-f28c006f] .t-table__tree-col:not(:has(.t-table__tree-op-icon)) {
32
+ .qd-service-table[data-v-a601e747] .t-table__tree-col:not(:has(.t-table__tree-op-icon)) {
33
33
  margin-left: calc(var(--td-font-size-body-large) + var(--td-comp-margin-s));
34
34
  }
35
- .qd-service-table[data-v-f28c006f] .t-table__tree-leaf-node .t-table__tree-op-icon:empty {
35
+ .qd-service-table[data-v-a601e747] .t-table__tree-leaf-node .t-table__tree-op-icon:empty {
36
36
  width: calc(var(--td-font-size-body-large) + var(--td-comp-margin-s));
37
37
  }
38
- .qd-service-table[data-v-f28c006f] .t-affix > .t-table__affixed-header-elm-wrap,
39
- .qd-service-table[data-v-f28c006f] .t-affix > .t-table__scrollbar--obvious {
40
- transform: var(--dca57566);
38
+ .qd-service-table[data-v-a601e747] .t-affix > .t-table__affixed-header-elm-wrap,
39
+ .qd-service-table[data-v-a601e747] .t-affix > .t-table__scrollbar--obvious {
40
+ transform: var(--v393be75e);
41
41
  }
42
- .qd-service-table--horizontal-bar-static[data-v-f28c006f] .t-table__scrollbar--obvious {
42
+ .qd-service-table--horizontal-bar-static[data-v-a601e747] .t-table__scrollbar--obvious {
43
43
  visibility: hidden;
44
44
  pointer-events: none;
45
45
  }
46
- .qd-service-table[data-v-f28c006f] .t-table__expanded-row .qd-service-table--horizontal-bar-static > div:has(> div > .t-table__scrollbar--obvious) {
46
+ .qd-service-table[data-v-a601e747] .t-table__expanded-row .qd-service-table--horizontal-bar-static > div:has(> div > .t-table__scrollbar--obvious) {
47
47
  display: none;
48
48
  }
49
- .qd-service-table[data-v-f28c006f] .t-table__expanded-row > td {
49
+ .qd-service-table[data-v-a601e747] .t-table__expanded-row > td {
50
50
  height: 0;
51
51
  }
52
- .qd-service-table[data-v-f28c006f] .t-table__affixed-header-elm-wrap {
52
+ .qd-service-table[data-v-a601e747] .t-table__affixed-header-elm-wrap {
53
53
  height: auto !important;
54
54
  }
55
- .qd-service-table[data-v-f28c006f] .t-table__affixed-header-elm {
55
+ .qd-service-table[data-v-a601e747] .t-table__affixed-header-elm {
56
56
  position: relative;
57
57
  scrollbar-width: none;
58
58
  }
59
- .qd-service-table[data-v-f28c006f] .t-table__affixed-header-elm::-webkit-scrollbar {
59
+ .qd-service-table[data-v-a601e747] .t-table__affixed-header-elm::-webkit-scrollbar {
60
60
  display: none;
61
61
  width: 0;
62
62
  height: 0;
63
63
  }
64
- .qd-service-table[data-v-f28c006f] .t-table__virtual-scroll-cursor + table {
64
+ .qd-service-table[data-v-a601e747] .t-table__virtual-scroll-cursor + table {
65
65
  border-collapse: separate;
66
66
  }
67
- .qd-service-table[data-v-f28c006f] .t-table__expanded-row-inner,
68
- .qd-service-table[data-v-f28c006f] .t-table__row-filter-inner {
67
+ .qd-service-table[data-v-a601e747] .t-table__expanded-row-inner,
68
+ .qd-service-table[data-v-a601e747] .t-table__row-filter-inner {
69
69
  display: block;
70
70
  position: sticky;
71
71
  left: 0;
72
- width: var(--v666e8bfc) !important;
72
+ width: var(--c95fd7f4) !important;
73
73
  }
74
- .qd-service-table[data-v-f28c006f] .t-table__cell-wrap > .t-form__controls > .t-form__controls-content > *:not(.t-switch):not(.t-tag):not(.t-icon):not(.qd-file-icon) {
74
+ .qd-service-table[data-v-a601e747] .t-table__cell-wrap > .t-form__controls > .t-form__controls-content > *:not(.t-switch):not(.t-tag):not(.t-icon):not(.qd-file-icon) {
75
75
  width: 100%;
76
76
  }
77
- .qd-service-table[data-v-f28c006f] .qd-service-table__non-editable-col {
77
+ .qd-service-table[data-v-a601e747] .qd-service-table__non-editable-col {
78
78
  background-color: color-mix(in srgb, var(--td-bg-color-component) 50%, transparent);
79
79
  }
80
- .qd-service-table[data-v-f28c006f] .qd-service-table__non-editable-col:is(
80
+ .qd-service-table[data-v-a601e747] .qd-service-table__non-editable-col:is(
81
81
  .t-table__cell--fixed-left,
82
82
  .t-table__cell--fixed-right
83
83
  ) {
84
84
  background-color: inherit;
85
85
  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));
86
86
  }
87
- .qd-service-table--disable-horizontal-scroll[data-v-f28c006f] colgroup > col {
87
+ .qd-service-table--disable-horizontal-scroll[data-v-a601e747] colgroup > col {
88
88
  width: auto !important;
89
89
  }
90
- .qd-service-table[data-v-f28c006f] .t-table__filter-pop-content-inner {
90
+ .qd-service-table[data-v-a601e747] .t-table__filter-pop-content-inner {
91
91
  padding: var(--td-comp-paddingTB-s) var(--td-comp-paddingLR-s) 0;
92
92
  }
93
- .qd-service-table[data-v-f28c006f] .t-table__filter-pop-content-inner:has(.qd-service-table-filter-item) {
93
+ .qd-service-table[data-v-a601e747] .t-table__filter-pop-content-inner:has(.qd-service-table-filter-item) {
94
94
  padding: 0;
95
95
  }
96
- .qd-service-table[data-v-f28c006f] .t-table__filter-pop-content-inner:has(
96
+ .qd-service-table[data-v-a601e747] .t-table__filter-pop-content-inner:has(
97
97
  .qd-service-table-filter-input,
98
98
  .qd-service-table-filter-custom
99
99
  ) {
100
100
  padding-bottom: var(--td-comp-paddingTB-s);
101
101
  }
102
- .qd-service-table[data-v-f28c006f] .t-table__filter--bottom-buttons {
102
+ .qd-service-table[data-v-a601e747] .t-table__filter--bottom-buttons {
103
103
  padding: var(--td-comp-paddingTB-s) var(--td-comp-paddingLR-s);
104
104
  }
105
- .qd-service-table--mini[data-v-f28c006f] .t-table__filter-pop-content-inner {
105
+ .qd-service-table--mini[data-v-a601e747] .t-table__filter-pop-content-inner {
106
106
  padding: var(--td-comp-paddingTB-xs) var(--td-comp-paddingLR-xs) 0;
107
107
  }
108
- .qd-service-table--mini[data-v-f28c006f] .t-table__filter--bottom-buttons {
108
+ .qd-service-table--mini[data-v-a601e747] .t-table__filter--bottom-buttons {
109
109
  padding: var(--td-comp-paddingTB-xs) var(--td-comp-paddingLR-xs);
110
110
  }
111
- .qd-service-table--mini[data-v-f28c006f] .t-table__filter-pop-content-inner:has(.qd-service-table-filter-item) {
111
+ .qd-service-table--mini[data-v-a601e747] .t-table__filter-pop-content-inner:has(.qd-service-table-filter-item) {
112
112
  padding: 0;
113
113
  }
114
- .qd-service-table--mini[data-v-f28c006f] .t-table__filter-pop-content-inner:has(
114
+ .qd-service-table--mini[data-v-a601e747] .t-table__filter-pop-content-inner:has(
115
115
  .qd-service-table-filter-input,
116
116
  .qd-service-table-filter-custom
117
117
  ) {
118
118
  padding-bottom: var(--td-comp-paddingTB-xs);
119
119
  }
120
- .qd-service-table[data-v-f28c006f] .qd-service-table-filter-item {
120
+ .qd-service-table[data-v-a601e747] .qd-service-table-filter-item {
121
121
  width: 266px;
122
122
  }
123
- .qd-service-table[data-v-f28c006f] .qd-service-table-filter-item__search,
124
- .qd-service-table[data-v-f28c006f] .qd-service-table-filter-item__all,
125
- .qd-service-table[data-v-f28c006f] .qd-service-table-filter-item__options {
123
+ .qd-service-table[data-v-a601e747] .qd-service-table-filter-item__search,
124
+ .qd-service-table[data-v-a601e747] .qd-service-table-filter-item__all,
125
+ .qd-service-table[data-v-a601e747] .qd-service-table-filter-item__options {
126
126
  padding: var(--td-comp-paddingTB-s) var(--td-comp-paddingLR-s) 0;
127
127
  }
128
- .qd-service-table[data-v-f28c006f] .qd-service-table-filter-item__all {
128
+ .qd-service-table[data-v-a601e747] .qd-service-table-filter-item__all {
129
129
  padding: 0 var(--td-comp-paddingLR-s);
130
130
  border-bottom: 1px solid var(--td-component-stroke);
131
131
  }
132
- .qd-service-table[data-v-f28c006f] .qd-service-table-filter-item__options {
132
+ .qd-service-table[data-v-a601e747] .qd-service-table-filter-item__options {
133
133
  display: flex;
134
134
  flex-direction: column;
135
135
  height: 206px;
136
136
  padding: 0 var(--td-comp-paddingLR-s);
137
137
  overflow-y: auto;
138
138
  }
139
- .qd-service-table[data-v-f28c006f] .qd-service-table-filter-item__count {
139
+ .qd-service-table[data-v-a601e747] .qd-service-table-filter-item__count {
140
140
  margin-left: var(--td-comp-margin-xs);
141
141
  color: var(--td-text-color-placeholder);
142
142
  }
143
- .qd-service-table[data-v-f28c006f] .qd-service-table-filter-item__cell {
143
+ .qd-service-table[data-v-a601e747] .qd-service-table-filter-item__cell {
144
144
  pointer-events: none;
145
145
  }
146
- .qd-service-table[data-v-f28c006f] .qd-service-table-filter-item .t-checkbox,
147
- .qd-service-table[data-v-f28c006f] .qd-service-table-filter-item .t-radio {
146
+ .qd-service-table[data-v-a601e747] .qd-service-table-filter-item .t-checkbox,
147
+ .qd-service-table[data-v-a601e747] .qd-service-table-filter-item .t-radio {
148
148
  display: flex;
149
149
  align-items: center;
150
150
  }
151
- .qd-service-table[data-v-f28c006f] .qd-service-table-filter-item .t-checkbox__label,
152
- .qd-service-table[data-v-f28c006f] .qd-service-table-filter-item .t-radio__label {
151
+ .qd-service-table[data-v-a601e747] .qd-service-table-filter-item .t-checkbox__label,
152
+ .qd-service-table[data-v-a601e747] .qd-service-table-filter-item .t-radio__label {
153
153
  display: inline-flex;
154
154
  flex: 1 1 0;
155
155
  align-items: center;
156
156
  min-width: 0;
157
157
  overflow: hidden;
158
158
  }
159
- .qd-service-table--mini[data-v-f28c006f] .qd-service-table-filter-item__search {
159
+ .qd-service-table--mini[data-v-a601e747] .qd-service-table-filter-item__search {
160
160
  padding: var(--td-comp-paddingTB-xs) var(--td-comp-paddingLR-xs) 0;
161
161
  }
162
- .qd-service-table--mini[data-v-f28c006f] .qd-service-table-filter-item__all,
163
- .qd-service-table--mini[data-v-f28c006f] .qd-service-table-filter-item__options {
162
+ .qd-service-table--mini[data-v-a601e747] .qd-service-table-filter-item__all,
163
+ .qd-service-table--mini[data-v-a601e747] .qd-service-table-filter-item__options {
164
164
  padding: 0 var(--td-comp-paddingLR-xs);
165
165
  }
@@ -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-f28c006f"]]);
5
+ const QdServiceTable = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-a601e747"]]);
6
6
  export {
7
7
  QdServiceTable as default
8
8
  };
@@ -21,6 +21,7 @@ import QdForm from "../../form/index.vue.mjs";
21
21
  import set from "../../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/set.mjs";
22
22
  const defaultMinWidth = 80;
23
23
  const defaultVirtualScrollBufferSize = 2;
24
+ const defaultXVirtualScrollThreshold = 20;
24
25
  const defaultVirtualScrollUpdateInterval = 16;
25
26
  const minVirtualScrollUpdateInterval = 8;
26
27
  const scrollRestoreMaxAttempts = 4;
@@ -332,8 +333,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
332
333
  emit: __emit
333
334
  }) {
334
335
  useCssVars((_ctx) => ({
335
- "dca57566": affixedHeaderTransform.value,
336
- "v666e8bfc": expandedRowWidth.value
336
+ "v393be75e": affixedHeaderTransform.value,
337
+ "c95fd7f4": expandedRowWidth.value
337
338
  }));
338
339
  const props = __props;
339
340
  const emit = __emit;
@@ -609,6 +610,9 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
609
610
  } = scroll ?? {};
610
611
  const reScroll = scroll?.type === "virtual" ? {
611
612
  bufferSize: defaultVirtualScrollBufferSize,
613
+ ...scroll.xVirtual === true ? {
614
+ threshold: defaultXVirtualScrollThreshold
615
+ } : {},
612
616
  virtualUpdateInterval: Math.max(minVirtualScrollUpdateInterval, virtualUpdateInterval ?? defaultVirtualScrollUpdateInterval),
613
617
  ...scrollOptions
614
618
  } : scroll;
@@ -115,7 +115,7 @@ function useModal() {
115
115
  queueMicrotask(() => updateOverlayMasks());
116
116
  }
117
117
  function wrapInstanceLifecycle(instance, config) {
118
- const { modalClass, hasMask, hideOnDeactivated, closeOnEscKeydown, attach } = config;
118
+ const { modalClass, hasMask, hideOnDeactivated, closeOnEscKeydown, attach, onEscClose } = config;
119
119
  const originalShow = instance.show.bind(instance);
120
120
  const originalHide = instance.hide.bind(instance);
121
121
  const originalDestroy = instance.destroy.bind(instance);
@@ -130,7 +130,7 @@ function useModal() {
130
130
  if (hideOnDeactivated) hideOnDeactivatedModalClasses.add(modalClass);
131
131
  if (hasMask) {
132
132
  registerOverlayEsc(modalClass, {
133
- close: () => instance.destroy(),
133
+ close: onEscClose ?? (() => instance.destroy()),
134
134
  closeOnEscKeydown
135
135
  });
136
136
  }
@@ -270,6 +270,10 @@ function useModal() {
270
270
  closeOnEscKeydown,
271
271
  hasMask
272
272
  } = withOverlay(alertOptionsMerge(options));
273
+ function handleClose() {
274
+ onClose?.();
275
+ instance.destroy();
276
+ }
273
277
  const instance = wrapInstanceLifecycle(
274
278
  DialogPlugin.confirm({
275
279
  ...reOptions,
@@ -300,12 +304,16 @@ function useModal() {
300
304
  }
301
305
  if (isEmpty(res) || res) instance.destroy();
302
306
  },
303
- onClose: () => {
304
- onClose?.();
305
- instance.destroy();
306
- }
307
+ onClose: handleClose
307
308
  }),
308
- { modalClass, hasMask, hideOnDeactivated, closeOnEscKeydown, attach: reOptions.attach }
309
+ {
310
+ modalClass,
311
+ hasMask,
312
+ hideOnDeactivated,
313
+ closeOnEscKeydown,
314
+ attach: reOptions.attach,
315
+ onEscClose: handleClose
316
+ }
309
317
  );
310
318
  visibleDialogInstances.add(instance);
311
319
  aliveDialogInstances.add(instance);
@@ -313,7 +321,7 @@ function useModal() {
313
321
  if (hideOnDeactivated) hideOnDeactivatedModalClasses.add(modalClass);
314
322
  if (hasMask) {
315
323
  registerOverlayEsc(modalClass, {
316
- close: () => instance.destroy(),
324
+ close: handleClose,
317
325
  closeOnEscKeydown
318
326
  });
319
327
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "qidian-vue-ui",
3
- "version": "2.0.44",
3
+ "version": "2.0.46",
4
4
  "description": "基于 TDesign 的 QiDian Vue UI 组件库",
5
5
  "author": "qidian",
6
6
  "license": "MIT",