feat(app): 初始化应用路由与基础样式- 添加 about 页面并实现页面间导航
- 更新全局样式,设置背景色与文字颜色 -优化 Header 组件,美化窗口控制按钮 - 引入持久化存储工具类 - 调整 Tauri 配置,设置构建路径与窗口最小尺寸- 替换 SVG 图标文件为 sprite 形式
This commit is contained in:
@@ -1,12 +1,16 @@
|
||||
<div>
|
||||
<h1>112323{title}</h1>
|
||||
<p>{description}</p>
|
||||
<div class="app-container">
|
||||
|
||||
<ul>
|
||||
|
||||
<li on:click={() => goto('/about')}>关于</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<style>
|
||||
|
||||
</style>
|
||||
|
||||
<script>
|
||||
const title = 'About';
|
||||
const description = 'This is the about page';
|
||||
|
||||
import { goto } from '$app/navigation';
|
||||
</script>
|
||||
7
src/routes/about/+page.svelte
Normal file
7
src/routes/about/+page.svelte
Normal file
@@ -0,0 +1,7 @@
|
||||
<script>
|
||||
import { goto } from '$app/navigation';
|
||||
</script>
|
||||
|
||||
<ul>
|
||||
<li on:click={() => goto('/')}>首页</li>
|
||||
</ul>
|
||||
Reference in New Issue
Block a user