@globalbrain/sefirot 2.14.0 → 2.14.1
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/lib/components/STable.vue +28 -10
- package/package.json +1 -1
|
@@ -65,6 +65,12 @@ const showFooter = computed(() => {
|
|
|
65
65
|
return page?.value && perPage?.value && total?.value
|
|
66
66
|
})
|
|
67
67
|
|
|
68
|
+
const classes = computed(() => ({
|
|
69
|
+
'has-header': showHeader.value,
|
|
70
|
+
'has-footer': showFooter.value,
|
|
71
|
+
'borderless': borderless?.value
|
|
72
|
+
}))
|
|
73
|
+
|
|
68
74
|
watch(() => records?.value, () => {
|
|
69
75
|
headLock = true
|
|
70
76
|
bodyLock = true
|
|
@@ -104,7 +110,7 @@ function updateColWidth(key: string, value: string) {
|
|
|
104
110
|
</script>
|
|
105
111
|
|
|
106
112
|
<template>
|
|
107
|
-
<div class="STable" :class="
|
|
113
|
+
<div class="STable" :class="classes" ref="el">
|
|
108
114
|
<div class="box">
|
|
109
115
|
<STableHeader
|
|
110
116
|
v-if="showHeader"
|
|
@@ -210,7 +216,6 @@ function updateColWidth(key: string, value: string) {
|
|
|
210
216
|
border-left: var(--table-border-left, var(--table-border));
|
|
211
217
|
border-radius: var(--table-border-radius);
|
|
212
218
|
width: 100%;
|
|
213
|
-
overflow: hidden;
|
|
214
219
|
|
|
215
220
|
.STable.borderless & {
|
|
216
221
|
border-right: 0;
|
|
@@ -230,16 +235,29 @@ function updateColWidth(key: string, value: string) {
|
|
|
230
235
|
width: 100%;
|
|
231
236
|
min-width: 100%;
|
|
232
237
|
overflow-x: auto;
|
|
238
|
+
}
|
|
239
|
+
|
|
240
|
+
.container.head {
|
|
241
|
+
position: var(--table-head-position, static);
|
|
242
|
+
top: var(--table-head-top, auto);
|
|
243
|
+
z-index: 100;
|
|
244
|
+
border-radius: var(--table-border-radius) var(--table-border-radius) 0 0;
|
|
245
|
+
background-color: var(--bg-elv-2);
|
|
246
|
+
|
|
247
|
+
.STable.has-header & {
|
|
248
|
+
border-radius: 0;
|
|
249
|
+
}
|
|
233
250
|
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
background-color: var(--bg-elv-2);
|
|
251
|
+
&::-webkit-scrollbar {
|
|
252
|
+
display: none;
|
|
253
|
+
}
|
|
254
|
+
}
|
|
239
255
|
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
256
|
+
.container.body {
|
|
257
|
+
border-radius: 6px 6px var(--table-border-radius) var(--table-border-radius);
|
|
258
|
+
|
|
259
|
+
.STable.has-footer & {
|
|
260
|
+
border-radius: 0;
|
|
243
261
|
}
|
|
244
262
|
}
|
|
245
263
|
|