Compare commits

...

73 Commits
main ... spa

Author SHA1 Message Date
GitHub Actions
ade652c4b1 Auto merge base into spa 2025-06-21 02:14:34 +00:00
GitHub Actions
9952611dd1 Auto merge base into spa 2025-06-21 02:12:02 +00:00
GitHub Actions
741975114c Auto merge base into spa 2025-06-21 01:26:19 +00:00
GitHub Actions
7e4e5a19ad Auto merge base into spa 2025-06-21 01:19:11 +00:00
feige996
a6aeab23e1 Merge branch 'base' into spa 2025-06-20 14:47:01 +08:00
GitHub Actions
e60d924281 Auto merge base into spa 2025-06-16 01:53:26 +00:00
GitHub Actions
48a37ab36e Auto merge base into spa 2025-06-15 14:28:47 +00:00
GitHub Actions
9664664762 Auto merge base into spa 2025-06-15 09:04:45 +00:00
GitHub Actions
9c907d3cd2 Auto merge base into spa 2025-06-15 08:46:49 +00:00
GitHub Actions
f1833571bd Auto merge base into spa 2025-06-14 04:36:19 +00:00
GitHub Actions
1fbac1d13a Auto merge base into spa 2025-06-14 04:00:34 +00:00
GitHub Actions
533f968a7f Auto merge base into spa 2025-06-14 03:13:51 +00:00
GitHub Actions
1784880890 Auto merge base into spa 2025-06-14 02:46:13 +00:00
GitHub Actions
13be95ad42 Auto merge base into spa 2025-06-13 10:34:51 +00:00
GitHub Actions
03071099a7 Auto merge base into spa 2025-06-13 10:33:45 +00:00
GitHub Actions
cd1cff5e4b Auto merge base into spa 2025-06-13 09:01:21 +00:00
GitHub Actions
9ed17c5acb Auto merge base into spa 2025-06-13 09:00:53 +00:00
GitHub Actions
5dcaf77949 Auto merge base into spa 2025-06-13 08:47:43 +00:00
GitHub Actions
b8d0133200 Auto merge base into spa 2025-06-13 08:38:56 +00:00
GitHub Actions
76f21fa406 Auto merge base into spa 2025-06-11 15:39:50 +00:00
GitHub Actions
5e79debf2c Auto merge base into spa 2025-06-10 09:14:21 +00:00
GitHub Actions
51ff0413c0 Auto merge base into spa 2025-06-06 15:46:16 +00:00
GitHub Actions
3cc8c43ff5 Auto merge base into spa 2025-06-06 14:59:38 +00:00
GitHub Actions
d56ba37c6d Auto merge base into spa 2025-06-06 14:42:49 +00:00
GitHub Actions
0700391fe2 Auto merge base into spa 2025-06-06 04:45:19 +00:00
GitHub Actions
1cc6ba0e8c Auto merge base into spa 2025-06-06 04:41:25 +00:00
GitHub Actions
b1535fdae5 Auto merge base into spa 2025-06-05 14:56:48 +00:00
GitHub Actions
6c9fb3ff51 Auto merge base into spa 2025-06-04 14:44:05 +00:00
feige996
d4d2608c46 Merge branch 'spa' of https://gitee.com/feige996/unibest into spa 2025-06-04 17:56:27 +08:00
GitHub Actions
cd52284a5b Auto merge base into spa 2025-06-04 09:41:11 +00:00
GitHub Actions
d1d00b7f75 Auto merge base into spa 2025-06-04 07:20:26 +00:00
GitHub Actions
e9f81aa347 Auto merge base into spa 2025-06-04 01:03:41 +00:00
GitHub Actions
a605313eb9 Auto merge base into spa 2025-06-04 01:03:10 +00:00
GitHub Actions
f23ff75a68 Auto merge base into spa 2025-06-04 01:00:58 +00:00
GitHub Actions
f4207824bf Auto merge base into spa 2025-06-03 12:04:11 +00:00
GitHub Actions
b240690ea8 Auto merge base into spa 2025-06-03 11:51:52 +00:00
GitHub Actions
9aacf11a63 Auto merge base into spa 2025-06-03 11:50:31 +00:00
GitHub Actions
1d35a08e11 Auto merge base into spa 2025-06-03 11:43:13 +00:00
GitHub Actions
a31ceadf7b Auto merge base into spa 2025-06-03 10:12:13 +00:00
GitHub Actions
9b0eb79074 Auto merge base into spa 2025-06-03 09:48:13 +00:00
GitHub Actions
32d9c1b64a Auto merge base into spa 2025-06-03 09:26:52 +00:00
GitHub Actions
93ad9785c6 Auto merge base into spa 2025-06-03 06:49:14 +00:00
feige996
2889a7055b fix: 更新应用ID并禁用app平台的copyNativeRes插件
更新manifest.json和.env文件中的应用ID为'__UNI__D1E5001'以匹配新配置
注释掉vite.config.ts中app平台的copyNativeRes插件调用以优化构建流程
2025-06-03 14:38:52 +08:00
feige996
381343a4cf Merge commit 'de55a88d0ea187b6a01613e10050c580d05e3758' into spa 2025-06-03 12:56:04 +08:00
GitHub Actions
c78f927bb8 Auto merge base into spa 2025-06-03 02:20:33 +00:00
GitHub Actions
d2b4d7f3c4 Auto merge base into spa 2025-06-03 02:14:09 +00:00
GitHub Actions
5603dc4aa0 Auto merge base into spa 2025-06-03 01:28:54 +00:00
GitHub Actions
5ee75213d5 Auto merge base into spa 2025-06-03 01:17:53 +00:00
GitHub Actions
0f104bedff Auto merge base into spa 2025-05-30 03:17:55 +00:00
GitHub Actions
af29c1991d Auto merge base into spa 2025-05-28 08:18:01 +00:00
GitHub Actions
1239c5e89a Auto merge base into spa 2025-05-28 07:21:17 +00:00
GitHub Actions
54e67c43c4 Auto merge base into spa 2025-05-28 07:15:44 +00:00
GitHub Actions
817b6c4a81 Auto merge base into spa 2025-05-28 03:40:46 +00:00
feige996
bfdab82d39 Merge branch 'base' into spa 2025-05-28 11:35:23 +08:00
feige996
566e5c6031 fix: 移除自定义导航栏样式并更新模板分支显示
- 移除关于页面的自定义导航栏配置及相关代码
- 将首页显示的模板分支从"base"更新为"spa"
- 清理了不再需要的导航栏组件注释代码
```

这个提交消息:
1. 使用"fix"类型,因为这些修改主要是修复/清理性质的
2. 省略了scope,因为修改涉及多个文件/功能
3. 描述简洁说明了主要修改内容
4. 在body中列出了具体的修改点,没有重复描述中的信息
5. 使用了中文并保持简洁明了
6. 遵循了50字符限制和祈使语气的要求
2025-05-28 10:08:33 +08:00
feige996
08f3f1ae9b Merge branch 'base' into spa 2025-05-28 00:59:50 +08:00
feige996
938ca363e5 Merge branch 'base' into spa 2025-05-28 00:53:33 +08:00
GitHub Actions
b7b0f04557 Auto merge base into spa 2025-05-27 08:55:54 +00:00
feige996
ba11c710c0 Merge branch 'base' into spa 2025-05-27 16:10:13 +08:00
feige996
27f23173fd feat(tabbar): 实现新的底部导航栏布局和功能
- 将原有tabbar组件重构为layout布局方式
- 新增tabbar store管理导航项状态和路由
- 为首页和关于页添加tabbar布局配置
- 移除旧的tabbar组件实现
- 添加tabbar路由跳转功能
- 更新类型定义以支持新组件
```

