quasar-ui-sellmate-ui-kit 1.1.97 → 2.0.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 +40 -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,27 @@
|
|
|
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 }}
|
|
27
|
+
{{ props.message }}
|
|
28
|
+
</div>
|
|
18
29
|
</slot>
|
|
19
30
|
</template>
|
|
20
31
|
<template #loading>
|
|
@@ -67,6 +78,12 @@
|
|
|
67
78
|
</slot>
|
|
68
79
|
</template>
|
|
69
80
|
</q-table>
|
|
81
|
+
<s-pagination2
|
|
82
|
+
v-if="!hideBottom"
|
|
83
|
+
v-model="paginationModel.page"
|
|
84
|
+
:lastPage="pagesNumber"
|
|
85
|
+
class="q-mt-md"
|
|
86
|
+
/>
|
|
70
87
|
</template>
|
|
71
88
|
|
|
72
89
|
<script>
|
|
@@ -74,7 +91,7 @@ import {
|
|
|
74
91
|
QTable, QInnerLoading, QTd, QIcon,
|
|
75
92
|
} from 'quasar';
|
|
76
93
|
import {
|
|
77
|
-
defineComponent, onMounted, ref,
|
|
94
|
+
defineComponent, onMounted, ref, computed,
|
|
78
95
|
} from 'vue';
|
|
79
96
|
import { useResizable } from '../composables/table/use-resizable';
|
|
80
97
|
import { useNavigator } from '../composables/table/use-navigator';
|
|
@@ -88,6 +105,21 @@ export default defineComponent({
|
|
|
88
105
|
QIcon,
|
|
89
106
|
},
|
|
90
107
|
props: {
|
|
108
|
+
pagination: {
|
|
109
|
+
type: Object,
|
|
110
|
+
default: () => ({
|
|
111
|
+
page: 1,
|
|
112
|
+
rowsPerPage: 50,
|
|
113
|
+
}),
|
|
114
|
+
},
|
|
115
|
+
hideBottom: {
|
|
116
|
+
type: Boolean,
|
|
117
|
+
default: false,
|
|
118
|
+
},
|
|
119
|
+
noDataLabel: {
|
|
120
|
+
type: String,
|
|
121
|
+
default: '데이터 조회가 필요합니다',
|
|
122
|
+
},
|
|
91
123
|
columns: {
|
|
92
124
|
type: Array,
|
|
93
125
|
default: () => [],
|
|
@@ -126,6 +158,7 @@ export default defineComponent({
|
|
|
126
158
|
},
|
|
127
159
|
},
|
|
128
160
|
setup(props, { emit, attrs }) {
|
|
161
|
+
const paginationModel = ref(props.pagination);
|
|
129
162
|
const sTableRef = ref(null);
|
|
130
163
|
const {
|
|
131
164
|
focusCell,
|
|
@@ -164,6 +197,8 @@ export default defineComponent({
|
|
|
164
197
|
closeInput,
|
|
165
198
|
editIcon,
|
|
166
199
|
updateSelected,
|
|
200
|
+
paginationModel,
|
|
201
|
+
pagesNumber: computed(() => Math.ceil((paginationModel.value.rowsNumber || props.rows.length) / paginationModel.value.rowsPerPage)),
|
|
167
202
|
};
|
|
168
203
|
},
|
|
169
204
|
});
|
|
@@ -233,7 +268,6 @@ export default defineComponent({
|
|
|
233
268
|
}
|
|
234
269
|
}
|
|
235
270
|
.s-select-table {
|
|
236
|
-
margin-bottom: $pagination-size;
|
|
237
271
|
.q-table__middle {
|
|
238
272
|
.q-table {
|
|
239
273
|
thead {
|