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