Compare commits

..

247 Commits

Author SHA1 Message Date
feige996
0dd0cab15d chore: 更新 package.json 中的版本号至 3.1.0 2025-06-22 16:58:18 +08:00
feige996
02d8fb1268 feat(utils): 添加查询字符串序列化工具函数替代qs库
实现一个轻量级的查询字符串序列化工具,支持基本类型和数组,用于替代第三方qs库以减少打包体积
2025-06-22 16:55:57 +08:00
feige996
ee8fc19a47 feat(env): 添加 VITE_APP_PROXY 和 UNI_PLATFORM 类型声明 2025-06-22 14:22:08 +08:00
feige996
dd11e45d5f refactor: 将类型定义文件移动到src/types目录下并添加登录相关类型
将types目录移动到src下以保持项目结构一致性
新增登录相关的类型定义文件,包含用户信息、登录返回数据等接口
2025-06-22 14:04:49 +08:00
feige996
8455f09e8c chore: 调整 vscode 文件嵌套配置 2025-06-22 13:12:42 +08:00
feige996
edefc99702 refactor(api): 将登录相关类型定义移动到types目录下 2025-06-22 13:02:10 +08:00
feige996
946ad7c976 feat(首页): 添加作者和官网信息并调整顶部间距
在首页添加作者和官网信息展示,同时将顶部图片间距从mt-12调整为mt-10以优化布局
2025-06-22 12:06:39 +08:00
feige996
cfe5634c91 ci(workflow): 添加 base-uv-ui 和 base-uview-plus 的自动合并工作流
添加两个新的工作流用于将 main 分支自动合并到 base-uv-ui 和 base-uview-plus 分支
2025-06-22 11:59:30 +08:00
feige996
2000eda414 chore: 禁用prettier并启用eslint作为默认格式化工具 2025-06-22 10:07:22 +08:00
feige996
69b7429909 style: 修改页面配置和代码片段格式
- 将首页图标类型从 'wot' 改为 'uiLib'
- 调整 Vue3 代码片段中 template 和 script 的顺序
- 格式化代码片段的缩进和换行
2025-06-22 10:04:44 +08:00
feige996
926d700b60 docs: tabbarList 2025-06-21 22:51:51 +08:00
feige996
f0cd8ee943 docs: tabbar.md 2025-06-21 22:46:42 +08:00
feige996
67f76415e1 build: auto merge to base-sard-ui 2025-06-21 19:44:24 +08:00
feige996
e67da2203c feat: uiLib 匹配 2025-06-21 19:36:04 +08:00
feige996
cb033104ee chore: // @ts-expect-error 预知的判断 2025-06-21 19:35:26 +08:00
feige996
28e59cd599 chore: 更新项目版本号至3.0.0,分支合并和eslint等重大变更 2025-06-21 17:40:14 +08:00
feige996
1af7213e96 chore: 移除oxlint及相关配置
清理不再使用的oxlint依赖及其配置文件
更新vscode设置以反映lint工具变更
2025-06-21 17:32:13 +08:00
feige996
d5c14ac3ae build: 将 ESLint 配置从 @antfu 迁移到 @uni-helper
统一使用 uni-app 生态的 ESLint 配置,保持工具链一致性
2025-06-21 17:29:42 +08:00
feige996
27d4441ca6 chore: 更新版本号至2.16.0, 使用 antfu/eslint-config 2025-06-21 17:23:51 +08:00
feige996
ea50a639ed Merge branch 'eslint' 2025-06-21 17:22:34 +08:00
feige996
e171c29d28 chore: 将 lint 工具从 oxlint 切换为 eslint 并启用多语言支持
更新 package.json 中的 lint 脚本,使用 eslint 替代 oxlint
在 .vscode/settings.json 中启用 eslint 对所有支持语言的校验
2025-06-21 17:22:06 +08:00
feige996
ae515cd85e chore: 将eslint替换为oxlint并更新vscode配置
更新package.json中的lint脚本,从eslint改为oxlint
调整.vscode/settings.json中的格式化配置,启用prettier并优化保存时的自动修复行为
2025-06-21 17:18:35 +08:00
feige996
e1654359fd style: 总算处理好所有的 eslint 报错 2025-06-21 17:11:17 +08:00
feige996
32cf872405 refactor: 在多个文件中添加process导入并调整tsconfig顺序
统一添加node:process导入以提高代码一致性
调整tsconfig.json中配置项的顺序以提升可读性
2025-06-21 17:03:45 +08:00
feige996
c355f6e8f1 chore(eslint): 更新eslint配置,禁用部分规则并添加忽略目录
添加markdown支持为false,并配置忽略目录src/uni_modules/和dist
禁用no-console等规则以提升开发体验
2025-06-21 16:59:01 +08:00
feige996
227f19a93c style: 统一代码格式和类型定义,测试eslint --fix, 还是有报错 2025-06-21 16:56:24 +08:00
feige996
9cf0c212bf build: 将 lint 工具从 oxlint 替换为 eslint
统一使用 eslint 作为代码检查工具,简化 lint-staged 配置
2025-06-21 16:53:10 +08:00
feige996
79c333e647 feat: 添加 ESLint 配置并集成到 VSCode
pnpm dlx @antfu/eslint-config@latest
2025-06-21 16:50:31 +08:00
feige996
9c074652e1 chore: 简化 commitlint 配置 2025-06-21 16:28:17 +08:00
feige996
6402f8825f docs: 修正描述中Vite的版本号从6改为5 2025-06-21 15:56:51 +08:00
feige996
4fc50a6bb5 Revert "chore: 更新.gitignore并删除未使用的配置文件"
This reverts commit 28d8000ad82b20e749f50dc1848f1e24ed588220.
2025-06-21 15:53:24 +08:00
feige996
28d8000ad8 chore: 更新.gitignore并删除未使用的配置文件
移除src/pages.json和src/manifest.json配置文件
更新.gitignore以忽略src/types目录和删除的配置文件
2025-06-21 15:50:13 +08:00
feige996
144dec8881 chore: 更新版本号至2.15.0 2025-06-21 15:33:19 +08:00
feige996
e2c319079a refactor(about): 移除未使用的导航代码并简化页面结构 2025-06-21 15:30:53 +08:00
feige996
1efb68cb9b docs: 将模板分支从tabbar更新为base 2025-06-21 15:29:36 +08:00
feige996
ba7252c332 ci(workflow): 移除不再需要的自动合并工作流
删除针对 tabbar 和 spa 分支的自动合并工作流配置,仅保留 i18n 分支的配置
2025-06-21 15:11:43 +08:00
feige996
548b0515f6 docs(pages.config): 添加关于 tabbar 配置位置的注释 2025-06-21 15:04:54 +08:00
feige996
b03f7ee310 docs: 更新README中微信平台的命令名称
将微信平台开发和生产环境的命令从`dev:mp-weixin`和`build:mp-weixin`统一简化为`dev:mp`和`build:mp`,保持命令一致性
2025-06-21 14:59:00 +08:00
feige996
e2eda79403 docs(fg-tabbar): 完善 tabbar 策略的注释说明
添加更详细的注释说明 tabbar 策略选项及其使用注意事项
提醒代码更改后需要重新运行以更新 pages.json
2025-06-21 14:55:06 +08:00
feige996
2a97bf0aaa chore(fg-tabbar): 将selectedTabbarStrategy默认值改为0 2025-06-21 14:46:50 +08:00
feige996
f8641457ad refactor(fg-tabbar): 更新tabbar策略并添加safelist配置
将selectedTabbarStrategy从0改为1以切换tabbar策略
在uno.config.ts中添加空的safelist配置
移除注释掉的i-carbon-code导入
2025-06-21 14:36:30 +08:00
feige996
407bc849ec Revert "chore: pnpm-lock.yaml"
This reverts commit 21234cdbe2bd40104cbb4abf1da2d62b44c0227e.
2025-06-21 14:31:00 +08:00
feige996
38328280c4 chore: 回退esbuild版本至0.20.2 解决ios模拟器报错 2025-06-21 14:24:30 +08:00
feige996
d2f7b5e1ec docs(layouts): 添加tabbar组件使用说明文档 2025-06-21 14:17:23 +08:00
feige996
7b3e757301 refactor(utils): 移除未使用的 tabBar 相关代码并简化导入
清理不再使用的 tabBar 相关函数和变量,简化 pages.json 的导入方式
2025-06-21 13:37:17 +08:00
feige996
2a71d02ab8 refactor(tabbar): 将 tabbar 组件从 components 移动到 layouts 目录
重构 tabbar 组件结构,将其从 components 目录迁移至 layouts 目录以更符合项目结构规范
移除未使用的 midButton 配置
2025-06-21 13:35:29 +08:00
feige996
4b77ca6c13 chore: midButton 2025-06-21 13:30:41 +08:00
feige996
21234cdbe2 chore: pnpm-lock.yaml 2025-06-21 13:30:26 +08:00
feige996
5250fac0a1 refactor(tabbar): 重构自定义tabbar逻辑并添加图标路径
移除冗余注释并整理tabbar相关配置
添加自定义tabbar的图标路径配置
优化tabbar显示逻辑,根据CUSTOM_TABBAR_ENABLE决定显示方式
2025-06-21 13:09:14 +08:00
feige996
91faa0f301 refactor(tabbar): 重构底部导航栏配置及逻辑
将底部导航栏配置从 pages.config.ts 移动到单独的文件中
添加 CUSTOM_TABBAR_ENABLE 开关控制自定义导航栏行为
优化导航栏切换逻辑,根据开关选择不同跳转方式
2025-06-21 12:54:52 +08:00
GitHub Actions
13ebc5aacc Auto merge main into tabbar 2025-06-21 02:53:22 +00:00
feige996
d86bfa719d ci: 将自动合并工作流中的基础分支从base改为main 2025-06-21 10:52:02 +08:00
GitHub Actions
72c261ef67 Auto merge base into tabbar 2025-06-21 02:38:08 +00:00
feige996
a7671ce4a9 docs(pages.config.ts): 更新tabBar配置的注释说明 2025-06-21 10:36:22 +08:00
GitHub Actions
de32f4515f Auto merge base into tabbar 2025-06-21 02:35:28 +00:00
feige996
74e52f000a docs(useUpload): 更新注释以明确不同平台的返回值差异
补充说明H5和App平台返回的File对象字段差异,并调整注释顺序使其更清晰
2025-06-21 10:33:22 +08:00
feige996
7bd338e07c fix(useUpload): 修复文件路径和大小获取逻辑错误
调整条件编译逻辑,确保在非微信小程序环境下也能正确获取文件路径和大小
2025-06-21 10:29:55 +08:00
feige996
119edac05a refactor(页面布局): 移除自定义导航栏相关代码并简化样式
移除about页面的自定义导航栏代码及相关配置,统一使用默认导航栏样式
优化index页面布局,移除多余的overflow-hidden样式
修复upload组件图片显示条件判断
2025-06-21 10:27:59 +08:00
GitHub Actions
f93ed08cb2 Auto merge base into tabbar 2025-06-21 02:14:34 +00:00
feige996
393c37bd56 chore: 更新版本号至2.14.0 2025-06-21 10:14:20 +08:00
GitHub Actions
7a1ae5b0f3 Auto merge base into tabbar 2025-06-21 02:12:02 +00:00
feige996
c47564e51a build: 添加对@dcloudio/uni-h5的补丁支持
添加pnpm-workspace.yaml配置文件并创建补丁文件,修复uni-h5组件中tabBar高度可能为undefined的问题
2025-06-21 10:11:39 +08:00
feige996
7a2e870641 chore: 在.prettierignore中添加node_modules目录 2025-06-21 10:08:35 +08:00
GitHub Actions
3b7688a20b Auto merge base into tabbar 2025-06-21 01:26:18 +00:00
feige996
e2c0ac4721 refactor(layout): 移除隐私弹窗组件 2025-06-21 09:20:04 +08:00
GitHub Actions
11c6f158d0 Auto merge base into tabbar 2025-06-21 01:19:12 +00:00
feige996
9ef3b7d7d4 build: 将 uno.css 替换为 virtual:uno.css 2025-06-20 23:16:20 +08:00
feige996
4f67168494 feat(tabbar): 添加中间按钮并移除自定义tabbar配置
添加发布按钮作为tabbar中间按钮,同时移除不再需要的custom配置
2025-06-20 21:40:52 +08:00
feige996
bf61c3d1f0 chore: 在页面中添加调试日志
添加console.log语句用于调试index和about页面
2025-06-20 19:35:31 +08:00
feige996
9a34868fb7 refactor(tabbar): 将tabbar配置抽离为单独模块以提高可维护性
将pages.config.ts中的tabbar配置抽离到单独的tabbarList.ts文件
移除pages.json中无用的__esModule字段
2025-06-20 19:32:34 +08:00
GitHub Actions
fe751745e5 Auto merge base into tabbar 2025-06-20 02:45:43 +00:00
GitHub Actions
ba8c0a2e7f Auto merge base into tabbar 2025-06-20 02:43:41 +00:00
GitHub Actions
6a7ece9b3f Auto merge base into tabbar 2025-06-17 14:57:59 +00:00
feige996
11b7880810 refactor: 移除未使用的"我的"页面及相关路由配置 2025-06-17 22:39:31 +08:00
feige996
c1b12eab84 Merge branch 'base' into tabbar 2025-06-17 22:39:11 +08:00
GitHub Actions
3eb06627c2 Auto merge base into tabbar 2025-06-17 10:15:28 +00:00
GitHub Actions
09e048ba85 Auto merge base into tabbar 2025-06-17 10:14:14 +00:00
GitHub Actions
ea2f3a6990 Auto merge base into tabbar 2025-06-17 10:10:22 +00:00
GitHub Actions
23cd9a522e Auto merge base into tabbar 2025-06-16 01:53:25 +00:00
GitHub Actions
61a2fd8a27 Auto merge base into tabbar 2025-06-15 14:28:46 +00:00
GitHub Actions
61bb8363cd Auto merge base into tabbar 2025-06-15 09:04:45 +00:00
GitHub Actions
a4d366c01e Auto merge base into tabbar 2025-06-15 08:46:51 +00:00
GitHub Actions
3a2b4febd2 Auto merge base into tabbar 2025-06-14 04:36:21 +00:00
GitHub Actions
95dbb93256 Auto merge base into tabbar 2025-06-14 04:00:41 +00:00
GitHub Actions
cc886bd326 Auto merge base into tabbar 2025-06-14 03:13:50 +00:00
GitHub Actions
26d49ac5bc Auto merge base into tabbar 2025-06-14 02:46:12 +00:00
GitHub Actions
25fb9705cc Auto merge base into tabbar 2025-06-13 10:34:52 +00:00
GitHub Actions
4efb14cbff Auto merge base into tabbar 2025-06-13 10:33:46 +00:00
GitHub Actions
0723fb178b Auto merge base into tabbar 2025-06-13 09:01:21 +00:00
GitHub Actions
6866c17184 Auto merge base into tabbar 2025-06-13 09:00:53 +00:00
GitHub Actions
1558430435 Auto merge base into tabbar 2025-06-13 08:47:40 +00:00
GitHub Actions
6da7d46913 Auto merge base into tabbar 2025-06-13 08:38:56 +00:00
GitHub Actions
5f97a3ff8a Auto merge base into tabbar 2025-06-11 15:39:50 +00:00
GitHub Actions
12b9384df6 Auto merge base into tabbar 2025-06-10 09:14:21 +00:00
GitHub Actions
1f3749d08d Auto merge base into tabbar 2025-06-06 15:46:16 +00:00
GitHub Actions
2c566253f3 Auto merge base into tabbar 2025-06-06 14:59:38 +00:00
GitHub Actions
28fad4a480 Auto merge base into tabbar 2025-06-06 14:42:50 +00:00
GitHub Actions
8233556683 Auto merge base into tabbar 2025-06-06 04:45:21 +00:00
GitHub Actions
8464a040ab Auto merge base into tabbar 2025-06-06 04:41:25 +00:00
GitHub Actions
0d42825314 Auto merge base into tabbar 2025-06-05 14:56:49 +00:00
GitHub Actions
8a434fa761 Auto merge base into tabbar 2025-06-04 14:44:02 +00:00
GitHub Actions
b286d07623 Auto merge base into tabbar 2025-06-04 09:41:11 +00:00
GitHub Actions
9dcea8189e Auto merge base into tabbar 2025-06-04 07:20:27 +00:00
GitHub Actions
d5a3772b3a Auto merge base into tabbar 2025-06-04 01:03:41 +00:00
GitHub Actions
3bf7fcb844 Auto merge base into tabbar 2025-06-04 01:03:12 +00:00
GitHub Actions
7b61242611 Auto merge base into tabbar 2025-06-04 01:00:58 +00:00
GitHub Actions
51d399f38b Auto merge base into tabbar 2025-06-03 12:04:11 +00:00
GitHub Actions
e79ae9a17f Auto merge base into tabbar 2025-06-03 11:51:51 +00:00
GitHub Actions
3f08e45e06 Auto merge base into tabbar 2025-06-03 11:50:30 +00:00
GitHub Actions
a0a2106fe7 Auto merge base into tabbar 2025-06-03 11:43:14 +00:00
GitHub Actions
291be04925 Auto merge base into tabbar 2025-06-03 10:12:13 +00:00
GitHub Actions
81a1e8e42d Auto merge base into tabbar 2025-06-03 09:48:13 +00:00
GitHub Actions
3e604e3c7f Auto merge base into tabbar 2025-06-03 09:26:52 +00:00
GitHub Actions
bb0a57bd1f Auto merge base into tabbar 2025-06-03 06:49:14 +00:00
GitHub Actions
22ce0f481d Auto merge base into tabbar 2025-06-03 04:55:35 +00:00
feige996
d76a5baad9 Merge branch 'tabbar' of github.com:feige996/unibest into tabbar 2025-06-03 12:42:18 +08:00
GitHub Actions
667e0647c4 Auto merge base into tabbar 2025-06-03 04:40:02 +00:00
feige996
0042afe215 refactor(fg-tabbar): 使用工具函数中的tabBarList替代直接导入
从直接导入pages.json中的tabBar改为使用utils中封装的_tabBarList,提高代码复用性和维护性
2025-06-03 12:38:13 +08:00
GitHub Actions
b857669c0c Auto merge base into tabbar 2025-06-03 02:20:33 +00:00
GitHub Actions
b454473591 Auto merge base into tabbar 2025-06-03 02:14:09 +00:00
GitHub Actions
91d66fda51 Auto merge base into tabbar 2025-06-03 01:28:54 +00:00
GitHub Actions
6777d20d41 Auto merge base into tabbar 2025-06-03 01:17:55 +00:00
GitHub Actions
1905a3f8bb Auto merge base into tabbar 2025-05-30 03:17:55 +00:00
GitHub Actions
54105b9968 Auto merge base into tabbar 2025-05-28 08:18:01 +00:00
GitHub Actions
d980dbb97a Auto merge base into tabbar 2025-05-28 07:21:17 +00:00
GitHub Actions
c594222abd Auto merge base into tabbar 2025-05-28 07:15:45 +00:00
GitHub Actions
53d68c10a0 Auto merge base into tabbar 2025-05-28 03:40:44 +00:00
feige996
b5cd1319c0 Merge branch 'base' into tabbar 2025-05-28 11:35:54 +08:00
feige996
b6fbf54c1c Merge branch 'base' into tabbar 2025-05-28 00:59:32 +08:00
feige996
d35fabd893 feat(tabbar): 调整 2025-05-28 00:51:49 +08:00
feige996
6673c2e269 Merge branch 'base' into tabbar 2025-05-28 00:46:30 +08:00
GitHub Actions
a57d4c08b3 Auto merge base into tabbar 2025-05-27 08:55:54 +00:00
GitHub Actions
cb33ed7a00 Auto merge base into tabbar 2025-05-26 16:32:23 +00:00
feige996
efe570c8c9 Merge branch 'base' into tabbar 2025-05-26 23:30:37 +08:00
GitHub Actions
3c398ab101 Auto merge base into tabbar 2025-05-22 12:02:38 +00:00
GitHub Actions
aed4b934ed Auto merge base into tabbar 2025-05-21 02:17:02 +00:00
GitHub Actions
56bfdfaf70 Auto merge base into tabbar 2025-05-19 07:12:12 +00:00
feige996
2959974f86 Merge branch 'base' into tabbar 2025-05-19 14:54:48 +08:00
GitHub Actions
085a1d73a2 Auto merge base into tabbar 2025-04-22 06:47:50 +00:00
GitHub Actions
7f80ded4c2 Auto merge base into tabbar 2025-04-12 06:09:19 +00:00
GitHub Actions
639c2a0e75 Auto merge base into tabbar 2025-03-07 11:43:14 +00:00
GitHub Actions
3c7701d21b Auto merge base into tabbar 2025-02-25 03:51:55 +00:00
GitHub Actions
5952515ac7 Auto merge base into tabbar 2025-01-23 15:50:34 +00:00
GitHub Actions
13c3e78cc6 Auto merge base into tabbar 2025-01-14 13:59:27 +00:00
GitHub Actions
e5103ddb7a Auto merge base into tabbar 2025-01-14 11:30:02 +00:00
Burt
ac2128bb76 Merge branch 'base' into tabbar 2025-01-14 19:26:40 +08:00
Burt
5b55e01089 Merge branch 'base' into tabbar 2025-01-06 23:27:20 +08:00
Burt
e57853fda0 Merge branch 'base' into tabbar 2025-01-06 14:00:47 +08:00
Burt
16c27345ed Merge branch 'base' into tabbar 2025-01-05 12:38:34 +08:00
Burt
c214a15bb7 Merge branch 'base' into tabbar 2025-01-01 18:09:03 +08:00
Burt
24b43088a9 Merge branch 'base' into tabbar 2024-12-31 12:21:03 +08:00
Burt
1ee3d06ed8 Merge branch 'base' into tabbar 2024-12-26 12:33:51 +08:00
Burt
5144ceabd1 Merge branch 'base' into tabbar 2024-12-10 21:45:05 +08:00
Burt
7eb4c23116 Merge branch 'base' into tabbar 2024-12-06 14:49:33 +08:00
Burt
53ebadf0a2 Merge branch 'base' into tabbar 2024-12-04 09:42:36 +08:00
Burt
8c1dda51ed Merge branch 'base' into tabbar 2024-12-02 21:02:12 +08:00
Burt
637ca983cf build: 降级uni版本,确保样式正确 2024-12-02 20:57:33 +08:00
Burt
1b61a262da Merge branch 'base' into tabbar 2024-12-02 20:54:08 +08:00
Burt
6fe2b888e4 Merge branch 'base' into tabbar 2024-12-02 16:25:40 +08:00
Burt
003e8685a4 build: update version 2024-12-02 16:20:50 +08:00
菲鸽
7eab089118
Merge pull request #20 from gladtoeatu/base
修复支付宝小程序无法build、onReachBottom支持组件直接调用
2024-11-27 22:17:47 +08:00
Burt
cd130de1cf Merge branch 'base' into tabbar 2024-11-15 16:47:22 +08:00
Burt
988cf6aa53 Merge branch 'base' into tabbar 2024-11-10 22:59:55 +08:00
Burt
7afa74d381 Merge branch base into tabbar 2024-11-10 22:52:08 +08:00
Burt
1bec786aaa Merge branch 'base' into tabbar 2024-11-10 22:48:37 +08:00
Burt
46ae55c73c Merge branch 'base' into tabbar 2024-09-11 20:50:58 +08:00
Burt
0865a33ad4 Merge branch 'base' into tabbar 2024-09-05 20:57:43 +08:00
Burt
f01b98693e Merge branch 'base' 2024-09-05 20:51:47 +08:00
菲鸽
8b357ab8c5 Merge branch 'base' into tabbar 2024-07-16 21:09:37 +08:00
菲鸽
7f41078fa0 Merge branch 'base' into tabbar 2024-06-28 13:08:08 +08:00
菲鸽
e4571097c8 Merge branch 'base' into tabbar 2024-06-25 21:59:57 +08:00
菲鸽
dec635a59d Merge branch 'base' into tabbar 2024-06-25 17:48:07 +08:00
菲鸽
5823f89e5f Merge branch 'base' into tabbar 2024-06-19 14:11:45 +08:00
菲鸽
d20f359769 Merge branch 'base' into tabbar 2024-06-17 17:24:21 +08:00
菲鸽
18d52a8e48 Merge branch 'base' into tabbar 2024-06-17 17:23:20 +08:00
菲鸽
3b2395da26 Merge branch 'base' into tabbar 2024-06-17 16:25:52 +08:00
菲鸽
12aae659fe Merge branch 'base' into tabbar 2024-06-16 16:47:37 +08:00
菲鸽
45744d412e Merge branch 'base' into tabbar 2024-06-16 16:39:14 +08:00
菲鸽
4b7a28fe97 Merge branch 'base' into tabbar 2024-06-07 10:48:09 +08:00
菲鸽
c1ed654ff3 Merge branch 'base' into tabbar 2024-06-04 18:03:36 +08:00
菲鸽
bb30afe1b6 Merge branch 'base' into tabbar 2024-06-03 12:33:53 +08:00
菲鸽
4ebc32dd3b Merge branch 'base' into tabbar 2024-06-01 21:53:56 +08:00
菲鸽
b1bfd0d336 Merge branch 'base' into tabbar 2024-06-01 21:48:43 +08:00
菲鸽
208f2395a6 build: pnpm-lock.yaml 2024-06-01 21:46:39 +08:00
菲鸽
a616867641 Merge branch 'base' into tabbar 2024-06-01 21:45:48 +08:00
菲鸽
bde0332183 refine: my 2024-05-28 11:36:23 +08:00
菲鸽
588c3a446f chore: 注意tabbar路由需要使用 layout:tabbar 布局 2024-05-28 11:34:30 +08:00
菲鸽
a9d3eccad5 feat: 优化tabbar,精简tabbar 2024-05-28 11:33:15 +08:00
菲鸽
01679809b8 fix: tabBar 我的 icon 不见了 2024-05-28 10:15:50 +08:00
菲鸽
a4fd81d2a8 Merge branch 'base' into tabbar 2024-05-26 09:52:31 +08:00
菲鸽
7ab753ee8d Merge branch 'base' into tabbar 2024-05-25 19:28:18 +08:00
菲鸽
e20b84c8d5 Merge branch 'base' into tabbar 2024-05-19 18:48:46 +08:00
菲鸽
77020a13a0 Merge branch 'base' into tabbar 2024-05-18 18:01:12 +08:00
菲鸽
79bbc09850 feat: 优化btn宽度 2024-05-18 17:58:02 +08:00
菲鸽
556f9052d1 Merge branch 'base' into tabbar 2024-05-18 17:46:50 +08:00
菲鸽
3e2cc7be81 chore: 运行 2024-05-18 17:43:34 +08:00
菲鸽
5871cb5fd8 Merge branch 'base' into tabbar 2024-05-12 19:53:51 +08:00
菲鸽
3a088be68b build: pnpm upgrade wot-design-uni 2024-05-12 17:46:37 +08:00
菲鸽
eab3de02fd build(manifest): ignoreVersion: true 2024-05-12 17:43:25 +08:00
菲鸽
7e26a71db8 chore: json 2024-05-12 17:24:47 +08:00
菲鸽
8bf7145752 Merge branch 'base' into tabbar 2024-05-12 17:24:11 +08:00
菲鸽
fd1102b425 Merge branch 'base' into tabbar 2024-05-12 17:19:28 +08:00
菲鸽
005d2406ab Merge branch 'base' into tabbar 2024-05-12 17:06:16 +08:00
菲鸽
fbd6343b2b Merge branch 'base' into tabbar 2024-05-12 16:47:28 +08:00
菲鸽
b11b17ec40 feat: tabbar 支持4种图标 2024-05-12 16:37:25 +08:00
菲鸽
9736931bfd Merge branch 'base' into tabbar 2024-05-12 16:25:53 +08:00
菲鸽
85c34bc922 build: uni-pages.d.ts 2024-05-12 11:54:50 +08:00
菲鸽
70801959ea Merge branch 'base' into tabbar 2024-05-12 11:54:22 +08:00
菲鸽
aa758845f6 build: 运行出自己的pages.json 2024-05-12 10:28:53 +08:00
菲鸽
c6eccbfa19 Merge branch 'base' into tabbar 2024-05-12 10:28:19 +08:00
菲鸽
3ae09fc804 refine: unocss icon 生效提示 2024-05-11 21:27:46 +08:00
菲鸽
695486e41f feat: 三种方式的图标,tabbar都支持 2024-05-11 21:26:56 +08:00
菲鸽
7cf16d608c feat: 续上,H5 也需要隐藏 2024-05-11 20:11:54 +08:00
菲鸽
0d948a0691 feat: app 里面才需要 hideTabBar 2024-05-11 20:10:26 +08:00
菲鸽
50cb3419c2 refine: store key 2024-05-11 11:36:44 +08:00
菲鸽
7271f3c618 fix: tabbar 2个BUG 2024-05-11 11:32:34 +08:00
菲鸽
d6c6022a18 fix: app 未隐藏原生tabbar 2024-05-11 11:26:04 +08:00
菲鸽
84d4607b2a fix: isUnocssIcon 没有了 2024-05-11 09:43:58 +08:00
菲鸽
4f6d271c28 feat: 使用 tabbar layout + wot icon 2024-05-11 09:41:33 +08:00
菲鸽
ee52ae132d refactor: 自定义tabbar 2024-05-11 09:36:26 +08:00
菲鸽
de8df540c2 Merge branch 'base' into tabbar 2024-05-09 08:49:40 +08:00
菲鸽
6d4bb21f52 Merge branch 'base' into tabbar 2024-05-08 21:02:02 +08:00
菲鸽
ffa5c68e66 Merge branch 'base' into tabbar 2024-05-08 20:27:06 +08:00
菲鸽
5eadda62de Merge branch 'base' into tabbar 2024-05-03 20:01:03 +08:00
菲鸽
041403f5d8 Merge branch 'base' into tabbar 2024-05-02 16:55:26 +08:00
菲鸽
137fa5846b Merge branch 'base' into tabbar 2024-04-30 15:00:40 +08:00
菲鸽
ffc37d9030 build: 写成 easycom 规范可以不用显式custom 规则 2024-04-20 11:08:54 +08:00
菲鸽
7e3ab3ca19 fix: tabbar 引入 2024-04-20 11:02:20 +08:00
菲鸽
cdae57adce Merge branch 'base' into tabbar 2024-04-20 10:53:07 +08:00
菲鸽
39007ec045 Merge branch 'base' into tabbar 2024-04-12 15:12:47 +08:00
菲鸽
d4935d1186 Merge branch 'base' into tabbar 2024-04-11 18:40:25 +08:00
菲鸽
12acce4575 Merge branch 'base' into tabbar 2024-04-11 09:25:03 +08:00
菲鸽
3f15da98de Merge branch 'base' into tabbar 2024-04-09 14:27:21 +08:00
菲鸽
fb4a6e7bec Merge branch 'base' into tabbar 2024-04-07 17:23:25 +08:00
菲鸽
6cdb56bb12 Merge branch 'base' into tabbar 2024-04-07 09:02:55 +08:00
菲鸽
e7d0a685d4 Merge branch 'base' into tabbar 2024-04-06 22:22:06 +08:00
菲鸽
c3debbb636 fix: code-snippets 2024-04-05 15:00:03 +08:00
菲鸽
a7c3dbaea2 Merge branch 'base' into tabbar 2024-04-05 14:20:06 +08:00
菲鸽
c032fe5a1e build(tsconfig.json): add components.d.ts ,自定义组件就有提示了 2024-04-04 16:55:26 +08:00
菲鸽
6a018d89be fix: 自动导入的函数,在模板报错 2024-04-04 16:17:29 +08:00
菲鸽
cc716a1e0c build: remove @uni-helper/uni-app-types 才有提示 2024-04-03 16:34:16 +08:00
菲鸽
be35efd530 Merge branch 'base' into tabbar 2024-04-02 21:32:38 +08:00
菲鸽
37b52d1243 refine: 显示模板分支 2024-04-02 21:05:29 +08:00
菲鸽
4770817fdc fix: ts 报错 2024-04-02 20:51:53 +08:00
菲鸽
3a12eb35eb refine: about 页面 2024-04-02 20:46:44 +08:00
菲鸽
01916970e8
!7 自定义tabbar
Merge pull request !7 from summer/custom-tabbar
2024-04-02 12:37:42 +00:00
summer
ee43df4fa6 feat: 新增自定义tabbar分支 2024-04-02 17:31:39 +08:00
38 changed files with 496 additions and 356 deletions

