This commit is contained in:
2025-11-28 15:03:34 +08:00
parent 0abe862aff
commit b310413bfc
6 changed files with 221 additions and 327 deletions

View File

@@ -1,6 +1,6 @@
import { app } from '../ai';
import { useEffect, useState } from 'react';
import { local } from '@/modules/query';
const getAppRoutes = () => {
const appRoutes = app.routes.map((route) => {
return {
@@ -19,6 +19,13 @@ const fetchTest = async () => {
const data = await response.json();
console.log('Fetch Test Data:', data);
}
const fetchLocal = async () => {
const res = await local.post({
path: 'client',
key: 'time'
})
console.log('Local Query Test Data:', res);
}
const dynamicImport = async () => {
// @ts-ignore
const module = await import('http://localhost:4321/test-import.js');
@@ -31,6 +38,7 @@ export const App = () => {
useEffect(() => {
setAppRoutes(getAppRoutes());
fetchLocal();
}, []);
return <div className='container mx-auto p-4'>
<div>

8
src/modules/query.ts Normal file
View File

@@ -0,0 +1,8 @@
import { Query } from "@kevisual/query";
export const query = new Query();
export const local = new Query({
url: '/client/router'
});