forked from verdnatura/salix-front
fix: refs #7623 update add updateRoute prop in VnPaginate
This commit is contained in:
parent
ec7b0c1416
commit
9169b793a9
|
@ -21,7 +21,7 @@ const currentUser = ref(state.getUser());
|
|||
const newNote = ref('');
|
||||
const vnPaginateRef = ref();
|
||||
function handleKeyUp(event) {
|
||||
if (event.key === 'Enter') {
|
||||
if (event.key === 'Enter') {
|
||||
event.preventDefault();
|
||||
if (!event.shiftKey) insert();
|
||||
}
|
||||
|
@ -77,6 +77,7 @@ async function insert() {
|
|||
auto-load
|
||||
ref="vnPaginateRef"
|
||||
class="show"
|
||||
:update-router="false"
|
||||
v-bind="$attrs"
|
||||
>
|
||||
<template #body="{ rows }">
|
||||
|
|
|
@ -66,6 +66,10 @@ const props = defineProps({
|
|||
type: Boolean,
|
||||
default: false,
|
||||
},
|
||||
updateRouter: {
|
||||
type: Boolean,
|
||||
default: true,
|
||||
},
|
||||
});
|
||||
|
||||
const emit = defineEmits(['onFetch', 'onPaginate', 'onChange']);
|
||||
|
@ -120,7 +124,7 @@ async function fetch(params) {
|
|||
useArrayData(props.dataKey, params);
|
||||
store.filter.skip = 0;
|
||||
store.skip = 0;
|
||||
await arrayData.fetch({ append: false });
|
||||
await arrayData.fetch({ append: false, updateRouter: props.updateRouter });
|
||||
if (!store.hasMoreData) {
|
||||
isLoading.value = false;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue