uview-pro 0.3.0 → 0.3.1

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 (249) hide show
  1. package/changelog.md +584 -574
  2. package/components/common/props.ts +22 -22
  3. package/components/u-action-sheet/types.ts +37 -37
  4. package/components/u-action-sheet/u-action-sheet.vue +178 -178
  5. package/components/u-alert-tips/types.ts +41 -41
  6. package/components/u-alert-tips/u-alert-tips.vue +238 -238
  7. package/components/u-avatar/types.ts +36 -36
  8. package/components/u-avatar/u-avatar.vue +217 -217
  9. package/components/u-avatar-cropper/types.ts +23 -23
  10. package/components/u-avatar-cropper/u-avatar-cropper.vue +297 -297
  11. package/components/u-avatar-cropper/weCropper.d.ts +62 -62
  12. package/components/u-avatar-cropper/weCropper.js +1281 -1281
  13. package/components/u-avatar-cropper/weCropper.ts +1276 -1276
  14. package/components/u-back-top/types.ts +36 -36
  15. package/components/u-back-top/u-back-top.vue +140 -140
  16. package/components/u-badge/types.ts +38 -38
  17. package/components/u-badge/u-badge.vue +183 -183
  18. package/components/u-button/types.ts +66 -66
  19. package/components/u-button/u-button.vue +579 -579
  20. package/components/u-calendar/types.ts +75 -75
  21. package/components/u-calendar/u-calendar.vue +793 -793
  22. package/components/u-car-keyboard/types.ts +14 -14
  23. package/components/u-car-keyboard/u-car-keyboard.vue +262 -262
  24. package/components/u-card/types.ts +61 -61
  25. package/components/u-card/u-card.vue +209 -209
  26. package/components/u-cell-group/types.ts +19 -19
  27. package/components/u-cell-group/u-cell-group.vue +60 -60
  28. package/components/u-cell-item/types.ts +56 -56
  29. package/components/u-cell-item/u-cell-item.vue +226 -226
  30. package/components/u-checkbox/types.ts +33 -33
  31. package/components/u-checkbox/u-checkbox.vue +282 -282
  32. package/components/u-checkbox-group/types.ts +34 -34
  33. package/components/u-checkbox-group/u-checkbox-group.vue +130 -130
  34. package/components/u-circle-progress/types.ts +54 -54
  35. package/components/u-circle-progress/u-circle-progress.vue +206 -206
  36. package/components/u-city-select/types.ts +22 -22
  37. package/components/u-city-select/u-city-select.vue +276 -276
  38. package/components/u-col/types.ts +32 -32
  39. package/components/u-col/u-col.vue +142 -142
  40. package/components/u-collapse/types.ts +33 -33
  41. package/components/u-collapse/u-collapse.vue +190 -190
  42. package/components/u-collapse-item/types.ts +27 -27
  43. package/components/u-collapse-item/u-collapse-item.vue +290 -290
  44. package/components/u-column-notice/types.ts +50 -50
  45. package/components/u-column-notice/u-column-notice.vue +222 -222
  46. package/components/u-count-down/types.ts +44 -44
  47. package/components/u-count-down/u-count-down.vue +286 -286
  48. package/components/u-count-to/types.ts +34 -34
  49. package/components/u-count-to/u-count-to.vue +266 -266
  50. package/components/u-divider/types.ts +33 -33
  51. package/components/u-divider/u-divider.vue +145 -145
  52. package/components/u-dropdown/types.ts +34 -34
  53. package/components/u-dropdown/u-dropdown.vue +330 -330
  54. package/components/u-dropdown-item/types.ts +29 -29
  55. package/components/u-dropdown-item/u-dropdown-item.vue +120 -120
  56. package/components/u-empty/types.ts +38 -38
  57. package/components/u-empty/u-empty.vue +103 -103
  58. package/components/u-field/types.ts +71 -71
  59. package/components/u-field/u-field.vue +388 -388
  60. package/components/u-form/types.ts +29 -29
  61. package/components/u-form/u-form.vue +130 -130
  62. package/components/u-form-item/types.ts +72 -72
  63. package/components/u-form-item/u-form-item.vue +447 -447
  64. package/components/u-full-screen/types.ts +16 -16
  65. package/components/u-full-screen/u-full-screen.vue +103 -103
  66. package/components/u-gap/types.ts +20 -20
  67. package/components/u-gap/u-gap.vue +50 -50
  68. package/components/u-grid/types.ts +21 -21
  69. package/components/u-grid/u-grid.vue +91 -91
  70. package/components/u-grid-item/types.ts +16 -16
  71. package/components/u-grid-item/u-grid-item.vue +130 -130
  72. package/components/u-icon/types.ts +61 -61
  73. package/components/u-icon/u-icon.vue +296 -296
  74. package/components/u-image/types.ts +51 -51
  75. package/components/u-image/u-image.vue +239 -239
  76. package/components/u-index-anchor/types.ts +16 -16
  77. package/components/u-index-anchor/u-index-anchor.vue +94 -94
  78. package/components/u-index-list/types.ts +43 -43
  79. package/components/u-index-list/u-index-list.vue +352 -352
  80. package/components/u-input/types.ts +137 -137
  81. package/components/u-input/u-input.vue +288 -288
  82. package/components/u-keyboard/types.ts +40 -40
  83. package/components/u-keyboard/u-keyboard.vue +178 -178
  84. package/components/u-lazy-load/types.ts +37 -37
  85. package/components/u-lazy-load/u-lazy-load.vue +246 -246
  86. package/components/u-line/types.ts +44 -44
  87. package/components/u-line/u-line.vue +68 -68
  88. package/components/u-line-progress/types.ts +58 -58
  89. package/components/u-line-progress/u-line-progress.vue +126 -126
  90. package/components/u-link/types.ts +43 -43
  91. package/components/u-link/u-link.vue +84 -84
  92. package/components/u-loading/types.ts +35 -35
  93. package/components/u-loading/u-loading.vue +105 -105
  94. package/components/u-loading-popup/types.ts +26 -26
  95. package/components/u-loading-popup/u-loading-popup.vue +253 -253
  96. package/components/u-loadmore/types.ts +79 -79
  97. package/components/u-loadmore/u-loadmore.vue +156 -156
  98. package/components/u-mask/types.ts +40 -40
  99. package/components/u-mask/u-mask.vue +113 -113
  100. package/components/u-message-input/types.ts +74 -74
  101. package/components/u-message-input/u-message-input.vue +281 -281
  102. package/components/u-modal/types.ts +118 -118
  103. package/components/u-modal/u-modal.vue +220 -220
  104. package/components/u-navbar/types.ts +103 -103
  105. package/components/u-navbar/u-navbar.vue +251 -251
  106. package/components/u-no-network/image.ts +2 -2
  107. package/components/u-no-network/types.ts +28 -28
  108. package/components/u-no-network/u-no-network.vue +303 -303
  109. package/components/u-notice-bar/types.ts +111 -111
  110. package/components/u-notice-bar/u-notice-bar.vue +189 -189
  111. package/components/u-number-box/types.ts +42 -42
  112. package/components/u-number-box/u-number-box.vue +321 -321
  113. package/components/u-number-keyboard/types.ts +26 -26
  114. package/components/u-number-keyboard/u-number-keyboard.vue +188 -188
  115. package/components/u-picker/types.ts +123 -123
  116. package/components/u-picker/u-picker.vue +685 -685
  117. package/components/u-popup/types.ts +59 -59
  118. package/components/u-popup/u-popup.vue +385 -385
  119. package/components/u-radio/types.ts +27 -27
  120. package/components/u-radio/u-radio.vue +279 -279
  121. package/components/u-radio-group/types.ts +31 -31
  122. package/components/u-radio-group/u-radio-group.vue +96 -96
  123. package/components/u-rate/types.ts +42 -42
  124. package/components/u-rate/u-rate.vue +249 -249
  125. package/components/u-read-more/types.ts +37 -37
  126. package/components/u-read-more/u-read-more.vue +172 -172
  127. package/components/u-root-portal/u-root-portal.vue +56 -56
  128. package/components/u-row/types.ts +22 -22
  129. package/components/u-row/u-row.vue +105 -105
  130. package/components/u-row-notice/types.ts +41 -41
  131. package/components/u-row-notice/u-row-notice.vue +256 -256
  132. package/components/u-safe-bottom/u-safe-bottom.vue +57 -57
  133. package/components/u-search/types.ts +55 -55
  134. package/components/u-search/u-search.vue +279 -279
  135. package/components/u-section/types.ts +34 -34
  136. package/components/u-section/u-section.vue +150 -150
  137. package/components/u-select/types.ts +45 -45
  138. package/components/u-select/u-select.vue +388 -388
  139. package/components/u-skeleton/types.ts +22 -22
  140. package/components/u-skeleton/u-skeleton.vue +231 -231
  141. package/components/u-slider/types.ts +34 -34
  142. package/components/u-slider/u-slider.vue +255 -255
  143. package/components/u-status-bar/u-status-bar.vue +74 -74
  144. package/components/u-steps/types.ts +30 -30
  145. package/components/u-steps/u-steps.vue +181 -181
  146. package/components/u-sticky/types.ts +24 -24
  147. package/components/u-sticky/u-sticky.vue +178 -178
  148. package/components/u-subsection/types.ts +38 -38
  149. package/components/u-subsection/u-subsection.vue +339 -339
  150. package/components/u-swipe-action/types.ts +52 -52
  151. package/components/u-swipe-action/u-swipe-action.vue +276 -276
  152. package/components/u-swiper/types.ts +49 -49
  153. package/components/u-swiper/u-swiper.vue +308 -308
  154. package/components/u-switch/types.ts +30 -30
  155. package/components/u-switch/u-switch.vue +150 -150
  156. package/components/u-tabbar/types.ts +38 -38
  157. package/components/u-tabbar/u-tabbar.vue +315 -315
  158. package/components/u-table/types.ts +27 -27
  159. package/components/u-table/u-table.vue +67 -67
  160. package/components/u-tabs/types.ts +53 -53
  161. package/components/u-tabs/u-tabs.vue +302 -302
  162. package/components/u-tabs-swiper/types.ts +55 -55
  163. package/components/u-tabs-swiper/u-tabs-swiper.vue +409 -409
  164. package/components/u-tag/types.ts +39 -39
  165. package/components/u-tag/u-tag.vue +268 -268
  166. package/components/u-td/types.ts +14 -14
  167. package/components/u-td/u-td.vue +98 -98
  168. package/components/u-text/types.ts +72 -72
  169. package/components/u-text/u-text.vue +343 -343
  170. package/components/u-th/types.ts +14 -14
  171. package/components/u-th/u-th.vue +92 -92
  172. package/components/u-time-line/u-time-line.vue +53 -53
  173. package/components/u-time-line-item/types.ts +16 -16
  174. package/components/u-time-line-item/u-time-line-item.vue +90 -90
  175. package/components/u-toast/types.ts +38 -38
  176. package/components/u-toast/u-toast.vue +240 -240
  177. package/components/u-top-tips/types.ts +16 -16
  178. package/components/u-top-tips/u-top-tips.vue +130 -130
  179. package/components/u-tr/types.ts +11 -11
  180. package/components/u-tr/u-tr.vue +39 -39
  181. package/components/u-upload/types.ts +82 -82
  182. package/components/u-upload/u-upload.vue +568 -568
  183. package/components/u-verification-code/types.ts +24 -24
  184. package/components/u-verification-code/u-verification-code.vue +176 -176
  185. package/components/u-waterfall/types.ts +18 -18
  186. package/components/u-waterfall/u-waterfall.vue +187 -187
  187. package/iconfont.css +913 -913
  188. package/index.scss +25 -25
  189. package/index.ts +38 -38
  190. package/libs/config/config.ts +26 -26
  191. package/libs/config/zIndex.ts +37 -37
  192. package/libs/css/color.scss +155 -155
  193. package/libs/css/common.scss +178 -178
  194. package/libs/css/style.components.scss +16 -16
  195. package/libs/css/style.h5.scss +8 -8
  196. package/libs/css/style.mp.scss +72 -72
  197. package/libs/css/style.nvue.scss +15 -15
  198. package/libs/css/style.vue.scss +188 -188
  199. package/libs/function/$parent.ts +24 -24
  200. package/libs/function/addUnit.ts +13 -13
  201. package/libs/function/color.ts +37 -37
  202. package/libs/function/colorGradient.ts +139 -139
  203. package/libs/function/debounce.ts +28 -28
  204. package/libs/function/deepClone.ts +39 -39
  205. package/libs/function/deepMerge.ts +35 -35
  206. package/libs/function/getParent.ts +63 -63
  207. package/libs/function/getRect.ts +26 -26
  208. package/libs/function/guid.ts +42 -42
  209. package/libs/function/md5.ts +403 -403
  210. package/libs/function/parent.ts +21 -21
  211. package/libs/function/queryParams.ts +64 -64
  212. package/libs/function/random.ts +16 -16
  213. package/libs/function/randomArray.ts +11 -11
  214. package/libs/function/route.ts +118 -118
  215. package/libs/function/styleUtils.ts +83 -83
  216. package/libs/function/sys.ts +15 -15
  217. package/libs/function/test.ts +289 -289
  218. package/libs/function/throttle.ts +31 -31
  219. package/libs/function/timeFormat.ts +55 -55
  220. package/libs/function/timeFrom.ts +48 -48
  221. package/libs/function/toast.ts +14 -14
  222. package/libs/function/trim.ts +21 -21
  223. package/libs/function/type2icon.ts +39 -39
  224. package/libs/hooks/index.ts +4 -4
  225. package/libs/hooks/useCompRelation.ts +364 -364
  226. package/libs/hooks/useComponent.ts +759 -759
  227. package/libs/hooks/useEmitter.ts +79 -79
  228. package/libs/hooks/useParent.ts +33 -33
  229. package/libs/hooks/useRect.ts +33 -33
  230. package/libs/index.ts +337 -337
  231. package/libs/request/auto-http.ts +76 -76
  232. package/libs/request/index.ts +242 -242
  233. package/libs/store/index.ts +88 -88
  234. package/libs/util/async-validator.d.ts +75 -75
  235. package/libs/util/async-validator.js +1 -1
  236. package/libs/util/calendar.d.ts +57 -57
  237. package/libs/util/emitter.ts +112 -112
  238. package/libs/util/eventBus.ts +86 -86
  239. package/libs/util/logger.ts +364 -364
  240. package/libs/util/mitt.ts +118 -118
  241. package/libs/util/parent.ts +20 -20
  242. package/package.json +4 -4
  243. package/readme.md +241 -241
  244. package/theme.scss +38 -38
  245. package/types/components.d.ts +97 -97
  246. package/types/global.d.ts +331 -331
  247. package/types/ignore-errors.d.ts +30 -30
  248. package/types/index.d.ts +19 -19
  249. package/types/uni-app.d.ts +63 -63
