[fix] set rowsNumber after load side
This commit is contained in:
parent
f5c6bcff6f
commit
ed0c74b031
|
@ -169,7 +169,7 @@
|
|||
|
||||
<script lang="ts">
|
||||
import DrinkPriceVolumes from '../components/CalculationTable/DrinkPriceVolumes.vue';
|
||||
import { defineComponent, onMounted, ComputedRef, computed, ref } from 'vue';
|
||||
import { defineComponent, onBeforeMount, ComputedRef, computed, ref } from 'vue';
|
||||
import { Drink, usePricelistStore, DrinkPriceVolume } from '../store';
|
||||
import MinPriceSetting from '../components/MinPriceSetting.vue';
|
||||
import { api, hasPermission } from '@flaschengeist/api';
|
||||
|
@ -206,7 +206,7 @@ export default defineComponent({
|
|||
setup(props) {
|
||||
const store = usePricelistStore();
|
||||
|
||||
onMounted(() => {
|
||||
onBeforeMount(() => {
|
||||
//void store.getDrinks();
|
||||
onRequest({
|
||||
pagination: pagination.value,
|
||||
|
@ -404,16 +404,17 @@ export default defineComponent({
|
|||
offset: startRow,
|
||||
limit: fetchCount,
|
||||
descending,
|
||||
search_name: props.filter.value,
|
||||
search_key: props.filter.key,
|
||||
search_name: props.filter?.value,
|
||||
search_key: props.filter?.key,
|
||||
});
|
||||
pagination.value.page = page;
|
||||
pagination.value.rowsPerPage = rowsPerPage;
|
||||
pagination.value.sortBy = sortBy;
|
||||
pagination.value.descending = descending;
|
||||
console.log('result', result.count);
|
||||
if (result.count) pagination.value.rowsNumber = result.count;
|
||||
} catch (error) {
|
||||
//..
|
||||
console.warn(error)
|
||||
}
|
||||
loading.value = false;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue