chore: Update data loaders defineBasicLoader function in data-loaders.[id].vue
All checks were successful
CI / cache-and-install (push) Successful in 1m17s

This commit is contained in:
严浩
2024-08-20 16:39:01 +08:00
parent d0698b26fa
commit fc2cc800d1

View File

@ -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' };
},