quasar-ui-sellmate-ui-kit 1.1.97 → 1.2.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/dist/index.css +1 -1
- package/dist/index.min.css +1 -1
- package/dist/index.rtl.css +1 -1
- package/dist/index.rtl.min.css +1 -1
- package/package.json +1 -1
- package/src/components/STable.vue +39 -6
package/dist/index.css
CHANGED
package/dist/index.min.css
CHANGED
package/dist/index.rtl.css
CHANGED
package/dist/index.rtl.min.css
CHANGED
package/package.json
CHANGED
|
@@ -5,16 +5,26 @@
|
|
|
5
5
|
hide-pagination
|
|
6
6
|
hide-selected-banner
|
|
7
7
|
class="s-table"
|
|
8
|
-
:class="{
|
|
8
|
+
:class="{
|
|
9
|
+
's-select-table': useSelect,
|
|
10
|
+
'resizable-table': resizable,
|
|
11
|
+
'sticky-resizable-table': stickyResizable,
|
|
12
|
+
'sticky-header': stickyHeader,
|
|
13
|
+
'before-search': beforeSearch,
|
|
14
|
+
}"
|
|
9
15
|
:table-class="{ 'resizable-table': resizable }"
|
|
10
16
|
:columns="columns"
|
|
11
17
|
:rows="rows"
|
|
18
|
+
v-model:pagination="paginationModel"
|
|
19
|
+
:no-data-label="noDataLabel"
|
|
12
20
|
ref="sTableRef"
|
|
13
21
|
@selection="updateSelected"
|
|
14
22
|
>
|
|
15
|
-
<template #no-data>
|
|
16
|
-
<slot name="noData">
|
|
17
|
-
<div class="full-width text-center"
|
|
23
|
+
<template #no-data="props">
|
|
24
|
+
<slot name="noData" v-bind="props">
|
|
25
|
+
<div class="full-width text-center">
|
|
26
|
+
{{ props.message }}
|
|
27
|
+
</div>
|
|
18
28
|
</slot>
|
|
19
29
|
</template>
|
|
20
30
|
<template #loading>
|
|
@@ -67,6 +77,12 @@
|
|
|
67
77
|
</slot>
|
|
68
78
|
</template>
|
|
69
79
|
</q-table>
|
|
80
|
+
<s-pagination2
|
|
81
|
+
v-if="!hideBottom"
|
|
82
|
+
v-model="paginationModel.page"
|
|
83
|
+
:lastPage="pagesNumber"
|
|
84
|
+
class="q-mt-md"
|
|
85
|
+
/>
|
|
70
86
|
</template>
|
|
71
87
|
|
|
72
88
|
<script>
|
|
@@ -74,7 +90,7 @@ import {
|
|
|
74
90
|
QTable, QInnerLoading, QTd, QIcon,
|
|
75
91
|
} from 'quasar';
|
|
76
92
|
import {
|
|
77
|
-
defineComponent, onMounted, ref,
|
|
93
|
+
defineComponent, onMounted, ref, computed,
|
|
78
94
|
} from 'vue';
|
|
79
95
|
import { useResizable } from '../composables/table/use-resizable';
|
|
80
96
|
import { useNavigator } from '../composables/table/use-navigator';
|
|
@@ -88,6 +104,21 @@ export default defineComponent({
|
|
|
88
104
|
QIcon,
|
|
89
105
|
},
|
|
90
106
|
props: {
|
|
107
|
+
pagination: {
|
|
108
|
+
type: Object,
|
|
109
|
+
default: () => ({
|
|
110
|
+
page: 1,
|
|
111
|
+
rowsPerPage: 50,
|
|
112
|
+
}),
|
|
113
|
+
},
|
|
114
|
+
hideBottom: {
|
|
115
|
+
type: Boolean,
|
|
116
|
+
default: false,
|
|
117
|
+
},
|
|
118
|
+
noDataLabel: {
|
|
119
|
+
type: String,
|
|
120
|
+
default: '데이터 조회가 필요합니다',
|
|
121
|
+
},
|
|
91
122
|
columns: {
|
|
92
123
|
type: Array,
|
|
93
124
|
default: () => [],
|
|
@@ -126,6 +157,7 @@ export default defineComponent({
|
|
|
126
157
|
},
|
|
127
158
|
},
|
|
128
159
|
setup(props, { emit, attrs }) {
|
|
160
|
+
const paginationModel = ref(props.pagination);
|
|
129
161
|
const sTableRef = ref(null);
|
|
130
162
|
const {
|
|
131
163
|
focusCell,
|
|
@@ -164,6 +196,8 @@ export default defineComponent({
|
|
|
164
196
|
closeInput,
|
|
165
197
|
editIcon,
|
|
166
198
|
updateSelected,
|
|
199
|
+
paginationModel,
|
|
200
|
+
pagesNumber: computed(() => Math.ceil((paginationModel.value.rowsNumber || props.rows.length) / paginationModel.value.rowsPerPage)),
|
|
167
201
|
};
|
|
168
202
|
},
|
|
169
203
|
});
|
|
@@ -233,7 +267,6 @@ export default defineComponent({
|
|
|
233
267
|
}
|
|
234
268
|
}
|
|
235
269
|
.s-select-table {
|
|
236
|
-
margin-bottom: $pagination-size;
|
|
237
270
|
.q-table__middle {
|
|
238
271
|
.q-table {
|
|
239
272
|
thead {
|