uview-pro 0.0.23 → 0.1.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 (83) hide show
  1. package/changelog.md +27 -0
  2. package/components/u-action-sheet/u-action-sheet.vue +1 -1
  3. package/components/u-alert-tips/u-alert-tips.vue +1 -1
  4. package/components/u-avatar/u-avatar.vue +1 -1
  5. package/components/u-badge/u-badge.vue +1 -1
  6. package/components/u-button/u-button.vue +1 -1
  7. package/components/u-calendar/u-calendar.vue +1 -1
  8. package/components/u-card/u-card.vue +1 -1
  9. package/components/u-cell-group/u-cell-group.vue +1 -1
  10. package/components/u-cell-item/u-cell-item.vue +1 -1
  11. package/components/u-checkbox/u-checkbox.vue +1 -1
  12. package/components/u-checkbox-group/u-checkbox-group.vue +1 -1
  13. package/components/u-circle-progress/u-circle-progress.vue +1 -1
  14. package/components/u-col/u-col.vue +1 -1
  15. package/components/u-collapse/u-collapse.vue +1 -1
  16. package/components/u-collapse-item/u-collapse-item.vue +2 -2
  17. package/components/u-count-down/u-count-down.vue +1 -1
  18. package/components/u-count-to/u-count-to.vue +1 -1
  19. package/components/u-divider/u-divider.vue +1 -1
  20. package/components/u-dropdown/u-dropdown.vue +1 -1
  21. package/components/u-dropdown-item/u-dropdown-item.vue +1 -1
  22. package/components/u-empty/u-empty.vue +1 -1
  23. package/components/u-field/u-field.vue +1 -1
  24. package/components/u-form/u-form.vue +1 -1
  25. package/components/u-form-item/u-form-item.vue +1 -1
  26. package/components/u-gap/u-gap.vue +1 -1
  27. package/components/u-grid/u-grid.vue +1 -1
  28. package/components/u-grid-item/u-grid-item.vue +1 -1
  29. package/components/u-icon/u-icon.vue +1 -1
  30. package/components/u-image/u-image.vue +1 -1
  31. package/components/u-index-anchor/u-index-anchor.vue +1 -1
  32. package/components/u-index-list/u-index-list.vue +1 -1
  33. package/components/u-keyboard/u-keyboard.vue +1 -1
  34. package/components/u-lazy-load/u-lazy-load.vue +1 -1
  35. package/components/u-line/u-line.vue +1 -1
  36. package/components/u-line-progress/u-line-progress.vue +1 -1
  37. package/components/u-link/u-link.vue +2 -2
  38. package/components/u-loading/u-loading.vue +1 -1
  39. package/components/u-loadmore/u-loadmore.vue +1 -1
  40. package/components/u-mask/u-mask.vue +1 -1
  41. package/components/u-message-input/u-message-input.vue +1 -1
  42. package/components/u-modal/u-modal.vue +1 -1
  43. package/components/u-navbar/u-navbar.vue +2 -2
  44. package/components/u-no-network/u-no-network.vue +1 -1
  45. package/components/u-notice-bar/u-notice-bar.vue +1 -1
  46. package/components/u-number-box/u-number-box.vue +1 -1
  47. package/components/u-picker/u-picker.vue +1 -1
  48. package/components/u-popup/u-popup.vue +1 -1
  49. package/components/u-radio/u-radio.vue +1 -1
  50. package/components/u-radio-group/u-radio-group.vue +1 -1
  51. package/components/u-rate/u-rate.vue +1 -1
  52. package/components/u-read-more/u-read-more.vue +2 -2
  53. package/components/u-row/u-row.vue +1 -1
  54. package/components/u-search/u-search.vue +1 -1
  55. package/components/u-section/u-section.vue +1 -1
  56. package/components/u-select/u-select.vue +1 -1
  57. package/components/u-skeleton/u-skeleton.vue +1 -1
  58. package/components/u-slider/u-slider.vue +1 -1
  59. package/components/u-steps/u-steps.vue +2 -2
  60. package/components/u-sticky/u-sticky.vue +2 -2
  61. package/components/u-subsection/u-subsection.vue +1 -1
  62. package/components/u-swipe-action/u-swipe-action.vue +2 -2
  63. package/components/u-swiper/u-swiper.vue +1 -1
  64. package/components/u-switch/u-switch.vue +1 -1
  65. package/components/u-table/u-table.vue +1 -1
  66. package/components/u-tabs/u-tabs.vue +1 -1
  67. package/components/u-tabs-swiper/u-tabs-swiper.vue +1 -1
  68. package/components/u-tag/u-tag.vue +1 -1
  69. package/components/u-td/u-td.vue +1 -1
  70. package/components/u-th/u-th.vue +1 -1
  71. package/components/u-time-line/u-time-line.vue +1 -1
  72. package/components/u-time-line-item/u-time-line-item.vue +1 -1
  73. package/components/u-toast/u-toast.vue +1 -1
  74. package/components/u-top-tips/u-top-tips.vue +1 -1
  75. package/components/u-tr/u-tr.vue +1 -1
  76. package/components/u-upload/u-upload.vue +1 -1
  77. package/components/u-verification-code/u-verification-code.vue +1 -1
  78. package/components/u-waterfall/u-waterfall.vue +1 -1
  79. package/index.ts +11 -2
  80. package/libs/function/color.ts +35 -1
  81. package/libs/request/index.ts +2 -2
  82. package/package.json +1 -1
  83. package/readme.md +5 -5