View File

@ -1,106 +1,3 @@
const { execSync } = require('node:child_process')
const fs = require('node:fs')
const path = require('node:path')
const scopes = fs
.readdirSync(path.resolve(__dirname, 'src'), { withFileTypes: true })
.filter(dirent => dirent.isDirectory())
.map(dirent => dirent.name.replace(/s$/, ''))
// precomputed scope
const scopeComplete = execSync('git status --porcelain || true')
.toString()
.trim()
.split('\n')
.find(r => ~r.indexOf('M src'))
?.replace(/\//g, '%%')
?.match(/src%%([\w-]*)/)?.[1]
?.replace(/s$/, '')
module.exports = {
ignores: [commit => commit.includes('init')],
extends: ['@commitlint/config-conventional'],
rules: {
'body-leading-blank': [2, 'always'],
'footer-leading-blank': [1, 'always'],
'header-max-length': [2, 'always', 108],
'subject-empty': [2, 'never'],
'type-empty': [2, 'never'],
'subject-case': [0],
'type-enum': [
2,
'always',
[
'feat',
'fix',
'perf',
'style',
'docs',
'test',
'refactor',
'build',
'ci',
'chore',
'revert',
'wip',
'workflow',
'types',
'release',
],
],
},
prompt: {
/** @use `pnpm commit :f` */
alias: {
f: 'docs: fix typos',
r: 'docs: update README',
s: 'style: update code format',
b: 'build: bump dependencies',
c: 'chore: update config',
},
customScopesAlign: !scopeComplete ? 'top' : 'bottom',
defaultScope: scopeComplete,
scopes: [...scopes, 'mock'],
allowEmptyIssuePrefixs: false,
allowCustomIssuePrefixs: false,
// English
typesAppend: [
{ value: 'wip', name: 'wip: work in process' },
{ value: 'workflow', name: 'workflow: workflow improvements' },
{ value: 'types', name: 'types: type definition file changes' },
],
// 中英文对照版
// messages: {
// type: '选择你要提交的类型 :',
// scope: '选择一个提交范围 (可选):',
// customScope: '请输入自定义的提交范围 :',
// subject: '填写简短精炼的变更描述 :\n',
// body: '填写更加详细的变更描述 (可选)。使用 "|" 换行 :\n',
// breaking: '列举非兼容性重大的变更 (可选)。使用 "|" 换行 :\n',
// footerPrefixsSelect: '选择关联issue前缀 (可选):',
// customFooterPrefixs: '输入自定义issue前缀 :',
// footer: '列举关联issue (可选) 例如: #31, #I3244 :\n',
// confirmCommit: '是否提交或修改commit ?',
// },
// types: [
// { value: 'feat', name: 'feat: 新增功能' },
// { value: 'fix', name: 'fix: 修复缺陷' },
// { value: 'docs', name: 'docs: 文档变更' },
// { value: 'style', name: 'style: 代码格式' },
// { value: 'refactor', name: 'refactor: 代码重构' },
// { value: 'perf', name: 'perf: 性能优化' },
// { value: 'test', name: 'test: 添加疏漏测试或已有测试改动' },
// { value: 'build', name: 'build: 构建流程、外部依赖变更 (如升级 npm 包、修改打包配置等)' },
// { value: 'ci', name: 'ci: 修改 CI 配置、脚本' },
// { value: 'revert', name: 'revert: 回滚 commit' },
// { value: 'chore', name: 'chore: 对构建过程或辅助工具和库的更改 (不影响源文件、测试用例)' },
// { value: 'wip', name: 'wip: 正在开发中' },
// { value: 'workflow', name: 'workflow: 工作流程改进' },
// { value: 'types', name: 'types: 类型定义文件修改' },
// ],
// emptyScopesAlias: 'empty: 不填写',
// customScopesAlias: 'custom: 自定义',
},
}

View File

@ -1,14 +1,14 @@
name: Auto Merge Base to Other Branches
name: Auto Merge Main to Other Branches
on:
push:
branches:
- base
- main
workflow_dispatch: # 手动触发
jobs:
merge-to-i18n:
name: Merge base into i18n
name: Merge main into i18n
runs-on: ubuntu-latest
steps:
- name: Checkout repository
@ -17,16 +17,16 @@ jobs:
fetch-depth: 0
token: ${{ secrets.GH_TOKEN_AUTO_MERGE }}
- name: Merge base into i18n
- name: Merge main into i18n
run: |
git config user.name "GitHub Actions"
git config user.email "actions@github.com"
git checkout i18n
git merge base --no-ff -m "Auto merge base into i18n"
git merge main --no-ff -m "Auto merge main into i18n"
git push origin i18n
merge-to-tabbar:
name: Merge base into tabbar
merge-to-base-sard-ui:
name: Merge main into base-sard-ui
runs-on: ubuntu-latest
steps:
- name: Checkout repository
@ -35,16 +35,16 @@ jobs:
fetch-depth: 0
token: ${{ secrets.GH_TOKEN_AUTO_MERGE }}
- name: Merge base into tabbar
- name: Merge main into base-sard-ui
run: |
git config user.name "GitHub Actions"
git config user.email "actions@github.com"
git checkout tabbar
git merge base --no-ff -m "Auto merge base into tabbar"
git push origin tabbar
git checkout base-sard-ui
git merge main --no-ff -m "Auto merge main into base-sard-ui"
git push origin base-sard-ui
merge-to-spa:
name: Merge base into spa
merge-to-base-uv-ui:
name: Merge main into base-uv-ui
runs-on: ubuntu-latest
steps:
- name: Checkout repository
@ -53,10 +53,28 @@ jobs:
fetch-depth: 0
token: ${{ secrets.GH_TOKEN_AUTO_MERGE }}
- name: Merge base into spa
- name: Merge main into base-uv-ui
run: |
git config user.name "GitHub Actions"
git config user.email "actions@github.com"
git checkout spa
git merge base --no-ff -m "Auto merge base into spa"
git push origin spa
git checkout base-uv-ui
git merge main --no-ff -m "Auto merge main into base-uv-ui"
git push origin base-uv-ui
merge-to-base-uview-plus:
name: Merge main into base-uview-plus
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0
token: ${{ secrets.GH_TOKEN_AUTO_MERGE }}
- name: Merge main into base-uview-plus
run: |
git config user.name "GitHub Actions"
git config user.email "actions@github.com"
git checkout base-uview-plus
git merge main --no-ff -m "Auto merge main into base-uview-plus"
git push origin base-uview-plus

2
.gitignore vendored
View File

@ -27,7 +27,7 @@ dist
docs/.vitepress/dist
docs/.vitepress/cache
types
src/types
# lock 文件还是不要了,我主要的版本写死就好了
# pnpm-lock.yaml

View File

@ -1,3 +1,5 @@
node_modules
# unplugin-auto-import 生成的类型文件,每次提交都改变,所以加入这里吧,与 .gitignore 配合使用
auto-import.d.ts

35
.vscode/settings.json vendored
View File

@ -1,4 +1,13 @@
{
// prettier
"editor.defaultFormatter": "esbenp.prettier-vscode",
// stylelint
"stylelint.validate": ["css", "scss", "vue", "html"], // package.jsonscripts
"stylelint.enable": true,
"css.validate": false,
"less.validate": false,
"scss.validate": false,
"[shellscript]": {
"editor.defaultFormatter": "foxundermoon.shell-format"
},
@ -20,7 +29,6 @@
"manifest.json": "jsonc" // manifest.json
},
"cSpell.words": [
"aliyun",
"Aplipay",
"climblee",
"commitlint",
@ -33,8 +41,8 @@
"tabbar",
"Toutiao",
"unibest",
"uview",
"uvui",
"vitepress",
"Wechat",
"WechatMiniprogram",
"Weixin"
@ -45,19 +53,31 @@
"explorer.fileNesting.patterns": {
"README.md": "index.html,favicon.ico,robots.txt,CHANGELOG.md",
"pages.config.ts": "manifest.config.ts,openapi-ts-request.config.ts",
"package.json": "pnpm-lock.yaml,pnpm-workspace.yaml,LICENSE,.gitattributes,.gitignore,.gitpod.yml,CNAME,.npmrc,.browserslistrc",
"eslint.config.mjs": "tsconfig.json,.commitlintrc.*,.editorconfig,.commitlint.cjs,.eslint*,.prettier*"
"package.json": "tsconfig.json,pnpm-lock.yaml,pnpm-workspace.yaml,LICENSE,.gitattributes,.gitignore,.gitpod.yml,CNAME,.npmrc,.browserslistrc",
"eslint.config.mjs": ".commitlintrc.*,.prettier*,.editorconfig,.commitlint.cjs,.eslint*"
},
// ESLint
// //
// "prettier.enable": true,
// "editor.formatOnSave": true,
// //
// "editor.codeActionsOnSave": {
// "source.fixAll": "explicit",
// "source.fixAll.eslint": "explicit",
// "source.fixAll.stylelint": "explicit"
// },
// Disable the default formatter, use eslint instead
"prettier.enable": false,
"editor.formatOnSave": false,
//
// Auto fix
"editor.codeActionsOnSave": {
"source.fixAll.eslint": "explicit",
"source.organizeImports": "never"
},
// Silent the stylistic rules in you IDE, but still auto fix them
"eslint.rules.customizations": [
{ "rule": "style/*", "severity": "off", "fixable": true },
{ "rule": "format/*", "severity": "off", "fixable": true },
@ -71,7 +91,7 @@
{ "rule": "*semi", "severity": "off", "fixable": true }
],
// ESLint
// Enable eslint for all supported languages
"eslint.validate": [
"javascript",
"javascriptreact",
@ -81,6 +101,7 @@
"html",
"markdown",
"json",
"json5",
"jsonc",
"yaml",
"toml",

View File

@ -27,12 +27,12 @@
" },",
"}",
"</route>\n",
"<template>",
" <view class=\"\">$2</view>",
"</template>\n",
"<script lang=\"ts\" setup>",
"//$3",
"</script>\n",
"<template>",
" <view class=\"\">$2</view>",
"</template>\n",
"<style lang=\"scss\" scoped>",
"//$4",
"</style>\n",
@ -41,16 +41,28 @@
"Print unibest style": {
"scope": "vue",
"prefix": "st",
"body": ["<style lang=\"scss\" scoped>", "//", "</style>\n"],
"body": [
"<style lang=\"scss\" scoped>",
"//",
"</style>\n"
],
},
"Print unibest script": {
"scope": "vue",
"prefix": "sc",
"body": ["<script lang=\"ts\" setup>", "//$3", "</script>\n"],
"body": [
"<script lang=\"ts\" setup>",
"//$3",
"</script>\n"
],
},
"Print unibest template": {
"scope": "vue",
"prefix": "te",
"body": ["<template>", " <view class=\"\">$1</view>", "</template>\n"],
"body": [
"<template>",
" <view class=\"\">$1</view>",
"</template>\n"
],
},
}

View File

@ -70,13 +70,13 @@
## 📦 运行(支持热更新)
- web平台 `pnpm dev:h5`, 然后打开 [http://localhost:9000/](http://localhost:9000/)。
- weixin平台`pnpm dev:mp-weixin` 然后打开微信开发者工具,导入本地文件夹,选择本项目的`dist/dev/mp-weixin` 文件。
- weixin平台`pnpm dev:mp` 然后打开微信开发者工具,导入本地文件夹,选择本项目的`dist/dev/mp-weixin` 文件。
- APP平台`pnpm dev:app`, 然后打开 `HBuilderX`,导入刚刚生成的`dist/dev/app` 文件夹,选择运行到模拟器(开发时优先使用),或者运行的安卓/ios基座。
## 🔗 发布
- web平台 `pnpm build:h5`,打包后的文件在 `dist/build/h5`可以放到web服务器如nginx运行。如果最终不是放在根目录可以在 `manifest.config.ts` 文件的 `h5.router.base` 属性进行修改。
- weixin平台`pnpm build:mp-weixin`, 打包后的文件在 `dist/build/mp-weixin`,然后通过微信开发者工具导入,并点击右上角的“上传”按钮进行上传。
- weixin平台`pnpm build:mp`, 打包后的文件在 `dist/build/mp-weixin`,然后通过微信开发者工具导入,并点击右上角的“上传”按钮进行上传。
- APP平台`pnpm build:app`, 然后打开 `HBuilderX`,导入刚刚生成的`dist/build/app` 文件夹,选择发行 - APP云打包。
## 📄 License

View File

@ -1,8 +1,8 @@
// eslint.config.mjs
import uniHelper from '@uni-helper/eslint-config'
export default uniHelper({
unocss: true,
vue: true,
markdown: false,
ignores: [
'src/uni_modules/',
@ -17,5 +17,6 @@ export default uniHelper({
'jsdoc/check-param-names': 'off',
'jsdoc/require-returns-description': 'off',
'ts/no-empty-object-type': 'off',
'no-extend-native': 'off',
},
})

View File

@ -1,6 +1,5 @@
import path from 'node:path'
import process from 'node:process'
// manifest.config.ts
import { defineManifestConfig } from '@uni-helper/vite-plugin-uni-manifest'
import { loadEnv } from 'vite'

View File

@ -1,9 +1,9 @@
{
"name": "unibest",
"type": "commonjs",
"version": "2.13.1",
"version": "3.1.0",
"description": "unibest - 最好的 uniapp 开发模板",
"update-time": "2025-06-17",
"update-time": "2025-06-21",
"author": {
"name": "feige996",
"zhName": "菲鸽",
@ -72,9 +72,8 @@
"type-check": "vue-tsc --noEmit",
"openapi-ts-request": "openapi-ts",
"prepare": "git init && husky",
"lint": "eslint .",
"lint:fix": "eslint . --fix"
"lint": "eslint",
"lint:fix": "eslint --fix"
},
"dependencies": {
"@dcloudio/uni-app": "3.0.0-4060620250520001",
@ -99,7 +98,6 @@
"js-cookie": "^3.0.5",
"pinia": "2.0.36",
"pinia-plugin-persistedstate": "3.2.1",
"qs": "6.5.3",
"vue": "^3.4.21",
"wot-design-uni": "^1.9.1",
"z-paging": "2.8.7"
@ -113,8 +111,8 @@
"@dcloudio/uni-cli-shared": "3.0.0-4060620250520001",
"@dcloudio/uni-stacktracey": "3.0.0-4060620250520001",
"@dcloudio/vite-plugin-uni": "3.0.0-4060620250520001",
"@esbuild/darwin-arm64": "0.25.5",
"@esbuild/darwin-x64": "0.25.5",
"@esbuild/darwin-arm64": "0.20.2",
"@esbuild/darwin-x64": "0.20.2",
"@iconify-json/carbon": "^1.2.4",
"@rollup/rollup-darwin-x64": "^4.28.0",
"@types/node": "^20.17.9",
@ -140,6 +138,7 @@
"postcss": "^8.4.49",
"postcss-html": "^1.7.0",
"postcss-scss": "^4.0.9",
"prettier": "^3.5.3",
"rollup-plugin-visualizer": "^5.12.0",
"sass": "1.77.8",
"terser": "^5.36.0",
@ -154,9 +153,6 @@
"bin-wrapper": "npm:bin-wrapper-china"
},
"lint-staged": {
"**/*.{html,js,jsx,ts,tsx,vue,mjs,cjs,mts,cts,json,scss,css,txt}": [
"eslint --fix"
],
"!**/{node_modules,dist}/**": []
"*": "eslint --fix"
}
}

View File

@ -1,4 +1,5 @@
import { defineUniPages } from '@uni-helper/vite-plugin-uni-pages'
import { tabBar } from './src/layouts/fg-tabbar/tabbarList'
export default defineUniPages({
globalStyle: {
@ -17,29 +18,6 @@ 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 的配置统一在 “./src/layouts/fg-tabbar/tabbarList.ts” 文件中
tabBar: tabBar as any,
})

View File

@ -0,0 +1,13 @@
diff --git a/dist/uni-h5.es.js b/dist/uni-h5.es.js
index 7421bad97d94ad34a3d4d94292a9ee9071430662..19c6071ee4036ceb8d1cfa09030e471c002d2cda 100644
--- a/dist/uni-h5.es.js
+++ b/dist/uni-h5.es.js
@@ -23410,7 +23410,7 @@ function useShowTabBar(emit2) {
const tabBar2 = useTabBar();
const showTabBar2 = computed(() => route.meta.isTabBar && tabBar2.shown);
updateCssVar({
- "--tab-bar-height": tabBar2.height
+ "--tab-bar-height": tabBar2?.height || 0
});
return showTabBar2;
}

87
pnpm-lock.yaml generated
View File

@ -7,6 +7,11 @@ settings:
overrides:
bin-wrapper: npm:bin-wrapper-china
patchedDependencies:
'@dcloudio/uni-h5':
hash: 5763725268e9a493075be3c82d91b590b9ae30e997a04a418494dd7d6d327b9d
path: patches/@dcloudio__uni-h5.patch
importers:
.:
@ -25,7 +30,7 @@ importers:
version: 3.0.0-4060620250520001(postcss@8.4.49)(rollup@4.41.1)(vue@3.5.15(typescript@5.7.2))
'@dcloudio/uni-h5':
specifier: 3.0.0-4060620250520001
version: 3.0.0-4060620250520001(postcss@8.4.49)(rollup@4.41.1)(vue@3.5.15(typescript@5.7.2))
version: 3.0.0-4060620250520001(patch_hash=5763725268e9a493075be3c82d91b590b9ae30e997a04a418494dd7d6d327b9d)(postcss@8.4.49)(rollup@4.41.1)(vue@3.5.15(typescript@5.7.2))
'@dcloudio/uni-mp-alipay':
specifier: 3.0.0-4060620250520001
version: 3.0.0-4060620250520001(postcss@8.4.49)(rollup@4.41.1)(vue@3.5.15(typescript@5.7.2))
@ -77,9 +82,6 @@ importers:
pinia-plugin-persistedstate:
specifier: 3.2.1
version: 3.2.1(pinia@2.0.36(typescript@5.7.2)(vue@3.5.15(typescript@5.7.2)))
qs:
specifier: 6.5.3
version: 6.5.3
vue:
specifier: ^3.4.21
version: 3.5.15(typescript@5.7.2)
@ -115,11 +117,11 @@ importers:
specifier: 3.0.0-4060620250520001
version: 3.0.0-4060620250520001(postcss@8.4.49)(rollup@4.41.1)(vite@5.2.8(@types/node@20.17.9)(sass@1.77.8)(terser@5.36.0))(vue@3.5.15(typescript@5.7.2))
'@esbuild/darwin-arm64':
specifier: 0.25.5
version: 0.25.5
specifier: 0.20.2
version: 0.20.2
'@esbuild/darwin-x64':
specifier: 0.25.5
version: 0.25.5
specifier: 0.20.2
version: 0.20.2
'@iconify-json/carbon':
specifier: ^1.2.4
version: 1.2.4
@ -195,6 +197,9 @@ importers:
postcss-scss:
specifier: ^4.0.9
version: 4.0.9(postcss@8.4.49)
prettier:
specifier: ^3.5.3
version: 3.5.3
rollup-plugin-visualizer:
specifier: ^5.12.0
version: 5.12.0(rollup@4.41.1)
@ -1140,6 +1145,10 @@ packages:
resolution: {integrity: sha512-YAdE/IJSpwbOTiaURNCKECdAwqrJuFiZhylmesBcIRawtYKnBR2wxPhoIewMg+Yu+QuYvHfJNReWpoxGBKOChA==}
engines: {node: '>=18'}
'@es-joy/jsdoccomment@0.51.1':
resolution: {integrity: sha512-fPn7AW/unCg3JRLt8Wg44HLRVkAEfkFIXiGRJbeOIrd7Hgl4iOFwVHpvVR8I5hJYpn5mNFWwIXR6A16ZRA/M9w==}
engines: {node: '>=18'}
'@esbuild/aix-ppc64@0.20.2':
resolution: {integrity: sha512-D+EBOJHXdNZcLJRBkhENNG8Wji2kgc9AZ9KiPr1JuZjsNtyHzrsfLRrY0tk2H2aoFu6RANO1y1iPPUCDYWkb5g==}
engines: {node: '>=12'}
@ -1197,6 +1206,7 @@ packages:
'@esbuild/darwin-arm64@0.25.5':
resolution: {integrity: sha512-GtaBgammVvdF7aPIgH2jxMDdivezgFu6iKpmT+48+F8Hhg5J/sfnDieg0aeG/jfSvkYQU2/pceFPDKlqZzwnfQ==}
engines: {node: '>=18'}
cpu: [arm64]
os: [darwin]
'@esbuild/darwin-x64@0.20.2':
@ -1208,6 +1218,7 @@ packages:
'@esbuild/darwin-x64@0.25.5':
resolution: {integrity: sha512-1iT4FVL0dJ76/q1wd7XDsXrSW+oLoquptvh4CLR4kITDtqi2e/xwXwdCVH8hVHU43wgJdsq7Gxuzcs6Iq/7bxQ==}
engines: {node: '>=18'}
cpu: [x64]
os: [darwin]
'@esbuild/freebsd-arm64@0.20.2':
@ -1479,8 +1490,8 @@ packages:
resolution: {integrity: sha512-3PIF4cBw/y+1u2EazflInpV+lYsSG0aByVIQzAgb1m1MhHFSbqTyNqtBKHgWf/9Ykud+DhILS9EGkmekVhbKoQ==}
engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0}
'@eslint/markdown@6.5.0':
resolution: {integrity: sha512-oSkF0p8X21vKEEAGTZASi7q3tbdTvlGduQ02Xz2A1AFncUP4RLVcNz27XurxVW4fs1JXuh0xBtvokXdtp/nN+Q==}
'@eslint/markdown@6.6.0':
resolution: {integrity: sha512-IsWPy2jU3gaQDlioDC4sT4I4kG1hX1OMWs/q2sWwJrPoMASHW/Z4SDw+6Aql6EsHejGbagYuJbFq9Zvx+Y1b1Q==}
engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0}
'@eslint/object-schema@2.1.6':
@ -1968,6 +1979,7 @@ packages:
'@rollup/rollup-darwin-x64@4.28.0':
resolution: {integrity: sha512-8hxgfReVs7k9Js1uAIhS6zq3I+wKQETInnWQtgzt8JfGx51R1N6DRVy3F4o0lQwumbErRz52YqwjfvuwRxGv1w==}
cpu: [x64]
os: [darwin]
'@rollup/rollup-darwin-x64@4.41.1':
@ -2152,6 +2164,9 @@ packages:
'@types/estree@1.0.7':
resolution: {integrity: sha512-w28IoSUCJpidD/TGviZwwMJckNESJZXFu7NBZ5YJ4mEUnNraUn9Pm8HSZm/jDF1pDWYKspWE7oVphigUPRakIQ==}
'@types/estree@1.0.8':
resolution: {integrity: sha512-dWHzHa2WqEXI/O1E9OjrocMTKJl2mSrEolh1Iomrv6U+JuNwaHXsXx9bLu5gG7BUWFIN0skIQJQ/L1rIex4X6w==}
'@types/graceful-fs@4.1.9':
resolution: {integrity: sha512-olP3sd1qOEe5dXTSaFvQG+02VdRXcdytWLAZsAq1PecU8uqQAhkrnbli7DagjtXKW/Bl7YJbUsa8MPcuc8LHEQ==}
@ -3560,8 +3575,8 @@ packages:
typescript:
optional: true
eslint-plugin-jsdoc@51.0.3:
resolution: {integrity: sha512-9BRR+b5nKwp6LGTffnrxKxduhzO/DzyBmRNqyt1wIlBFP+q9mq+sq1hIQCVetZAn1PaOl0Evo4PUOlT+xbtctQ==}
eslint-plugin-jsdoc@51.1.0:
resolution: {integrity: sha512-dWyjRvQcAuFHZUTUaJEw7OQ6XziNlbz2wZNt6QuLUHwYMnOWzs6vGSikR/ZSeh+IFHjdH+91AKf+CwYjlJ4kVA==}
engines: {node: '>=20.11.0'}
peerDependencies:
eslint: ^7.0.0 || ^8.0.0 || ^9.0.0
@ -3932,6 +3947,9 @@ packages:
engines: {node: '>=16'}
hasBin: true
github-slugger@2.0.0:
resolution: {integrity: sha512-IaOQ9puYtjrkq7Y0Ygl9KDZnrf/aiUJYUpVf89y8kyaxbRG7Y1SrX/jaumrv81vc61+kiMempujsM3Yw7w5qcw==}
glob-parent@5.1.2:
resolution: {integrity: sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==}
engines: {node: '>= 6'}
@ -5419,10 +5437,6 @@ packages:
resolution: {integrity: sha512-+38qI9SOr8tfZ4QmJNplMUxqjbe7LKvvZgWdExBOmd+egZTtjLB67Gu0HRX3u/XOq7UU2Nx6nsjvS16Z9uwfpg==}
engines: {node: '>=0.6'}
qs@6.5.3:
resolution: {integrity: sha512-qxXIEh4pCGfHICj1mAJQ2/2XVZkjCDTcEgfoSQxc/fYivUZxTkk7L3bDBJSoNrEzXI17oUO5Dp07ktqE5KzczA==}
engines: {node: '>=0.6'}
quansync@0.2.10:
resolution: {integrity: sha512-t41VRkMYbkHyCYmOvx/6URnN80H7k4X0lLdBMGsz+maAwrJQYB1djpV6vHrQIBE0WBSGqhtEHrK9U3DWWH8v7A==}
@ -6422,7 +6436,7 @@ snapshots:
'@antfu/install-pkg': 1.1.0
'@clack/prompts': 0.11.0
'@eslint-community/eslint-plugin-eslint-comments': 4.5.0(eslint@9.29.0(jiti@2.4.2))
'@eslint/markdown': 6.5.0
'@eslint/markdown': 6.6.0
'@stylistic/eslint-plugin': 5.0.0-beta.5(eslint@9.29.0(jiti@2.4.2))
'@typescript-eslint/eslint-plugin': 8.34.1(@typescript-eslint/parser@8.34.1(eslint@9.29.0(jiti@2.4.2))(typescript@5.7.2))(eslint@9.29.0(jiti@2.4.2))(typescript@5.7.2)
'@typescript-eslint/parser': 8.34.1(eslint@9.29.0(jiti@2.4.2))(typescript@5.7.2)
@ -6436,7 +6450,7 @@ snapshots:
eslint-plugin-antfu: 3.1.1(eslint@9.29.0(jiti@2.4.2))
eslint-plugin-command: 3.3.0(eslint@9.29.0(jiti@2.4.2))
eslint-plugin-import-lite: 0.3.0(eslint@9.29.0(jiti@2.4.2))(typescript@5.7.2)
eslint-plugin-jsdoc: 51.0.3(eslint@9.29.0(jiti@2.4.2))
eslint-plugin-jsdoc: 51.1.0(eslint@9.29.0(jiti@2.4.2))
eslint-plugin-jsonc: 2.20.1(eslint@9.29.0(jiti@2.4.2))
eslint-plugin-n: 17.20.0(eslint@9.29.0(jiti@2.4.2))(typescript@5.7.2)
eslint-plugin-no-only-tests: 3.3.0
@ -7700,7 +7714,7 @@ snapshots:
'@dcloudio/uni-components@3.0.0-4060620250520001(postcss@8.4.49)(rollup@4.41.1)(vue@3.5.15(typescript@5.7.2))':
dependencies:
'@dcloudio/uni-cloud': 3.0.0-4060620250520001(postcss@8.4.49)(rollup@4.41.1)(vue@3.5.15(typescript@5.7.2))
'@dcloudio/uni-h5': 3.0.0-4060620250520001(postcss@8.4.49)(rollup@4.41.1)(vue@3.5.15(typescript@5.7.2))
'@dcloudio/uni-h5': 3.0.0-4060620250520001(patch_hash=5763725268e9a493075be3c82d91b590b9ae30e997a04a418494dd7d6d327b9d)(postcss@8.4.49)(rollup@4.41.1)(vue@3.5.15(typescript@5.7.2))
'@dcloudio/uni-i18n': 3.0.0-4060620250520001
transitivePeerDependencies:
- '@nuxt/kit'
@ -7753,7 +7767,7 @@ snapshots:
transitivePeerDependencies:
- vue
'@dcloudio/uni-h5@3.0.0-4060620250520001(postcss@8.4.49)(rollup@4.41.1)(vue@3.5.15(typescript@5.7.2))':
'@dcloudio/uni-h5@3.0.0-4060620250520001(patch_hash=5763725268e9a493075be3c82d91b590b9ae30e997a04a418494dd7d6d327b9d)(postcss@8.4.49)(rollup@4.41.1)(vue@3.5.15(typescript@5.7.2))':
dependencies:
'@dcloudio/uni-h5-vite': 3.0.0-4060620250520001(postcss@8.4.49)(rollup@4.41.1)(vue@3.5.15(typescript@5.7.2))
'@dcloudio/uni-h5-vue': 3.0.0-4060620250520001(vue@3.5.15(typescript@5.7.2))
@ -8141,6 +8155,14 @@ snapshots:
esquery: 1.6.0
jsdoc-type-pratt-parser: 4.1.0
'@es-joy/jsdoccomment@0.51.1':
dependencies:
'@types/estree': 1.0.8
'@typescript-eslint/types': 8.34.1
comment-parser: 1.4.1
esquery: 1.6.0
jsdoc-type-pratt-parser: 4.1.0
'@esbuild/aix-ppc64@0.20.2':
optional: true
@ -8165,16 +8187,16 @@ snapshots:
'@esbuild/android-x64@0.25.5':
optional: true
'@esbuild/darwin-arm64@0.20.2':
'@esbuild/darwin-arm64@0.20.2': {}
'@esbuild/darwin-arm64@0.25.5':
optional: true
'@esbuild/darwin-arm64@0.25.5': {}
'@esbuild/darwin-x64@0.20.2': {}
'@esbuild/darwin-x64@0.20.2':
'@esbuild/darwin-x64@0.25.5':
optional: true
'@esbuild/darwin-x64@0.25.5': {}
'@esbuild/freebsd-arm64@0.20.2':
optional: true
@ -8338,10 +8360,11 @@ snapshots:
'@eslint/js@9.29.0': {}
'@eslint/markdown@6.5.0':
'@eslint/markdown@6.6.0':
dependencies:
'@eslint/core': 0.14.0
'@eslint/plugin-kit': 0.3.2
github-slugger: 2.0.0
mdast-util-from-markdown: 2.0.2
mdast-util-frontmatter: 2.0.1
mdast-util-gfm: 3.1.0
@ -9175,6 +9198,8 @@ snapshots:
'@types/estree@1.0.7': {}
'@types/estree@1.0.8': {}
'@types/graceful-fs@4.1.9':
dependencies:
'@types/node': 20.19.0
@ -9669,7 +9694,7 @@ snapshots:
'@unocss/rule-utils@66.2.0':
dependencies:
'@unocss/core': 66.2.0
'@unocss/core': 66.2.3
magic-string: 0.30.17
'@unocss/rule-utils@66.2.3':
@ -10852,9 +10877,9 @@ snapshots:
optionalDependencies:
typescript: 5.7.2
eslint-plugin-jsdoc@51.0.3(eslint@9.29.0(jiti@2.4.2)):
eslint-plugin-jsdoc@51.1.0(eslint@9.29.0(jiti@2.4.2)):
dependencies:
'@es-joy/jsdoccomment': 0.50.2
'@es-joy/jsdoccomment': 0.51.1
are-docs-informative: 0.0.2
comment-parser: 1.4.1
debug: 4.4.1
@ -11368,6 +11393,8 @@ snapshots:
meow: 12.1.1
split2: 4.2.0
github-slugger@2.0.0: {}
glob-parent@5.1.2:
dependencies:
is-glob: 4.0.3
@ -13223,8 +13250,6 @@ snapshots:
dependencies:
side-channel: 1.0.6
qs@6.5.3: {}
quansync@0.2.10: {}
querystringify@2.2.0: {}

2
pnpm-workspace.yaml Normal file
View File

@ -0,0 +1,2 @@
patchedDependencies:
'@dcloudio/uni-h5': patches/@dcloudio__uni-h5.patch

View File

@ -1,4 +1,4 @@
import type { ICaptcha, IUpdateInfo, IUpdatePassword, IUserInfoVo, IUserLogin } from './login.typings'
import type { ICaptcha, IUpdateInfo, IUpdatePassword, IUserInfoVo, IUserLogin } from './types/login'
import { http } from '@/utils/http'
/**

3
src/env.d.ts vendored
View File

@ -29,3 +29,6 @@ interface ImportMetaEnv {
interface ImportMeta {
readonly env: ImportMetaEnv
}
declare const __VITE_APP_PROXY__: 'true' | 'false'
declare const __UNI_PLATFORM__: 'app' | 'h5' | 'mp-alipay' | 'mp-baidu' | 'mp-kuaishou' | 'mp-lark' | 'mp-qq' | 'mp-tiktok' | 'mp-weixin' | 'mp-xiaochengxu'

View File

@ -30,7 +30,6 @@ export default function useUpload<T extends TfileType>(options: TOptions<T> = {}
const error = ref<Error | null>(null)
const data = ref<any>(null)
const run = () => {
const handleFileChoose = ({ tempFilePath, size }: { tempFilePath: string, size: number }) => {
if (size > maxSize) {
uni.showToast({
@ -71,25 +70,28 @@ export default function useUpload<T extends TfileType>(options: TOptions<T> = {}
})
}
const run = () => {
// 微信小程序从基础库 2.21.0 开始, wx.chooseImage 停止维护,请使用 uni.chooseMedia 代替。
// 微信小程序在2023年10月17日之后使用本API需要配置隐私协议
const chooseFileOptions = {
count: 1,
success: (res: any) => {
console.log('File selected successfully:', res)
// h5中res:{errMsg: "chooseImage:ok", tempFilePaths: "blob:http://localhost:9000/f74ab6b8-a14d-4cb6-a10d-fcf4511a0de5", tempFiles: [File]}
// h5的File有一下字段{name: "girl.jpeg", size: 48976, type: "image/jpeg"}
// 小程序中res:{errMsg: "chooseImage:ok", tempFiles: [{fileType: "image", size: 48976, tempFilePath: "http://tmp/5iG1WpIxTaJf3ece38692a337dc06df7eb69ecb49c6b.jpeg"}]}
// h5中res:{errMsg: "chooseImage:ok", tempFilePaths: "blob:http://localhost:9000/f74ab6b8-a14d-4cb6-a10d-fcf4511a0de5", tempFiles: [File]}
// h5的File有以下字段{name: "girl.jpeg", size: 48976, type: "image/jpeg"}
// App中res:{errMsg: "chooseImage:ok", tempFilePaths: "file:///Users/feige/xxx/gallery/1522437259-compressed-IMG_0006.jpg", tempFiles: [File]}
// App的File有以下字段{path: "file:///Users/feige/xxx/gallery/1522437259-compressed-IMG_0006.jpg", size: 48976}
let tempFilePath = ''
let size = 0
// #ifdef H5
tempFilePath = res.tempFilePaths[0]
size = res.tempFiles[0].size
// #endif
// #ifdef MP-WEIXIN
tempFilePath = res.tempFiles[0].tempFilePath
size = res.tempFiles[0].size
// #endif
// #ifndef MP-WEIXIN
tempFilePath = res.tempFilePaths[0]
size = res.tempFiles[0].size
// #endif
handleFileChoose({ tempFilePath, size })
},
fail: (err: any) => {

View File

@ -2,7 +2,6 @@ export const prototypeInterceptor = {
install() {
// 解决低版本手机不识别 array.at() 导致运行报错的问题
if (typeof Array.prototype.at !== 'function') {
// eslint-disable-next-line no-extend-native
Array.prototype.at = function (index: number) {
if (index < 0)
return this[this.length + index]

View File

@ -1,7 +1,7 @@
import qs from 'qs'
import { useUserStore } from '@/store'
import { getEnvBaseUrl } from '@/utils'
import { platform } from '@/utils/platform'
import { stringifyQuery } from '@/utils/queryString'
export type CustomRequestOptions = UniApp.RequestOptions & {
query?: Record<string, any>
@ -18,7 +18,7 @@ const httpInterceptor = {
invoke(options: CustomRequestOptions) {
// 接口请求支持通过 query 参数配置 queryString
if (options.query) {
const queryStr = qs.stringify(options.query)
const queryStr = stringifyQuery(options.query)
if (options.url.includes('?')) {
options.url += `&${queryStr}`
}

View File

@ -13,6 +13,5 @@ const themeVars: ConfigProviderThemeVars = {
<slot />
<wd-toast />
<wd-message-box />
<privacy-popup />
</wd-config-provider>
</template>

View File

@ -0,0 +1,67 @@
<script setup lang="ts">
import { tabbarStore } from './tabbar'
// 'i-carbon-code',
import { tabbarList as _tabBarList, cacheTabbarEnable, selectedTabbarStrategy } from './tabbarList'
// @ts-expect-error
const customTabbarEnable = selectedTabbarStrategy === 1 || selectedTabbarStrategy === 2
/** tabbarList 里面的 path 从 pages.config.ts 得到 */
const tabbarList = _tabBarList.map(item => ({ ...item, path: `/${item.pagePath}` }))
function selectTabBar({ value: index }: { value: number }) {
const url = tabbarList[index].path
tabbarStore.setCurIdx(index)
if (cacheTabbarEnable) {
uni.switchTab({ url })
}
else {
uni.navigateTo({ url })
}
}
onLoad(() => {
// tabBar 2 tabBar
// @ts-expect-error
const hideRedundantTabbarEnable = selectedTabbarStrategy === 1
hideRedundantTabbarEnable
&& uni.hideTabBar({
fail(err) {
console.log('hideTabBar fail: ', err)
},
success(res) {
console.log('hideTabBar success: ', res)
},
})
})
</script>
<template>
<wd-tabbar
v-if="customTabbarEnable"
v-model="tabbarStore.curIdx"
bordered
safeareainsetbottom
placeholder
fixed
@change="selectTabBar"
>
<block v-for="(item, idx) in tabbarList" :key="item.path">
<wd-tabbar-item v-if="item.iconType === 'uiLib'" :title="item.text" :icon="item.icon" />
<wd-tabbar-item
v-else-if="item.iconType === 'unocss' || item.iconType === 'iconfont'"
:title="item.text"
>
<template #icon>
<view
h-40rpx
w-40rpx
:class="[item.icon, idx === tabbarStore.curIdx ? 'is-active' : 'is-inactive']"
/>
</template>
</wd-tabbar-item>
<wd-tabbar-item v-else-if="item.iconType === 'local'" :title="item.text">
<template #icon>
<image :src="item.icon" h-40rpx w-40rpx />
</template>
</wd-tabbar-item>
</block>
</wd-tabbar>
</template>

View File

@ -0,0 +1,16 @@
# tabbar 说明
`tabbar` 分为 `4 种` 情况:
- `完全原生 tabbar`,使用 `switchTab` 切换 tabbar`tabbar` 页面有缓存。
- 优势:原生自带的 tabbar最先渲染有缓存。
- 劣势:只能使用 2 组图片来切换选中和非选中状态,修改颜色只能重新换图片(或者用 iconfont
- `半自定义 tabbar`,使用 `switchTab` 切换 tabbar`tabbar` 页面有缓存。使用了第三方 UI 库的 `tabbar` 组件,并隐藏了原生 `tabbar` 的显示。
- 优势:可以随意配置自己想要的 `svg icon`,切换字体颜色方便。有缓存。可以实现各种花里胡哨的动效等。
- 劣势:首次点击 tababr 会闪烁。
- `全自定义 tabbar`,使用 `navigateTo` 切换 `tabbar``tabbar` 页面无缓存。使用了第三方 UI 库的 `tabbar` 组件。
- 优势:可以随意配置自己想要的 svg icon切换字体颜色方便。可以实现各种花里胡哨的动效等。
- 劣势:首次点击 `tababr` 会闪烁,无缓存。
- `无 tabbar`,只有一个页面入口,底部无 `tabbar` 显示;常用语临时活动页。
> 注意:花里胡哨的效果需要自己实现,本模版不提供。

View File

@ -0,0 +1,11 @@
/**
* tabbar storageSync tabbar
* 使reactive简单状态 pinia
*/
export const tabbarStore = reactive({
curIdx: uni.getStorageSync('app-tabbar-index') || 0,
setCurIdx(idx: number) {
this.curIdx = idx
uni.setStorageSync('app-tabbar-index', idx)
},
})

View File

@ -0,0 +1,65 @@
/**
* tabbar tabbar.md
* 0: 'NATIVE_TABBAR' `完全原生 tabbar`
* 2: 'FULL_CUSTOM_TABBAR' `全自定义 tabbar`
* 1: 'HALF_CUSTOM_TABBAR' `半自定义 tabbar`
* 3: 'NO_TABBAR' `无 tabbar`
*
* pages.json
*/
// TODO通过这里切换使用tabbar的策略
export const selectedTabbarStrategy = 0
// 0 和 1 时需要tabbar缓存
export const cacheTabbarEnable = selectedTabbarStrategy < 2
// selectedTabbarStrategy==0 时,需要填 iconPath 和 selectedIconPath
// selectedTabbarStrategy==1 or 2 时,需要填 icon 和 iconType
// selectedTabbarStrategy==3 时tabbarList 不生效
export const tabbarList = [
{
iconPath: 'static/tabbar/home.png',
selectedIconPath: 'static/tabbar/homeHL.png',
pagePath: 'pages/index/index',
text: '首页',
icon: 'home',
iconType: 'uiLib',
},
{
iconPath: 'static/tabbar/example.png',
selectedIconPath: 'static/tabbar/exampleHL.png',
pagePath: 'pages/about/about',
text: '关于',
icon: 'i-carbon-code',
// 注意 unocss 的图标需要在 页面上引入一下,或者配置到 unocss.config.ts 的 safelist 中
iconType: 'unocss',
},
// {
// pagePath: 'pages/my/index',
// text: '我的',
// icon: '/static/logo.svg',
// iconType: 'local',
// },
// {
// pagePath: 'pages/mine/index',
// text: '我的',
// icon: 'iconfont icon-my',
// iconType: 'iconfont',
// },
]
const _tabbar = {
color: '#999999',
selectedColor: '#018d71',
backgroundColor: '#F8F8F8',
borderStyle: 'black',
height: '50px',
fontSize: '10px',
iconWidth: '24px',
spacing: '3px',
list: tabbarList,
}
// 0和1 需要显示底部的tabbar的各种配置以利用缓存
export const tabBar = cacheTabbarEnable ? _tabbar : undefined

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

@ -0,0 +1,19 @@
<script lang="ts" setup>
import type { ConfigProviderThemeVars } from 'wot-design-uni'
import FgTabbar from './fg-tabbar/fg-tabbar.vue'
const themeVars: ConfigProviderThemeVars = {
// colorTheme: 'red',
// buttonPrimaryBgColor: '#07c160',
// buttonPrimaryColor: '#07c160',
}
</script>
<template>
<wd-config-provider :theme-vars="themeVars">
<slot />
<FgTabbar />
<wd-toast />
<wd-message-box />
</wd-config-provider>
</template>

View File

@ -5,7 +5,7 @@ import { prototypeInterceptor, requestInterceptor, routeInterceptor } from './in
import store from './store'
import '@/style/index.scss'
import 'uno.css'
import 'virtual:uno.css'
export function createApp() {
const app = createSSRApp(App)

View File

@ -28,21 +28,25 @@
"iconPath": "static/tabbar/home.png",
"selectedIconPath": "static/tabbar/homeHL.png",
"pagePath": "pages/index/index",
"text": "首页"
"text": "首页",
"icon": "home",
"iconType": "uiLib"
},
{
"iconPath": "static/tabbar/example.png",
"selectedIconPath": "static/tabbar/exampleHL.png",
"pagePath": "pages/about/about",
"text": "关于"
"text": "关于",
"icon": "i-carbon-code",
"iconType": "unocss"
}
]
},
"__esModule": true,
"pages": [
{
"path": "pages/index/index",
"type": "home",
"layout": "tabbar",
"style": {
"navigationStyle": "custom",
"navigationBarTitleText": "首页"
@ -51,9 +55,9 @@
{
"path": "pages/about/about",
"type": "page",
"layout": "tabbar",
"style": {
"navigationBarTitleText": "关于",
"navigationStyle": "custom"
"navigationBarTitleText": "关于"
}
}
],

View File

@ -1,8 +1,8 @@
<route lang="json5">
{
layout: 'tabbar',
style: {
navigationBarTitleText: '关于',
navigationStyle: 'custom', //
},
}
</route>
@ -13,40 +13,26 @@ import UploadComp from './components/upload.vue'
//
const { safeAreaInsets } = uni.getSystemInfoSync()
function toSubPage() {
uni.navigateTo({
url: '/pages-sub/demo/index',
})
}
// vue .ts
// const testOxlint = (name: string) => {
// console.log('oxlint')
// }
// testOxlint('oxlint')
console.log('about')
</script>
<template>
<view>
<fg-navbar>关于</fg-navbar>
<view
class="overflow-hidden bg-white px-4 pt-2"
:style="{ marginTop: `${safeAreaInsets?.top}px` }"
>
<view class="mt-8 text-center text-3xl">
鸽友们好我是
<text class="text-red-500">
菲鸽
</text>
</view>
<!-- <button @click="toSubPage()">去分包</button> -->
<view class="test-css">
测试 scss 样式
</view>
<RequestComp />
<UploadComp />
</view>
</view>
</template>
<style lang="scss" scoped>

View File

@ -26,8 +26,8 @@ const { loading, data, run } = useUpload()
<view class="m-2">
{{ data }}
</view>
<view class="h-80 w-full">
<image v-if="data" :src="data.url" mode="scaleToFill" />
<view v-if="data" class="h-80 w-full">
<image :src="data.url" mode="scaleToFill" />
</view>
</template>
</view>

View File

@ -1,7 +1,9 @@
<!-- 使用 type="home" 属性设置首页其他页面不需要设置默认为page推荐使用json5更强大且允许注释 -->
<route lang="json5" type="home">
{
layout: 'tabbar',
style: {
// 'custom' 'default'
navigationStyle: 'custom',
navigationBarTitleText: '首页',
},
@ -39,20 +41,19 @@ safeAreaInsets = systemInfo.safeAreaInsets
// #endif
const author = ref('菲鸽')
const description = ref(
'unibest 是一个集成了多种工具和技术的 uniapp 开发模板,由 uniapp + Vue3 + Ts + Vite6 + UnoCss + VSCode 构建,模板具有代码提示、自动格式化、统一配置、代码片段等功能,并内置了许多常用的基本组件和基本功能,让你编写 uniapp 拥有 best 体验。',
'unibest 是一个集成了多种工具和技术的 uniapp 开发模板,由 uniapp + Vue3 + Ts + Vite5 + UnoCss + VSCode 构建,模板具有代码提示、自动格式化、统一配置、代码片段等功能,并内置了许多常用的基本组件和基本功能,让你编写 uniapp 拥有 best 体验。',
)
// uni API
onLoad(() => {
console.log('项目作者:', author.value)
})
console.log('index')
</script>
<template>
<view
class="overflow-hidden bg-white px-4 pt-2"
:style="{ marginTop: `${safeAreaInsets?.top}px` }"
>
<view class="mt-12">
<view class="bg-white px-4 pt-2" :style="{ marginTop: `${safeAreaInsets?.top}px` }">
<view class="mt-10">
<image src="/static/logo.svg" alt="" class="mx-auto block h-28 w-28" />
</view>
<view class="mt-4 text-center text-4xl text-[#d14328]">
@ -65,6 +66,19 @@ onLoad(() => {
<view class="m-auto mb-2 max-w-100 text-justify indent text-4">
{{ description }}
</view>
<view class="mt-4 text-center">
作者
<text class="text-green-500">
菲鸽
</text>
</view>
<view class="mt-4 text-center">
官网地址
<text class="text-green-500">
https://unibest.tech
</text>
</view>
<view class="mt-6 h-1px bg-#eee" />
<view class="mt-8 text-center">
当前平台是
<text class="text-green-500">

View File

@ -1,4 +1,4 @@
import type { IUserInfoVo } from '@/api/login.typings'
import type { IUserInfoVo } from '@/api/types/login'
import { defineStore } from 'pinia'
import { ref } from 'vue'
import {

View File

@ -1,4 +1,4 @@
// @import './iconfont.css';
@import './iconfont.css';
.test {
// 可以通过 @apply 多个样式封装整体样式

View File

@ -1,8 +1,6 @@
import pagesConfig from '@/pages.json'
import { pages, subPackages } from '@/pages.json'
import { isMpWeixin } from './platform'
const { pages, subPackages, tabBar = { list: [] } } = { ...pagesConfig }
export function getLastPage() {
// getCurrentPages() 至少有1个元素所以不再额外判断
// const lastPage = getCurrentPages().at(-1)
@ -11,41 +9,6 @@ export function getLastPage() {
return pages[pages.length - 1]
}
export const tabBarList = tabBar?.list || []
/** 判断当前页面是否是 tabbar 页 */
export function getIsTabbar() {
try {
const lastPage = getLastPage()
const currPath = lastPage?.route
return Boolean(tabBar?.list?.some(item => item.pagePath === currPath))
}
catch {
return false
}
}
/**
* tabbar
* @param path
* @returns true: tabbar false: tabbar
*/
export function isTableBar(path: string) {
if (!tabBar) {
return false
}
if (!tabBar.list.length) {
// 通常有 tabBar 的话list 不能有空且至少有2个元素这里其实不用处理
return false
}
// 这里需要处理一下 path因为 tabBar 中的 pagePath 是不带 /pages 前缀的
if (path.startsWith('/')) {
path = path.substring(1)
}
return !!tabBar.list.find(e => e.pagePath === path)
}
/**
* path redirectPath
* path '/pages/login/index'

29
src/utils/queryString.ts Normal file
View File

@ -0,0 +1,29 @@
/**
* URL查询字符串 qs
*
* @param obj
* @returns
*/
export function stringifyQuery(obj: Record<string, any>): string {
if (!obj || typeof obj !== 'object' || Array.isArray(obj))
return ''
return Object.entries(obj)
.filter(([_, value]) => value !== undefined && value !== null)
.map(([key, value]) => {
// 对键进行编码
const encodedKey = encodeURIComponent(key)
// 处理数组类型
if (Array.isArray(value)) {
return value
.filter(item => item !== undefined && item !== null)
.map(item => `${encodedKey}=${encodeURIComponent(item)}`)
.join('&')
}
// 处理基本类型
return `${encodedKey}=${encodeURIComponent(value)}`
})
.join('&')
}

View File

@ -39,6 +39,7 @@ export default defineConfig({
center: 'flex justify-center items-center',
},
],
safelist: [],
rules: [
[
'p-safe',

View File

@ -1,6 +1,5 @@
import path from 'node:path'
import process from 'node:process'
import fs from 'fs-extra'
export function copyNativeRes() {

View File

@ -1,6 +1,5 @@
import path from 'node:path'
import process from 'node:process'
import Uni from '@dcloudio/vite-plugin-uni'
import Components from '@uni-helper/vite-plugin-uni-components'
// @see https://uni-helper.js.org/vite-plugin-uni-layouts