@ctzy-web-client/plugin-component-vue 1.0.47 → 1.0.49

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