update
This commit is contained in:
6
.vscode/settings.json
vendored
6
.vscode/settings.json
vendored
@@ -1,6 +0,0 @@
|
||||
{
|
||||
"workbench.editorAssociations": {
|
||||
// "*.md": "vscode.markdown.preview.editor" // 预览打开
|
||||
"*.md": "default" // 默认打开
|
||||
}
|
||||
}
|
||||
@@ -7,13 +7,14 @@ import pkgs from './package.json';
|
||||
import tailwindcss from '@tailwindcss/vite';
|
||||
const isDev = process.env.NODE_ENV === 'development';
|
||||
|
||||
let target = process.env.VITE_API_URL || 'https://localhost:51015';
|
||||
let target = process.env.VITE_API_URL || 'http://localhost:51015';
|
||||
const apiProxy = { target: target, changeOrigin: true, ws: true, rewriteWsOrigin: true, secure: false, cookieDomainRewrite: 'localhost' };
|
||||
let proxy = {
|
||||
'/root/': {
|
||||
target: `${target}/root/`,
|
||||
},
|
||||
'/api': apiProxy,
|
||||
'/client': apiProxy,
|
||||
};
|
||||
|
||||
const basename = isDev ? undefined : `${pkgs.basename}`;
|
||||
|
||||
30
package.json
30
package.json
@@ -16,45 +16,45 @@
|
||||
"license": "MIT",
|
||||
"type": "module",
|
||||
"dependencies": {
|
||||
"@astrojs/mdx": "^4.3.8",
|
||||
"@astrojs/react": "^4.4.0",
|
||||
"@astrojs/mdx": "^4.3.10",
|
||||
"@astrojs/react": "^4.4.2",
|
||||
"@astrojs/sitemap": "^3.6.0",
|
||||
"@floating-ui/dom": "^1.7.4",
|
||||
"@kevisual/context": "^0.0.4",
|
||||
"@kevisual/query": "0.0.29",
|
||||
"@kevisual/query-login": "^0.0.6",
|
||||
"@kevisual/registry": "^0.0.1",
|
||||
"@radix-ui/react-slot": "^1.2.3",
|
||||
"@tailwindcss/vite": "^4.1.16",
|
||||
"astro": "^5.15.1",
|
||||
"@radix-ui/react-slot": "^1.2.4",
|
||||
"@tailwindcss/vite": "^4.1.17",
|
||||
"astro": "^5.15.8",
|
||||
"class-variance-authority": "^0.7.1",
|
||||
"clsx": "^2.1.1",
|
||||
"dayjs": "^1.11.18",
|
||||
"es-toolkit": "^1.41.0",
|
||||
"dayjs": "^1.11.19",
|
||||
"es-toolkit": "^1.42.0",
|
||||
"github-markdown-css": "^5.8.1",
|
||||
"lucide-react": "^0.548.0",
|
||||
"lucide-react": "^0.554.0",
|
||||
"nanoid": "^5.1.6",
|
||||
"qrcode": "^1.5.4",
|
||||
"react": "^19.2.0",
|
||||
"react-dom": "^19.2.0",
|
||||
"react-toastify": "^11.0.5",
|
||||
"tailwind-merge": "^3.3.1",
|
||||
"tailwind-merge": "^3.4.0",
|
||||
"zustand": "^5.0.8"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@kevisual/router": "0.0.30",
|
||||
"@kevisual/router": "0.0.33",
|
||||
"@kevisual/store": "0.0.9",
|
||||
"@kevisual/types": "^0.0.10",
|
||||
"@tailwindcss/vite": "^4.1.16",
|
||||
"@tailwindcss/vite": "^4.1.17",
|
||||
"@types/qrcode": "^1.5.6",
|
||||
"@types/react": "^19.2.2",
|
||||
"@types/react-dom": "^19.2.2",
|
||||
"@types/react": "^19.2.5",
|
||||
"@types/react-dom": "^19.2.3",
|
||||
"@vitejs/plugin-basic-ssl": "^2.1.0",
|
||||
"dotenv": "^17.2.3",
|
||||
"react": "^19.2.0",
|
||||
"tailwindcss": "^4.1.16",
|
||||
"tailwindcss": "^4.1.17",
|
||||
"tw-animate-css": "^1.4.0",
|
||||
"vite": "^7.1.12"
|
||||
"vite": "^7.2.2"
|
||||
},
|
||||
"pnpm": {
|
||||
"onlyBuiltDependencies": [
|
||||
|
||||
491
pnpm-lock.yaml
generated
491
pnpm-lock.yaml
generated
File diff suppressed because it is too large
Load Diff
@@ -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
8
src/modules/query.ts
Normal file
@@ -0,0 +1,8 @@
|
||||
import { Query } from "@kevisual/query";
|
||||
|
||||
|
||||
export const query = new Query();
|
||||
|
||||
export const local = new Query({
|
||||
url: '/client/router'
|
||||
});
|
||||
Reference in New Issue
Block a user