From b7f03197c7baa9d52e033fbe1c39a8887c62911e Mon Sep 17 00:00:00 2001 From: Vixalie Date: Thu, 7 Aug 2025 22:18:04 +0800 Subject: [PATCH] =?UTF-8?q?feat(navigation):=20=E6=B7=BB=E5=8A=A0=20Demo?= =?UTF-8?q?=20=E9=A1=B5=E9=9D=A2=E8=B7=AF=E7=94=B1=E5=92=8C=E7=BB=84?= =?UTF-8?q?=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 在 Layout 组件中添加了 Demo 页面的导航链接 - 在主路由中增加了 /demo 路径的路由 - 新增了 ComponentsDemo 组件用于 Demo 页面显示 --- src/Layout.tsx | 4 ++++ src/index.tsx | 4 ++++ src/pages/ComponentsDemo.tsx | 9 +++++++++ 3 files changed, 17 insertions(+) create mode 100644 src/pages/ComponentsDemo.tsx diff --git a/src/Layout.tsx b/src/Layout.tsx index 8955a72..4419571 100644 --- a/src/Layout.tsx +++ b/src/Layout.tsx @@ -50,6 +50,10 @@ const Layout: ParentComponent = (props) => { Settings + + + Demo + diff --git a/src/index.tsx b/src/index.tsx index 0eade6f..2caf88a 100644 --- a/src/index.tsx +++ b/src/index.tsx @@ -6,12 +6,16 @@ import './index.css'; import { Route, Router } from '@solidjs/router'; import { render } from 'solid-js/web'; import Layout from './Layout'; +import ComponentsDemo from './pages/ComponentsDemo'; import Models from './pages/Models'; +import Settings from './pages/Settings'; render( () => ( + + ), document.getElementById('root') as HTMLElement, diff --git a/src/pages/ComponentsDemo.tsx b/src/pages/ComponentsDemo.tsx new file mode 100644 index 0000000..032d4e8 --- /dev/null +++ b/src/pages/ComponentsDemo.tsx @@ -0,0 +1,9 @@ +import { Component } from 'solid-js'; + +const ComponentsDemo: Component = () => { + return ( +
+ ); +}; + +export default ComponentsDemo;