@ctzy-web-client/plugin-component-vue 1.0.35 → 1.0.36
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.
|
@@ -69,7 +69,7 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
|
69
69
|
default: true
|
|
70
70
|
}
|
|
71
71
|
},
|
|
72
|
-
emits: ["drag"],
|
|
72
|
+
emits: ["drag", "headerWidthChange"],
|
|
73
73
|
setup(__props, { emit: __emit }) {
|
|
74
74
|
var _a;
|
|
75
75
|
;
|
|
@@ -193,6 +193,14 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
|
193
193
|
}
|
|
194
194
|
const tableSelectSubject = new Subject();
|
|
195
195
|
const selectionChange = tableSelectSubject.next.bind(tableSelectSubject);
|
|
196
|
+
const headerDragend = (newWidth, oldWidth, column) => {
|
|
197
|
+
let widthObj = {
|
|
198
|
+
newWidth: Math.round(newWidth),
|
|
199
|
+
oldWidth: Math.round(oldWidth),
|
|
200
|
+
column
|
|
201
|
+
};
|
|
202
|
+
emit("headerWidthChange", widthObj);
|
|
203
|
+
};
|
|
196
204
|
const totalPage = computed(() => dataTable.getTotalPage());
|
|
197
205
|
const tableSelectSubscription = tableSelectSubject.pipe(debounceTime(debounceDelay)).subscribe(unref(dataTable).setSelection.bind(unref(dataTable)));
|
|
198
206
|
const selectChangeAPIObservable = new Observable(
|
|
@@ -273,6 +281,7 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
|
273
281
|
"show-header": "",
|
|
274
282
|
stripe: ""
|
|
275
283
|
}, unref(attrs), {
|
|
284
|
+
onHeaderDragend: headerDragend,
|
|
276
285
|
onSelectionChange: unref(selectionChange),
|
|
277
286
|
onSortChange: sortHandle,
|
|
278
287
|
border: __props.border
|
|
@@ -73,7 +73,7 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
|
73
73
|
default: true
|
|
74
74
|
}
|
|
75
75
|
},
|
|
76
|
-
emits: ["drag"],
|
|
76
|
+
emits: ["drag", "headerWidthChange"],
|
|
77
77
|
setup(__props, { emit: __emit }) {
|
|
78
78
|
var _a;
|
|
79
79
|
;
|
|
@@ -197,6 +197,14 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
|
197
197
|
}
|
|
198
198
|
const tableSelectSubject = new rxjs.Subject();
|
|
199
199
|
const selectionChange = tableSelectSubject.next.bind(tableSelectSubject);
|
|
200
|
+
const headerDragend = (newWidth, oldWidth, column) => {
|
|
201
|
+
let widthObj = {
|
|
202
|
+
newWidth: Math.round(newWidth),
|
|
203
|
+
oldWidth: Math.round(oldWidth),
|
|
204
|
+
column
|
|
205
|
+
};
|
|
206
|
+
emit("headerWidthChange", widthObj);
|
|
207
|
+
};
|
|
200
208
|
const totalPage = vue.computed(() => dataTable.getTotalPage());
|
|
201
209
|
const tableSelectSubscription = tableSelectSubject.pipe(rxjs.debounceTime(debounceDelay)).subscribe(vue.unref(dataTable).setSelection.bind(vue.unref(dataTable)));
|
|
202
210
|
const selectChangeAPIObservable = new rxjs.Observable(
|
|
@@ -277,6 +285,7 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
|
277
285
|
"show-header": "",
|
|
278
286
|
stripe: ""
|
|
279
287
|
}, vue.unref(attrs), {
|
|
288
|
+
onHeaderDragend: headerDragend,
|
|
280
289
|
onSelectionChange: vue.unref(selectionChange),
|
|
281
290
|
onSortChange: sortHandle,
|
|
282
291
|
border: __props.border
|
package/package.json
CHANGED
|
@@ -12,6 +12,7 @@
|
|
|
12
12
|
show-header
|
|
13
13
|
stripe
|
|
14
14
|
v-bind="attrs"
|
|
15
|
+
@header-dragend='headerDragend'
|
|
15
16
|
@selection-change="selectionChange"
|
|
16
17
|
@sort-change="sortHandle"
|
|
17
18
|
:border="border"
|
|
@@ -214,7 +215,7 @@ watch(
|
|
|
214
215
|
|
|
215
216
|
const searchParams = computed(() => props.searchParams);
|
|
216
217
|
|
|
217
|
-
const emit = defineEmits(['drag']);
|
|
218
|
+
const emit = defineEmits(['drag','headerWidthChange']);
|
|
218
219
|
|
|
219
220
|
const debounceDelay = useGlobalConfig('debounceDelay', 500);
|
|
220
221
|
|
|
@@ -354,7 +355,16 @@ function sortColumn(array) {
|
|
|
354
355
|
|
|
355
356
|
const tableSelectSubject = new Subject();
|
|
356
357
|
const selectionChange = tableSelectSubject.next.bind(tableSelectSubject);
|
|
358
|
+
const headerDragend = (newWidth,oldWidth,column) =>{
|
|
357
359
|
|
|
360
|
+
|
|
361
|
+
let widthObj = {
|
|
362
|
+
newWidth:Math.round(newWidth),
|
|
363
|
+
oldWidth:Math.round(oldWidth),
|
|
364
|
+
column:column
|
|
365
|
+
}
|
|
366
|
+
emit('headerWidthChange',widthObj)
|
|
367
|
+
}
|
|
358
368
|
const totalPage = computed(() => dataTable.getTotalPage());
|
|
359
369
|
|
|
360
370
|
const tableSelectSubscription = tableSelectSubject
|
|
File without changes
|
|
File without changes
|