@ctzy-web-client/plugin-component-vue 1.0.46 → 1.0.48

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