chore: Update data loaders defineBasicLoader function in data-loaders.[id].vue
All checks were successful
CI / cache-and-install (push) Successful in 1m17s
All checks were successful
CI / cache-and-install (push) Successful in 1m17s
This commit is contained in:
@ -1,13 +1,11 @@
|
||||
<script lang="ts">
|
||||
// https://uvr.esm.is/data-loaders/rfc.html
|
||||
|
||||
import { defineBasicLoader } from 'unplugin-vue-router/data-loaders/basic';
|
||||
// https://uvr.esm.is/data-loaders/rfc.html
|
||||
|
||||
export const usePageData = defineBasicLoader(
|
||||
'DataLoadersId',
|
||||
async (...args) => {
|
||||
console.log('[DefineLoaderFn]', 'args :>> ', args);
|
||||
const [route] = args;
|
||||
async (route, ...otherArgs) => {
|
||||
console.log('[DefineLoaderFn]', 'otherArgs :>> ', otherArgs);
|
||||
await new Promise((resolve) => setTimeout(resolve, 777));
|
||||
return { idFromPreviousPage: route.params.id, someOtherData: 'someOtherData' };
|
||||
},
|
||||
|
Reference in New Issue
Block a user