这个提交消息:
1. 使用feat类型,因为这是新增功能
2. 添加了scope(tabbar)明确修改范围
3. 简明描述了主要变更内容
4. 使用中文符合要求
5. 保持了50字符以内的描述行
6. 在正文中列出了主要变更点而不重复描述
2025-05-27 00:22:40 +08:00
feige996
e123a5cb1b feat(store): 添加tabbar模块并导出
新增tabbar状态管理模块,包含tabbar项的状态、getters和actions
在store统一导出文件中添加tabbar模块的导出
2025-05-26 23:43:15 +08:00
feige996
cfced2e6d8 refactor: 移除tabbar相关配置和逻辑
- 删除pages.config.ts和pages.json中的tabBar配置
- 移除default.vue中与tabbar相关的逻辑代码
- 更新类型声明文件中的SwitchTabOptions接口
- 添加Tabbar组件到全局组件声明
```

这个提交消息:
1. 使用了`refactor`类型,因为这是代码重构,不改变功能但优化了代码结构
2. 简洁地描述了主要变更内容
3. 在消息体中列出了具体的修改点
4. 使用了中文并保持简洁明了
5. 遵循了50字符限制和祈使语气的要求
2025-05-26 23:40:38 +08:00
feige996
f91fff8004 Merge branch 'base' into spa 2025-05-26 23:31:35 +08:00
GitHub Actions
57addd9531 Auto merge base into spa 2025-05-22 12:02:39 +00:00
GitHub Actions
c3a26b0df9 Auto merge base into spa 2025-05-21 02:17:03 +00:00
GitHub Actions
b9ee449c5c Auto merge base into spa 2025-05-19 07:12:12 +00:00
feige996
2c404a072b chore: / 2025-05-19 14:56:47 +08:00
feige996
c115cb8ab4 Merge branch 'base' into spa 2025-05-19 14:52:56 +08:00
GitHub Actions
61264eba09 Auto merge base into spa 2025-04-22 06:47:50 +00:00
laifeipeng
1693727f56 Merge branch 'base' into spa 2025-04-22 14:45:51 +08:00
laifeipeng
fd64936e36 feat: 去掉 tabbar 2025-04-22 14:44:16 +08:00
ygytsyjj
775690c405 feat(tabbar): 测试提交 2025-01-02 17:17:24 +08:00
ygytsyjj
bff59b33b1 feat(tabbar): test 2024-12-31 15:26:28 +08:00
7 changed files with 141 additions and 55 deletions

View File

@ -17,29 +17,5 @@ export default defineUniPages({
'z-paging/components/z-paging$1/z-paging$1.vue',
},
},
// 如果不需要tabBar推荐使用 spa 模板。pnpm create xxx -t spa
tabBar: {
color: '#999999',
selectedColor: '#018d71',
backgroundColor: '#F8F8F8',
borderStyle: 'black',
height: '50px',
fontSize: '10px',
iconWidth: '24px',
spacing: '3px',
list: [
{
iconPath: 'static/tabbar/home.png',
selectedIconPath: 'static/tabbar/homeHL.png',
pagePath: 'pages/index/index',
text: '首页',
},
{
iconPath: 'static/tabbar/example.png',
selectedIconPath: 'static/tabbar/exampleHL.png',
pagePath: 'pages/about/about',
text: '关于',
},
],
},
// 如果不需要tabBar可以注释掉这个配置或者直接删除
})

60
src/layouts/tabbar.vue Normal file
View File

@ -0,0 +1,60 @@
<template>
<wd-config-provider :themeVars="themeVars">
<wd-notify />
<wd-toast />
<wd-message-box />
<!-- <privacy-popup></privacy-popup> -->
<slot></slot>
<wd-tabbar
fixed
:model-value="tabbarStore.getActive.name"
@change="handleChange"
bordered
safeAreaInsetBottom
placeholder
>
<wd-tabbar-item
v-for="(item, index) in tabbarStore.getTabbarItems"
:key="index"
:name="item.name"
:value="tabbarStore.getTabbarItemValue(item.name)"
:title="item.title"
:icon="item.icon"
></wd-tabbar-item>
</wd-tabbar>
</wd-config-provider>
</template>
<script lang="ts">
export default {
options: {
addGlobalClass: true,
virtualHost: true,
styleIsolation: 'shared',
},
}
</script>
<script lang="ts" setup>
import { useTabbarStore } from '@/store/tabbar'
import { ConfigProviderThemeVars } from 'wot-design-uni'
const tabbarStore = useTabbarStore()
const themeVars = reactive<ConfigProviderThemeVars>({
colorTheme: '#fa4126',
tabsNavLineBgColor: 'red',
})
function handleChange({ value }) {
tabbarStore.setTabbarItemActive(value)
uni.navigateTo({
url: tabbarStore.getTabbarItemRoute(value),
})
}
onShow(() => {
// #ifdef APP-PLUS
uni.hideTabBar()
// #endif
})
</script>
<style lang="scss" scoped></style>

View File

@ -14,35 +14,11 @@
"^(?!z-paging-refresh|z-paging-load-more)z-paging(.*)": "z-paging/components/z-paging$1/z-paging$1.vue"
}
},
"tabBar": {
"color": "#999999",
"selectedColor": "#018d71",
"backgroundColor": "#F8F8F8",
"borderStyle": "black",
"height": "50px",
"fontSize": "10px",
"iconWidth": "24px",
"spacing": "3px",
"list": [
{
"iconPath": "static/tabbar/home.png",
"selectedIconPath": "static/tabbar/homeHL.png",
"pagePath": "pages/index/index",
"text": "首页"
},
{
"iconPath": "static/tabbar/example.png",
"selectedIconPath": "static/tabbar/exampleHL.png",
"pagePath": "pages/about/about",
"text": "关于"
}
]
},
"__esModule": true,
"pages": [
{
"path": "pages/index/index",
"type": "home",
"layout": "tabbar",
"style": {
"navigationStyle": "custom",
"navigationBarTitleText": "首页"
@ -51,9 +27,9 @@
{
"path": "pages/about/about",
"type": "page",
"layout": "tabbar",
"style": {
"navigationBarTitleText": "关于",
"navigationStyle": "custom"
"navigationBarTitleText": "关于"
}
}
],

View File

@ -1,15 +1,16 @@
<route lang="json5">
{
layout: 'tabbar',
style: {
navigationBarTitleText: '关于',
navigationStyle: 'custom', //
// navigationStyle: 'custom', //
},
}
</route>
<template>
<view>
<fg-navbar>关于</fg-navbar>
<!-- <fg-navbar>关于</fg-navbar> -->
<view
class="bg-white overflow-hidden pt-2 px-4"
:style="{ marginTop: safeAreaInsets?.top + 'px' }"

View File

@ -1,6 +1,7 @@
<!-- 使用 type="home" 属性设置首页其他页面不需要设置默认为page推荐使用json5更强大且允许注释 -->
<route lang="json5" type="home">
{
layout: 'tabbar',
style: {
navigationStyle: 'custom',
navigationBarTitleText: '首页',
@ -25,7 +26,7 @@
</view>
<view class="text-center mt-4">
模板分支是
<text class="text-green-500">base</text>
<text class="text-green-500">spa</text>
</view>
</view>
</template>

View File

@ -15,3 +15,4 @@ export default store
// 模块统一导出
export * from './user'
export * from './tabbar'

71
src/store/tabbar.ts Normal file
View File

@ -0,0 +1,71 @@
import { defineStore } from 'pinia'
export interface TabbarItem {
name: string
value: number | null
active: boolean
route: string
title: string
icon: string
}
export const useTabbarStore = defineStore('tabbar', {
state: (): { tabbarItems: TabbarItem[] } => ({
tabbarItems: [
{
name: 'index',
value: null,
active: true,
route: '/pages/index/index',
title: '首页',
icon: 'home',
},
{
name: 'about',
value: null,
active: false,
route: '/pages/about/about',
title: '关于',
icon: 'user',
},
],
}),
getters: {
getTabbarItems: (state) => {
return state.tabbarItems
},
getActive: (state) => {
const item = state.tabbarItems.find((item) => item.active)
return item || state.tabbarItems[0]
},
getTabbarItemValue: (state) => {
return (name: string) => {
const item = state.tabbarItems.find((item) => item.name === name)
return item && item.value ? item.value : null
}
},
getTabbarItemRoute: (state) => {
return (name: string) => {
const item = state.tabbarItems.find((item) => item.name === name)
return (item && item.route) ?? null
}
},
},
actions: {
setTabbarItem(name: string, value: number) {
const tabbarItem = this.tabbarItems.find((item) => item.name === name)
if (tabbarItem) {
tabbarItem.value = value
}
},
setTabbarItemActive(name: string) {
this.tabbarItems.forEach((item) => {
if (item.name === name) {
item.active = true
} else {
item.active = false
}
})
},
},
})