package/changelog.md CHANGED
@@ -1,3 +1,30 @@
1
+ ## 0.1.0(2025-09-21)
2
+
3
+ ### ♻️ Code Refactoring | 代码重构
4
+
5
+ - **http:** 优化 HTTP 请求和响应拦截器 ([b9ea27f](https://github.com/anyup/uView-Pro/commit/b9ea27f7a2fc3425316211784a07b2cde030282a))
6
+ - 修改路由基础路径 ([23143c8](https://github.com/anyup/uView-Pro/commit/23143c839242fcd19c9c6ca73a8ff1bcfdb8b83b))
7
+ - 移除多个组件中未使用的样式标签 ([f8d353a](https://github.com/anyup/uView-Pro/commit/f8d353a0b99b3d9a2530d8d8a4bd8d0d5fe7dcc5))
8
+ - 更新项目文档链接和基础配置 ([435a1ea](https://github.com/anyup/uView-Pro/commit/435a1ea5b89f8ba850f3cd469f4583d3946f8142))
9
+
10
+ ### 📦‍ Build System | 打包构建
11
+
12
+ - **vite:** 配置别名和服务器设置 ([b319288](https://github.com/anyup/uView-Pro/commit/b3192882a104963ab6a2c7b6c03e2fb8ee17f609))
13
+ - **vite:** 配置别名和服务器设置 ([9483730](https://github.com/anyup/uView-Pro/commit/9483730b371a5722511cd515d20a1eac28834f04))
14
+ - 添加修复空 CSS 文件的脚本 ([38b943d](https://github.com/anyup/uView-Pro/commit/38b943d0f1234978e90284fa759f13b604160e96))
15
+
16
+ ### ✨ Features | 新功能
17
+
18
+ - **theme:** 支持自定义的color值传入 ([3de798f](https://github.com/anyup/uView-Pro/commit/3de798f8de48af07774376366f5472f463b07177))
19
+
20
+ ### 💄 Styles | 风格
21
+
22
+ - 移除多余空格和换行 ([80df4d4](https://github.com/anyup/uView-Pro/commit/80df4d44b631b12adb1ae45a6dd0dfa69a2694b1))
23
+
24
+ ### 📝 Documentation | 文档
25
+
26
+ - 更新交流群图片 ([3b71cb0](https://github.com/anyup/uView-Pro/commit/3b71cb092efd4c5a89c36ee559028d0fe438a013))
27
+
1
28
  ## 0.0.23(2025-09-15)
2
29
 
3
30
  ### 🐛 Bug Fixes | Bug 修复
@@ -45,7 +45,7 @@ defineOptions({
45
45
  /**
46
46
  * actionSheet 操作菜单
47
47
  * @description 本组件用于从底部弹出一个操作菜单,供用户选择并返回结果。本组件功能类似于uni的uni.showActionSheetAPI,配置更加灵活,所有平台都表现一致。
48
- * @tutorial https://uview-pro.netlify.app/components/actionSheet.html
48
+ * @tutorial https://uviewpro.cn/zh/components/actionSheet.html
49
49
  * @property {Array<{ text: string; subText?: string; color?: string; fontSize?: string; disabled?: boolean }>} list 按钮的文字数组,见官方文档示例
50
50
  * @property {{text: string; color?: string; fontSize?: string}} tips 顶部的提示文字,见官方文档示例
51
51
  * @property {String} cancel-text 取消按钮的提示文字
@@ -57,7 +57,7 @@ defineOptions({
57
57
  /**
58
58
  * alertTips 警告提示
59
59
  * @description 警告提示,展现需要关注的信息
60
- * @tutorial https://uview-pro.netlify.app/components/alertTips.html
60
+ * @tutorial https://uviewpro.cn/zh/components/alertTips.html
61
61
  * @property {String} title 显示的标题文字
62
62
  * @property {String} description 辅助性文字,颜色比title浅一点,字号也小一点,可选
63
63
  * @property {String} type 关闭按钮(默认为叉号icon图标)
@@ -26,7 +26,7 @@ let base64Avatar =
26
26
  /**
27
27
  * avatar 头像
28
28
  * @description 本组件一般用于展示头像的地方,如个人中心,或者评论列表页的用户头像展示等场所。
29
- * @tutorial https://uview-pro.netlify.app/components/avatar.html
29
+ * @tutorial https://uviewpro.cn/zh/components/avatar.html
30
30
  * @property {String} bg-color 背景颜色,一般显示文字时用(默认#ffffff)
31
31
  * @property {String} src 头像路径,如加载失败,将会显示默认头像
32
32
  * @property {String Number} size 头像尺寸,可以为指定字符串(large, default, mini),或者数值,单位rpx(默认default)
@@ -30,7 +30,7 @@ defineOptions({
30
30
  /**
31
31
  * badge 角标
32
32
  * @description 本组件一般用于展示头像的地方,如个人中心,或者评论列表页的用户头像展示等场所。
33
- * @tutorial https://uview-pro.netlify.app/components/badge.html
33
+ * @tutorial https://uviewpro.cn/zh/components/badge.html
34
34
  * @property {String|Number} count 展示的数字,大于 overflowCount 时显示为 ${overflowCount}+,为0且show-zero为false时隐藏
35
35
  * @property {Boolean} is-dot 不展示数字,只有一个小点(默认false)
36
36
  * @property {Boolean} absolute 组件是否绝对定位,为true时,offset参数才有效(默认true)
@@ -71,7 +71,7 @@ defineOptions({
71
71
  /**
72
72
  * button 按钮
73
73
  * @description Button 按钮
74
- * @tutorial https://uview-pro.netlify.app/components/button.html
74
+ * @tutorial https://uviewpro.cn/zh/components/button.html
75
75
  * @property {String} size 按钮的大小
76
76
  * @property {Boolean} ripple 是否开启点击水波纹效果
77
77
  * @property {String} ripple-bg-color 水波纹的背景色,ripple为true时有效
@@ -92,7 +92,7 @@ defineOptions({
92
92
  /**
93
93
  * calendar 日历
94
94
  * @description 此组件用于单个选择日期,范围选择日期等,日历被包裹在底部弹起的容器中。
95
- * @tutorial https://uview-pro.netlify.app/components/calendar.html
95
+ * @tutorial https://uviewpro.cn/zh/components/calendar.html
96
96
  * @property {String} mode 选择日期的模式,date-为单个日期,range-为选择日期范围
97
97
  * @property {Boolean} v-model 布尔值变量,用于控制日历的弹出与收起
98
98
  * @property {Boolean} safe-area-inset-bottom 是否开启底部安全区适配(默认false)
@@ -83,7 +83,7 @@ defineOptions({
83
83
  /**
84
84
  * card 卡片
85
85
  * @description 卡片组件一般用于多个列表条目,且风格统一的场景
86
- * @tutorial https://uview-pro.netlify.app/components/card.html
86
+ * @tutorial https://uviewpro.cn/zh/components/card.html
87
87
  * @property {Boolean} full 卡片与屏幕两侧是否留空隙(默认false)
88
88
  * @property {String} title 头部左边的标题
89
89
  * @property {String} title-color 标题颜色(默认#303133)
@@ -19,7 +19,7 @@ defineOptions({
19
19
  /**
20
20
  * cellGroup 单元格父组件Group
21
21
  * @description cell单元格一般用于一组列表的情况,比如个人中心页,设置页等。搭配u-cell-item
22
- * @tutorial https://uview-pro.netlify.app/components/cell.html
22
+ * @tutorial https://uviewpro.cn/zh/components/cell.html
23
23
  * @property {String} title 分组标题
24
24
  * @property {Boolean} border 是否显示外边框(默认true)
25
25
  * @property {Object} title-style 分组标题的的样式,对象形式,如{'font-size': '24rpx'} 或 {'fontSize': '24rpx'}
@@ -46,7 +46,7 @@ defineOptions({
46
46
  /**
47
47
  * cellItem 单元格Item
48
48
  * @description cell单元格一般用于一组列表的情况,比如个人中心页,设置页等。搭配u-cell-group使用
49
- * @tutorial https://uview-pro.netlify.app/components/cell.html
49
+ * @tutorial https://uviewpro.cn/zh/components/cell.html
50
50
  * @property {String} title 左侧标题
51
51
  * @property {String} icon 左侧图标名,只支持uView内置图标,见Icon 图标
52
52
  * @property {Object} icon-style 左边图标的样式,对象形式
@@ -27,7 +27,7 @@ defineOptions({
27
27
  /**
28
28
  * checkbox 复选框
29
29
  * @description 该组件需要搭配checkboxGroup组件使用,以便用户进行操作时,获得当前复选框组的选中情况。
30
- * @tutorial https://uview-pro.netlify.app/components/checkbox.html
30
+ * @tutorial https://uviewpro.cn/zh/components/checkbox.html
31
31
  * @property {String Number} icon-size 图标大小,单位rpx(默认20)
32
32
  * @property {String Number} label-size label字体大小,单位rpx(默认28)
33
33
  * @property {String Number} name checkbox组件的标示符
@@ -16,7 +16,7 @@ defineOptions({
16
16
  /**
17
17
  * checkboxGroup 开关选择器父组件Group
18
18
  * @description 复选框组件一般用于需要多个选择的场景,该组件功能完整,使用方便
19
- * @tutorial https://uview-pro.netlify.app/components/checkbox.html
19
+ * @tutorial https://uviewpro.cn/zh/components/checkbox.html
20
20
  * @property {String Number} max 最多能选中多少个checkbox(默认999)
21
21
  * @property {String Number} size 组件整体的大小,单位rpx(默认40)
22
22
  * @property {Boolean} disabled 是否禁用所有checkbox(默认false)
@@ -42,7 +42,7 @@ defineOptions({
42
42
  /**
43
43
  * circleProgress 环形进度条
44
44
  * @description 展示操作或任务的当前进度,比如上传文件,是一个圆形的进度条。注意:此组件的percent值只能动态增加,不能动态减少。
45
- * @tutorial https://uview-pro.netlify.app/components/circleProgress.html
45
+ * @tutorial https://uviewpro.cn/zh/components/circleProgress.html
46
46
  * @property {String Number} percent 圆环进度百分比值,为数值类型,0-100
47
47
  * @property {String} inactive-color 圆环的底色,默认为灰色(该值无法动态变更)(默认#ececec)
48
48
  * @property {String} active-color 圆环激活部分的颜色(该值无法动态变更)(默认#19be6b)
@@ -15,7 +15,7 @@ defineOptions({
15
15
  /**
16
16
  * col 布局单元格
17
17
  * @description 通过基础的 12 分栏,迅速简便地创建布局(搭配<u-row>使用)
18
- * @tutorial https://uview-pro.netlify.app/components/layout.html
18
+ * @tutorial https://uviewpro.cn/zh/components/layout.html
19
19
  * @property {String|Number} span 栅格占据的列数,总12等分(默认0)
20
20
  * @property {String} text-align 文字水平对齐方式(默认left)
21
21
  * @property {String|Number} offset 分栏左边偏移,计算方式与span相同(默认0)
@@ -15,7 +15,7 @@ defineOptions({
15
15
  /**
16
16
  * collapse 手风琴
17
17
  * @description 通过折叠面板收纳内容区域
18
- * @tutorial https://uview-pro.netlify.app/components/collapse.html
18
+ * @tutorial https://uviewpro.cn/zh/components/collapse.html
19
19
  * @property {Boolean} accordion 是否手风琴模式(默认true)
20
20
  * @property {Boolean} arrow 是否显示标题右侧的箭头(默认true)
21
21
  * @property {String} arrow-color 标题右侧箭头的颜色(默认#909399)
@@ -31,7 +31,7 @@ defineOptions({ name: 'u-collapse-item' });
31
31
  /**
32
32
  * collapseItem 手风琴Item
33
33
  * @description 通过折叠面板收纳内容区域(搭配u-collapse使用)
34
- * @tutorial https://uview-pro.netlify.app/components/collapse.html
34
+ * @tutorial https://uviewpro.cn/zh/components/collapse.html
35
35
  * @property {String} title 面板标题
36
36
  * @property {String Number} index 主要用于事件的回调,标识那个Item被点击
37
37
  * @property {Boolean} disabled 面板是否可以打开或收起(默认false)
@@ -124,7 +124,7 @@ function headClick() {
124
124
  * 查询内容高度
125
125
  */
126
126
  function queryRect() {
127
- // getRect为uView自带的节点查询简化方法,详见文档介绍:https://uview-pro.netlify.app/js/getRect.html
127
+ // getRect为uView自带的节点查询简化方法,详见文档介绍:https://uviewpro.cn/zh/js/getRect.html
128
128
  // 组件内部一般用this.$uGetRect,对外的为this.$u.getRect,二者功能一致,名称不同
129
129
  $u.getRect('#' + elId.value, instance).then((res: any) => {
130
130
  height.value = res.height;
@@ -60,7 +60,7 @@ defineOptions({ name: 'u-count-down' });
60
60
  /**
61
61
  * countDown 倒计时
62
62
  * @description 该组件一般使用于某个活动的截止时间上,通过数字的变化,给用户明确的时间感受,提示用户进行某一个行为操作。
63
- * @tutorial https://uview-pro.netlify.app/components/countDown.html
63
+ * @tutorial https://uviewpro.cn/zh/components/countDown.html
64
64
  * @property {String | Number} timestamp 倒计时,单位为秒
65
65
  * @property {Boolean} autoplay 是否自动开始倒计时,如果为false,需手动调用开始方法。见官网说明(默认true)
66
66
  * @property {String} separator 分隔符,colon为英文冒号,zh为中文(默认colon)
@@ -20,7 +20,7 @@ defineOptions({ name: 'u-count-to' });
20
20
  /**
21
21
  * countTo 数字滚动
22
22
  * @description 该组件一般用于需要滚动数字到某一个值的场景,目标要求是一个递增的值。
23
- * @tutorial https://uview-pro.netlify.app/components/countTo.html
23
+ * @tutorial https://uviewpro.cn/zh/components/countTo.html
24
24
  * @property {String | Number} start-val 开始值
25
25
  * @property {String | Number} end-val 结束值
26
26
  * @property {String | Number} duration 滚动过程所需的时间,单位ms(默认2000)
@@ -34,7 +34,7 @@ defineOptions({
34
34
  /**
35
35
  * divider 分割线
36
36
  * @description 区隔内容的分割线,一般用于页面底部"没有更多"的提示。
37
- * @tutorial https://uview-pro.netlify.app/components/divider.html
37
+ * @tutorial https://uviewpro.cn/zh/components/divider.html
38
38
  * @property {String Number} half-width 文字左或右边线条宽度,数值或百分比,数值时单位为rpx
39
39
  * @property {String} border-color 线条颜色,优先级高于type(默认#dcdfe6)
40
40
  * @property {String} color 文字颜色(默认#909399)
@@ -58,7 +58,7 @@ defineOptions({ name: 'u-dropdown' });
58
58
  /**
59
59
  * dropdown 下拉菜单
60
60
  * @description 该组件一般用于向下展开菜单,同时可切换多个选项卡的场景
61
- * @tutorial https://uview-pro.netlify.app/components/dropdown.html
61
+ * @tutorial https://uviewpro.cn/zh/components/dropdown.html
62
62
  * @property {String} active-color 标题和选项卡选中的颜色(默认#2979ff)
63
63
  * @property {String} inactive-color 标题和选项卡未选中的颜色(默认#606266)
64
64
  * @property {Boolean} close-on-click-mask 点击遮罩是否关闭菜单(默认true)
@@ -32,7 +32,7 @@ defineOptions({ name: 'u-dropdown-item' });
32
32
  /**
33
33
  * dropdown-item 下拉菜单
34
34
  * @description 该组件一般用于向下展开菜单,同时可切换多个选项卡的场景
35
- * @tutorial https://uview-pro.netlify.app/components/dropdown.html
35
+ * @tutorial https://uviewpro.cn/zh/components/dropdown.html
36
36
  * @property {String | Number} v-model 双向绑定选项卡选择值
37
37
  * @property {String} title 菜单项标题
38
38
  * @property {Array[Object]} options 选项数据,如果传入了默认slot,此参数无效
@@ -27,7 +27,7 @@ defineOptions({
27
27
  /**
28
28
  * empty 内容为空
29
29
  * @description 该组件用于需要加载内容,但是加载的第一页数据就为空,提示一个"没有内容"的场景, 我们精心挑选了十几个场景的图标,方便您使用。
30
- * @tutorial https://uview-pro.netlify.app/components/empty.html
30
+ * @tutorial https://uviewpro.cn/zh/components/empty.html
31
31
  * @property {String} color 文字颜色(默认#c0c4cc)
32
32
  * @property {String} text 文字提示(默认“无内容”)
33
33
  * @property {String} src 自定义图标路径,如定义,mode参数会失效
@@ -88,7 +88,7 @@ defineOptions({ name: 'u-field' });
88
88
  /**
89
89
  * field 输入框
90
90
  * @description 借助此组件,可以实现表单的输入, 有"text"和"textarea"类型的,此外,借助uView的picker和actionSheet组件可以快速实现上拉菜单,时间,地区选择等, 为表单解决方案的利器。
91
- * @tutorial https://uview-pro.netlify.app/components/field.html
91
+ * @tutorial https://uviewpro.cn/zh/components/field.html
92
92
  * @property {String} type 输入框的类型(默认text)
93
93
  * @property {String} icon label左边的图标,限uView的图标名称
94
94
  * @property {Object} icon-style 左边图标的样式,对象形式
@@ -14,7 +14,7 @@ defineOptions({
14
14
  /**
15
15
  * form 表单
16
16
  * @description 此组件一般用于表单场景,可以配置Input输入框,Select弹出框,进行表单验证等。
17
- * @tutorial https://uview-pro.netlify.app/components/form.html
17
+ * @tutorial https://uviewpro.cn/zh/components/form.html
18
18
  * @property {Object} model 表单数据对象
19
19
  * @property {Boolean} border-bottom 是否显示表单域的下划线边框
20
20
  * @property {String} label-position 表单域提示文字的位置,left-左侧,top-上方
@@ -81,7 +81,7 @@ defineOptions({
81
81
  /**
82
82
  * form-item 表单item
83
83
  * @description 此组件一般用于表单场景,可以配置Input输入框,Select弹出框,进行表单验证等。
84
- * @tutorial https://uview-pro.netlify.app/components/form.html
84
+ * @tutorial https://uviewpro.cn/zh/components/form.html
85
85
  * @property {String} label 左侧提示文字
86
86
  * @property {Object} prop 表单域model对象的属性名,在使用 validate、resetFields 方法的情况下,该属性是必填的
87
87
  * @property {Boolean} border-bottom 是否显示表单域的下划线边框
@@ -13,7 +13,7 @@ defineOptions({
13
13
  /**
14
14
  * gap 间隔槽
15
15
  * @description 该组件一般用于内容块之间的用一个灰色块隔开的场景,方便用户风格统一,减少工作量
16
- * @tutorial https://uview-pro.netlify.app/components/gap.html
16
+ * @tutorial https://uviewpro.cn/zh/components/gap.html
17
17
  * @property {String} bg-color 背景颜色(默认#f3f4f6)
18
18
  * @property {String Number} height 分割槽高度,单位rpx(默认30)
19
19
  * @property {String Number} margin-top 与前一个组件的距离,单位rpx(默认0)
@@ -13,7 +13,7 @@ defineOptions({ name: 'u-grid' });
13
13
  /**
14
14
  * grid 宫格布局
15
15
  * @description 宫格组件一般用于同时展示多个同类项目的场景,可以给宫格的项目设置徽标组件(badge),或者图标等,也可以扩展为左右滑动的轮播形式。
16
- * @tutorial https://uview-pro.netlify.app/components/grid.html
16
+ * @tutorial https://uviewpro.cn/zh/components/grid.html
17
17
  * @property {String|Number} col 宫格的列数(默认3)
18
18
  * @property {Boolean} border 是否显示宫格的边框(默认true)
19
19
  * @property {Boolean} hover-class 点击宫格的时候,是否显示按下的灰色背景(默认false)
@@ -25,7 +25,7 @@ defineOptions({ name: 'u-grid-item' });
25
25
  /**
26
26
  * gridItem 宫格项
27
27
  * @description 宫格组件一般用于同时展示多个同类项目的场景,可以给宫格的项目设置徽标组件(badge),或者图标等,也可以扩展为左右滑动的轮播形式。搭配u-grid使用
28
- * @tutorial https://uview-pro.netlify.app/components/grid.html
28
+ * @tutorial https://uviewpro.cn/zh/components/grid.html
29
29
  * @property {String} bg-color 宫格的背景颜色(默认#ffffff)
30
30
  * @property {String|Number} index 点击宫格时,返回的值
31
31
  * @property {Object} custom-style 自定义样式,对象形式
@@ -22,7 +22,7 @@ defineOptions({
22
22
  /**
23
23
  * icon 图标
24
24
  * @description 基于字体的图标集,包含了大多数常见场景的图标。
25
- * @tutorial https://uview-pro.netlify.app/components/icon.html
25
+ * @tutorial https://uviewpro.cn/zh/components/icon.html
26
26
  * @property {String} name 图标名称,见示例图标集
27
27
  * @property {String} color 图标颜色(默认inherit)
28
28
  * @property {String | Number} size 图标字体大小,单位rpx(默认32)
@@ -34,7 +34,7 @@ defineOptions({
34
34
  /**
35
35
  * Image 图片
36
36
  * @description 此组件为uni-app的image组件的加强版,在继承了原有功能外,还支持淡入动画、加载中、加载失败提示、圆角值和形状等。
37
- * @tutorial https://uview-pro.netlify.app/components/image.html
37
+ * @tutorial https://uviewpro.cn/zh/components/image.html
38
38
  * @property {String} src 图片地址
39
39
  * @property {String} mode 裁剪模式,见官网说明
40
40
  * @property {String | Number} width 宽度,单位任意,如果为数值,则为rpx单位(默认100%)
@@ -24,7 +24,7 @@ defineOptions({
24
24
  /**
25
25
  * indexAnchor 索引列表锚点
26
26
  * @description 通过折叠面板收纳内容区域,搭配<u-index-anchor>使用
27
- * @tutorial https://uview-pro.netlify.app/components/indexList.html#indexanchor-props
27
+ * @tutorial https://uviewpro.cn/zh/components/indexList.html#indexanchor-props
28
28
  * @property {Boolean} use-slot 是否使用自定义内容的插槽(默认false)
29
29
  * @property {String|Number} index 索引字符,如果定义了use-slot,此参数自动失效
30
30
  * @property {Object} customStyle 自定义样式,对象形式,如"{color: 'red'}"
@@ -58,7 +58,7 @@ defineOptions({
58
58
  /**
59
59
  * indexList 索引列表
60
60
  * @description 通过折叠面板收纳内容区域,搭配<u-index-anchor>使用
61
- * @tutorial https://uview-pro.netlify.app/components/indexList.html#indexanchor-props
61
+ * @tutorial https://uviewpro.cn/zh/components/indexList.html#indexanchor-props
62
62
  * @property {Number|String} scroll-top 当前滚动高度,自定义组件无法获得滚动条事件,所以依赖接入方传入
63
63
  * @property {Array} index-list 索引字符列表,数组(默认A-Z)
64
64
  * @property {Number|String} z-index 锚点吸顶时的层级(默认965)
@@ -42,7 +42,7 @@ defineOptions({
42
42
  /**
43
43
  * keyboard 键盘
44
44
  * @description 此为uViw自定义的键盘面板,内含了数字键盘,车牌号键,身份证号键盘3中模式,都有可以打乱按键顺序的选项。
45
- * @tutorial https://uview-pro.netlify.app/components/keyboard.html
45
+ * @tutorial https://uviewpro.cn/zh/components/keyboard.html
46
46
  * @property {String} mode 键盘类型,见官网基本使用的说明(默认number)
47
47
  * @property {Boolean} dot-enabled 是否显示"."按键,只在mode=number时有效(默认true)
48
48
  * @property {Boolean} tooltip 是否显示键盘顶部工具条(默认true)
@@ -43,7 +43,7 @@ defineOptions({ name: 'u-lazy-load' });
43
43
  /**
44
44
  * lazyLoad 懒加载
45
45
  * @description 懒加载使用的场景为:页面有很多图片时,APP会同时加载所有的图片,导致页面卡顿,各个位置的图片出现前后不一致等.
46
- * @tutorial https://uview-pro.netlify.app/components/lazyLoad.html
46
+ * @tutorial https://uviewpro.cn/zh/components/lazyLoad.html
47
47
  * @property {String | Number} index 用户自定义值,在事件触发时回调,用以区分是哪个图片
48
48
  * @property {String} image 图片路径
49
49
  * @property {String} loading-img 预加载时的占位图
@@ -14,7 +14,7 @@ defineOptions({
14
14
  /**
15
15
  * line 线条
16
16
  * @description 此组件一般用于显示一根线条,用于分隔内容块,有横向和竖向两种模式,且能设置0.5px线条,使用也很简单
17
- * @tutorial https://uview-pro.netlify.app/components/line.html
17
+ * @tutorial https://uviewpro.cn/zh/components/line.html
18
18
  * @property {String} color 线条的颜色(默认#e4e7ed)
19
19
  * @property {String} length 长度,竖向时表现为高度,横向时表现为长度,可以为百分比,带rpx单位的值等
20
20
  * @property {String} direction 线条的方向,row-横向,col-竖向(默认row)
@@ -27,7 +27,7 @@ defineOptions({
27
27
  /**
28
28
  * lineProgress 线型进度条
29
29
  * @description 展示操作或任务的当前进度,比如上传文件,是一个线形的进度条。
30
- * @tutorial https://uview-pro.netlify.app/components/lineProgress.html
30
+ * @tutorial https://uviewpro.cn/zh/components/lineProgress.html
31
31
  * @property {String Number} percent 进度条百分比值,为数值类型,0-100
32
32
  * @property {Boolean} round 进度条两端是否为半圆(默认true)
33
33
  * @property {String} type 如设置,active-color值将会失效
@@ -24,14 +24,14 @@ defineOptions({
24
24
  /**
25
25
  * link 超链接
26
26
  * @description 该组件为超链接组件,在不同平台有不同表现形式:在APP平台会通过plus环境打开内置浏览器,在小程序中把链接复制到粘贴板,同时提示信息,在H5中通过window.open打开链接。
27
- * @tutorial https://uview-pro.netlify.app/components/link.html
27
+ * @tutorial https://uviewpro.cn/zh/components/link.html
28
28
  * @property {String} color 文字颜色(默认#606266)
29
29
  * @property {String Number} font-size 字体大小,单位rpx(默认28)
30
30
  * @property {Boolean} under-line 是否显示下划线(默认false)
31
31
  * @property {String} href 跳转的链接,要带上http(s)
32
32
  * @property {String} line-color 下划线颜色,默认同color参数颜色
33
33
  * @property {String} mp-tips 各个小程序平台把链接复制到粘贴板后的提示语(默认“链接已复制,请在浏览器打开”)
34
- * @example <u-link href="https://uview-pro.netlify.app">蜀道难,难于上青天</u-link>
34
+ * @example <u-link href="https://uviewpro.cn">蜀道难,难于上青天</u-link>
35
35
  */
36
36
  const props = defineProps(LinkProps);
37
37
 
@@ -13,7 +13,7 @@ defineOptions({
13
13
  /**
14
14
  * loading 加载动画
15
15
  * @description 此组件为一个小动画,目前用在uView的loadmore加载更多和switch开关等组件的正在加载状态场景。
16
- * @tutorial https://uview-pro.netlify.app/components/loading.html
16
+ * @tutorial https://uviewpro.cn/zh/components/loading.html
17
17
  * @property {String} mode 模式选择,见官网说明(默认circle)
18
18
  * @property {String} color 动画活动区域的颜色,只对 mode = flower 模式有效(默认#c7c7c7)
19
19
  * @property {String|Number} size 加载图标的大小,单位rpx(默认34)
@@ -38,7 +38,7 @@ defineOptions({ name: 'u-loadmore' });
38
38
  /**
39
39
  * loadmore 加载更多
40
40
  * @description 此组件一般用于标识页面底部加载数据时的状态。
41
- * @tutorial https://uview-pro.netlify.app/components/loadMore.html
41
+ * @tutorial https://uviewpro.cn/zh/components/loadMore.html
42
42
  * @property {String} status 组件状态(默认loadmore)
43
43
  * @property {String} bg-color 组件背景颜色,在页面是非白色时会用到(默认#ffffff)
44
44
  * @property {Boolean} icon 加载中时是否显示图标(默认true)
@@ -24,7 +24,7 @@ defineOptions({ name: 'u-mask' });
24
24
  /**
25
25
  * mask 遮罩
26
26
  * @description 创建一个遮罩层,用于强调特定的页面元素,并阻止用户对遮罩下层的内容进行操作,一般用于弹窗场景
27
- * @tutorial https://uview-pro.netlify.app/components/mask.html
27
+ * @tutorial https://uviewpro.cn/zh/components/mask.html
28
28
  * @property {Boolean} show 是否显示遮罩(默认false)
29
29
  * @property {String|Number} z-index z-index 层级(默认1070)
30
30
  * @property {Object} custom-style 自定义样式对象,见上方说明
@@ -64,7 +64,7 @@ defineOptions({ name: 'u-message-input' });
64
64
  /**
65
65
  * messageInput 验证码输入框
66
66
  * @description 该组件一般用于验证用户短信验证码的场景,也可以结合uView的键盘组件使用
67
- * @tutorial https://uview-pro.netlify.app/components/messageInput.html
67
+ * @tutorial https://uviewpro.cn/zh/components/messageInput.html
68
68
  * @property {String|Number} maxlength 输入字符个数(默认4)
69
69
  * @property {Boolean} dot-fill 是否用圆点填充(默认false)
70
70
  * @property {String} mode 模式选择,见上方"基本使用"说明(默认box)
@@ -57,7 +57,7 @@ defineOptions({
57
57
  /**
58
58
  * modal 模态框
59
59
  * @description 弹出模态框,常用于消息提示、消息确认、在当前页面内完成特定的交互操作
60
- * @tutorial https://uview-pro.netlify.app/components/modal.html
60
+ * @tutorial https://uviewpro.cn/zh/components/modal.html
61
61
  * @property {Boolean} value 是否显示模态框
62
62
  * @property {String | Number} z-index 层级
63
63
  * @property {String} title 模态框标题(默认"提示")
@@ -1,5 +1,5 @@
1
1
  <template>
2
- <view class="">
2
+ <view>
3
3
  <view class="u-navbar" :style="navbarStyle" :class="{ 'u-navbar-fixed': props.isFixed, 'u-border-bottom': props.borderBottom }">
4
4
  <view class="u-status-bar" :style="{ height: statusBarHeight + 'px' }"></view>
5
5
  <view class="u-navbar-inner" :style="navbarInnerStyle">
@@ -48,7 +48,7 @@ defineOptions({ name: 'u-navbar' });
48
48
  /**
49
49
  * navbar 自定义导航栏
50
50
  * @description 此组件一般用于在特殊情况下,需要自定义导航栏的时候用到,一般建议使用uniapp自带的导航栏。
51
- * @tutorial https://uview-pro.netlify.app/components/navbar.html
51
+ * @tutorial https://uviewpro.cn/zh/components/navbar.html
52
52
  * @property {String|Number} height 导航栏高度(不包括状态栏高度在内,内部自动加上),注意这里的单位是px(默认44)
53
53
  * @property {String} back-icon-color 左边返回图标的颜色(默认#606266)
54
54
  * @property {String} back-icon-name 左边返回图标的名称,只能为uView自带的图标(默认arrow-left)
@@ -25,7 +25,7 @@ defineOptions({ name: 'u-no-network' });
25
25
  /**
26
26
  * noNetwork 无网络提示
27
27
  * @description 该组件无需任何配置,引入即可,内部自动处理所有功能和事件。
28
- * @tutorial https://uview-pro.netlify.app/components/noNetwork.html
28
+ * @tutorial https://uviewpro.cn/zh/components/noNetwork.html
29
29
  * @property {String} tips 没有网络时的提示语(默认哎呀,网络信号丢失)
30
30
  * @property {String | Number} zIndex 组件的z-index值(默认1080)
31
31
  * @property {String} image 无网络的图片提示,可用的src地址或base64图片
@@ -55,7 +55,7 @@ defineOptions({ name: 'u-notice-bar' });
55
55
  /**
56
56
  * noticeBar 滚动通知
57
57
  * @description 该组件用于滚动通告场景,有多种模式可供选择
58
- * @tutorial https://uview-pro.netlify.app/components/noticeBar.html
58
+ * @tutorial https://uviewpro.cn/zh/components/noticeBar.html
59
59
  * @property {Array} list 滚动内容,数组形式,见上方说明
60
60
  * @property {String} type 显示的主题(默认warning)
61
61
  * @property {Boolean} volumeIcon 是否显示小喇叭图标(默认true)
@@ -57,7 +57,7 @@ defineOptions({
57
57
  /**
58
58
  * numberBox 步进器
59
59
  * @description 该组件一般用于商城购物选择物品数量的场景。注意:该输入框只能输入大于或等于0的整数,不支持小数输入
60
- * @tutorial https://uview-pro.netlify.app/components/numberBox.html
60
+ * @tutorial https://uviewpro.cn/zh/components/numberBox.html
61
61
  * @property {Number} modelValue 输入框初始值(默认1)
62
62
  * @property {String} bg-color 输入框和按钮的背景颜色(默认#F2F3F5)
63
63
  * @property {Number} min 用户可输入的最小值(默认0)
@@ -115,7 +115,7 @@ defineOptions({
115
115
  /**
116
116
  * picker picker弹出选择器
117
117
  * @description 此选择器有两种弹出模式:一是时间模式,可以配置年,日,月,时,分,秒参数 二是地区模式,可以配置省,市,区参数
118
- * @tutorial https://uview-pro.netlify.app/components/picker.html
118
+ * @tutorial https://uviewpro.cn/zh/components/picker.html
119
119
  * @property {Object} params 需要显示的参数,见官网说明
120
120
  * @property {String} mode 模式选择,region-地区类型,time-时间类型(默认time)
121
121
  * @property {String Number} start-year 可选的开始年份,mode=time时有效(默认1950)
@@ -57,7 +57,7 @@ defineOptions({
57
57
  /**
58
58
  * popup 弹窗
59
59
  * @description 弹出层容器,用于展示弹窗、信息提示等内容,支持上、下、左、右和中部弹出。组件只提供容器,内部内容由用户自定义
60
- * @tutorial https://uview-pro.netlify.app/components/popup.html
60
+ * @tutorial https://uviewpro.cn/zh/components/popup.html
61
61
  * @property {String} mode 弹出方向(默认left)
62
62
  * @property {Boolean} mask 是否显示遮罩(默认true)
63
63
  * @property {Stringr | Number} length mode=left | 见官网说明(默认auto)
@@ -27,7 +27,7 @@ defineOptions({
27
27
  /**
28
28
  * radio 单选框
29
29
  * @description 单选框用于有一个选择,用户只能选择其中一个的场景。搭配u-radio-group使用
30
- * @tutorial https://uview-pro.netlify.app/components/radio.html
30
+ * @tutorial https://uviewpro.cn/zh/components/radio.html
31
31
  * @property {String|Number} icon-size 图标大小,单位rpx(默认24)
32
32
  * @property {String|Number} label-size label字体大小,单位rpx(默认28)
33
33
  * @property {String|Number} name radio组件的标示符
@@ -16,7 +16,7 @@ defineOptions({
16
16
  /**
17
17
  * radioGroup 单选框父组件
18
18
  * @description 单选框用于有一个选择,用户只能选择其中一个的场景。搭配u-radio使用
19
- * @tutorial https://uview-pro.netlify.app/components/radio.html
19
+ * @tutorial https://uviewpro.cn/zh/components/radio.html
20
20
  * @property {Boolean} disabled 是否禁用所有radio(默认false)
21
21
  * @property {String|Number} size 组件整体的大小,单位rpx(默认40)
22
22
  * @property {String} active-color 选中时的颜色,应用到所有子Radio组件(默认#2979ff)
@@ -30,7 +30,7 @@ defineOptions({
30
30
  /**
31
31
  * rate 评分
32
32
  * @description 该组件一般用于满意度调查,星型评分的场景
33
- * @tutorial https://uview-pro.netlify.app/components/rate.html
33
+ * @tutorial https://uviewpro.cn/zh/components/rate.html
34
34
  * @property {String|Number} count 最多可选的星星数量(默认5)
35
35
  * @property {String|Number} current 默认选中的星星数量(默认0)
36
36
  * @property {Boolean} disabled 是否禁止用户操作(默认false)
@@ -1,5 +1,5 @@
1
1
  <template>
2
- <view class="">
2
+ <view>
3
3
  <view
4
4
  class="u-content"
5
5
  :class="[elId]"
@@ -37,7 +37,7 @@ defineOptions({ name: 'u-read-more' });
37
37
  /**
38
38
  * readMore 阅读更多
39
39
  * @description 该组件一般用于内容较长,预先收起一部分,点击展开全部内容的场景。
40
- * @tutorial https://uview-pro.netlify.app/components/readMore.html
40
+ * @tutorial https://uviewpro.cn/zh/components/readMore.html
41
41
  * @property {String|Number} showHeight 内容超出此高度才会显示展开全文按钮,单位rpx(默认400)
42
42
  * @property {Boolean} toggle 展开后是否显示收起按钮(默认false)
43
43
  * @property {String} closeText 关闭时的提示文字(默认“展开阅读全文”)
@@ -22,7 +22,7 @@ defineOptions({
22
22
  /**
23
23
  * row 行布局
24
24
  * @description 通过基础的 12 分栏,迅速简便地创建布局。
25
- * @tutorial https://uview-pro.netlify.app/components/layout.html#row-props
25
+ * @tutorial https://uviewpro.cn/zh/components/layout.html#row-props
26
26
  * @property {String|Number} gutter 栅格间隔,左右各为此值的一半,单位rpx(默认0)
27
27
  * @property {String} justify 水平排列方式(微信小程序暂不支持)默认(start(或flex-start))
28
28
  * @property {String} align 垂直排列方式(默认center)
@@ -59,7 +59,7 @@ defineOptions({ name: 'u-search' });
59
59
  /**
60
60
  * search 搜索框
61
61
  * @description 搜索组件,集成了常见搜索框所需功能,用户可以一键引入,开箱即用。
62
- * @tutorial https://uview-pro.netlify.app/components/search.html
62
+ * @tutorial https://uviewpro.cn/zh/components/search.html
63
63
  * @property {String} shape 搜索框形状,round-圆形,square-方形(默认round)
64
64
  * @property {String} bg-color 搜索框背景颜色(默认#f2f2f2)
65
65
  * @property {String} border-color 边框颜色,配置了颜色,才会有边框
@@ -46,7 +46,7 @@ defineOptions({ name: 'u-section' });
46
46
  /**
47
47
  * section 查看更多
48
48
  * @description 该组件一般用于分类信息有很多,但是限于篇幅只能列出一部分,让用户通过"查看更多"获得更多信息的场景,实际效果见演示。
49
- * @tutorial https://uview-pro.netlify.app/components/section.html
49
+ * @tutorial https://uviewpro.cn/zh/components/section.html
50
50
  * @property {String} title 左边主标题
51
51
  * @property {String} subTitle 右边副标题(默认更多)
52
52
  * @property {Boolean} right 是否显示右边的内容(默认true)
@@ -70,7 +70,7 @@ defineOptions({
70
70
  /**
71
71
  * select 列选择器
72
72
  * @description 此选择器用于单列,多列,多列联动的选择场景。(从1.3.0版本起,不建议使用Picker组件的单列和多列模式,Select组件是专门为列选择而构造的组件,更简单易用。)
73
- * @tutorial https://uview-pro.netlify.app/components/select.html
73
+ * @tutorial https://uviewpro.cn/zh/components/select.html
74
74
  * @property {String} mode 模式选择,"single-column"-单列模式,"mutil-column"-多列模式,"mutil-column-auto"-多列联动模式
75
75
  * @property {Array} list 列数据,数组形式,见官网说明
76
76
  * @property {Boolean} v-model 布尔值变量,用于控制选择器的弹出与收起
@@ -16,7 +16,7 @@ defineOptions({ name: 'u-skeleton' });
16
16
  /**
17
17
  * skeleton 骨架屏
18
18
  * @description 骨架屏一般用于页面在请求远程数据尚未完成时,页面用灰色块预显示本来的页面结构,给用户更好的体验。
19
- * @tutorial https://uview-pro.netlify.app/components/skeleton.html
19
+ * @tutorial https://uviewpro.cn/zh/components/skeleton.html
20
20
  * @property {String} elColor 骨架块状元素的背景颜色(默认#e5e5e5)
21
21
  * @property {String} bgColor 骨架组件背景颜色(默认#ffffff)
22
22
  * @property {Boolean} animation 骨架块是否显示动画效果(默认false)
@@ -39,7 +39,7 @@
39
39
  <script setup lang="ts">
40
40
  /**
41
41
  * slider 滑块选择器
42
- * @tutorial https://uview-pro.netlify.app/components/slider.html
42
+ * @tutorial https://uviewpro.cn/zh/components/slider.html
43
43
  * @property {Number | String} value 滑块默认值(默认0)
44
44
  * @property {Number | String} min 最小值(默认0)
45
45
  * @property {Number | String} max 最大值(默认100)
@@ -1,5 +1,5 @@
1
1
  <template>
2
- <view class="">
2
+ <view>
3
3
  <view class="u-steps" :style="directionStyle">
4
4
  <view class="u-steps__item" :class="['u-steps__item--' + direction]" v-for="(item, index) in list" :key="index">
5
5
  <view class="u-steps__item__num" v-if="mode == 'number'" :style="numberStyle(index)">
@@ -29,7 +29,7 @@ defineOptions({ name: 'u-steps' });
29
29
  /**
30
30
  * steps 步骤条
31
31
  * @description 该组件一般用于完成一个任务要分几个步骤,标识目前处于第几步的场景。
32
- * @tutorial https://uview-pro.netlify.app/components/steps.html
32
+ * @tutorial https://uviewpro.cn/zh/components/steps.html
33
33
  * @property {String} mode 设置模式(默认dot)
34
34
  * @property {Array<{name: string}>} list 数轴条数据,数组。具体见上方示例
35
35
  * @property {String} type type主题(默认primary)
@@ -1,5 +1,5 @@
1
1
  <template>
2
- <view class="">
2
+ <view>
3
3
  <view
4
4
  class="u-sticky-wrap"
5
5
  :class="[elClass]"
@@ -34,7 +34,7 @@ defineOptions({ name: 'u-sticky' });
34
34
  /**
35
35
  * sticky 吸顶
36
36
  * @description 该组件与CSS中position: sticky属性实现的效果一致,当组件达到预设的到顶部距离时, 就会固定在指定位置,组件位置大于预设的顶部距离时,会重新按照正常的布局排列。
37
- * @tutorial https://uview-pro.netlify.app/components/sticky.html
37
+ * @tutorial https://uviewpro.cn/zh/components/sticky.html
38
38
  * @property {String|Number} offsetTop 吸顶时与顶部的距离,单位rpx(默认0)
39
39
  * @property {String|Number} index 自定义标识,用于区分是哪一个组件
40
40
  * @property {Boolean} enable 是否开启吸顶功能(默认true)
@@ -24,7 +24,7 @@ defineOptions({ name: 'u-subsection' });
24
24
  /**
25
25
  * subsection 分段器
26
26
  * @description 该分段器一般用于用户从几个选项中选择某一个的场景
27
- * @tutorial https://uview-pro.netlify.app/components/subsection.html
27
+ * @tutorial https://uviewpro.cn/zh/components/subsection.html
28
28
  * @property {Array} list 选项的数组,形式见上方"基本使用"
29
29
  * @property {String | Number} current 初始化时默认选中的选项索引值(默认0)
30
30
  * @property {String} activeColor 激活时的颜色,mode为subsection时固定为白色(默认#303133)
@@ -1,5 +1,5 @@
1
1
  <template>
2
- <view class="">
2
+ <view>
3
3
  <movable-area class="u-swipe-action" :style="{ backgroundColor: props.bgColor }">
4
4
  <movable-view
5
5
  class="u-swipe-view"
@@ -33,7 +33,7 @@ defineOptions({ name: 'u-swipe-action' });
33
33
  /**
34
34
  * swipeAction 左滑单元格
35
35
  * @description 该组件一般用于左滑唤出操作菜单的场景,用的最多的是左滑删除操作。
36
- * @tutorial https://uview-pro.netlify.app/components/swipeAction.html
36
+ * @tutorial https://uviewpro.cn/zh/components/swipeAction.html
37
37
  * @property {String} bg-color 整个组件背景颜色(默认#ffffff)
38
38
  * @property {Array} options 数组形式,可以配置背景颜色和文字
39
39
  * @property {String|Number} index 标识符,点击时候用于区分点击了哪一个,用v-for循环时的index即可
@@ -63,7 +63,7 @@ defineOptions({ name: 'u-swiper' });
63
63
  /**
64
64
  * swiper 轮播图
65
65
  * @description 该组件一般用于导航轮播,广告展示等场景,可开箱即用
66
- * @tutorial https://uview-pro.netlify.app/components/swiper.html
66
+ * @tutorial https://uviewpro.cn/zh/components/swiper.html
67
67
  * @property {Array} list 轮播图数据,见官网"基本使用"说明
68
68
  * @property {Boolean} title 是否显示标题文字,需要配合list参数,见官网说明(默认false)
69
69
  * @property {String} mode 指示器模式,见官网说明(默认round)
@@ -24,7 +24,7 @@ defineOptions({
24
24
  /**
25
25
  * switch 开关选择器
26
26
  * @description 选择开关一般用于只有两个选择,且只能选其一的场景。
27
- * @tutorial https://uview-pro.netlify.app/components/switch.html
27
+ * @tutorial https://uviewpro.cn/zh/components/switch.html
28
28
  * @property {Boolean} loading 是否处于加载中(默认false)
29
29
  * @property {Boolean} disabled 是否禁用(默认false)
30
30
  * @property {String|Number} size 开关尺寸,单位rpx(默认50)
@@ -13,7 +13,7 @@ defineOptions({ name: 'u-table' });
13
13
  /**
14
14
  * table 表格
15
15
  * @description 表格组件一般用于展示大量结构化数据的场景
16
- * @tutorial https://uview-pro.netlify.app/components/table.html
16
+ * @tutorial https://uviewpro.cn/zh/components/table.html
17
17
  * @property {String} border-color 表格边框的颜色(默认#e4e7ed)
18
18
  * @property {String} bg-color 表格的背景颜色(默认#ffffff)
19
19
  * @property {String} align 单元格的内容对齐方式,作用类似css的text-align(默认center)
@@ -25,7 +25,7 @@ defineOptions({ name: 'u-tabs' });
25
25
  /**
26
26
  * tabs 标签
27
27
  * @description 该组件,是一个tabs标签组件,在标签多的时候,可以配置为左右滑动,标签少的时候,可以禁止滑动。 该组件的一个特点是配置为滚动模式时,激活的tab会自动移动到组件的中间位置。
28
- * @tutorial https://uview-pro.netlify.app/components/tabs.html
28
+ * @tutorial https://uviewpro.cn/zh/components/tabs.html
29
29
  * @property {Boolean} is-scroll tabs是否可以左右拖动(默认true)
30
30
  * @property {Array} list 标签数组,元素为对象,如[{name: '推荐'}]
31
31
  * @property {String|Number} current 指定哪个tab为激活状态(默认0)
@@ -22,7 +22,7 @@ defineOptions({ name: 'u-tabs-swiper' });
22
22
  /**
23
23
  * tabsSwiper 全屏选项卡
24
24
  * @description 该组件内部实现主要依托于uniapp的scroll-view和swiper组件,主要特色是切换过程中,tabsSwiper文字的颜色可以渐变,底部滑块可以 跟随式滑动,活动tab滚动居中等。应用场景可以用于需要左右切换页面,比如商城的订单中心(待收货-待付款-待评价-已退货)等应用场景。
25
- * @tutorial https://uview-pro.netlify.app/components/tabsSwiper.html
25
+ * @tutorial https://uviewpro.cn/zh/components/tabsSwiper.html
26
26
  * @property {Boolean} is-scroll tabs是否可以左右拖动(默认true)
27
27
  * @property {Array} list 标签数组,元素为对象,如[{name: '推荐'}]
28
28
  * @property {String|Number} current 指定哪个tab为激活状态(默认0)
@@ -24,7 +24,7 @@ defineOptions({
24
24
  /**
25
25
  * tag 提示
26
26
  * @description 该组件一般用于标记和选择
27
- * @tutorial https://uview-pro.netlify.app/components/tag.html
27
+ * @tutorial https://uviewpro.cn/zh/components/tag.html
28
28
  * @property {String} type 主题类型(默认primary)
29
29
  * @property {String} size 标签大小(默认default)
30
30
  * @property {String} shape 标签形状(默认square)
@@ -14,7 +14,7 @@ defineOptions({ name: 'u-td' });
14
14
  /**
15
15
  * td td单元格
16
16
  * @description 表格组件一般用于展示大量结构化数据的场景(搭配u-table使用)
17
- * @tutorial https://uview-pro.netlify.app/components/table.html#td-props
17
+ * @tutorial https://uviewpro.cn/zh/components/table.html#td-props
18
18
  * @property {String | Number} width 单元格宽度百分比或者具体带单位的值,如30%, 200rpx等,一般使用百分比,单元格宽度默认为均分tr的长度(默认auto)
19
19
  * @example <u-td>二年级</u-td>
20
20
  */
@@ -14,7 +14,7 @@ defineOptions({ name: 'u-th' });
14
14
  /**
15
15
  * th th单元格
16
16
  * @description 表格组件一般用于展示大量结构化数据的场景(搭配u-table使用)
17
- * @tutorial https://uview-pro.netlify.app/components/table.html#td-props
17
+ * @tutorial https://uviewpro.cn/zh/components/table.html#td-props
18
18
  * @property {String | Number} width 标题单元格宽度百分比或者具体带单位的值,如30%,200rpx等,一般使用百分比,单元格宽度默认为均分tr的长度
19
19
  * @example 暂无示例
20
20
  */
@@ -10,7 +10,7 @@ defineOptions({ name: 'u-time-line' });
10
10
  /**
11
11
  * timeLine 时间轴
12
12
  * @description 时间轴组件一般用于物流信息展示,各种跟时间相关的记录等场景。
13
- * @tutorial https://uview-pro.netlify.app/components/timeLine.html
13
+ * @tutorial https://uviewpro.cn/zh/components/timeLine.html
14
14
  * @example <u-time-line></u-time-line>
15
15
  */
16
16
 
@@ -18,7 +18,7 @@ defineOptions({ name: 'u-time-line-item' });
18
18
  /**
19
19
  * timeLineItem 时间轴Item
20
20
  * @description 时间轴组件一般用于物流信息展示,各种跟时间相关的记录等场景。(搭配u-time-line使用)
21
- * @tutorial https://uview-pro.netlify.app/components/timeLine.html
21
+ * @tutorial https://uviewpro.cn/zh/components/timeLine.html
22
22
  * @property {String} bg-color 左边节点的背景颜色,一般通过slot内容自定义背景颜色即可(默认#ffffff)
23
23
  * @property {String | Number} node-top 节点左边图标绝对定位的top值,单位rpx
24
24
  * @example <u-time-line-item node-top="2">...</u-time-line-item>
@@ -26,7 +26,7 @@ defineOptions({
26
26
  /**
27
27
  * toast 消息提示
28
28
  * @description 此组件表现形式类似uni的uni.showToastAPI,但也有不同的地方。
29
- * @tutorial https://uview-pro.netlify.app/components/toast.html
29
+ * @tutorial https://uviewpro.cn/zh/components/toast.html
30
30
  * @property {String|Number} z-index toast展示时的z-index值
31
31
  * @event {Function} show 显示toast,如需一进入页面就显示toast,请在onReady生命周期调用
32
32
  * @example <u-toast ref="uToast" />
@@ -12,7 +12,7 @@ defineOptions({ name: 'u-top-tips' });
12
12
  /**
13
13
  * topTips 顶部提示
14
14
  * @description 该组件一般用于页面顶部向下滑出一个提示,尔后自动收起的场景。
15
- * @tutorial https://uview-pro.netlify.app/components/topTips.html
15
+ * @tutorial https://uviewpro.cn/zh/components/topTips.html
16
16
  * @property {String|Number} navbarHeight 导航栏高度(包含状态栏高度在内),单位PX
17
17
  * @property {String|Number} zIndex z-index值(默认975)
18
18
  * @example <u-top-tips ref="uTips"></u-top-tips>
@@ -10,7 +10,7 @@ defineOptions({ name: 'u-tr' });
10
10
  /**
11
11
  * tr 表格行标签
12
12
  * @description 表格组件一般用于展示大量结构化数据的场景(搭配<u-table>使用)
13
- * @tutorial https://uview-pro.netlify.app/components/table.html
13
+ * @tutorial https://uviewpro.cn/zh/components/table.html
14
14
  * @example <u-tr></u-tr>
15
15
  */
16
16
  </script>
@@ -62,7 +62,7 @@ defineOptions({
62
62
  /**
63
63
  * upload 图片上传
64
64
  * @description 该组件用于上传图片场景
65
- * @tutorial https://uview-pro.netlify.app/components/upload.html
65
+ * @tutorial https://uviewpro.cn/zh/components/upload.html
66
66
  * @property {String} action 服务器上传地址
67
67
  * @property {String Number} max-count 最大选择图片的数量(默认99)
68
68
  * @property {Boolean} custom-btn 如果需要自定义选择图片的按钮,设置为true(默认false)
@@ -13,7 +13,7 @@ defineOptions({ name: 'u-verification-code' });
13
13
  /**
14
14
  * verificationCode 验证码输入框
15
15
  * @description 考虑到用户实际发送验证码的场景,可能是一个按钮,也可能是一段文字,提示语各有不同,所以本组件不提供界面显示,只提供提示语,由用户将提示语嵌入到具体的场景
16
- * @tutorial https://uview-pro.netlify.app/components/verificationCode.html
16
+ * @tutorial https://uviewpro.cn/zh/components/verificationCode.html
17
17
  * @property {Number|String} seconds 倒计时所需的秒数(默认60)
18
18
  * @property {String} startText 开始前的提示语,见官网说明(默认获取验证码)
19
19
  * @property {String} changeText 倒计时期间的提示语,必须带有字母"x",见官网说明(默认X秒重新获取)
@@ -18,7 +18,7 @@ defineOptions({ name: 'u-waterfall' });
18
18
  /**
19
19
  * waterfall 瀑布流
20
20
  * @description 这是一个瀑布流形式的组件,内容分为左右两列,结合uView的懒加载组件效果更佳。相较于某些只是奇偶数左右分别,或者没有利用vue作用域插槽的做法,uView的瀑布流实现了真正的 组件化,搭配LazyLoad 懒加载和loadMore 加载更多组件,让您开箱即用,眼前一亮。
21
- * @tutorial https://uview-pro.netlify.app/components/waterfall.html
21
+ * @tutorial https://uviewpro.cn/zh/components/waterfall.html
22
22
  * @property {Array} flow-list 用于渲染的数据
23
23
  * @property {String | Number} add-time 单条数据添加到队列的时间间隔,单位ms,见上方注意事项说明(默认200)
24
24
  * @example <u-waterfall :flowList="flowList"></u-waterfall>
package/index.ts CHANGED
@@ -11,7 +11,7 @@ import colorGradients from './libs/function/colorGradient';
11
11
  // 生成全局唯一guid字符串
12
12
  import guid from './libs/function/guid';
13
13
  // 主题相关颜色,info|success|warning|primary|default|error,此颜色已在uview.scss中定义,但是为js中也能使用,故也定义一份
14
- import color from './libs/function/color';
14
+ import color, { type ThemeColor } from './libs/function/color';
15
15
  // 根据type获取图标名称
16
16
  import type2icon from './libs/function/type2icon';
17
17
  // 打乱数组的顺序
@@ -147,9 +147,18 @@ export const $u: UViewUtils = {
147
147
  };
148
148
 
149
149
  // $u挂载到uni对象上
150
+ interface UViewProOptions {
151
+ theme?: ThemeColor;
152
+ // 可扩展更多配置项
153
+ }
150
154
 
151
- const install = (): void => {
155
+ const install = (app: any, options?: UViewProOptions): void => {
152
156
  uni.$u = $u;
157
+ if (options && options.theme) {
158
+ $u.color = deepMerge($u.color, options.theme);
159
+ }
160
+ // 可扩展更多配置项
161
+ app.config.globalProperties.$u = $u;
153
162
  };
154
163
 
155
164
  export default {
@@ -1,6 +1,40 @@
1
1
  // 为了让用户能够自定义主题,会逐步弃用此文件,各颜色通过css提供
2
2
  // 为了给某些特殊场景使用和向后兼容,无需删除此文件(2020-06-20)
3
- let color = {
3
+ export type ThemeColor = Partial<{
4
+ primary: string;
5
+ primaryDark: string;
6
+ primaryDisabled: string;
7
+ primaryLight: string;
8
+ bgColor: string;
9
+
10
+ info: string;
11
+ infoDark: string;
12
+ infoDisabled: string;
13
+ infoLight: string;
14
+
15
+ warning: string;
16
+ warningDark: string;
17
+ warningDisabled: string;
18
+ warningLight: string;
19
+
20
+ error: string;
21
+ errorDark: string;
22
+ errorDisabled: string;
23
+ errorLight: string;
24
+
25
+ success: string;
26
+ successDark: string;
27
+ successDisabled: string;
28
+ successLight: string;
29
+
30
+ mainColor: string;
31
+ contentColor: string;
32
+ tipsColor: string;
33
+ lightColor: string;
34
+ borderColor: string;
35
+ }>;
36
+
37
+ const color: ThemeColor = {
4
38
  primary: '#2979ff',
5
39
  primaryDark: '#2b85e4',
6
40
  primaryDisabled: '#a0cfff',
@@ -35,8 +35,8 @@ export interface RequestInterceptor {
35
35
  */
36
36
  export interface RequestOptions {
37
37
  url: string;
38
- header?: Record<string, any>;
39
- method?: 'GET' | 'POST' | 'OPTIONS' | 'HEAD' | 'PUT' | 'DELETE' | 'TRACE' | 'CONNECT';
38
+ header: Record<string, any>;
39
+ method: 'GET' | 'POST' | 'OPTIONS' | 'HEAD' | 'PUT' | 'DELETE' | 'TRACE' | 'CONNECT';
40
40
  data?: any;
41
41
  dataType?: string;
42
42
  responseType?: string;
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "id": "uview-pro",
3
3
  "name": "uview-pro",
4
4
  "displayName": "【Vue3重构版】uView Pro|基于Vue3+TS全面重构的70+精选UI组件库",
5
- "version": "0.0.23",
5
+ "version": "0.1.0",
6
6
  "description": "uView Pro,是全面支持Vue3的uni-app生态框架,70+精选组件已使用TypeScript重构,已全面支持uni-app Vue3.0",
7
7
  "main": "index.ts",
8
8
  "module": "index.ts",
package/readme.md CHANGED
@@ -10,7 +10,7 @@
10
10
  [![forks](https://img.shields.io/github/forks/anyup/uView-Pro?style=flat-square&logo=GitHub)](https://github.com/anyup/uView-Pro)
11
11
  [![issues](https://img.shields.io/github/issues/anyup/uView-Pro?style=flat-square&logo=GitHub)](https://github.com/anyup/uView-Pro/issues)
12
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://uview-pro.anyup.cn/)
13
+ [![Website](https://img.shields.io/badge/uView%20Pro-docs-blue?style=flat-square)](https://uviewpro.cn)
14
14
  [![node version](https://img.shields.io/badge/node-%3E%3D18-green)](https://nodejs.org/)
15
15
  [![pnpm version](https://img.shields.io/badge/pnpm-%3E%3D7.30-green)](https://pnpm.io/)
16
16
  [![license](https://img.shields.io/github/license/anyup/uView-Pro?style=flat-square)](https://en.wikipedia.org/wiki/MIT_License)
@@ -21,7 +21,7 @@
21
21
 
22
22
  `uView Pro`,是全面支持 Vue3.0、TypeScript 的 uni-app 生态框架,uView Pro 的基线版本是基于 uView 1.8.8 修改,使用 TypeScript 完全重构,目前已全面支持 uni-app Vue3.0。
23
23
 
24
- ## [官方文档:https://uview-pro.netlify.app/](https://uview-pro.netlify.app/)
24
+ ## [官方文档:https://uviewpro.cn](https://uviewpro.cn)
25
25
 
26
26
  ## 特性
27
27
 
@@ -60,7 +60,7 @@ pnpm dev
60
60
 
61
61
  - [Github](https://github.com/anyup/uview-pro)
62
62
  - [Gitee](https://gitee.com/anyup/uview-pro)
63
- - [官方文档](https://uview-pro.netlify.app/)
63
+ - [官方文档](https://uviewpro.cn)
64
64
  - [更新日志](https://github.com/anyup/uView-Pro/blob/master/src/uni_modules/uview-pro/changelog.md)
65
65
 
66
66
  ## 交流反馈
@@ -69,7 +69,7 @@ pnpm dev
69
69
 
70
70
  <table class="table">
71
71
  <tr>
72
- <td><img src="https://ik.imagekit.io/anyup/images/social/weixin-chat.png?updatedAt=1757940337724" width="250" height="345" ></td>
72
+ <td><img src="https://ik.imagekit.io/anyup/images/social/weixin-chat.png?updatedAt=1758420557584" width="250" height="345" ></td>
73
73
  <td><img src="https://ik.imagekit.io/anyup/images/social/qq-chat.png" width="250" height="345" ></td>
74
74
  </tr>
75
75
  <tr>
@@ -200,7 +200,7 @@ export function createApp() {
200
200
  </template>
201
201
  ```
202
202
 
203
- 请通过[快速上手](https://uview-pro.netlify.app/components/quickstart.html)了解更详细的内容
203
+ 请通过[快速上手](https://uviewpro.cn/zh/components/quickstart.html)了解更详细的内容
204
204
 
205
205
  ## 捐赠 uView Pro
206
206