evui 3.1.57 → 3.1.58
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.
- package/dist/evui.common.js +95 -87
- package/dist/evui.common.js.map +1 -1
- package/dist/evui.umd.js +95 -87
- package/dist/evui.umd.js.map +1 -1
- package/dist/evui.umd.min.js +1 -1
- package/dist/evui.umd.min.js.map +1 -1
- package/package.json +1 -1
- package/src/components/grid/Grid.vue +1 -1
- package/src/components/grid/uses.js +12 -9
- package/src/components/window/uses.js +10 -8
package/package.json
CHANGED
|
@@ -475,17 +475,20 @@ export const sortEvent = (params) => {
|
|
|
475
475
|
/**
|
|
476
476
|
* sort 이벤트를 처리한다.
|
|
477
477
|
*
|
|
478
|
-
* @param {
|
|
478
|
+
* @param {object} column - 컬럼 정보
|
|
479
479
|
*/
|
|
480
|
-
const onSort = (
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
sortInfo.sortField
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
480
|
+
const onSort = (column) => {
|
|
481
|
+
const sortable = column.sortable === undefined ? true : column.sortable;
|
|
482
|
+
if (sortable) {
|
|
483
|
+
if (sortInfo.sortField !== column?.field) {
|
|
484
|
+
order.orders = ['asc', 'desc', 'init'];
|
|
485
|
+
sortInfo.sortField = column?.field;
|
|
486
|
+
}
|
|
487
|
+
sortInfo.sortOrder = order.dequeue();
|
|
488
|
+
order.enqueue(sortInfo.sortOrder);
|
|
487
489
|
|
|
488
|
-
|
|
490
|
+
sortInfo.isSorting = true;
|
|
491
|
+
}
|
|
489
492
|
};
|
|
490
493
|
/**
|
|
491
494
|
* 설정값에 따라 해당 컬럼 데이터에 대해 정렬한다.
|
|
@@ -56,7 +56,7 @@ const useModel = () => {
|
|
|
56
56
|
return result;
|
|
57
57
|
};
|
|
58
58
|
|
|
59
|
-
const removeUnit = (input, direction) => {
|
|
59
|
+
const removeUnit = (input, direction = 'horizontal') => {
|
|
60
60
|
if (typeof input === 'number') {
|
|
61
61
|
return input;
|
|
62
62
|
} else if (!input) {
|
|
@@ -226,9 +226,9 @@ const useMouseEvent = (param) => {
|
|
|
226
226
|
const posY = +y - rect.top;
|
|
227
227
|
const headerAreaStyleInfo = headerRef.value.style;
|
|
228
228
|
const headerPaddingInfo = {
|
|
229
|
-
top: removeUnit(headerAreaStyleInfo.paddingTop),
|
|
230
|
-
left: removeUnit(headerAreaStyleInfo.paddingLeft),
|
|
231
|
-
right: removeUnit(headerAreaStyleInfo.paddingRight),
|
|
229
|
+
top: removeUnit(headerAreaStyleInfo.paddingTop, 'vertical'),
|
|
230
|
+
left: removeUnit(headerAreaStyleInfo.paddingLeft, 'horizontal'),
|
|
231
|
+
right: removeUnit(headerAreaStyleInfo.paddingRight, 'horizontal'),
|
|
232
232
|
};
|
|
233
233
|
const startPosX = headerPaddingInfo.left;
|
|
234
234
|
const endPosX = rect.width - headerPaddingInfo.right;
|
|
@@ -279,17 +279,17 @@ const useMouseEvent = (param) => {
|
|
|
279
279
|
if (hasOwnProperty.call(paramObj, 'minWidth')) {
|
|
280
280
|
tMinWidth = paramObj.minWidth;
|
|
281
281
|
} else {
|
|
282
|
-
tMinWidth =
|
|
282
|
+
tMinWidth = props.minWidth;
|
|
283
283
|
}
|
|
284
284
|
|
|
285
285
|
if (hasOwnProperty.call(paramObj, 'minHeight')) {
|
|
286
286
|
tMinHeight = paramObj.minHeight;
|
|
287
287
|
} else {
|
|
288
|
-
tMinHeight =
|
|
288
|
+
tMinHeight = props.minHeight;
|
|
289
289
|
}
|
|
290
290
|
|
|
291
|
-
width =
|
|
292
|
-
height =
|
|
291
|
+
width = removeUnit(width, 'horizontal') > removeUnit(tMinWidth, 'horizontal') ? width : tMinWidth;
|
|
292
|
+
height = removeUnit(height, 'vertical') > removeUnit(tMinHeight, 'vertical') ? height : tMinHeight;
|
|
293
293
|
|
|
294
294
|
dragStyle.top = numberToUnit(top);
|
|
295
295
|
dragStyle.left = numberToUnit(left);
|
|
@@ -433,6 +433,8 @@ const useMouseEvent = (param) => {
|
|
|
433
433
|
setDragStyle({
|
|
434
434
|
top: `${tempTop}px`,
|
|
435
435
|
left: `${tempLeft}px`,
|
|
436
|
+
width: props.width,
|
|
437
|
+
height: props.height,
|
|
436
438
|
});
|
|
437
439
|
} else if (props.resizable && clickedInfo.pressedSpot === 'border') {
|
|
438
440
|
resizeWindow(e);
|