@atooyu/uxto-fronted 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (46) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +142 -0
  3. package/example/index.html +12 -0
  4. package/example/package-lock.json +11120 -0
  5. package/example/package.json +37 -0
  6. package/example/patches/@dcloudio+vite-plugin-uni+3.0.0-4060620250520001.patch +13 -0
  7. package/example/src/App.vue +25 -0
  8. package/example/src/assets/styles/index.scss +130 -0
  9. package/example/src/env.d.ts +10 -0
  10. package/example/src/main.ts +10 -0
  11. package/example/src/manifest.json +40 -0
  12. package/example/src/pages/home/index.vue +74 -0
  13. package/example/src/pages/mine/index.vue +339 -0
  14. package/example/src/pages/uxto/index.vue +109 -0
  15. package/example/src/pages.json +28 -0
  16. package/example/src/stores/index.ts +1 -0
  17. package/example/src/stores/theme.ts +95 -0
  18. package/example/tsconfig.json +20 -0
  19. package/example/vite.config.js +30 -0
  20. package/package.json +46 -0
  21. package/template/index.html +12 -0
  22. package/template/package.json +37 -0
  23. package/template/src/App.vue +22 -0
  24. package/template/src/assets/styles/index.scss +213 -0
  25. package/template/src/env.d.ts +20 -0
  26. package/template/src/main.ts +12 -0
  27. package/template/src/manifest.json +69 -0
  28. package/template/src/pages/api/index.vue +43 -0
  29. package/template/src/pages/components/index.vue +43 -0
  30. package/template/src/pages/index/index.vue +51 -0
  31. package/template/src/pages/store/index.vue +43 -0
  32. package/template/src/pages/tabbar/index.vue +111 -0
  33. package/template/src/pages/utils/index.vue +43 -0
  34. package/template/src/pages.json +53 -0
  35. package/template/src/static/tabbar/README.md +30 -0
  36. package/template/src/stores/cart.ts +50 -0
  37. package/template/src/stores/counter.ts +28 -0
  38. package/template/src/stores/index.ts +4 -0
  39. package/template/src/stores/theme.ts +100 -0
  40. package/template/src/stores/user.ts +48 -0
  41. package/template/src/utils/common.ts +106 -0
  42. package/template/src/utils/http.ts +46 -0
  43. package/template/src/utils/index.ts +3 -0
  44. package/template/src/utils/storage.ts +26 -0
  45. package/template/tsconfig.json +30 -0
  46. package/template/vite.config.js +27 -0
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 atooyu
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,142 @@
1
+ # UXTO Frontend
2
+
3
+ UXTO UniApp 前端脚手架模板 - 支持 iOS、Android、鸿蒙多平台。
4
+
5
+ ## 安装
6
+
7
+ ### 使用 CLI 创建项目(推荐)
8
+
9
+ ```bash
10
+ # 安装 CLI
11
+ npm install -g @atooyu/uxto-cli
12
+
13
+ # 创建新项目
14
+ uxto create my-app
15
+
16
+ # 进入项目
17
+ cd my-app
18
+
19
+ # 安装依赖
20
+ pnpm install
21
+
22
+ # 运行
23
+ pnpm dev:h5 # H5
24
+ pnpm dev:app # App (iOS/Android)
25
+ pnpm dev:harmony # 鸿蒙
26
+ ```
27
+
28
+ ### 直接使用模板
29
+
30
+ ```bash
31
+ # 克隆模板
32
+ npx degit atooyu/uxto-fronted/template my-app
33
+
34
+ # 或使用模板创建
35
+ npm create @atooyu/uxto-app my-app
36
+ ```
37
+
38
+ ## 项目结构
39
+
40
+ ```
41
+ uxto-fronted/
42
+ ├── template/ # 脚手架模板
43
+ │ ├── src/
44
+ │ │ ├── pages/ # 页面
45
+ │ │ ├── stores/ # Pinia 状态管理
46
+ │ │ ├── utils/ # 工具函数
47
+ │ │ └── assets/ # 静态资源
48
+ │ ├── package.json
49
+ │ └── vite.config.js
50
+ ├── example/ # 示例项目
51
+ │ ├── src/
52
+ │ │ ├── pages/
53
+ │ │ │ ├── home/ # 首页
54
+ │ │ │ ├── uxto/ # UXTO 页面
55
+ │ │ │ └── mine/ # 我的(含主题切换)
56
+ │ │ └── stores/ # 主题状态
57
+ │ └── package.json
58
+ └── README.md
59
+ ```
60
+
61
+ ## 模板特性
62
+
63
+ - ✅ **UniApp + Vue3 + TypeScript** - 最新技术栈
64
+ - ✅ **多平台支持** - iOS、Android、鸿蒙、H5、小程序
65
+ - ✅ **Pinia 状态管理** - 轻量级状态管理方案
66
+ - ✅ **UXTO 组件库** - 内置 `@atooyu/uxto-ui`
67
+ - ✅ **u-tabbar** - 精美的底部导航组件
68
+ - ✅ **主题切换** - 支持暗黑模式和灰色模式
69
+ - ✅ **CSS 变量** - 灵活的主题定制
70
+
71
+ ## 示例项目
72
+
73
+ 示例项目展示了:
74
+
75
+ - u-tabbar 底部导航使用
76
+ - 暗黑模式 / 灰色模式切换
77
+ - 组件库使用方法
78
+
79
+ ```bash
80
+ cd example
81
+ pnpm install
82
+ pnpm dev:h5
83
+ ```
84
+
85
+ ## 主题切换
86
+
87
+ 模板内置了两种主题模式:
88
+
89
+ ### 暗黑模式
90
+ ```typescript
91
+ import { useThemeStore } from '@/stores/theme'
92
+
93
+ const theme = useThemeStore()
94
+ theme.setDarkMode(true)
95
+ ```
96
+
97
+ ### 灰色模式
98
+ ```typescript
99
+ theme.setGrayMode(true)
100
+ ```
101
+
102
+ ## 平台支持
103
+
104
+ | 平台 | 支持状态 |
105
+ |------|---------|
106
+ | iOS | ✅ |
107
+ | Android | ✅ |
108
+ | 鸿蒙 | ✅ |
109
+ | H5 | ✅ |
110
+ | 微信小程序 | ✅ |
111
+ | 支付宝小程序 | ✅ |
112
+ | 百度小程序 | ✅ |
113
+ | 字节小程序 | ✅ |
114
+
115
+ ## 相关项目
116
+
117
+ | 项目 | 说明 |
118
+ |------|------|
119
+ | [@atooyu/uxto-ui](https://www.npmjs.com/package/@atooyu/uxto-ui) | UXTO 组件库 |
120
+ | [@atooyu/uxto-cli](https://www.npmjs.com/package/@atooyu/uxto-cli) | UXTO 脚手架工具 |
121
+
122
+ ## 开发指南
123
+
124
+ ### 运行模板
125
+
126
+ ```bash
127
+ cd template
128
+ pnpm install
129
+ pnpm dev:h5
130
+ ```
131
+
132
+ ### 运行示例
133
+
134
+ ```bash
135
+ cd example
136
+ pnpm install
137
+ pnpm dev:h5
138
+ ```
139
+
140
+ ## License
141
+
142
+ MIT © atooyu
@@ -0,0 +1,12 @@
1
+ <!DOCTYPE html>
2
+ <html lang="zh-CN">
3
+ <head>
4
+ <meta charset="UTF-8" />
5
+ <meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0" />
6
+ <title>UXTO Example</title>
7
+ </head>
8
+ <body>
9
+ <div id="app"></div>
10
+ <script type="module" src="/src/main.ts"></script>
11
+ </body>
12
+ </html>