quasar-ui-sellmate-ui-kit 3.14.43 → 3.14.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.
- package/dist/index.common.js +2 -2
- package/dist/index.css +1 -1
- package/dist/index.esm.js +2 -2
- package/dist/index.min.css +1 -1
- package/dist/index.rtl.css +1 -1
- package/dist/index.rtl.min.css +1 -1
- package/dist/index.umd.js +35 -30
- package/dist/index.umd.min.js +2 -2
- package/package.json +1 -1
- package/src/components/STable.vue +14 -7
- package/src/composables/table/use-resizable.js +19 -17
package/package.json
CHANGED
|
@@ -13,7 +13,10 @@
|
|
|
13
13
|
:class="{
|
|
14
14
|
's-select-table': $attrs.selection && $attrs.selection !== 'none',
|
|
15
15
|
'resizable-table': resizable,
|
|
16
|
-
'sticky-column-table':
|
|
16
|
+
'sticky-column-table':
|
|
17
|
+
($attrs.selection && $attrs.selection !== 'none') ||
|
|
18
|
+
stickyColumn.leftStickyCount > 0 ||
|
|
19
|
+
stickyColumn.rightStickyCount > 0,
|
|
17
20
|
'sticky-resizable-table': stickyResizable,
|
|
18
21
|
'sticky-header': stickyHeader,
|
|
19
22
|
'before-search': !rows.length,
|
|
@@ -301,18 +304,22 @@
|
|
|
301
304
|
}
|
|
302
305
|
|
|
303
306
|
function handleColumns() {
|
|
304
|
-
const { addResizable, addStickyColumn
|
|
305
|
-
const tableElement = () => sTableRef.value.$el;
|
|
307
|
+
const { addResizable, addStickyColumn } = useResizable();
|
|
306
308
|
|
|
307
309
|
if (props.resizable) {
|
|
308
310
|
addResizable(sTableRef, props.stickyColumn, props.useLastCellResizable);
|
|
309
311
|
}
|
|
310
312
|
|
|
311
|
-
const
|
|
312
|
-
|
|
313
|
-
|
|
313
|
+
const hasSelection = attrs.selection && attrs.selection !== 'none';
|
|
314
|
+
|
|
315
|
+
const hasSticky =
|
|
316
|
+
hasSelection ||
|
|
317
|
+
props.stickyColumn.leftStickyCount > 0 ||
|
|
318
|
+
props.stickyColumn.rightStickyCount > 0;
|
|
319
|
+
|
|
320
|
+
if (hasSticky) {
|
|
314
321
|
addStickyColumn(sTableRef, props.stickyColumn);
|
|
315
|
-
observeScrollForStickyShadow(
|
|
322
|
+
observeScrollForStickyShadow(sTableRef.value.$el);
|
|
316
323
|
}
|
|
317
324
|
}
|
|
318
325
|
|
|
@@ -172,34 +172,36 @@ export function useResizable() {
|
|
|
172
172
|
function addStickyColumn(tableRef, stickyColumnsConfig) {
|
|
173
173
|
const { leftStickyCount, rightStickyCount } = stickyColumnsConfig;
|
|
174
174
|
|
|
175
|
-
const
|
|
176
|
-
const
|
|
175
|
+
const tableEl = tableRef.value.$el;
|
|
176
|
+
const cols = getTableCols(tableEl);
|
|
177
|
+
const isSelectTable = tableEl.classList.contains('s-select-table');
|
|
178
|
+
|
|
179
|
+
let startLeftIndex = 0;
|
|
177
180
|
|
|
178
181
|
// Left Sticky Columns
|
|
179
|
-
if (
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
applyStickyToColumn(tableRef.value.$el, i, true, '0px');
|
|
185
|
-
if (isSelectTable && i > 0) {
|
|
186
|
-
appendResizableDiv(cols[i], 'right', true); // 오른쪽에 리사이즈 핸들 추가
|
|
187
|
-
} else {
|
|
188
|
-
appendResizableDiv(cols[i], 'right', true); // 오른쪽에 리사이즈 핸들 추가
|
|
189
|
-
}
|
|
190
|
-
}
|
|
182
|
+
if (isSelectTable && cols[0]) {
|
|
183
|
+
applyStickyToColumn(tableEl, 0, true, '0px'); // 체크박스 컬럼 고정
|
|
184
|
+
appendResizableDiv(cols[0], 'right', true); // 오른쪽에 리사이즈 핸들 추가
|
|
185
|
+
startLeftIndex = 1; // 이후 데이터 컬럼은 1번부터 시작
|
|
186
|
+
}
|
|
191
187
|
|
|
192
|
-
|
|
188
|
+
for (let i = 0; i < leftStickyCount; i++) {
|
|
189
|
+
const colIdx = startLeftIndex + i;
|
|
190
|
+
if (!cols[colIdx]) break;
|
|
191
|
+
applyStickyToColumn(tableEl, colIdx, true, '0px'); // 컬럼 고정
|
|
192
|
+
appendResizableDiv(cols[colIdx], 'right', true); // 오른쪽에 리사이즈 핸들 추가
|
|
193
193
|
}
|
|
194
194
|
|
|
195
|
+
detectStickyWidth(tableEl, true); // 좌측 스티키 너비 재계산
|
|
196
|
+
|
|
195
197
|
// Right Sticky Columns
|
|
196
198
|
if (rightStickyCount > 0) {
|
|
197
199
|
for (let i = cols.length - rightStickyCount; i < cols.length; i++) {
|
|
198
|
-
applyStickyToColumn(
|
|
200
|
+
applyStickyToColumn(tableEl, i, false, '0px');
|
|
199
201
|
appendResizableDiv(cols[i], 'left', true); // 왼쪽에 리사이즈 핸들 추가 (우측 스티키)
|
|
200
202
|
}
|
|
201
203
|
|
|
202
|
-
detectStickyWidth(
|
|
204
|
+
detectStickyWidth(tableEl, false); // 우측 스티키 너비 재계산
|
|
203
205
|
}
|
|
204
206
|
}
|
|
205
207
|
return {
|