qidian-vue-ui 2.4.3 → 2.4.4

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-5b6139bb] {
1
+ .qd-crud-table[data-v-c856531a] {
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-5b6139bb] {
6
+ .qd-crud-table > .qd-crud-search:not(.qd-crud-search--hide) + .qd-crud-table__body[data-v-c856531a] {
7
7
  margin-top: var(--td-comp-margin-l);
8
8
  }
9
- .qd-crud-table__body[data-v-5b6139bb] > .t-loading__parent > .t-card__body {
9
+ .qd-crud-table__body[data-v-c856531a] > .t-loading__parent > .t-card__body {
10
10
  display: flex;
11
11
  flex-direction: column;
12
12
  }
13
- .qd-crud-table__body[data-v-5b6139bb] > .t-loading__parent > .t-card__body > .qd-service-table .t-table__pagination {
13
+ .qd-crud-table__body[data-v-c856531a] > .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-5b6139bb] {
16
+ .qd-crud-table--fit-parent-height[data-v-c856531a] {
17
17
  height: 100%;
18
18
  }
19
- .qd-crud-table--fit-parent-height > .qd-crud-table__body[data-v-5b6139bb] {
19
+ .qd-crud-table--fit-parent-height > .qd-crud-table__body[data-v-c856531a] {
20
20
  flex: auto;
21
21
  }
22
- .qd-crud-table--fit-parent-height > .qd-crud-table__body[data-v-5b6139bb] > .t-loading__parent > .t-card__body {
22
+ .qd-crud-table--fit-parent-height > .qd-crud-table__body[data-v-c856531a] > .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-5b6139bb] > .t-loading__parent > .t-card__body > .qd-service-table {
26
+ .qd-crud-table--fit-parent-height > .qd-crud-table__body[data-v-c856531a] > .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-5b6139bb] {
30
+ .qd-crud-table__toolbar[data-v-c856531a] {
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-5b6139bb] {
34
+ .qd-crud-table__toolbar--has-space-item + .qd-service-table[data-v-c856531a] {
35
35
  margin-top: var(--td-comp-margin-l);
36
36
  }
37
- .qd-crud-table__toolbar-separator[data-v-5b6139bb] {
37
+ .qd-crud-table__toolbar-separator[data-v-c856531a] {
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-5b6139bb"]]);
5
+ const QdCrudTable = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-c856531a"]]);
6
6
  export {
7
7
  QdCrudTable as default
8
8
  };
@@ -413,6 +413,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
413
413
  } = useVModels(props, emit, {
414
414
  passive: true
415
415
  });
416
+ const safeData = computed(() => data.value ?? []);
416
417
  const {
417
418
  t,
418
419
  size: globalComponentSize
@@ -964,7 +965,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
964
965
  if (getData) {
965
966
  return props.tree ? getData(item)?.row : getData(item);
966
967
  }
967
- return data.value.find((it) => get(it, rowKey) === item);
968
+ return safeData.value.find((it) => get(it, rowKey) === item);
968
969
  }).filter(Boolean);
969
970
  if (typeof checkChildren === "function") {
970
971
  let result = await checkChildren({
@@ -973,7 +974,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
973
974
  selectedRowKeys: selectedRowKeys.value,
974
975
  rowKey,
975
976
  childrenKey,
976
- tableData: data.value
977
+ tableData: safeData.value
977
978
  });
978
979
  if (typeof result === "boolean") {
979
980
  result = {
@@ -1,111 +1,111 @@
1
- .qd-service-table[data-v-474edf55] {
1
+ .qd-service-table[data-v-1787ac4b] {
2
2
  height: 100%;
3
3
  display: flex;
4
4
  flex-direction: column;
5
5
  }
6
- .qd-service-table[data-v-474edf55] > .t-table__content {
6
+ .qd-service-table[data-v-1787ac4b] > .t-table__content {
7
7
  flex: 1;
8
8
  }
9
- .qd-service-table--mini[data-v-474edf55] {
9
+ .qd-service-table--mini[data-v-1787ac4b] {
10
10
  font: var(--td-font-body-small);
11
11
  }
12
- .qd-service-table--mini[data-v-474edf55] th,
13
- .qd-service-table--mini[data-v-474edf55] tr:not(.t-table__expanded-row) > td {
12
+ .qd-service-table--mini[data-v-1787ac4b] th,
13
+ .qd-service-table--mini[data-v-1787ac4b] 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-474edf55] .t-table__row-full-element {
17
+ .qd-service-table--mini[data-v-1787ac4b] .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-474edf55] .t-table__empty {
20
+ .qd-service-table--hide-empty-image[data-v-1787ac4b] .t-table__empty {
21
21
  min-height: auto;
22
22
  }
23
- .qd-service-table--hide-empty-image[data-v-474edf55] .t-table__empty .t-empty {
23
+ .qd-service-table--hide-empty-image[data-v-1787ac4b] .t-table__empty .t-empty {
24
24
  padding: 0 !important;
25
25
  }
26
- .qd-service-table--hide-empty-image[data-v-474edf55] .t-table__empty .t-empty__image {
26
+ .qd-service-table--hide-empty-image[data-v-1787ac4b] .t-table__empty .t-empty__image {
27
27
  display: none;
28
28
  }
29
- .qd-service-table--hide-empty-image[data-v-474edf55] .t-table__empty .t-empty__title {
29
+ .qd-service-table--hide-empty-image[data-v-1787ac4b] .t-table__empty .t-empty__title {
30
30
  margin-top: 0;
31
31
  }
32
- .qd-service-table[data-v-474edf55] .t-table__tree-col,
33
- .qd-service-table[data-v-474edf55] .t-table__tree-leaf-node {
32
+ .qd-service-table[data-v-1787ac4b] .t-table__tree-col,
33
+ .qd-service-table[data-v-1787ac4b] .t-table__tree-leaf-node {
34
34
  padding-left: 0 !important;
35
35
  }
36
- .qd-service-table[data-v-474edf55] .t-table__tree-col:not(:has(.t-table__tree-op-icon)) {
36
+ .qd-service-table[data-v-1787ac4b] .t-table__tree-col:not(:has(.t-table__tree-op-icon)) {
37
37
  margin-left: calc(var(--td-font-size-body-large) + var(--td-tree-indent, 0px) * (var(--td-tree-level, 0) + 1));
38
38
  }
39
- .qd-service-table[data-v-474edf55] .t-table__tree-op-icon {
39
+ .qd-service-table[data-v-1787ac4b] .t-table__tree-op-icon {
40
40
  margin-right: calc(var(--td-tree-indent, 0px) * (var(--td-tree-level, 0) + 1));
41
41
  }
42
- .qd-service-table[data-v-474edf55] .t-table__tree-leaf-node .t-table__tree-op-icon:empty {
42
+ .qd-service-table[data-v-1787ac4b] .t-table__tree-leaf-node .t-table__tree-op-icon:empty {
43
43
  width: var(--td-font-size-body-large);
44
44
  margin-right: calc(var(--td-tree-indent, 0px) * (var(--td-tree-level, 0) + 1));
45
45
  }
46
- .qd-service-table[data-v-474edf55] .t-affix > .t-table__affixed-header-elm-wrap,
47
- .qd-service-table[data-v-474edf55] .t-affix > .t-table__scrollbar--obvious {
48
- transform: var(--v00b676fc);
46
+ .qd-service-table[data-v-1787ac4b] .t-affix > .t-table__affixed-header-elm-wrap,
47
+ .qd-service-table[data-v-1787ac4b] .t-affix > .t-table__scrollbar--obvious {
48
+ transform: var(--v1c05dfca);
49
49
  }
50
- .qd-service-table--horizontal-bar-static[data-v-474edf55] .t-table__scrollbar--obvious {
50
+ .qd-service-table--horizontal-bar-static[data-v-1787ac4b] .t-table__scrollbar--obvious {
51
51
  visibility: hidden;
52
52
  pointer-events: none;
53
53
  }
54
- .qd-service-table--horizontal-bar-static[data-v-474edf55] > div:has(> div > .t-table__scrollbar--obvious) {
54
+ .qd-service-table--horizontal-bar-static[data-v-1787ac4b] > div:has(> div > .t-table__scrollbar--obvious) {
55
55
  height: 0;
56
56
  margin-top: 0 !important;
57
57
  overflow: hidden;
58
58
  }
59
- .qd-service-table[data-v-474edf55] .t-table__expanded-row .qd-service-table--horizontal-bar-static > div:has(> div > .t-table__scrollbar--obvious) {
59
+ .qd-service-table[data-v-1787ac4b] .t-table__expanded-row .qd-service-table--horizontal-bar-static > div:has(> div > .t-table__scrollbar--obvious) {
60
60
  display: none;
61
61
  }
62
- .qd-service-table[data-v-474edf55] .t-table__expanded-row > td {
62
+ .qd-service-table[data-v-1787ac4b] .t-table__expanded-row > td {
63
63
  height: 0;
64
64
  }
65
- .qd-service-table[data-v-474edf55] .t-table__affixed-header-elm-wrap {
65
+ .qd-service-table[data-v-1787ac4b] .t-table__affixed-header-elm-wrap {
66
66
  height: auto !important;
67
67
  }
68
- .qd-service-table[data-v-474edf55] .t-table__affixed-header-elm {
68
+ .qd-service-table[data-v-1787ac4b] .t-table__affixed-header-elm {
69
69
  position: relative;
70
70
  scrollbar-width: none;
71
71
  }
72
- .qd-service-table[data-v-474edf55] .t-table__affixed-header-elm::-webkit-scrollbar {
72
+ .qd-service-table[data-v-1787ac4b] .t-table__affixed-header-elm::-webkit-scrollbar {
73
73
  display: none;
74
74
  width: 0;
75
75
  height: 0;
76
76
  }
77
- .qd-service-table[data-v-474edf55] .t-table__virtual-scroll-cursor + table {
77
+ .qd-service-table[data-v-1787ac4b] .t-table__virtual-scroll-cursor + table {
78
78
  border-collapse: separate;
79
79
  }
80
- .qd-service-table[data-v-474edf55] .t-table__expanded-row-inner,
81
- .qd-service-table[data-v-474edf55] .t-table__row-filter-inner {
80
+ .qd-service-table[data-v-1787ac4b] .t-table__expanded-row-inner,
81
+ .qd-service-table[data-v-1787ac4b] .t-table__row-filter-inner {
82
82
  display: block;
83
83
  position: sticky;
84
84
  left: 0;
85
- width: var(--v40489af1) !important;
85
+ width: var(--v6c443750) !important;
86
86
  }
87
- .qd-service-table[data-v-474edf55] .t-table__cell-wrap > .t-form__controls > .t-form__controls-content > *:not(.t-switch):not(.t-tag):not(.t-icon):not(.qd-file-icon) {
87
+ .qd-service-table[data-v-1787ac4b] .t-table__cell-wrap > .t-form__controls > .t-form__controls-content > *:not(.t-switch):not(.t-tag):not(.t-icon):not(.qd-file-icon) {
88
88
  width: 100%;
89
89
  }
90
- .qd-service-table[data-v-474edf55] .qd-service-table__non-editable-col {
90
+ .qd-service-table[data-v-1787ac4b] .qd-service-table__non-editable-col {
91
91
  background-color: color-mix(in srgb, var(--td-bg-color-component) 50%, transparent);
92
92
  }
93
- .qd-service-table[data-v-474edf55] td.qd-service-table__selected-cell {
93
+ .qd-service-table[data-v-1787ac4b] td.qd-service-table__selected-cell {
94
94
  box-shadow: inset 0 1px 0 0 var(--qst-sel-t, transparent), inset 0 -1px 0 0 var(--qst-sel-b, transparent), inset 1px 0 0 0 var(--qst-sel-l, transparent), inset -1px 0 0 0 var(--qst-sel-r, transparent);
95
95
  }
96
- .qd-service-table[data-v-474edf55] .qd-service-table__selected-bt {
96
+ .qd-service-table[data-v-1787ac4b] .qd-service-table__selected-bt {
97
97
  --qst-sel-t: var(--td-brand-color);
98
98
  }
99
- .qd-service-table[data-v-474edf55] .qd-service-table__selected-bb {
99
+ .qd-service-table[data-v-1787ac4b] .qd-service-table__selected-bb {
100
100
  --qst-sel-b: var(--td-brand-color);
101
101
  }
102
- .qd-service-table[data-v-474edf55] .qd-service-table__selected-bl {
102
+ .qd-service-table[data-v-1787ac4b] .qd-service-table__selected-bl {
103
103
  --qst-sel-l: var(--td-brand-color);
104
104
  }
105
- .qd-service-table[data-v-474edf55] .qd-service-table__selected-br {
105
+ .qd-service-table[data-v-1787ac4b] .qd-service-table__selected-br {
106
106
  --qst-sel-r: var(--td-brand-color);
107
107
  }
108
- .qd-service-table[data-v-474edf55] td.qd-service-table__copied-cell {
108
+ .qd-service-table[data-v-1787ac4b] td.qd-service-table__copied-cell {
109
109
  background-image: var(--qst-copy-t, none), var(--qst-copy-b, none), var(--qst-copy-l, none), var(--qst-copy-r, none);
110
110
  background-size: 8px 1px,
111
111
  8px 1px,
@@ -116,134 +116,134 @@
116
116
  0 0,
117
117
  100% 0;
118
118
  background-repeat: repeat-x, repeat-x, repeat-y, repeat-y;
119
- animation: qst-cell-ants-474edf55 0.5s linear infinite;
119
+ animation: qst-cell-ants-1787ac4b 0.5s linear infinite;
120
120
  }
121
- .qd-service-table[data-v-474edf55] td.qd-service-table__copied-cell.qd-service-table__selected-cell {
121
+ .qd-service-table[data-v-1787ac4b] td.qd-service-table__copied-cell.qd-service-table__selected-cell {
122
122
  background-size: 8px 2px,
123
123
  8px 2px,
124
124
  2px 8px,
125
125
  2px 8px;
126
126
  }
127
- .qd-service-table[data-v-474edf55] .qd-service-table__copied-bt {
127
+ .qd-service-table[data-v-1787ac4b] .qd-service-table__copied-bt {
128
128
  --qst-copy-t: linear-gradient(90deg, var(--td-brand-color-hover) 50%, transparent 0);
129
129
  }
130
- .qd-service-table[data-v-474edf55] .qd-service-table__copied-bb {
130
+ .qd-service-table[data-v-1787ac4b] .qd-service-table__copied-bb {
131
131
  --qst-copy-b: linear-gradient(90deg, var(--td-brand-color-hover) 50%, transparent 0);
132
132
  }
133
- .qd-service-table[data-v-474edf55] .qd-service-table__copied-bl {
133
+ .qd-service-table[data-v-1787ac4b] .qd-service-table__copied-bl {
134
134
  --qst-copy-l: linear-gradient(0deg, var(--td-brand-color-hover) 50%, transparent 0);
135
135
  }
136
- .qd-service-table[data-v-474edf55] .qd-service-table__copied-br {
136
+ .qd-service-table[data-v-1787ac4b] .qd-service-table__copied-br {
137
137
  --qst-copy-r: linear-gradient(0deg, var(--td-brand-color-hover) 50%, transparent 0);
138
138
  }
139
- .qd-service-table[data-v-474edf55] tbody > tr.t-table__row--active {
139
+ .qd-service-table[data-v-1787ac4b] tbody > tr.t-table__row--active {
140
140
  background-color: var(--td-brand-color-light);
141
141
  }
142
- .qd-service-table[data-v-474edf55] tbody > tr.t-table__row--active.t-table__row--hover,
143
- .qd-service-table[data-v-474edf55] tbody > tr.t-table__row--active:hover {
142
+ .qd-service-table[data-v-1787ac4b] tbody > tr.t-table__row--active.t-table__row--hover,
143
+ .qd-service-table[data-v-1787ac4b] tbody > tr.t-table__row--active:hover {
144
144
  background-color: var(--td-brand-color-light-hover);
145
145
  }
146
- .qd-service-table[data-v-474edf55] .qd-service-table__non-editable-col:not(.qd-service-table__copied-cell):is(
146
+ .qd-service-table[data-v-1787ac4b] .qd-service-table__non-editable-col:not(.qd-service-table__copied-cell):is(
147
147
  .t-table__cell--fixed-left,
148
148
  .t-table__cell--fixed-right
149
149
  ) {
150
150
  background-color: inherit;
151
151
  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));
152
152
  }
153
- .qd-service-table--disable-horizontal-scroll[data-v-474edf55] colgroup > col {
153
+ .qd-service-table--disable-horizontal-scroll[data-v-1787ac4b] colgroup > col {
154
154
  width: auto !important;
155
155
  }
156
- .qd-service-table--cell-drag-selecting[data-v-474edf55] {
156
+ .qd-service-table--cell-drag-selecting[data-v-1787ac4b] {
157
157
  cursor: crosshair;
158
158
  }
159
- .qd-service-table--cell-drag-selecting[data-v-474edf55] td {
159
+ .qd-service-table--cell-drag-selecting[data-v-1787ac4b] td {
160
160
  cursor: crosshair;
161
161
  }
162
- .qd-service-table[data-v-474edf55] .t-table__filter-pop-content-inner {
162
+ .qd-service-table[data-v-1787ac4b] .t-table__filter-pop-content-inner {
163
163
  padding: var(--td-comp-paddingTB-s) var(--td-comp-paddingLR-s) 0;
164
164
  }
165
- .qd-service-table[data-v-474edf55] .t-table__filter-pop-content-inner:has(.qd-service-table-filter-item) {
165
+ .qd-service-table[data-v-1787ac4b] .t-table__filter-pop-content-inner:has(.qd-service-table-filter-item) {
166
166
  padding: 0;
167
167
  }
168
- .qd-service-table[data-v-474edf55] .t-table__filter-pop-content-inner:has(
168
+ .qd-service-table[data-v-1787ac4b] .t-table__filter-pop-content-inner:has(
169
169
  .qd-service-table-filter-input,
170
170
  .qd-service-table-filter-custom
171
171
  ) {
172
172
  padding-bottom: var(--td-comp-paddingTB-s);
173
173
  }
174
- .qd-service-table[data-v-474edf55] .t-table__filter--bottom-buttons {
174
+ .qd-service-table[data-v-1787ac4b] .t-table__filter--bottom-buttons {
175
175
  padding: var(--td-comp-paddingTB-s) var(--td-comp-paddingLR-s);
176
176
  }
177
- .qd-service-table--mini[data-v-474edf55] .t-table__filter-pop-content-inner {
177
+ .qd-service-table--mini[data-v-1787ac4b] .t-table__filter-pop-content-inner {
178
178
  padding: var(--td-comp-paddingTB-xs) var(--td-comp-paddingLR-xs) 0;
179
179
  }
180
- .qd-service-table--mini[data-v-474edf55] .t-table__filter--bottom-buttons {
180
+ .qd-service-table--mini[data-v-1787ac4b] .t-table__filter--bottom-buttons {
181
181
  padding: var(--td-comp-paddingTB-xs) var(--td-comp-paddingLR-xs);
182
182
  }
183
- .qd-service-table--mini[data-v-474edf55] .t-table__filter-pop-content-inner:has(.qd-service-table-filter-item) {
183
+ .qd-service-table--mini[data-v-1787ac4b] .t-table__filter-pop-content-inner:has(.qd-service-table-filter-item) {
184
184
  padding: 0;
185
185
  }
186
- .qd-service-table--mini[data-v-474edf55] .t-table__filter-pop-content-inner:has(
186
+ .qd-service-table--mini[data-v-1787ac4b] .t-table__filter-pop-content-inner:has(
187
187
  .qd-service-table-filter-input,
188
188
  .qd-service-table-filter-custom
189
189
  ) {
190
190
  padding-bottom: var(--td-comp-paddingTB-xs);
191
191
  }
192
- .qd-service-table[data-v-474edf55] .qd-service-table-filter-item {
192
+ .qd-service-table[data-v-1787ac4b] .qd-service-table-filter-item {
193
193
  width: 266px;
194
194
  }
195
- .qd-service-table[data-v-474edf55] .qd-service-table-filter-item__search,
196
- .qd-service-table[data-v-474edf55] .qd-service-table-filter-item__all,
197
- .qd-service-table[data-v-474edf55] .qd-service-table-filter-item__options {
195
+ .qd-service-table[data-v-1787ac4b] .qd-service-table-filter-item__search,
196
+ .qd-service-table[data-v-1787ac4b] .qd-service-table-filter-item__all,
197
+ .qd-service-table[data-v-1787ac4b] .qd-service-table-filter-item__options {
198
198
  padding: var(--td-comp-paddingTB-s) var(--td-comp-paddingLR-s) 0;
199
199
  }
200
- .qd-service-table[data-v-474edf55] .qd-service-table-filter-item__all {
200
+ .qd-service-table[data-v-1787ac4b] .qd-service-table-filter-item__all {
201
201
  display: flex;
202
202
  align-items: center;
203
203
  padding: 0 var(--td-comp-paddingLR-s);
204
204
  border-bottom: 1px solid var(--td-component-stroke);
205
205
  }
206
- .qd-service-table[data-v-474edf55] .qd-service-table-filter-item__options {
206
+ .qd-service-table[data-v-1787ac4b] .qd-service-table-filter-item__options {
207
207
  display: flex;
208
208
  flex-direction: column;
209
209
  height: 206px;
210
210
  padding: 0 var(--td-comp-paddingLR-s);
211
211
  overflow-y: auto;
212
212
  }
213
- .qd-service-table[data-v-474edf55] .qd-service-table-filter-item__count {
213
+ .qd-service-table[data-v-1787ac4b] .qd-service-table-filter-item__count {
214
214
  margin-left: var(--td-comp-margin-xs);
215
215
  color: var(--td-text-color-placeholder);
216
216
  }
217
- .qd-service-table[data-v-474edf55] .qd-service-table-filter-item__cell {
217
+ .qd-service-table[data-v-1787ac4b] .qd-service-table-filter-item__cell {
218
218
  pointer-events: none;
219
219
  }
220
- .qd-service-table[data-v-474edf55] .qd-service-table-filter-item .t-checkbox,
221
- .qd-service-table[data-v-474edf55] .qd-service-table-filter-item .t-radio {
220
+ .qd-service-table[data-v-1787ac4b] .qd-service-table-filter-item .t-checkbox,
221
+ .qd-service-table[data-v-1787ac4b] .qd-service-table-filter-item .t-radio {
222
222
  display: flex;
223
223
  align-items: center;
224
224
  }
225
- .qd-service-table[data-v-474edf55] .qd-service-table-filter-item .t-checkbox__label,
226
- .qd-service-table[data-v-474edf55] .qd-service-table-filter-item .t-radio__label {
225
+ .qd-service-table[data-v-1787ac4b] .qd-service-table-filter-item .t-checkbox__label,
226
+ .qd-service-table[data-v-1787ac4b] .qd-service-table-filter-item .t-radio__label {
227
227
  display: inline-flex;
228
228
  flex: 1 1 0;
229
229
  align-items: center;
230
230
  min-width: 0;
231
231
  overflow: hidden;
232
232
  }
233
- .qd-service-table--mini[data-v-474edf55] .qd-service-table-filter-item__search {
233
+ .qd-service-table--mini[data-v-1787ac4b] .qd-service-table-filter-item__search {
234
234
  padding: var(--td-comp-paddingTB-xs) var(--td-comp-paddingLR-xs) 0;
235
235
  }
236
- .qd-service-table--mini[data-v-474edf55] .qd-service-table-filter-item__all,
237
- .qd-service-table--mini[data-v-474edf55] .qd-service-table-filter-item__options {
236
+ .qd-service-table--mini[data-v-1787ac4b] .qd-service-table-filter-item__all,
237
+ .qd-service-table--mini[data-v-1787ac4b] .qd-service-table-filter-item__options {
238
238
  padding: 0 var(--td-comp-paddingLR-xs);
239
239
  }
240
- @keyframes qst-cell-ants-474edf55 {
240
+ @keyframes qst-cell-ants-1787ac4b {
241
241
  to {
242
242
  background-position: 8px 0, -8px 100%, 0 -8px, 100% 8px;
243
243
  }
244
244
  }
245
245
  @media (prefers-reduced-motion: reduce) {
246
- [data-v-474edf55] td.qd-service-table__copied-cell {
246
+ [data-v-1787ac4b] td.qd-service-table__copied-cell {
247
247
  animation: none;
248
248
  }
249
249
  }
@@ -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-474edf55"]]);
5
+ const QdServiceTable = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-1787ac4b"]]);
6
6
  export {
7
7
  QdServiceTable as default
8
8
  };
@@ -364,8 +364,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
364
364
  emit: __emit
365
365
  }) {
366
366
  useCssVars((_ctx) => ({
367
- "v00b676fc": affixedHeaderTransform.value,
368
- "v40489af1": expandedRowWidth.value
367
+ "v1c05dfca": affixedHeaderTransform.value,
368
+ "v6c443750": expandedRowWidth.value
369
369
  }));
370
370
  const props = __props;
371
371
  const emit = __emit;
@@ -383,6 +383,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
383
383
  } = useVModels(props, emit, {
384
384
  passive: true
385
385
  });
386
+ const safeData = computed(() => data.value ?? []);
386
387
  const innerSort = ref(getDefaultSort());
387
388
  const reSort = computed({
388
389
  get: () => sort.value ?? innerSort.value,
@@ -493,7 +494,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
493
494
  return prototype === Object.prototype || prototype === null;
494
495
  }
495
496
  function getExpandedRowProxy(row) {
496
- const sourceRow = data.value.find((item) => getRowValue(item) === getRowValue(row)) ?? row;
497
+ const sourceRow = safeData.value.find((item) => getRowValue(item) === getRowValue(row)) ?? row;
497
498
  const cached = expandedRowProxyMap.get(sourceRow);
498
499
  if (cached) return cached;
499
500
  const proxies = /* @__PURE__ */ new WeakMap();
@@ -611,7 +612,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
611
612
  return result;
612
613
  });
613
614
  const displayData = computed(() => {
614
- const rows = data.value ?? [];
615
+ const rows = safeData.value;
615
616
  if (props.onFilterChange) return rows;
616
617
  if (props.service && props.pagination !== false) return rows;
617
618
  const activeFilters = getActiveFilterEntries();
@@ -1368,7 +1369,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
1368
1369
  }
1369
1370
  function replaceTableValidationErrors(result) {
1370
1371
  const nextErrors = /* @__PURE__ */ new Map();
1371
- for (const row of data.value) {
1372
+ for (const row of safeData.value) {
1372
1373
  const rowValue = getRowValue(row);
1373
1374
  const rowErrors = /* @__PURE__ */ new Map();
1374
1375
  for (const {
@@ -1440,7 +1441,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
1440
1441
  return selectedCells.value.some((item) => getRowValue(item.row) === getRowValue(row) && item.colKey === colKey);
1441
1442
  }
1442
1443
  function isSelectedCellAt(rowIndex, colIndex) {
1443
- const row = data.value[rowIndex];
1444
+ const row = safeData.value[rowIndex];
1444
1445
  const column = leafColumns.value[colIndex];
1445
1446
  if (!row || !column) return false;
1446
1447
  return isSelectedCell(row, column.colKey);
@@ -1449,7 +1450,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
1449
1450
  return copiedCells.value.some((item) => getRowValue(item.row) === getRowValue(row) && item.colKey === colKey);
1450
1451
  }
1451
1452
  function isCopiedCellAt(rowIndex, colIndex) {
1452
- const row = data.value[rowIndex];
1453
+ const row = safeData.value[rowIndex];
1453
1454
  const column = leafColumns.value[colIndex];
1454
1455
  if (!row || !column) return false;
1455
1456
  return isCopiedCell(row, column.colKey);
@@ -1462,7 +1463,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
1462
1463
  const columns = leafColumns.value;
1463
1464
  const fromCol = columns.findIndex((col) => col.colKey === anchor.colKey);
1464
1465
  const toCol = columns.findIndex((col) => col.colKey === target.colKey);
1465
- const rows = data.value;
1466
+ const rows = safeData.value;
1466
1467
  const fromRow = rows.findIndex((row) => getRowValue(row) === getRowValue(anchor.row));
1467
1468
  const toRow = rows.findIndex((row) => getRowValue(row) === getRowValue(target.row));
1468
1469
  if (fromCol < 0 || toCol < 0 || fromRow < 0 || toRow < 0) return [target];
@@ -1494,8 +1495,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
1494
1495
  if (seen.has(rowValue)) continue;
1495
1496
  seen.add(rowValue);
1496
1497
  rowKeys.push(rowValue);
1497
- const rowIndex = data.value.findIndex((row) => getRowValue(row) === rowValue);
1498
- if (!isRowSelectDisabled(rowIndex >= 0 ? data.value[rowIndex] : item.row, rowIndex)) {
1498
+ const rowIndex = safeData.value.findIndex((row) => getRowValue(row) === rowValue);
1499
+ if (!isRowSelectDisabled(rowIndex >= 0 ? safeData.value[rowIndex] : item.row, rowIndex)) {
1499
1500
  checkableRowKeys.push(rowValue);
1500
1501
  }
1501
1502
  }
@@ -1520,7 +1521,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
1520
1521
  function emitRowSelectChange(clickedRow, type) {
1521
1522
  if (!rowClickSelectsRows.value) return;
1522
1523
  const rowKeys = [...selectedRowKeys.value];
1523
- const selectedRowData = rowKeys.map((key) => data.value.find((row) => getRowValue(row) === key)).filter((row) => !!row);
1524
+ const selectedRowData = rowKeys.map((key) => safeData.value.find((row) => getRowValue(row) === key)).filter((row) => !!row);
1524
1525
  props.onSelectChange?.(rowKeys, {
1525
1526
  selectedRowData,
1526
1527
  currentRowKey: String(getRowValue(clickedRow)),
@@ -1550,8 +1551,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
1550
1551
  const nextKeys = new Set(selectedRowKeys.value);
1551
1552
  for (const rowValue of nextRows) {
1552
1553
  if (prevRows.has(rowValue)) continue;
1553
- const rowIndex = data.value.findIndex((row) => getRowValue(row) === rowValue);
1554
- if (rowIndex >= 0 && !isRowSelectDisabled(data.value[rowIndex], rowIndex)) {
1554
+ const rowIndex = safeData.value.findIndex((row) => getRowValue(row) === rowValue);
1555
+ if (rowIndex >= 0 && !isRowSelectDisabled(safeData.value[rowIndex], rowIndex)) {
1555
1556
  nextKeys.add(rowValue);
1556
1557
  }
1557
1558
  }
@@ -1595,7 +1596,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
1595
1596
  const columns = leafColumns.value;
1596
1597
  const fromCol = columns.findIndex((col) => col.colKey === anchor.colKey);
1597
1598
  const toCol = columns.findIndex((col) => col.colKey === target.colKey);
1598
- const rows = data.value;
1599
+ const rows = safeData.value;
1599
1600
  const fromRow = rows.findIndex((row) => getRowValue(row) === getRowValue(anchor.row));
1600
1601
  const toRow = rows.findIndex((row) => getRowValue(row) === getRowValue(target.row));
1601
1602
  if (fromCol < 0 || toCol < 0 || fromRow < 0 || toRow < 0) return null;
@@ -1618,7 +1619,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
1618
1619
  if (dragCellCache.has(td)) return dragCellCache.get(td) ?? null;
1619
1620
  const rowKey = td.dataset.qdRowKey;
1620
1621
  const column = leafColumns.value.find((col) => String(col.colKey) === td.dataset.qdColKey);
1621
- const row = data.value.find((item) => rowKey !== void 0 && String(getRowValue(item)) === rowKey);
1622
+ const row = safeData.value.find((item) => rowKey !== void 0 && String(getRowValue(item)) === rowKey);
1622
1623
  if (!row || !column || !isCellSelectableColumn(column)) return null;
1623
1624
  const cell = {
1624
1625
  row,
@@ -1786,7 +1787,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
1786
1787
  for (const cell of resolveSelectedCells()) {
1787
1788
  if (!cell.colKey) continue;
1788
1789
  const colIdx = columns.findIndex((col) => col.colKey === cell.colKey);
1789
- const rowIdx = data.value.findIndex((row) => getRowValue(row) === getRowValue(cell.row));
1790
+ const rowIdx = safeData.value.findIndex((row) => getRowValue(row) === getRowValue(cell.row));
1790
1791
  if (colIdx < 0 || rowIdx < 0) continue;
1791
1792
  positions.push({
1792
1793
  rowIdx,
@@ -1795,7 +1796,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
1795
1796
  }
1796
1797
  if (!positions.length) return null;
1797
1798
  positions.sort((first, second) => first.rowIdx - second.rowIdx || first.colIdx - second.colIdx);
1798
- const rows = data.value;
1799
+ const rows = safeData.value;
1799
1800
  const rowStart = positions[0].rowIdx;
1800
1801
  const rowEnd = positions.at(-1).rowIdx;
1801
1802
  const colStart = Math.min(...positions.map((item) => item.colIdx));
@@ -1964,7 +1965,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
1964
1965
  skipped: 0
1965
1966
  };
1966
1967
  const columns = leafColumns.value;
1967
- const rows = data.value;
1968
+ const rows = safeData.value;
1968
1969
  const anchors = anchorCells.map((cell) => ({
1969
1970
  rowIdx: rows.findIndex((row) => getRowValue(row) === getRowValue(cell.row)),
1970
1971
  colIdx: columns.findIndex((col) => col.colKey === cell.colKey)
@@ -2286,7 +2287,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
2286
2287
  }
2287
2288
  function resolveValidationResults(result) {
2288
2289
  const results = [];
2289
- for (const [rowIndex, row] of data.value.entries()) {
2290
+ for (const [rowIndex, row] of safeData.value.entries()) {
2290
2291
  for (const {
2291
2292
  column,
2292
2293
  colIndex
@@ -2477,16 +2478,16 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
2477
2478
  }
2478
2479
  }
2479
2480
  async function validateTableViaOffscreenForm() {
2480
- return validateRowsViaOffscreenRules(data.value);
2481
+ return validateRowsViaOffscreenRules(safeData.value);
2481
2482
  }
2482
2483
  async function validateSingleRowViaOffscreenForm(rowValue) {
2483
- const row = data.value.find((item) => getRowValue(item) === rowValue);
2484
+ const row = safeData.value.find((item) => getRowValue(item) === rowValue);
2484
2485
  if (!row) return [];
2485
2486
  const result = await validateRowsViaOffscreenRules([row]);
2486
2487
  return resolveValidationResults(result);
2487
2488
  }
2488
2489
  async function submitTableViaOffscreenForm(params, showErrorMessage) {
2489
- const queueResult = await runOffscreenBeforeSubmit(data.value);
2490
+ const queueResult = await runOffscreenBeforeSubmit(safeData.value);
2490
2491
  if (!queueResult.success) {
2491
2492
  if (showErrorMessage && queueResult.message) msgError(queueResult.message);
2492
2493
  return {
@@ -2495,10 +2496,10 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
2495
2496
  validateResult: false,
2496
2497
  firstError: queueResult.message,
2497
2498
  showErrorMessage,
2498
- tableData: easyCopy(data.value)
2499
+ tableData: easyCopy(safeData.value)
2499
2500
  };
2500
2501
  }
2501
- const result = await validateRowsViaOffscreenRules(data.value);
2502
+ const result = await validateRowsViaOffscreenRules(safeData.value);
2502
2503
  const cellResults = resolveValidationResults(result);
2503
2504
  if (cellResults.length) await showFirstValidationError(cellResults, {
2504
2505
  ...params,
@@ -2510,7 +2511,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
2510
2511
  validateResult: !cellResults.length,
2511
2512
  firstError: getFirstValidationError(cellResults),
2512
2513
  showErrorMessage,
2513
- tableData: easyCopy(data.value)
2514
+ tableData: easyCopy(safeData.value)
2514
2515
  };
2515
2516
  }
2516
2517
  async function submitSingleRowViaOffscreenForm(row, params, showErrorMessage) {
@@ -2634,7 +2635,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
2634
2635
  validateResult: false,
2635
2636
  firstError: queueResult.message,
2636
2637
  showErrorMessage,
2637
- tableData: easyCopy(data.value)
2638
+ tableData: easyCopy(safeData.value)
2638
2639
  };
2639
2640
  }
2640
2641
  const validateContext = await validateTableData({
@@ -2644,12 +2645,12 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
2644
2645
  return {
2645
2646
  ...validateContext,
2646
2647
  showErrorMessage,
2647
- tableData: easyCopy(data.value)
2648
+ tableData: easyCopy(safeData.value)
2648
2649
  };
2649
2650
  }
2650
2651
  async function submitRowData(rowValue, params) {
2651
2652
  const showErrorMessage = params?.showErrorMessage ?? true;
2652
- const row = data.value.find((item) => getRowValue(item) === rowValue);
2653
+ const row = safeData.value.find((item) => getRowValue(item) === rowValue);
2653
2654
  if (isVirtualScroll.value) {
2654
2655
  return serializeOffscreen(() => submitSingleRowViaOffscreenForm(row, params, showErrorMessage));
2655
2656
  }
@@ -2705,7 +2706,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
2705
2706
  const firstRows = /* @__PURE__ */ new Map();
2706
2707
  let blankCount = 0;
2707
2708
  const colKey = column.colKey;
2708
- data.value.forEach((row, rowIndex) => {
2709
+ safeData.value.forEach((row, rowIndex) => {
2709
2710
  const value = colKey ? get(row, colKey) : void 0;
2710
2711
  if (isEmpty(value)) {
2711
2712
  blankCount += 1;
@@ -2893,7 +2894,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
2893
2894
  const selectedCellClass = (context) => {
2894
2895
  if (context.type !== "td" || !reCellSelectable.value) return "";
2895
2896
  if (!isSelectedCell(context.row, column.colKey)) return "";
2896
- const rowIndex = data.value.findIndex((item) => getRowValue(item) === getRowValue(context.row));
2897
+ const rowIndex = safeData.value.findIndex((item) => getRowValue(item) === getRowValue(context.row));
2897
2898
  const colIndex = leafColumns.value.findIndex((col) => col.colKey === column.colKey);
2898
2899
  const classes = ["qd-service-table__selected-cell"];
2899
2900
  if (!isSelectedCellAt(rowIndex - 1, colIndex)) classes.push("qd-service-table__selected-bt");
@@ -2904,7 +2905,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
2904
2905
  };
2905
2906
  const copiedCellClass = (context) => {
2906
2907
  if (context.type !== "td" || !isCopiedCell(context.row, column.colKey)) return "";
2907
- const rowIndex = data.value.findIndex((item) => getRowValue(item) === getRowValue(context.row));
2908
+ const rowIndex = safeData.value.findIndex((item) => getRowValue(item) === getRowValue(context.row));
2908
2909
  const colIndex = leafColumns.value.findIndex((col) => col.colKey === column.colKey);
2909
2910
  const classes = ["qd-service-table__copied-cell"];
2910
2911
  if (!isCopiedCellAt(rowIndex - 1, colIndex)) classes.push("qd-service-table__copied-bt");
@@ -2993,7 +2994,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
2993
2994
  colKey: String(colKey),
2994
2995
  formItem,
2995
2996
  label: column.title,
2996
- sourceRow: props.data?.find((item) => getRowValue(item) === rowValue) ?? data.value.find((item) => getRowValue(item) === rowValue) ?? row,
2997
+ sourceRow: props.data?.find((item) => getRowValue(item) === rowValue) ?? safeData.value.find((item) => getRowValue(item) === rowValue) ?? row,
2997
2998
  updateEditedCellValue: context.updateEditedCellValue,
2998
2999
  notifyDataChange,
2999
3000
  getHorizontalScroll: () => getCurrentTableContentEl()?.scrollLeft,
@@ -3402,7 +3403,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
3402
3403
  submitRowData,
3403
3404
  getData: (key) => {
3404
3405
  if (props.tree) return tableRef.value?.getData(key);
3405
- return data.value.find((item) => get(item, props.rowKey || qdServiceTableProps.rowKey) === key);
3406
+ return safeData.value.find((item) => get(item, props.rowKey || qdServiceTableProps.rowKey) === key);
3406
3407
  },
3407
3408
  scrollToElement: (params) => {
3408
3409
  const opts = params ?? {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "qidian-vue-ui",
3
- "version": "2.4.3",
3
+ "version": "2.4.4",
4
4
  "description": "基于 TDesign 的 QiDian Vue UI 组件库",
5
5
  "author": "qidian",
6
6
  "license": "MIT",