forked from verdnatura/salix-front
feat: refs #6992 comments
This commit is contained in:
parent
50bce40613
commit
6349a3e790
|
@ -1,5 +1,5 @@
|
||||||
import { onMounted, ref, computed } from 'vue';
|
import { onMounted, ref, computed } from 'vue';
|
||||||
import { useRouter, useRoute } from 'vue-router';
|
import { useRoute } from 'vue-router';
|
||||||
import axios from 'axios';
|
import axios from 'axios';
|
||||||
import { useArrayDataStore } from 'stores/useArrayDataStore';
|
import { useArrayDataStore } from 'stores/useArrayDataStore';
|
||||||
import { buildFilter } from 'filters/filterPanel';
|
import { buildFilter } from 'filters/filterPanel';
|
||||||
|
@ -15,7 +15,6 @@ export function useArrayData(key, userOptions) {
|
||||||
|
|
||||||
const store = arrayDataStore.get(key);
|
const store = arrayDataStore.get(key);
|
||||||
const hasMoreData = ref(false);
|
const hasMoreData = ref(false);
|
||||||
const router = useRouter();
|
|
||||||
const route = useRoute();
|
const route = useRoute();
|
||||||
let canceller = null;
|
let canceller = null;
|
||||||
|
|
||||||
|
|
|
@ -11,7 +11,11 @@ describe('useArrayData', () => {
|
||||||
writable: true,
|
writable: true,
|
||||||
value: 'localhost:9000/invoice-in/list',
|
value: 'localhost:9000/invoice-in/list',
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// Mock the window.history.pushState method within useArrayData
|
||||||
window.history.pushState = (data, title, url) => (window.location.href = url);
|
window.history.pushState = (data, title, url) => (window.location.href = url);
|
||||||
|
|
||||||
|
// Mock the URL constructor within useArrayData
|
||||||
global.URL = class URL {
|
global.URL = class URL {
|
||||||
constructor(url) {
|
constructor(url) {
|
||||||
this.hash = url.split('localhost:9000/')[1];
|
this.hash = url.split('localhost:9000/')[1];
|
||||||
|
|
Loading…
Reference in New Issue