package/readme.md CHANGED
@@ -1,241 +1,241 @@
1
- <p align="center">
2
- <img alt="logo" src="https://ik.imagekit.io/anyup/uview-pro/common/logo.png" width="120" height="120" style="margin-bottom: 10px;">
3
- </p>
4
- <h3 align="center" style="margin: 30px 0 30px;font-weight: bold;font-size:40px;">uView Pro</h3>
5
- <h3 align="center">uni-app Vue3 多平台快速开发的 UI 框架</h3>
6
-
7
- [![star](https://gitee.com/anyup/uView-Pro/badge/star.svg)](https://gitee.com/anyup/uView-Pro)
8
- [![fork](https://gitee.com/anyup/uView-Pro/badge/fork.svg)](https://gitee.com/anyup/uView-Pro)
9
- [![stars](https://img.shields.io/github/stars/anyup/uView-Pro?style=flat-square&logo=GitHub)](https://github.com/anyup/uView-Pro)
10
- [![forks](https://img.shields.io/github/forks/anyup/uView-Pro?style=flat-square&logo=GitHub)](https://github.com/anyup/uView-Pro)
11
- [![issues](https://img.shields.io/github/issues/anyup/uView-Pro?style=flat-square&logo=GitHub)](https://github.com/anyup/uView-Pro/issues)
12
- [![npm version](https://img.shields.io/npm/v/uview-pro)](https://www.npmjs.com/package/uview-pro)
13
- [![Website](https://img.shields.io/badge/uView%20Pro-docs-blue?style=flat-square)](https://uviewpro.cn)
14
- [![node version](https://img.shields.io/badge/node-%3E%3D18-green)](https://nodejs.org/)
15
- [![pnpm version](https://img.shields.io/badge/pnpm-%3E%3D7.30-green)](https://pnpm.io/)
16
- [![license](https://img.shields.io/github/license/anyup/uView-Pro?style=flat-square)](https://en.wikipedia.org/wiki/MIT_License)
17
-
18
- ## 说明
19
-
20
- `uView UI`,是 [uni-app](https://uniapp.dcloud.io/) 生态优秀的 UI 框架,全面的组件和便捷的工具会让您信手拈来,如鱼得水。
21
-
22
- `uView Pro`,是全面支持 Vue3.0、TypeScript 的 uni-app 生态框架,uView Pro 的基线版本是基于 uView 1.8.8 修改,使用 TypeScript 完全重构,目前已全面支持 uni-app Vue3.0。
23
-
24
- ## [官方文档:https://uviewpro.cn](https://uviewpro.cn)
25
-
26
- ## 特性
27
-
28
- - 兼容安卓,iOS,微信小程序,H5,QQ 小程序,百度小程序,支付宝小程序,头条小程序
29
- - 70+精选组件,功能丰富,多端兼容,让您快速集成,开箱即用
30
- - 众多贴心的 JS 利器,让您飞镖在手,召之即来,百步穿杨
31
- - 众多的常用页面和布局,让您专注逻辑,事半功倍
32
- - 详尽的文档支持,现代化的演示效果
33
- - 按需引入,精简打包体积
34
-
35
- ## 手机预览
36
-
37
- 您可以通过**微信**或**手机浏览器**扫描以下二维码,查看最佳的演示效果。
38
-
39
- <table class="table">
40
- <tr>
41
- <td><img src="https://ik.imagekit.io/anyup/images/social/qr_uview_pro_wx.jpg" width="150" height="150" ></td>
42
- <td><img src="https://ik.imagekit.io/anyup/images/social/qr_uview_pro_alipay.png" width="150" height="150" ></td>
43
- <td><img src="https://ik.imagekit.io/anyup/images/social/qr_uview_pro_h5.png" width="150" height="150" ></td>
44
- <td><img src="https://ik.imagekit.io/anyup/images/social/qr_uview_pro_android.png" width="150" height="150" ></td>
45
- </tr>
46
- <tr>
47
- <td align="center"><strong>微信小程序</strong><br>(微信扫码)</td>
48
- <td align="center"><strong>支付宝小程序</strong><br>(支付宝扫码)</td>
49
- <td align="center"><strong>H5</strong><br>(浏览器扫码)</td>
50
- <td align="center"><strong>Android</strong><br>(浏览器扫码)</td>
51
- </tr>
52
- </table>
53
-
54
- 运行示例工程,请[下载源码](https://github.com/anyup/uview-pro)后,在项目根目录执行以下命令:
55
-
56
- ```bash
57
- pnpm install
58
- pnpm dev
59
- ```
60
-
61
- ## 链接
62
-
63
- - [Github](https://github.com/anyup/uview-pro)
64
- - [Gitee](https://gitee.com/anyup/uview-pro)
65
- - [官方文档](https://uviewpro.cn)
66
- - [更新日志](https://github.com/anyup/uView-Pro/blob/master/src/uni_modules/uview-pro/changelog.md)
67
-
68
- ## 交流反馈
69
-
70
- `uView Pro` 微信交流群: [点击进入](https://uviewpro.cn/zh/resource/about.html)
71
-
72
- `uView Pro` QQ 交流群: [点击进入](http://qm.qq.com/cgi-bin/qm/qr?_wv=1027&k=98nSVDldWEbDdq4lxiP4aL7uATfMSlI6&authKey=G2yQJ5MQiKzMldaxBsIfKt17NuJuUw8Fr6zdKLggc6NZXgw4BVbqkU2U3EE994yd&noverify=0&group_code=811732166)
73
-
74
- <table class="table">
75
- <tr>
76
- <td><img src="https://ik.imagekit.io/anyup/images/social/weixin-chat.png?updatedAt=1760233880982" width="250" height="345" ></td>
77
- <td><img src="https://ik.imagekit.io/anyup/images/social/qq-chat.png" width="250" height="345" ></td>
78
- </tr>
79
- <tr>
80
- <td align="center"><strong>微信群</strong><br></td>
81
- <td align="center"><strong>QQ群</strong><br></td>
82
- </tr>
83
- </table>
84
-
85
- ## 关于 PR
86
-
87
- 我们非常乐意接受各位的优质 PR,但在此之前我希望您了解 `uView Pro` 是一个需要兼容多个平台的(小程序、h5、iOS App、Android App)包括 nvue 页面、vue 页面。
88
-
89
- 所以希望在您修复 bug 并提交之前尽可能的去这些平台测试一下兼容性。最好能携带测试截图以方便审核。非常感谢!
90
-
91
- ## 安装配置
92
-
93
- `uView Pro` 支持 `npm` 和 `uni_modules` 两种主流安装方式,配置方式高度一致。无论采用哪种方式,均可通过 `easycom` 实现组件自动引入,极大提升开发效率。以下为统一的配置说明:
94
-
95
- ### 1. 安装 uView Pro
96
-
97
- - npm 安装:
98
-
99
- ```bash
100
- npm install uview-pro
101
- # 或
102
- yarn add uview-pro
103
- # 或
104
- pnpm add uview-pro
105
- ```
106
-
107
- - uni_modules 安装:
108
-
109
- 通过 HBuilderX 插件市场或手动下载,将 uView Pro 放入 `uni_modules` 目录。
110
-
111
- [插件市场:https://ext.dcloud.net.cn/plugin?id=24633](https://ext.dcloud.net.cn/plugin?id=24633)
112
-
113
- ### 2. 引入 uView Pro 主库
114
-
115
- 在 `main.ts` 中引入并注册 uView Pro:
116
-
117
- ```js
118
- import { createSSRApp } from 'vue';
119
- // npm 方式
120
- import uViewPro from 'uview-pro';
121
- // uni_modules 方式
122
- // import uViewPro from "@/uni_modules/uview-pro";
123
-
124
- export function createApp() {
125
- const app = createSSRApp(App);
126
- app.use(uViewPro);
127
- return {
128
- app
129
- };
130
- }
131
- ```
132
-
133
- ### 3. 引入全局样式
134
-
135
- 在 `uni.scss` 中引入主题样式:
136
-
137
- ```scss
138
- /* npm 方式 */
139
- @import 'uview-pro/theme.scss';
140
- /* uni_modules 方式 */
141
- /* @import "@/uni_modules/uview-pro/theme.scss"; */
142
- ```
143
-
144
- 在 `App.vue` 首行引入基础样式:
145
-
146
- ```scss
147
- <style lang="scss">
148
- /* npm 方式 */
149
- @import "uview-pro/index.scss";
150
- /* uni_modules 方式 */
151
- /* @import "@/uni_modules/uview-pro/index.scss"; */
152
- </style>
153
- ```
154
-
155
- ### 4. 配置 easycom 自动引入组件
156
-
157
- 在 `pages.json` 中配置 `easycom` 规则,实现组件自动引入:
158
-
159
- ```json
160
- {
161
- "easycom": {
162
- "autoscan": true,
163
- "custom": {
164
- // npm 方式
165
- "^u-(.*)": "uview-pro/components/u-$1/u-$1.vue"
166
- // uni_modules 方式
167
- // "^u-(.*)": "@/uni_modules/uview-pro/components/u-$1/u-$1.vue"
168
- }
169
- },
170
- "pages": []
171
- }
172
- ```
173
-
174
- **温馨提示**
175
-
176
- - 1.修改 `easycom` 规则后需重启 HX 或重新编译项目。
177
- - 2.请确保 `pages.json` 中只有一个 easycom 字段,否则请自行合并多个规则。
178
- - 3.一定要放在 `custom` 内,否则无效。
179
-
180
- ### 5. Volar 类型提示支持
181
-
182
- 如需在 `CLI` 项目中获得 `Volar` 的全局类型提示,请在 `tsconfig.json` 中添加:
183
-
184
- ```json
185
- {
186
- "compilerOptions": {
187
- // npm 方式
188
- "types": ["uview-pro/types"]
189
- // uni_modules 方式
190
- // "types": ["@/uni_modules/uview-pro/types"]
191
- }
192
- }
193
- ```
194
-
195
- > HBuilderX 项目暂不支持 `tsconfig.json` 的 `types` 配置,`CLI` 项目推荐配置以获得最佳 `TS` 体验。
196
-
197
- ### 6. 组件使用
198
-
199
- 配置完成后,无需 `import` 和 `components` 注册,可直接在 `SFC` 中使用 `uView Pro` 组件:
200
-
201
- ```vue
202
- <template>
203
- <u-button type="primary">按钮</u-button>
204
- </template>
205
- ```
206
-
207
- 请通过[快速上手](https://uviewpro.cn/zh/components/quickstart.html)了解更详细的内容
208
-
209
- ## 捐赠 uView Pro
210
-
211
- `uView Pro` 文档内容和框架源码基于 `uView UI` 二次开发,因此全部开源免费,如果您认为 `uView Pro` 帮到了您的开发工作,您可以捐赠 `uView Pro` 的研发工作,捐赠无门槛,哪怕是一杯可乐也好(相信这比打赏主播更有意义)。
212
-
213
- <table class="table">
214
- <tr>
215
- <td><img src="https://ik.imagekit.io/anyup/images/social/wechat-pay.png" width="250" height="345" ></td>
216
- <td><img src="https://ik.imagekit.io/anyup/images/social/ali-pay.png" width="250" height="345" ></td>
217
- </tr>
218
- <tr>
219
- <td align="center"><strong>微信</strong><br></td>
220
- <td align="center"><strong>支付宝</strong><br></td>
221
- </tr>
222
- </table>
223
-
224
- ## 贡献者
225
-
226
- <a href="https://github.com/anyup/uView-Pro/graphs/contributors">
227
- <img alt="Contributors" src="https://contrib.rocks/image?repo=anyup/uView-Pro" />
228
- </a>
229
-
230
- ## 版权信息
231
-
232
- `uView Pro` 遵循[MIT](https://en.wikipedia.org/wiki/MIT_License)开源协议,意味着您无需支付任何费用,也无需授权,即可将 `uView Pro` 应用到您的产品中。
233
-
234
- ## 鸣谢
235
-
236
- 再次感谢 `uView UI` 开发团队,以及所有为 `uView UI` 的贡献者,以及所有为 `uView Pro` 的贡献者。
237
-
238
- - [Github](https://github.com/anyup/uview-pro)
239
- - [Gitee](https://gitee.com/anyup/uview-pro)
240
- - [uView UI 1.0](https://github.com/umicro/uView)
241
- - [uView UI 2.0](https://github.com/umicro/uView2.0)
1
+ <p align="center">
2
+ <img alt="logo" src="https://ik.imagekit.io/anyup/uview-pro/common/logo.png" width="120" height="120" style="margin-bottom: 10px;">
3
+ </p>
4
+ <h3 align="center" style="margin: 30px 0 30px;font-weight: bold;font-size:40px;">uView Pro</h3>
5
+ <h3 align="center">uni-app Vue3 多平台快速开发的 UI 框架</h3>
6
+
7
+ [![star](https://gitee.com/anyup/uView-Pro/badge/star.svg)](https://gitee.com/anyup/uView-Pro)
8
+ [![fork](https://gitee.com/anyup/uView-Pro/badge/fork.svg)](https://gitee.com/anyup/uView-Pro)
9
+ [![stars](https://img.shields.io/github/stars/anyup/uView-Pro?style=flat-square&logo=GitHub)](https://github.com/anyup/uView-Pro)
10
+ [![forks](https://img.shields.io/github/forks/anyup/uView-Pro?style=flat-square&logo=GitHub)](https://github.com/anyup/uView-Pro)
11
+ [![issues](https://img.shields.io/github/issues/anyup/uView-Pro?style=flat-square&logo=GitHub)](https://github.com/anyup/uView-Pro/issues)
12
+ [![npm version](https://img.shields.io/npm/v/uview-pro)](https://www.npmjs.com/package/uview-pro)
13
+ [![Website](https://img.shields.io/badge/uView%20Pro-docs-blue?style=flat-square)](https://uviewpro.cn)
14
+ [![node version](https://img.shields.io/badge/node-%3E%3D18-green)](https://nodejs.org/)
15
+ [![pnpm version](https://img.shields.io/badge/pnpm-%3E%3D7.30-green)](https://pnpm.io/)
16
+ [![license](https://img.shields.io/github/license/anyup/uView-Pro?style=flat-square)](https://en.wikipedia.org/wiki/MIT_License)
17
+
18
+ ## 说明
19
+
20
+ `uView UI`,是 [uni-app](https://uniapp.dcloud.io/) 生态优秀的 UI 框架,全面的组件和便捷的工具会让您信手拈来,如鱼得水。
21
+
22
+ `uView Pro`,是全面支持 Vue3.0、TypeScript 的 uni-app 生态框架,uView Pro 的基线版本是基于 uView 1.8.8 修改,使用 TypeScript 完全重构,目前已全面支持 uni-app Vue3.0。
23
+
24
+ ## [官方文档:https://uviewpro.cn](https://uviewpro.cn)
25
+
26
+ ## 特性
27
+
28
+ - 兼容安卓,iOS,微信小程序,H5,QQ 小程序,百度小程序,支付宝小程序,头条小程序
29
+ - 70+精选组件,功能丰富,多端兼容,让您快速集成,开箱即用
30
+ - 众多贴心的 JS 利器,让您飞镖在手,召之即来,百步穿杨
31
+ - 众多的常用页面和布局,让您专注逻辑,事半功倍
32
+ - 详尽的文档支持,现代化的演示效果
33
+ - 按需引入,精简打包体积
34
+
35
+ ## 手机预览
36
+
37
+ 您可以通过**微信**或**手机浏览器**扫描以下二维码,查看最佳的演示效果。
38
+
39
+ <table class="table">
40
+ <tr>
41
+ <td><img src="https://ik.imagekit.io/anyup/images/social/qr_uview_pro_wx.jpg" width="150" height="150" ></td>
42
+ <td><img src="https://ik.imagekit.io/anyup/images/social/qr_uview_pro_alipay.png" width="150" height="150" ></td>
43
+ <td><img src="https://ik.imagekit.io/anyup/images/social/qr_uview_pro_h5.png" width="150" height="150" ></td>
44
+ <td><img src="https://ik.imagekit.io/anyup/images/social/qr_uview_pro_android.png" width="150" height="150" ></td>
45
+ </tr>
46
+ <tr>
47
+ <td align="center"><strong>微信小程序</strong><br>(微信扫码)</td>
48
+ <td align="center"><strong>支付宝小程序</strong><br>(支付宝扫码)</td>
49
+ <td align="center"><strong>H5</strong><br>(浏览器扫码)</td>
50
+ <td align="center"><strong>Android</strong><br>(浏览器扫码)</td>
51
+ </tr>
52
+ </table>
53
+
54
+ 运行示例工程,请[下载源码](https://github.com/anyup/uview-pro)后,在项目根目录执行以下命令:
55
+
56
+ ```bash
57
+ pnpm install
58
+ pnpm dev
59
+ ```
60
+
61
+ ## 链接
62
+
63
+ - [Github](https://github.com/anyup/uview-pro)
64
+ - [Gitee](https://gitee.com/anyup/uview-pro)
65
+ - [官方文档](https://uviewpro.cn)
66
+ - [更新日志](https://github.com/anyup/uView-Pro/blob/master/src/uni_modules/uview-pro/changelog.md)
67
+
68
+ ## 交流反馈
69
+
70
+ `uView Pro` 微信交流群: [点击进入](https://uviewpro.cn/zh/resource/about.html)
71
+
72
+ `uView Pro` QQ 交流群: [点击进入](http://qm.qq.com/cgi-bin/qm/qr?_wv=1027&k=98nSVDldWEbDdq4lxiP4aL7uATfMSlI6&authKey=G2yQJ5MQiKzMldaxBsIfKt17NuJuUw8Fr6zdKLggc6NZXgw4BVbqkU2U3EE994yd&noverify=0&group_code=811732166)
73
+
74
+ <table class="table">
75
+ <tr>
76
+ <td><img src="https://ik.imagekit.io/anyup/images/social/weixin-chat.png?updatedAt=1760233880982" width="250" height="345" ></td>
77
+ <td><img src="https://ik.imagekit.io/anyup/images/social/qq-chat.png" width="250" height="345" ></td>
78
+ </tr>
79
+ <tr>
80
+ <td align="center"><strong>微信群</strong><br></td>
81
+ <td align="center"><strong>QQ群</strong><br></td>
82
+ </tr>
83
+ </table>
84
+
85
+ ## 关于 PR
86
+
87
+ 我们非常乐意接受各位的优质 PR,但在此之前我希望您了解 `uView Pro` 是一个需要兼容多个平台的(小程序、h5、iOS App、Android App)包括 nvue 页面、vue 页面。
88
+
89
+ 所以希望在您修复 bug 并提交之前尽可能的去这些平台测试一下兼容性。最好能携带测试截图以方便审核。非常感谢!
90
+
91
+ ## 安装配置
92
+
93
+ `uView Pro` 支持 `npm` 和 `uni_modules` 两种主流安装方式,配置方式高度一致。无论采用哪种方式,均可通过 `easycom` 实现组件自动引入,极大提升开发效率。以下为统一的配置说明:
94
+
95
+ ### 1. 安装 uView Pro
96
+
97
+ - npm 安装:
98
+
99
+ ```bash
100
+ npm install uview-pro
101
+ # 或
102
+ yarn add uview-pro
103
+ # 或
104
+ pnpm add uview-pro
105
+ ```
106
+
107
+ - uni_modules 安装:
108
+
109
+ 通过 HBuilderX 插件市场或手动下载,将 uView Pro 放入 `uni_modules` 目录。
110
+
111
+ [插件市场:https://ext.dcloud.net.cn/plugin?id=24633](https://ext.dcloud.net.cn/plugin?id=24633)
112
+
113
+ ### 2. 引入 uView Pro 主库
114
+
115
+ 在 `main.ts` 中引入并注册 uView Pro:
116
+
117
+ ```js
118
+ import { createSSRApp } from 'vue';
119
+ // npm 方式
120
+ import uViewPro from 'uview-pro';
121
+ // uni_modules 方式
122
+ // import uViewPro from "@/uni_modules/uview-pro";
123
+
124
+ export function createApp() {
125
+ const app = createSSRApp(App);
126
+ app.use(uViewPro);
127
+ return {
128
+ app
129
+ };
130
+ }
131
+ ```
132
+
133
+ ### 3. 引入全局样式
134
+
135
+ 在 `uni.scss` 中引入主题样式:
136
+
137
+ ```scss
138
+ /* npm 方式 */
139
+ @import 'uview-pro/theme.scss';
140
+ /* uni_modules 方式 */
141
+ /* @import "@/uni_modules/uview-pro/theme.scss"; */
142
+ ```
143
+
144
+ 在 `App.vue` 首行引入基础样式:
145
+
146
+ ```scss
147
+ <style lang="scss">
148
+ /* npm 方式 */
149
+ @import "uview-pro/index.scss";
150
+ /* uni_modules 方式 */
151
+ /* @import "@/uni_modules/uview-pro/index.scss"; */
152
+ </style>
153
+ ```
154
+
155
+ ### 4. 配置 easycom 自动引入组件
156
+
157
+ 在 `pages.json` 中配置 `easycom` 规则,实现组件自动引入:
158
+
159
+ ```json
160
+ {
161
+ "easycom": {
162
+ "autoscan": true,
163
+ "custom": {
164
+ // npm 方式
165
+ "^u-(.*)": "uview-pro/components/u-$1/u-$1.vue"
166
+ // uni_modules 方式
167
+ // "^u-(.*)": "@/uni_modules/uview-pro/components/u-$1/u-$1.vue"
168
+ }
169
+ },
170
+ "pages": []
171
+ }
172
+ ```
173
+
174
+ **温馨提示**
175
+
176
+ - 1.修改 `easycom` 规则后需重启 HX 或重新编译项目。
177
+ - 2.请确保 `pages.json` 中只有一个 easycom 字段,否则请自行合并多个规则。
178
+ - 3.一定要放在 `custom` 内,否则无效。
179
+
180
+ ### 5. Volar 类型提示支持
181
+
182
+ 如需在 `CLI` 项目中获得 `Volar` 的全局类型提示,请在 `tsconfig.json` 中添加:
183
+
184
+ ```json
185
+ {
186
+ "compilerOptions": {
187
+ // npm 方式
188
+ "types": ["uview-pro/types"]
189
+ // uni_modules 方式
190
+ // "types": ["@/uni_modules/uview-pro/types"]
191
+ }
192
+ }
193
+ ```
194
+
195
+ > HBuilderX 项目暂不支持 `tsconfig.json` 的 `types` 配置,`CLI` 项目推荐配置以获得最佳 `TS` 体验。
196
+
197
+ ### 6. 组件使用
198
+
199
+ 配置完成后,无需 `import` 和 `components` 注册,可直接在 `SFC` 中使用 `uView Pro` 组件:
200
+
201
+ ```vue
202
+ <template>
203
+ <u-button type="primary">按钮</u-button>
204
+ </template>
205
+ ```
206
+
207
+ 请通过[快速上手](https://uviewpro.cn/zh/components/quickstart.html)了解更详细的内容
208
+
209
+ ## 捐赠 uView Pro
210
+
211
+ `uView Pro` 文档内容和框架源码基于 `uView UI` 二次开发,因此全部开源免费,如果您认为 `uView Pro` 帮到了您的开发工作,您可以捐赠 `uView Pro` 的研发工作,捐赠无门槛,哪怕是一杯可乐也好(相信这比打赏主播更有意义)。
212
+
213
+ <table class="table">
214
+ <tr>
215
+ <td><img src="https://ik.imagekit.io/anyup/images/social/wechat-pay.png" width="250" height="345" ></td>
216
+ <td><img src="https://ik.imagekit.io/anyup/images/social/ali-pay.png" width="250" height="345" ></td>
217
+ </tr>
218
+ <tr>
219
+ <td align="center"><strong>微信</strong><br></td>
220
+ <td align="center"><strong>支付宝</strong><br></td>
221
+ </tr>
222
+ </table>
223
+
224
+ ## 贡献者
225
+
226
+ <a href="https://github.com/anyup/uView-Pro/graphs/contributors">
227
+ <img alt="Contributors" src="https://contrib.rocks/image?repo=anyup/uView-Pro" />
228
+ </a>
229
+
230
+ ## 版权信息
231
+
232
+ `uView Pro` 遵循[MIT](https://en.wikipedia.org/wiki/MIT_License)开源协议,意味着您无需支付任何费用,也无需授权,即可将 `uView Pro` 应用到您的产品中。
233
+
234
+ ## 鸣谢
235
+
236
+ 再次感谢 `uView UI` 开发团队,以及所有为 `uView UI` 的贡献者,以及所有为 `uView Pro` 的贡献者。
237
+
238
+ - [Github](https://github.com/anyup/uview-pro)
239
+ - [Gitee](https://gitee.com/anyup/uview-pro)
240
+ - [uView UI 1.0](https://github.com/umicro/uView)
241
+ - [uView UI 2.0](https://github.com/umicro/uView2.0)
package/theme.scss CHANGED
@@ -1,38 +1,38 @@
1
- // 此文件为uView的主题变量,这些变量目前只能通过uni.scss引入才有效,另外由于
2
- // uni.scss中引入的样式会同时混入到全局样式文件和单独每一个页面的样式中,造成微信程序包太大,
3
- // 故uni.scss只建议放scss变量名相关样式,其他的样式可以通过main.js或者App.vue引入
4
-
5
- $u-main-color: #303133;
6
- $u-content-color: #606266;
7
- $u-tips-color: #909399;
8
- $u-light-color: #c0c4cc;
9
- $u-border-color: #e4e7ed;
10
- $u-bg-color: #f3f4f6;
11
-
12
- $u-type-primary: #2979ff;
13
- $u-type-primary-light: #ecf5ff;
14
- $u-type-primary-disabled: #a0cfff;
15
- $u-type-primary-dark: #2b85e4;
16
-
17
- $u-type-warning: #ff9900;
18
- $u-type-warning-disabled: #fcbd71;
19
- $u-type-warning-dark: #f29100;
20
- $u-type-warning-light: #fdf6ec;
21
-
22
- $u-type-success: #19be6b;
23
- $u-type-success-disabled: #71d5a1;
24
- $u-type-success-dark: #18b566;
25
- $u-type-success-light: #dbf1e1;
26
-
27
- $u-type-error: #fa3534;
28
- $u-type-error-disabled: #fab6b6;
29
- $u-type-error-dark: #dd6161;
30
- $u-type-error-light: #fef0f0;
31
-
32
- $u-type-info: #909399;
33
- $u-type-info-disabled: #c8c9cc;
34
- $u-type-info-dark: #82848a;
35
- $u-type-info-light: #f4f4f5;
36
-
37
- $u-form-item-height: 70rpx;
38
- $u-form-item-border-color: #dcdfe6;
1
+ // 此文件为uView的主题变量,这些变量目前只能通过uni.scss引入才有效,另外由于
2
+ // uni.scss中引入的样式会同时混入到全局样式文件和单独每一个页面的样式中,造成微信程序包太大,
3
+ // 故uni.scss只建议放scss变量名相关样式,其他的样式可以通过main.js或者App.vue引入
4
+
5
+ $u-main-color: #303133;
6
+ $u-content-color: #606266;
7
+ $u-tips-color: #909399;
8
+ $u-light-color: #c0c4cc;
9
+ $u-border-color: #e4e7ed;
10
+ $u-bg-color: #f3f4f6;
11
+
12
+ $u-type-primary: #2979ff;
13
+ $u-type-primary-light: #ecf5ff;
14
+ $u-type-primary-disabled: #a0cfff;
15
+ $u-type-primary-dark: #2b85e4;
16
+
17
+ $u-type-warning: #ff9900;
18
+ $u-type-warning-disabled: #fcbd71;
19
+ $u-type-warning-dark: #f29100;
20
+ $u-type-warning-light: #fdf6ec;
21
+
22
+ $u-type-success: #19be6b;
23
+ $u-type-success-disabled: #71d5a1;
24
+ $u-type-success-dark: #18b566;
25
+ $u-type-success-light: #dbf1e1;
26
+
27
+ $u-type-error: #fa3534;
28
+ $u-type-error-disabled: #fab6b6;
29
+ $u-type-error-dark: #dd6161;
30
+ $u-type-error-light: #fef0f0;
31
+
32
+ $u-type-info: #909399;
33
+ $u-type-info-disabled: #c8c9cc;
34
+ $u-type-info-dark: #82848a;
35
+ $u-type-info-light: #f4f4f5;
36
+
37
+ $u-form-item-height: 70rpx;
38
+ $u-form-item-border-color: #dcdfe6;