@ctzy-web-client/plugin-component-vue 1.0.45 → 1.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.
@@ -0,0 +1 @@
1
+ .bwa-datatable[data-v-75958349]{display:flex;flex-direction:column;height:100%;min-height:0;width:100%}.bwa-datatable .content[data-v-75958349]{display:flex;flex:1;flex-direction:column;width:100%}.bwa-datatable [data-v-75958349] .el-table{width:100%!important}.bwa-datatable [data-v-75958349] .el-table,.bwa-datatable [data-v-75958349] .el-table__inner-wrapper{display:flex!important;flex:1!important;flex-direction:column!important}.bwa-datatable [data-v-75958349] .el-table__body-wrapper{flex:1!important;overflow:auto!important}.bwa-datatable .bwa-datatable__pagination[data-v-75958349]{align-items:center;display:flex;justify-content:space-between}.letter-circle[data-v-9ba46efc]{font-size:14px;height:24px;margin-right:8px;width:24px}.letter-circle[data-v-9ba46efc],.letter-circle[data-v-cb2d8ca5]{align-items:center;border-radius:50%;color:#fff;display:flex;justify-content:center}.letter-circle[data-v-cb2d8ca5]{flex-shrink:0;font-size:12px;height:22px;width:22px}.option-container[data-v-cb2d8ca5]{align-items:center;display:flex;width:100%}.option-text[data-v-cb2d8ca5]{flex:1;margin-left:8px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.pct-select-ellipsis .el-select-dropdown__item{box-sizing:border-box!important;overflow:hidden!important;text-overflow:ellipsis!important;white-space:nowrap!important;width:100%!important}
@@ -1,4 +1,4 @@
1
- import { defineComponent, useAttrs, ref, computed, unref, watch, provide, reactive, nextTick, onUnmounted, openBlock, createElementBlock, normalizeClass, normalizeStyle, renderSlot, createVNode, mergeProps, withCtx, createBlock, createElementVNode, createCommentVNode, Fragment, renderList, createTextVNode, toDisplayString } from 'vue';
1
+ import { defineComponent, useAttrs, ref, computed, unref, watch, provide, reactive, nextTick, onUnmounted, openBlock, createElementBlock, Fragment, createCommentVNode, createElementVNode, normalizeClass, renderSlot, createVNode, mergeProps, withCtx, createBlock, renderList, createTextVNode, toDisplayString, normalizeStyle } from 'vue';
2
2
  import { ElMessage, ElTable, ElTableColumn, ElPagination } from 'element-plus';
3
3
  import { useService, useGlobalConfig, dataTableKey, useNamespace, useEventDispatcher } from '@ctzy-web-client/web-base-client-vue';
4
4
  import DynamicComponent from './dynamic-component.mjs';
@@ -6,6 +6,7 @@ import DataTableColumn from './data-table-column.mjs';
6
6
  import { useDataTableDrag } from './use-datatable-drag.mjs';
7
7
  import { get } from 'lodash';
8
8
  import { Subject, debounceTime, Observable, filter, map, delayWhen, from, skipWhile } from 'rxjs';
9
+ import './data-table.vue_vue_type_style_index_0_scoped_75958349_lang.mjs';
9
10
  import _export_sfc from '../_virtual/_plugin-vue_export-helper.mjs';
10
11
 
11
12
  // Inject __name helper
@@ -20,54 +21,19 @@ if (typeof __name === 'undefined') {
20
21
  const __default__ = defineComponent({ name: "BwaDataTable" });
21
22
  const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
22
23
  props: {
23
- dataTable: {
24
- type: Object,
25
- required: true
26
- },
27
- autoLoad: {
28
- type: Boolean,
29
- default: true
30
- },
31
- height: {
32
- type: [String, Number],
33
- default: "auto"
34
- },
35
- showIndex: {
36
- type: Boolean,
37
- default: false
38
- },
39
- indexColumnLabel: {
40
- type: String,
41
- default: "\u7F16\u53F7"
42
- },
43
- selection: {
44
- type: Boolean,
45
- default: false
46
- },
47
- paginationLayout: {
48
- type: String,
49
- default: "sizes, prev, pager, next, jumper"
50
- },
51
- paginationPageSizes: {
52
- type: Array,
53
- default: () => [10, 20, 50, 100, 200]
54
- },
55
- showPagination: {
56
- type: Boolean,
57
- default: true
58
- },
59
- whereParamName: {
60
- type: String,
61
- default: ""
62
- },
63
- showDrag: {
64
- type: Boolean,
65
- default: false
66
- },
67
- border: {
68
- type: Boolean,
69
- default: true
70
- }
24
+ dataTable: { type: Object, required: true },
25
+ autoLoad: { type: Boolean, default: true },
26
+ height: { type: [String, Number], default: "auto" },
27
+ showIndex: { type: Boolean, default: false },
28
+ indexColumnLabel: { type: String, default: "\u7F16\u53F7" },
29
+ selection: { type: Boolean, default: false },
30
+ fixedSelection: { type: [Boolean, String], default: false },
31
+ paginationLayout: { type: String, default: "sizes, prev, pager, next, jumper" },
32
+ paginationPageSizes: { type: Array, default: () => [10, 20, 50, 100, 200] },
33
+ showPagination: { type: Boolean, default: true },
34
+ whereParamName: { type: String, default: "" },
35
+ showDrag: { type: Boolean, default: false },
36
+ border: { type: Boolean, default: true }
71
37
  },
72
38
  emits: ["drag", "headerWidthChange"],
73
39
  setup(__props, { emit: __emit }) {
@@ -80,177 +46,101 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
80
46
  const dataTable = props.dataTable;
81
47
  dataTable._userService = (_a = userService.value) == null ? void 0 : _a.getUserList;
82
48
  const dataTableEl = ref(null);
83
- const realHeight = computed(() => props.height);
84
- const displayColumns = computed(
85
- () => unref(dataTable).getDisplayColumns() || []
86
- );
87
- watch(
88
- computed(() => props.whereParamName),
89
- (whereParamName) => {
90
- dataTable.setWhereParamName(whereParamName || "");
91
- },
92
- { immediate: true, flush: "sync" }
93
- );
49
+ const displayColumns = computed(() => unref(dataTable).getDisplayColumns() || []);
50
+ watch(computed(() => props.whereParamName), (whereParamName) => {
51
+ dataTable.setWhereParamName(whereParamName || "");
52
+ }, { immediate: true, flush: "sync" });
94
53
  const searchParams = computed(() => props.searchParams);
95
54
  const emit = __emit;
96
55
  const debounceDelay = useGlobalConfig("debounceDelay", 500);
97
- provide(
98
- dataTableKey,
99
- reactive({
100
- dataTable,
101
- displayColumns
102
- })
103
- );
56
+ provide(dataTableKey, reactive({ dataTable, displayColumns }));
104
57
  const ns = useNamespace("datatable");
105
- const { barRectangle } = useDataTableDrag(
106
- dataTableEl,
107
- ".bwa-datatable__drag",
108
- ".el-table__row",
109
- { emit }
110
- );
58
+ const { barRectangle } = useDataTableDrag(dataTableEl, ".bwa-datatable__drag", ".el-table__row", { emit });
111
59
  const processing = ref(false);
112
- const data = computed(() => {
113
- return props.dataTable.data;
114
- });
60
+ const data = computed(() => props.dataTable.data);
115
61
  useEventDispatcher(dataTable, "load-successfully", async (res) => {
116
- if (res.code != 0) {
62
+ if (res.code != 0)
117
63
  return;
118
- }
119
64
  const _userService = unref(userService);
120
- if (!_userService) {
65
+ if (!_userService)
121
66
  return;
122
- }
123
67
  let columns = dataTable.getColumns();
124
68
  const componentNames = ["BwaUserSelect", "BwaUserMultiSelect"];
125
- columns = columns.filter((column) => componentNames.includes(column.formComponent)).filter((column) => column.visible).filter((column) => column.isExtend);
126
- if (!columns.length) {
69
+ columns = columns.filter((c) => componentNames.includes(c.formComponent)).filter((c) => c.visible).filter((c) => c.isExtend);
70
+ if (!columns.length)
127
71
  return;
128
- }
129
72
  processing.value = true;
130
73
  const data2 = res.data;
131
- let ids = data2.reduce((result, item) => {
132
- return result.concat(
133
- columns.reduce((result2, column) => {
134
- let value = get(item, column.fullAttrName);
135
- value = Array.isArray(value) ? value : value ? [value] : [];
136
- return result2.concat(value);
137
- }, [])
138
- );
139
- }, []).map((id) => id + "");
74
+ let ids = data2.reduce((r, i) => r.concat(columns.reduce((rr, cc) => rr.concat(Array.isArray(get(i, cc.fullAttrName)) ? get(i, cc.fullAttrName) : get(i, cc.fullAttrName) ? [get(i, cc.fullAttrName)] : []), [])), []).map((id) => id + "");
140
75
  ids = [...new Set(ids)];
141
76
  try {
142
77
  const userListResult = await _userService.getUserListByIds(ids);
143
- if (userListResult.code != 0) {
78
+ if (userListResult.code != 0)
144
79
  return;
145
- }
146
80
  for (const column of columns) {
147
81
  column.componentProps = column.componentProps || {};
148
- column.componentProps.options = (userListResult.data || []).map(
149
- (item) => ({
150
- label: item.label,
151
- value: item.value
152
- })
153
- );
82
+ column.componentProps.options = (userListResult.data || []).map((item) => ({ label: item.label, value: item.value }));
154
83
  }
155
84
  } finally {
156
85
  processing.value = false;
157
86
  }
158
87
  });
159
- const sortHandle = (column, prop, order) => {
88
+ const sortHandle = (column) => {
160
89
  let sortColumn2 = "";
161
90
  let sortType = "";
162
91
  if (column.order) {
163
92
  sortColumn2 = column.prop;
164
- sortType = column.order == "descending" ? 0 : 1;
93
+ sortType = column.order === "descending" ? 0 : 1;
165
94
  dataTable.setParam("sortColumn", sortColumn2);
166
95
  dataTable.setParam("sortType", sortType);
167
96
  } else {
168
- dataTable.setParam("sortColumn", sortColumn2);
169
- dataTable.setParam("sortType", sortType);
97
+ dataTable.setParam("sortColumn", "");
98
+ dataTable.setParam("sortType", "");
170
99
  }
171
100
  dataTable.load();
172
101
  };
173
102
  useEventDispatcher(dataTable, "load-successfully", (res) => {
174
103
  var _a2, _b;
175
- if (!elTable.value) {
104
+ if (!elTable.value)
176
105
  return;
177
- }
178
- if ((_b = (_a2 = unref(elTable)) == null ? void 0 : _a2.store) == null ? void 0 : _b.updateSelectionByRowKey) {
106
+ if ((_b = (_a2 = unref(elTable)) == null ? void 0 : _a2.store) == null ? void 0 : _b.updateSelectionByRowKey)
179
107
  unref(elTable).store.updateSelectionByRowKey();
180
- }
181
- if (res.code != 0) {
108
+ if (res.code != 0)
182
109
  ElMessage.error(res.msg);
183
- }
184
110
  });
185
111
  function sortColumn(array) {
186
112
  array.forEach((item) => {
187
113
  var _a2, _b;
188
114
  item.no = (_a2 = item.getColumnIndex) == null ? void 0 : _a2.call(item);
189
- if ((_b = item.children) == null ? void 0 : _b.length) {
115
+ if ((_b = item.children) == null ? void 0 : _b.length)
190
116
  sortColumn(item.children);
191
- }
192
117
  });
193
118
  array.sort((cur, pre) => cur.no - pre.no);
194
119
  }
195
120
  const tableSelectSubject = new Subject();
196
121
  const selectionChange = tableSelectSubject.next.bind(tableSelectSubject);
197
122
  const headerDragend = (newWidth, oldWidth, column) => {
198
- let widthObj = {
199
- newWidth: Math.round(newWidth),
200
- oldWidth: Math.round(oldWidth),
201
- column
202
- };
203
- emit("headerWidthChange", widthObj);
123
+ emit("headerWidthChange", { newWidth: Math.round(newWidth), oldWidth: Math.round(oldWidth), column });
204
124
  };
205
125
  const totalPage = computed(() => dataTable.getTotalPage());
206
126
  const tableSelectSubscription = tableSelectSubject.pipe(debounceTime(debounceDelay)).subscribe(unref(dataTable).setSelection.bind(unref(dataTable)));
207
- const selectChangeAPIObservable = new Observable(
208
- (observer) => useEventDispatcher(
209
- props.dataTable,
210
- "select-change",
211
- observer.next.bind(observer)
212
- )
213
- ).pipe(
214
- filter((selection) => {
215
- if (!unref(elTable)) {
216
- return false;
217
- }
218
- const selectionRows = unref(elTable).getSelectionRows();
219
- if (selectionRows.length !== selection.length) {
220
- return true;
221
- }
222
- const primaryKey = dataTable.primaryKey;
223
- return !selectionRows.every(
224
- (item) => selection.find((itm) => item[primaryKey] === item[primaryKey])
225
- );
226
- })
227
- ).subscribe((selection) => {
127
+ const selectChangeAPIObservable = new Observable((observer) => useEventDispatcher(props.dataTable, "select-change", observer.next.bind(observer))).pipe(filter((selection) => {
128
+ if (!unref(elTable))
129
+ return false;
130
+ const selectionRows = unref(elTable).getSelectionRows();
131
+ if (selectionRows.length !== selection.length)
132
+ return true;
133
+ const primaryKey = dataTable.primaryKey;
134
+ return !selectionRows.every((item) => selection.find((it) => item[primaryKey] === it[primaryKey]));
135
+ })).subscribe((selection) => {
228
136
  unref(elTable).clearSelection();
229
- for (const item of selection) {
137
+ for (const item of selection)
230
138
  unref(elTable).toggleRowSelection(item, true);
231
- }
232
139
  });
233
- if (props.autoLoad) {
140
+ if (props.autoLoad)
234
141
  dataTable.load();
235
- }
236
- const searchParamsSubscription = new Observable(
237
- (observer) => useEventDispatcher(
238
- props.dataTable.filterPanel,
239
- "params-change",
240
- observer.next.bind(observer)
241
- )
242
- ).pipe(
243
- filter(() => props.dataTable.filterPanel.ready),
244
- debounceTime(unref(debounceDelay))
245
- ).subscribe(() => {
246
- props.dataTable.load();
247
- });
248
- const subscription = props.dataTable.getDisplayColumnsSubject().pipe(
249
- map(() => unref(elTable)),
250
- delayWhen(() => from(nextTick())),
251
- map((elTable2) => elTable2 == null ? void 0 : elTable2.store),
252
- skipWhile((store) => !store)
253
- ).subscribe((store) => {
142
+ const searchParamsSubscription = new Observable((observer) => useEventDispatcher(props.dataTable.filterPanel, "params-change", observer.next.bind(observer))).pipe(filter(() => props.dataTable.filterPanel.ready), debounceTime(unref(debounceDelay))).subscribe(() => props.dataTable.load());
143
+ const subscription = props.dataTable.getDisplayColumnsSubject().pipe(map(() => unref(elTable)), delayWhen(() => from(nextTick())), map((el) => el == null ? void 0 : el.store), skipWhile((store) => !store)).subscribe((store) => {
254
144
  sortColumn(unref(store.states._columns));
255
145
  store.updateColumns();
256
146
  store.scheduleLayout();
@@ -262,138 +152,139 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
262
152
  searchParamsSubscription.unsubscribe();
263
153
  });
264
154
  return (_ctx, _cache) => {
265
- return openBlock(), createElementBlock("div", {
266
- class: normalizeClass(unref(ns).b()),
267
- ref_key: "dataTableEl",
268
- ref: dataTableEl,
269
- style: normalizeStyle({
270
- display: realHeight.value === "auto" ? "flex" : "block",
271
- flexDirection: realHeight.value === "auto" ? "column" : "unset"
272
- })
273
- }, [
274
- renderSlot(_ctx.$slots, "default", { dataTable: unref(dataTable) }, () => [
275
- createVNode(unref(ElTable), mergeProps({
276
- class: "content",
277
- height: realHeight.value,
278
- ref_key: "elTable",
279
- ref: elTable,
280
- data: data.value,
281
- "row-key": unref(dataTable).primaryKey,
282
- "show-header": "",
283
- stripe: ""
284
- }, unref(attrs), {
285
- onHeaderDragend: headerDragend,
286
- onSelectionChange: unref(selectionChange),
287
- onSortChange: sortHandle,
288
- border: __props.border
289
- }), {
290
- empty: withCtx(() => [
291
- renderSlot(_ctx.$slots, "empty-table")
292
- ]),
293
- default: withCtx(() => [
294
- __props.showDrag ? (openBlock(), createBlock(unref(ElTableColumn), {
295
- key: 0,
296
- width: "40px"
297
- }, {
298
- default: withCtx(() => [
299
- createElementVNode("div", {
300
- class: normalizeClass(unref(ns).e("drag"))
301
- }, [
302
- renderSlot(_ctx.$slots, "default", {}, () => [
303
- _cache[2] || (_cache[2] = createElementVNode("i", { class: "ptp-icon ptp-buzhou-yidong" }, null, -1))
304
- ])
305
- ], 2)
306
- ]),
307
- _: 3
308
- })) : createCommentVNode("v-if", true),
309
- __props.selection ? renderSlot(_ctx.$slots, "selection", { key: 1 }, () => [
310
- createVNode(unref(ElTableColumn), {
311
- type: "selection",
312
- align: "center",
313
- width: "56",
314
- "reserve-selection": true
315
- })
316
- ]) : createCommentVNode("v-if", true),
317
- __props.showIndex ? renderSlot(_ctx.$slots, "index", { key: 2 }, () => [
318
- createVNode(unref(ElTableColumn), {
319
- type: "index",
320
- width: "60",
321
- align: "center",
322
- label: __props.indexColumnLabel
323
- }, null, 8, ["label"])
324
- ]) : createCommentVNode("v-if", true),
325
- renderSlot(_ctx.$slots, "table-columns", { dataTable: unref(dataTable) }, () => [
326
- (openBlock(true), createElementBlock(Fragment, null, renderList(displayColumns.value, (item) => {
327
- return openBlock(), createBlock(DataTableColumn, mergeProps({
328
- "column-key": item.attrName,
329
- key: item.attrName,
330
- label: item.title,
331
- prop: item.fullAttrName,
332
- "min-width": item.width,
333
- align: item.align
334
- }, { ref_for: true }, item.componentProps, {
335
- sortable: item.sortable == "custom"
336
- }), {
337
- header: withCtx(() => [
338
- renderSlot(_ctx.$slots, `table-header-col-${item.attrName}`, {}, () => [
339
- createTextVNode(toDisplayString(item.title), 1)
340
- ])
341
- ]),
342
- default: withCtx(({ row, $index }) => [
343
- data.value.length ? renderSlot(_ctx.$slots, "table-col-" + item.attrName, {
344
- key: 0,
345
- row,
346
- index: $index,
347
- column: item,
348
- dataTable: unref(dataTable)
349
- }, () => [
350
- createVNode(unref(DynamicComponent), {
155
+ return openBlock(), createElementBlock(Fragment, null, [
156
+ createCommentVNode(" \u{1F525} \u6700\u5916\u5C42\uFF1A\u81EA\u52A8\u9002\u914D\u6240\u6709\u5BB9\u5668\uFF0C\u5F39\u6846/\u9875\u9762\u901A\u7528 "),
157
+ createElementVNode("div", {
158
+ class: normalizeClass(unref(ns).b()),
159
+ ref_key: "dataTableEl",
160
+ ref: dataTableEl,
161
+ style: { "width": "100%", "height": "100%", "display": "flex", "flex-direction": "column", "min-height": "0" }
162
+ }, [
163
+ renderSlot(_ctx.$slots, "default", { dataTable: unref(dataTable) }, () => [
164
+ createVNode(unref(ElTable), mergeProps({
165
+ class: "content",
166
+ ref_key: "elTable",
167
+ ref: elTable,
168
+ data: data.value,
169
+ "row-key": unref(dataTable).primaryKey,
170
+ "show-header": "",
171
+ stripe: ""
172
+ }, unref(attrs), {
173
+ onHeaderDragend: headerDragend,
174
+ onSelectionChange: unref(selectionChange),
175
+ onSortChange: sortHandle,
176
+ border: __props.border
177
+ }), {
178
+ empty: withCtx(() => [
179
+ renderSlot(_ctx.$slots, "empty-table", {}, void 0, true)
180
+ ]),
181
+ default: withCtx(() => [
182
+ __props.showDrag ? (openBlock(), createBlock(unref(ElTableColumn), {
183
+ key: 0,
184
+ width: "40px"
185
+ }, {
186
+ default: withCtx(() => [
187
+ createElementVNode("div", {
188
+ class: normalizeClass(unref(ns).e("drag"))
189
+ }, [
190
+ renderSlot(_ctx.$slots, "default", {}, () => [
191
+ _cache[2] || (_cache[2] = createElementVNode("i", { class: "ptp-icon ptp-buzhou-yidong" }, null, -1))
192
+ ], true)
193
+ ], 2)
194
+ ]),
195
+ _: 3
196
+ })) : createCommentVNode("v-if", true),
197
+ __props.selection ? renderSlot(_ctx.$slots, "selection", { key: 1 }, () => [
198
+ createVNode(unref(ElTableColumn), {
199
+ type: "selection",
200
+ fixed: __props.fixedSelection,
201
+ align: "center",
202
+ width: "56",
203
+ "reserve-selection": true
204
+ }, null, 8, ["fixed"])
205
+ ], true) : createCommentVNode("v-if", true),
206
+ __props.showIndex ? renderSlot(_ctx.$slots, "index", { key: 2 }, () => [
207
+ createVNode(unref(ElTableColumn), {
208
+ type: "index",
209
+ width: "60",
210
+ align: "center",
211
+ label: __props.indexColumnLabel
212
+ }, null, 8, ["label"])
213
+ ], true) : createCommentVNode("v-if", true),
214
+ renderSlot(_ctx.$slots, "table-columns", { dataTable: unref(dataTable) }, () => [
215
+ (openBlock(true), createElementBlock(Fragment, null, renderList(displayColumns.value, (item) => {
216
+ return openBlock(), createBlock(DataTableColumn, mergeProps({
217
+ "column-key": item.attrName,
218
+ key: item.attrName,
219
+ label: item.title,
220
+ prop: item.fullAttrName,
221
+ "min-width": item.width,
222
+ align: item.align,
223
+ fixed: item.fixed
224
+ }, { ref_for: true }, item.componentProps, {
225
+ sortable: item.sortable == "custom"
226
+ }), {
227
+ header: withCtx(() => [
228
+ renderSlot(_ctx.$slots, `table-header-col-${item.attrName}`, {}, () => [
229
+ createTextVNode(toDisplayString(item.title), 1)
230
+ ], true)
231
+ ]),
232
+ default: withCtx(({ row, $index }) => [
233
+ data.value.length ? renderSlot(_ctx.$slots, "table-col-" + item.attrName, {
234
+ key: 0,
235
+ row,
236
+ index: $index,
351
237
  column: item,
352
- record: row
353
- }, null, 8, ["column", "record"])
354
- ]) : createCommentVNode("v-if", true)
355
- ]),
356
- _: 2
357
- }, 1040, ["column-key", "label", "prop", "min-width", "align", "sortable"]);
358
- }), 128))
238
+ dataTable: unref(dataTable)
239
+ }, () => [
240
+ createVNode(unref(DynamicComponent), {
241
+ column: item,
242
+ record: row
243
+ }, null, 8, ["column", "record"])
244
+ ], true) : createCommentVNode("v-if", true)
245
+ ]),
246
+ _: 2
247
+ }, 1040, ["column-key", "label", "prop", "min-width", "align", "fixed", "sortable"]);
248
+ }), 128))
249
+ ], true),
250
+ renderSlot(_ctx.$slots, "column-append", {}, void 0, true)
359
251
  ]),
360
- renderSlot(_ctx.$slots, "column-append")
361
- ]),
362
- _: 3
363
- }, 16, ["height", "data", "row-key", "onSelectionChange", "border"])
364
- ]),
365
- __props.showPagination ? (openBlock(), createElementBlock("div", {
366
- key: 0,
367
- class: normalizeClass(unref(ns).e("pagination"))
368
- }, [
369
- createElementVNode("div", {
370
- class: normalizeClass(unref(ns).e("pagination-info"))
371
- }, " \u5171" + toDisplayString(totalPage.value) + "\u9875\uFF0C" + toDisplayString(unref(dataTable).totalRecCount) + "\u6761 ", 3),
372
- createVNode(unref(ElPagination), {
373
- currentPage: unref(dataTable).pageNum,
374
- "page-sizes": __props.paginationPageSizes,
375
- "page-size": unref(dataTable).pageSize,
376
- layout: __props.paginationLayout,
377
- total: unref(dataTable).totalRecCount,
378
- onSizeChange: _cache[0] || (_cache[0] = ($event) => unref(dataTable).setPageSize($event)),
379
- onCurrentChange: _cache[1] || (_cache[1] = ($event) => unref(dataTable).pageTo($event)),
380
- teleported: false
381
- }, null, 8, ["currentPage", "page-sizes", "page-size", "layout", "total"])
382
- ], 2)) : createCommentVNode("v-if", true),
383
- unref(barRectangle) ? (openBlock(), createElementBlock("div", {
384
- key: 1,
385
- class: normalizeClass(unref(ns).e("dragbar")),
386
- style: normalizeStyle({
387
- left: unref(barRectangle).left + "px",
388
- top: unref(barRectangle).top + "px",
389
- width: unref(barRectangle).width + "px",
390
- height: unref(barRectangle).height + "px"
391
- })
392
- }, null, 6)) : createCommentVNode("v-if", true)
393
- ], 6);
252
+ _: 3
253
+ }, 16, ["data", "row-key", "onSelectionChange", "border"])
254
+ ], true),
255
+ __props.showPagination ? (openBlock(), createElementBlock("div", {
256
+ key: 0,
257
+ class: normalizeClass(unref(ns).e("pagination"))
258
+ }, [
259
+ createElementVNode("div", {
260
+ class: normalizeClass(unref(ns).e("pagination-info"))
261
+ }, " \u5171" + toDisplayString(totalPage.value) + "\u9875\uFF0C" + toDisplayString(unref(dataTable).totalRecCount) + "\u6761 ", 3),
262
+ createVNode(unref(ElPagination), {
263
+ currentPage: unref(dataTable).pageNum,
264
+ "page-sizes": __props.paginationPageSizes,
265
+ "page-size": unref(dataTable).pageSize,
266
+ layout: __props.paginationLayout,
267
+ total: unref(dataTable).totalRecCount,
268
+ onSizeChange: _cache[0] || (_cache[0] = ($event) => unref(dataTable).setPageSize($event)),
269
+ onCurrentChange: _cache[1] || (_cache[1] = ($event) => unref(dataTable).pageTo($event)),
270
+ teleported: false
271
+ }, null, 8, ["currentPage", "page-sizes", "page-size", "layout", "total"])
272
+ ], 2)) : createCommentVNode("v-if", true),
273
+ unref(barRectangle) ? (openBlock(), createElementBlock("div", {
274
+ key: 1,
275
+ class: normalizeClass(unref(ns).e("dragbar")),
276
+ style: normalizeStyle({
277
+ left: unref(barRectangle).left + "px",
278
+ top: unref(barRectangle).top + "px",
279
+ width: unref(barRectangle).width + "px",
280
+ height: unref(barRectangle).height + "px"
281
+ })
282
+ }, null, 6)) : createCommentVNode("v-if", true)
283
+ ], 2)
284
+ ], 2112);
394
285
  };
395
286
  }
396
287
  });
397
- var DataTable = /* @__PURE__ */ _export_sfc(_sfc_main, [["__file", "data-table.vue"]]);
288
+ var DataTable = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-75958349"], ["__file", "data-table.vue"]]);
398
289
 
399
290
  export { DataTable as default };
@@ -0,0 +1,13 @@
1
+ // Inject __name helper
2
+ if (typeof __name === 'undefined') {
3
+ function __name(obj, name) {
4
+ Object.defineProperty(obj, "name", {
5
+ value: name,
6
+ configurable: true
7
+ });
8
+ }
9
+ }
10
+
11
+ var undefined$1 = undefined;
12
+
13
+ export { undefined$1 as default };
@@ -0,0 +1 @@
1
+ .bwa-datatable[data-v-75958349]{display:flex;flex-direction:column;height:100%;min-height:0;width:100%}.bwa-datatable .content[data-v-75958349]{display:flex;flex:1;flex-direction:column;width:100%}.bwa-datatable [data-v-75958349] .el-table{width:100%!important}.bwa-datatable [data-v-75958349] .el-table,.bwa-datatable [data-v-75958349] .el-table__inner-wrapper{display:flex!important;flex:1!important;flex-direction:column!important}.bwa-datatable [data-v-75958349] .el-table__body-wrapper{flex:1!important;overflow:auto!important}.bwa-datatable .bwa-datatable__pagination[data-v-75958349]{align-items:center;display:flex;justify-content:space-between}.letter-circle[data-v-9ba46efc]{font-size:14px;height:24px;margin-right:8px;width:24px}.letter-circle[data-v-9ba46efc],.letter-circle[data-v-cb2d8ca5]{align-items:center;border-radius:50%;color:#fff;display:flex;justify-content:center}.letter-circle[data-v-cb2d8ca5]{flex-shrink:0;font-size:12px;height:22px;width:22px}.option-container[data-v-cb2d8ca5]{align-items:center;display:flex;width:100%}.option-text[data-v-cb2d8ca5]{flex:1;margin-left:8px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.pct-select-ellipsis .el-select-dropdown__item{box-sizing:border-box!important;overflow:hidden!important;text-overflow:ellipsis!important;white-space:nowrap!important;width:100%!important}