quasar-ui-sellmate-ui-kit 3.14.30 → 3.14.32
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 +149 -129
- package/dist/index.umd.min.js +2 -2
- package/package.json +1 -1
- package/src/components/SDatePicker.vue +3 -18
- package/src/components/STable.vue +43 -7
package/package.json
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
<template>
|
|
2
|
+
{{ dateValue }}
|
|
2
3
|
<q-input
|
|
3
4
|
dense
|
|
4
5
|
outlined
|
|
@@ -33,7 +34,6 @@
|
|
|
33
34
|
>
|
|
34
35
|
<q-menu v-model="calendarOpen" fit class="date-picker-wrapper" :offset="[12, 12]">
|
|
35
36
|
<q-date
|
|
36
|
-
v-if="range"
|
|
37
37
|
v-model="dateValue"
|
|
38
38
|
minimal
|
|
39
39
|
:range="range"
|
|
@@ -45,19 +45,6 @@
|
|
|
45
45
|
@range-end="resetDate"
|
|
46
46
|
@update:modelValue="dateUpdate"
|
|
47
47
|
/>
|
|
48
|
-
<q-date
|
|
49
|
-
v-else
|
|
50
|
-
v-model="processedDateValue"
|
|
51
|
-
minimal
|
|
52
|
-
:range="range"
|
|
53
|
-
color="positive"
|
|
54
|
-
class="q-pa-none"
|
|
55
|
-
:options="optionsFn"
|
|
56
|
-
:locale="lang ? locale[lang] : {}"
|
|
57
|
-
@range-start="getRangeStartDay"
|
|
58
|
-
@range-end="resetDate"
|
|
59
|
-
@update:modelValue="dateUpdate"
|
|
60
|
-
/>
|
|
61
48
|
</q-menu>
|
|
62
49
|
</q-btn>
|
|
63
50
|
</template>
|
|
@@ -147,9 +134,8 @@
|
|
|
147
134
|
);
|
|
148
135
|
|
|
149
136
|
const dateValue = ref(props.modelValue);
|
|
150
|
-
const processedDateValue = ref(props.modelValue);
|
|
151
137
|
|
|
152
|
-
function dateUpdate(
|
|
138
|
+
function dateUpdate() {
|
|
153
139
|
if (props.range) {
|
|
154
140
|
if (typeof dateValue.value === 'string') {
|
|
155
141
|
dateValue.value = {
|
|
@@ -162,8 +148,7 @@
|
|
|
162
148
|
}
|
|
163
149
|
inputDate.value = `${dateValue.value.from} ~ ${dateValue.value.to}`;
|
|
164
150
|
} else {
|
|
165
|
-
dateValue.value =
|
|
166
|
-
processedDateValue.value = dateVal;
|
|
151
|
+
dateValue.value = date.formatDate(dateValue.value, 'YYYY-MM-DD');
|
|
167
152
|
inputDate.value = dateValue.value;
|
|
168
153
|
}
|
|
169
154
|
calendarOpen.value = false;
|
|
@@ -76,13 +76,25 @@
|
|
|
76
76
|
<slot :name="slotName" :key="`slot-${index}`" v-bind="data"> </slot>
|
|
77
77
|
</template>
|
|
78
78
|
</q-table>
|
|
79
|
-
<
|
|
79
|
+
<div
|
|
80
80
|
v-if="paginationModel.rowsPerPage !== 0 && ((!hideBottom && pagesNumber > 1) || showBottom)"
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
81
|
+
class="bg-grey_05 s-border-radius-sm s-border-top-none s-border-grey_30 s-pagination-wrapper relative-position"
|
|
82
|
+
>
|
|
83
|
+
<s-pagination
|
|
84
|
+
v-model="paginationModel.page"
|
|
85
|
+
:lastPage="pagesNumber"
|
|
86
|
+
@update:model-value="updatePagination"
|
|
87
|
+
/>
|
|
88
|
+
<s-select
|
|
89
|
+
v-if="usePerPageSelect"
|
|
90
|
+
:options="perPageOptions"
|
|
91
|
+
v-model="paginationModel.rowsPerPage"
|
|
92
|
+
emit-value
|
|
93
|
+
map-options
|
|
94
|
+
class="absolute s-width-120 rows-per-page"
|
|
95
|
+
@update:model-value="updateRowsPerPage"
|
|
96
|
+
/>
|
|
97
|
+
</div>
|
|
86
98
|
</template>
|
|
87
99
|
|
|
88
100
|
<script>
|
|
@@ -93,7 +105,7 @@
|
|
|
93
105
|
|
|
94
106
|
export default defineComponent({
|
|
95
107
|
name: 'STable',
|
|
96
|
-
emits: ['update:page', 'update:focused', 'field-updated', 'request'],
|
|
108
|
+
emits: ['update:page', 'update:rowsPerPage', 'update:focused', 'field-updated', 'request'],
|
|
97
109
|
components: {
|
|
98
110
|
QTable,
|
|
99
111
|
QInnerLoading,
|
|
@@ -166,6 +178,19 @@
|
|
|
166
178
|
type: Boolean,
|
|
167
179
|
default: false,
|
|
168
180
|
},
|
|
181
|
+
usePerPageSelect: {
|
|
182
|
+
type: Boolean,
|
|
183
|
+
default: false,
|
|
184
|
+
},
|
|
185
|
+
perPageOptions: {
|
|
186
|
+
type: Array,
|
|
187
|
+
default: () => [
|
|
188
|
+
{ label: '50개씩 보기', value: 50 },
|
|
189
|
+
{ label: '100개씩 보기', value: 100 },
|
|
190
|
+
{ label: '150개씩 보기', value: 150 },
|
|
191
|
+
{ label: '200개씩 보기', value: 200 },
|
|
192
|
+
],
|
|
193
|
+
},
|
|
169
194
|
},
|
|
170
195
|
setup(props, { emit, attrs }) {
|
|
171
196
|
const tablePagination = ref(props.pagination);
|
|
@@ -187,6 +212,11 @@
|
|
|
187
212
|
}
|
|
188
213
|
}
|
|
189
214
|
|
|
215
|
+
function updateRowsPerPage(value) {
|
|
216
|
+
emit('update:rowsPerPage', value);
|
|
217
|
+
updatePagination(1);
|
|
218
|
+
}
|
|
219
|
+
|
|
190
220
|
const sTableRef = ref(null);
|
|
191
221
|
const { focusCell, isFocused, editing, inputRef, inputData, closeInput, editIcon } =
|
|
192
222
|
useNavigator(props, attrs, emit);
|
|
@@ -316,6 +346,7 @@
|
|
|
316
346
|
Math.ceil(props.rows.length / paginationModel.value.rowsPerPage),
|
|
317
347
|
),
|
|
318
348
|
updatePagination,
|
|
349
|
+
updateRowsPerPage,
|
|
319
350
|
};
|
|
320
351
|
},
|
|
321
352
|
});
|
|
@@ -576,4 +607,9 @@
|
|
|
576
607
|
pointer-events: none;
|
|
577
608
|
}
|
|
578
609
|
}
|
|
610
|
+
.rows-per-page {
|
|
611
|
+
right: 20px;
|
|
612
|
+
top: 50%;
|
|
613
|
+
transform: translateY(-50%);
|
|
614
|
+
}
|
|
579
615
|
</style>
|