feat(pages): 重构首页界面并新增功能模块页面
- 在 app.config.ts 中添加 pages/feature/index 页面路径 - 更新首页标题为"工具箱",修改导航栏样式配置 - 移除首页底部导航栏相关样式和代码逻辑 - 重命名品牌标识卡片为公司信息卡片,调整样式布局 - 将功能入口网格改为功能模块网格,使用 CSS Grid 布局 - 替换功能图标为 NutUI 图标组件,优化图标展示 - 新增 pages/feature/index 页面及相关配置文件 - 实现动态功能页面,支持通过参数显示不同功能模块 - 调整项目配置信息,更新描述和应用ID
This commit is contained in:
33
src/pages/feature/index.tsx
Normal file
33
src/pages/feature/index.tsx
Normal file
@@ -0,0 +1,33 @@
|
||||
import Taro, { useRouter } from '@tarojs/taro'
|
||||
import { useEffect, useMemo } from 'react'
|
||||
import { View, Text } from '@tarojs/components'
|
||||
import './index.scss'
|
||||
|
||||
function FeaturePage() {
|
||||
const { params } = useRouter()
|
||||
|
||||
const title = useMemo(() => {
|
||||
const raw = params?.title || '功能'
|
||||
try {
|
||||
return decodeURIComponent(raw)
|
||||
} catch {
|
||||
return raw
|
||||
}
|
||||
}, [params?.title])
|
||||
|
||||
useEffect(() => {
|
||||
Taro.setNavigationBarTitle({ title })
|
||||
}, [title])
|
||||
|
||||
return (
|
||||
<View className="feature-page">
|
||||
<View className="feature-card">
|
||||
<Text className="feature-title">{title}</Text>
|
||||
<Text className="feature-desc">这是占位页面,可在此接入实际业务功能与路由。</Text>
|
||||
</View>
|
||||
</View>
|
||||
)
|
||||
}
|
||||
|
||||
export default FeaturePage
|
||||
|
||||
Reference in New Issue
Block a user