evui 3.1.36 → 3.1.37

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "evui",
3
- "version": "3.1.36",
3
+ "version": "3.1.37",
4
4
  "description": "A EXEM Library project",
5
5
  "author": "exem <dev_client@ex-em.com>",
6
6
  "license": "MIT",
@@ -186,8 +186,9 @@ export default {
186
186
  'update:checked': null,
187
187
  'check-row': null,
188
188
  'check-all': null,
189
+ 'update-tree-data': null,
189
190
  },
190
- setup(props) {
191
+ setup(props, { emit }) {
191
192
  const {
192
193
  isRenderer,
193
194
  getComponentName,
@@ -290,10 +291,14 @@ export default {
290
291
  () => props.checked,
291
292
  (value) => {
292
293
  const store = stores.treeStore;
294
+ checkInfo.isHeaderChecked = false;
293
295
  checkInfo.checkedRows = value;
294
296
  for (let ix = 0; ix < store.length; ix++) {
295
297
  store[ix].checked = value.includes(store[ix]);
296
298
  }
299
+ if (value.length && store.length === value.length) {
300
+ checkInfo.isHeaderChecked = true;
301
+ }
297
302
  },
298
303
  );
299
304
  watch(
@@ -311,6 +316,7 @@ export default {
311
316
  calculatedColumn();
312
317
  setTreeStore(stores.treeRows, 0, true);
313
318
  updateVScroll();
319
+ emit('update-tree-data', stores.treeRows);
314
320
  });
315
321
  }, { deep: true, immediate: true },
316
322
  );
@@ -215,12 +215,15 @@ export default {
215
215
  overflow: hidden !important;
216
216
  }
217
217
  }
218
+ .ev-window-open {
219
+ position: relative !important;
220
+ }
218
221
  .ev-window-dim-layer {
219
222
  position: fixed;
220
223
  top: 0;
221
224
  left: 0;
222
- width: 100vw;
223
- height: 100vh;
225
+ width: 100%;
226
+ height: 100%;
224
227
  background-color: rgba(0, 0, 0, 0.5);
225
228
  z-index: 700;
226
229
  }
@@ -229,7 +232,7 @@ export default {
229
232
  $padding-horizontal: 17px;
230
233
 
231
234
  display: flex;
232
- position: fixed;
235
+ position: absolute;
233
236
  top: 0;
234
237
  left: 0;
235
238
  width: 50vw;
@@ -37,7 +37,6 @@ const useModel = () => {
37
37
  root = document.getElementById('ev-window-modal');
38
38
  }
39
39
  };
40
-
41
40
  initWrapperDiv();
42
41
 
43
42
  const numberToUnit = (input) => {
@@ -98,26 +97,22 @@ const useModel = () => {
98
97
  return;
99
98
  }
100
99
 
101
- const windowWidth = window.innerWidth;
102
- const windowHeight = window.innerHeight;
103
- const refWidth = props.width ?? windowRef.value?.offsetWidth ?? Math.floor(windowWidth / 2);
104
- const refHeight = props.height ?? windowRef.value?.offsetHeight ?? Math.floor(windowHeight / 2);
100
+ const scrollTop = window.pageYOffset || document.documentElement.scrollTop
101
+ || document.body.scrollTop || 0;
102
+ const scrollLeft = window.pageXOffset || document.documentElement.scrollLeft
103
+ || document.body.scrollLeft || 0;
105
104
 
106
- const tempWidth = removeUnit(refWidth, 'horizontal');
107
- const tempHeight = removeUnit(refHeight, 'vertical');
105
+ basePosition.width = numberToUnit(props.width);
106
+ basePosition.height = numberToUnit(props.height);
107
+ basePosition.position = 'absolute';
108
+ basePosition.top = `calc(((100vh - ${basePosition.height}) / 2) + ${scrollTop}px)`;
109
+ basePosition.left = `calc(((100vw - ${basePosition.width}) / 2) + ${scrollLeft}px)`;
108
110
 
109
- basePosition.width = `${tempWidth}px`;
110
- basePosition.height = `${tempHeight}px`;
111
- basePosition.left = `${Math.floor((windowWidth - tempWidth) / 2)}px`;
112
-
113
- if (props.hideScroll || props.isModal) {
114
- basePosition.position = 'fixed';
115
- basePosition.top = `${Math.floor((windowHeight - tempHeight) / 2)}px`;
116
- } else {
117
- const scrollTop = window.pageYOffset || document.documentElement.scrollTop
118
- || document.body.scrollTop || 0;
119
- basePosition.position = 'absolute';
120
- basePosition.top = `${Math.floor(((windowHeight - tempHeight) / 2) + scrollTop)}px`;
111
+ if (removeUnit(props.width, 'horizontal') > window.innerWidth) {
112
+ basePosition.left = 0;
113
+ }
114
+ if (removeUnit(props.height, 'vertical') > window.innerHeight) {
115
+ basePosition.top = `${scrollTop}px`;
121
116
  }
122
117
  };
123
118
 
@@ -130,6 +125,7 @@ const useModel = () => {
130
125
  };
131
126
 
132
127
  const changeBodyCls = (isVisible) => {
128
+ const windowCnt = root?.getElementsByClassName('ev-window-wrapper')?.length;
133
129
  const hideScrollWindowCnt = root?.getElementsByClassName('scroll-lock')?.length;
134
130
  const allowScrollWindowCnt = root?.getElementsByClassName('scroll-allow')?.length;
135
131
  const bodyElem = document.body;
@@ -162,6 +158,7 @@ const useModel = () => {
162
158
 
163
159
  bodyElem.classList.add(...bodyClassName);
164
160
  }
161
+ bodyElem.classList.add('ev-window-open');
165
162
  } else {
166
163
  if (hideScrollWindowCnt === 1) {
167
164
  bodyElem.style.removeProperty('padding-right');
@@ -170,6 +167,9 @@ const useModel = () => {
170
167
  if (allowScrollWindowCnt === 1) {
171
168
  bodyElem.classList.remove('ev-window-scroll-allow', 'horizontal-hide', 'vertical-hide', 'hide');
172
169
  }
170
+ if (windowCnt === 1) {
171
+ bodyElem.classList.remove('ev-window-open');
172
+ }
173
173
  }
174
174
  };
175
175
  setBasePosition();
@@ -524,12 +524,6 @@ const useMouseEvent = (param) => {
524
524
  tempTop = getValidTop(windowHeight, tempTop);
525
525
  tempLeft = getValidLeft(windowWidth, tempLeft);
526
526
 
527
- if (tempLeft < -(clickedInfo.width - draggingMinSize)) { // 좌
528
- tempLeft = -Math.floor(clickedInfo.width - draggingMinSize);
529
- } else if (tempLeft > windowWidth - draggingMinSize) { // 우
530
- tempLeft = Math.floor(windowWidth - draggingMinSize);
531
- }
532
-
533
527
  setDragStyle({
534
528
  top: `${tempTop}px`,
535
529
  left: `${tempLeft}px`,