uview-pro 0.0.3 → 0.0.5

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 (76) hide show
  1. package/changelog.md +156 -1
  2. package/components/u-action-sheet/u-action-sheet.vue +4 -4
  3. package/components/u-avatar/u-avatar.vue +1 -1
  4. package/components/u-badge/u-badge.vue +1 -1
  5. package/components/u-button/u-button.vue +102 -25
  6. package/components/u-card/u-card.vue +1 -1
  7. package/components/u-cell-group/u-cell-group.vue +1 -1
  8. package/components/u-cell-item/u-cell-item.vue +1 -1
  9. package/components/u-checkbox/u-checkbox.vue +1 -1
  10. package/components/u-checkbox-group/u-checkbox-group.vue +1 -1
  11. package/components/u-circle-progress/u-circle-progress.vue +1 -1
  12. package/components/u-city-select/u-city-select.vue +244 -0
  13. package/components/u-col/u-col.vue +1 -1
  14. package/components/u-collapse/u-collapse.vue +1 -1
  15. package/components/u-collapse-item/u-collapse-item.vue +2 -2
  16. package/components/u-count-down/u-count-down.vue +1 -1
  17. package/components/u-count-to/u-count-to.vue +1 -1
  18. package/components/u-divider/u-divider.vue +1 -1
  19. package/components/u-empty/u-empty.vue +1 -1
  20. package/components/u-field/u-field.vue +1 -1
  21. package/components/u-gap/u-gap.vue +1 -1
  22. package/components/u-grid/u-grid.vue +1 -1
  23. package/components/u-grid-item/u-grid-item.vue +1 -1
  24. package/components/u-icon/u-icon.vue +29 -23
  25. package/components/u-index-anchor/u-index-anchor.vue +1 -1
  26. package/components/u-index-list/u-index-list.vue +1 -1
  27. package/components/u-keyboard/u-keyboard.vue +1 -1
  28. package/components/u-lazy-load/u-lazy-load.vue +1 -1
  29. package/components/u-line/u-line.vue +1 -1
  30. package/components/u-line-progress/u-line-progress.vue +1 -1
  31. package/components/u-link/u-link.vue +1 -1
  32. package/components/u-loading/u-loading.vue +1 -1
  33. package/components/u-loadmore/u-loadmore.vue +1 -1
  34. package/components/u-mask/u-mask.vue +1 -1
  35. package/components/u-message-input/u-message-input.vue +1 -1
  36. package/components/u-modal/u-modal.vue +1 -1
  37. package/components/u-navbar/u-navbar.vue +1 -1
  38. package/components/u-no-network/u-no-network.vue +1 -1
  39. package/components/u-notice-bar/u-notice-bar.vue +1 -1
  40. package/components/u-number-box/u-number-box.vue +1 -1
  41. package/components/u-picker/u-picker.vue +1 -1
  42. package/components/u-popup/u-popup.vue +1 -1
  43. package/components/u-radio/u-radio.vue +1 -1
  44. package/components/u-radio-group/u-radio-group.vue +1 -1
  45. package/components/u-rate/u-rate.vue +1 -1
  46. package/components/u-read-more/u-read-more.vue +1 -1
  47. package/components/u-row/u-row.vue +1 -1
  48. package/components/u-search/u-search.vue +1 -1
  49. package/components/u-section/u-section.vue +1 -1
  50. package/components/u-skeleton/u-skeleton.vue +1 -1
  51. package/components/u-steps/u-steps.vue +1 -1
  52. package/components/u-sticky/u-sticky.vue +1 -1
  53. package/components/u-subsection/u-subsection.vue +1 -1
  54. package/components/u-swipe-action/u-swipe-action.vue +1 -1
  55. package/components/u-swiper/u-swiper.vue +1 -1
  56. package/components/u-switch/u-switch.vue +1 -1
  57. package/components/u-table/u-table.vue +1 -1
  58. package/components/u-tabs/u-tabs.vue +1 -1
  59. package/components/u-tabs-swiper/u-tabs-swiper.vue +1 -1
  60. package/components/u-tag/u-tag.vue +1 -1
  61. package/components/u-td/u-td.vue +1 -1
  62. package/components/u-th/u-th.vue +1 -1
  63. package/components/u-time-line/u-time-line.vue +1 -1
  64. package/components/u-time-line-item/u-time-line-item.vue +1 -1
  65. package/components/u-toast/u-toast.vue +1 -1
  66. package/components/u-top-tips/u-top-tips.vue +1 -1
  67. package/components/u-tr/u-tr.vue +1 -1
  68. package/components/u-upload/u-upload.vue +12 -6
  69. package/components/u-verification-code/u-verification-code.vue +1 -1
  70. package/components/u-waterfall/u-waterfall.vue +1 -1
  71. package/libs/function/md5.ts +3 -1
  72. package/libs/request/auto-http.ts +76 -0
  73. package/libs/request/uni-http.md +156 -0
  74. package/libs/request/uni-http.ts +434 -0
  75. package/package.json +5 -3
  76. package/readme.md +33 -15
package/changelog.md CHANGED
@@ -1,9 +1,164 @@
1
+ ## 0.0.5(2025-08-19)
2
+
3
+ ### ✨ Features | 新功能
4
+
5
+ - 新增 u-city-select 城市选择器组件 ([0eb4806](https://gitee.com/anyup/uView-Pro/commit/0eb4806db3be39e1a6c6f33c9ea511d8445da884))
6
+ - 完善 u-button 的 open-type 支持类型 ([37c0db5](https://gitee.com/anyup/uView-Pro/commit/37c0db527258bca57dbd55d7013b633230489853))
7
+
8
+ ### 🐛 Bug Fixes | Bug 修复
9
+
10
+ - u-upload 暴露 lists 属性 ([09f8424](https://gitee.com/anyup/uView-Pro/commit/09f8424774baaee3b6fc7a42458949f8d5903951))
11
+ - u-upload 深度监听文件列表变化并优化事件触发 ([a41a571](https://gitee.com/anyup/uView-Pro/commit/a41a5719ddf9d6793b78c55a13025bbdc88fdfe3))
12
+
13
+ ### 🚀 Demos | 示例页面优化
14
+
15
+ - 优化关于页面布局和内容 ([ad5f6a4](https://gitee.com/anyup/uView-Pro/commit/ad5f6a47847999268b43b8c5dbf1a34cb8f70802))
16
+ - 删除分类数据文件 ([5ed7a11](https://gitee.com/anyup/uView-Pro/commit/5ed7a1113db58ff493ad606296a210358348affe))
17
+ - 重构 index list 页面 ([13d780e](https://gitee.com/anyup/uView-Pro/commit/13d780ea5acc4c8eed72062482735df826d4b37a))
18
+ - 更新商场菜单组件引用 ([a5f1bf3](https://gitee.com/anyup/uView-Pro/commit/a5f1bf3f256705d6cad028d60701b4b0544332de))
19
+ - 修改图片地址 ([c459893](https://gitee.com/anyup/uView-Pro/commit/c459893848936aa9a44e7bda3277ab1428109869))
20
+ - 重构 upload 上传组件示例页面 ([686831d](https://gitee.com/anyup/uView-Pro/commit/686831de357aca67bbf7015e2f0696cf6bf48164))
21
+ - 优化多个组件的代码结构和样式 ([f2af44c](https://gitee.com/anyup/uView-Pro/commit/f2af44ca1710334495e4c4fad99d04027b3788f8))
22
+ - 添加提交规范相关配置文件 git-cz/husky/changelog ([d93b816](https://gitee.com/anyup/uView-Pro/commit/d93b816a5a3e468c4bc45e3161d7c006cba5fbf6))
23
+ - 优化 deepClone 和 deepMerge 页面的结果展示 ([b0daa70](https://gitee.com/anyup/uView-Pro/commit/b0daa700b6a385e037d38dc1f10b3612596e2403))
24
+ - 新增优惠券模板 ([1b77762](https://gitee.com/anyup/uView-Pro/commit/1b777621615f7ebe9d83606d53650987c8b2c4e0))
25
+ - 更新 easycom 配置说明,一定要放在 custom 里,否则不生效 ([fc14bf9](https://gitee.com/anyup/uView-Pro/commit/fc14bf90cb77088d258e20e79e3d25820f37e97e))
26
+ - 添加模板示例页面 ([3336af4](https://gitee.com/anyup/uView-Pro/commit/3336af406161648d18578c988d9b3ad79b86059a))
27
+ - 新增模版相关页面 ([8925a02](https://gitee.com/anyup/uView-Pro/commit/8925a02f9fa88f4742d984f2ff02909afc6ad0d7))
28
+ - 重构 request 类,优化泛型支持 ([d7b2e6a](https://gitee.com/anyup/uView-Pro/commit/d7b2e6a224d96f717e5bdbaf09edb19b712ced47))
29
+
30
+ ## 0.0.4(2025-08-14)
31
+
32
+ ### 新增
33
+
34
+ - `u-icon` 组件新增 `space` 属性,表示`label` 在四周时与图标的距离,权重高于 `margin`,单位 rpx
35
+ - 新增`$u`工具库各类方法,同步文档
36
+ - 组件全部 setup 化,全面支持 TypeScript 和 Vue3
37
+ - 工具库示例页面全部 setup 化
38
+
39
+ ### 优化
40
+
41
+ - 组件样式兼容多端
42
+ - 代码注释与类型完善
43
+ - 优化演示代码兼容性
44
+
45
+ ### 修复
46
+
47
+ - 修复类型声明、变量冲突、lint 报错等问题
48
+
1
49
  ## 0.0.3(2025-08-06)
2
- - 添加插件使用示例工程
50
+
51
+ - 添加插件使用示例工程
52
+
3
53
  ## 0.0.2(2025-08-04)
54
+
4
55
  - 解决一些 npm 包依赖问题
56
+
5
57
  ## 0.0.1(2025-08-04)
58
+
6
59
  - 70+精选组件,使用 Vue3+TS 全面重构,功能丰富,多端兼容,让您快速集成,开箱即用
7
60
  - 兼容安卓,iOS,微信小程序,H5 等
8
61
  - 详尽的文档支持,现代化的演示效果
9
62
  - 按需引入,精简打包体积
63
+
64
+ ### 基础组件(8)
65
+
66
+ - Color 色彩
67
+ - Icon 图标
68
+ - Image 图片
69
+ - Button 按钮
70
+ - Layout 布局
71
+ - Cell 单元格
72
+ - Badge 徽标数
73
+ - Tag 标签
74
+
75
+ ---
76
+
77
+ ### 表单组件(15)
78
+
79
+ - Form 表单
80
+ - Calendar 日历
81
+ - Select 列选择器
82
+ - Keyboard 键盘
83
+ - Picker 选择器
84
+ - Rate 评分
85
+ - Search 搜索
86
+ - NumberBox 步进器
87
+ - Upload 上传
88
+ - VerificationCode 验证码倒计时
89
+ - Field 输入框
90
+ - Checkbox 复选框
91
+ - Radio 单选框
92
+ - Switch 开关选择器
93
+ - Slider 滑动选择器
94
+
95
+ ---
96
+
97
+ ### 数据组件(4)
98
+
99
+ - Progress 进度条
100
+ - Table 表格
101
+ - CountDown 倒计时
102
+ - CountTo 数字滚动
103
+
104
+ ---
105
+
106
+ ### 反馈组件(10)
107
+
108
+ - ActionSheet 操作菜单
109
+ - AlertTips 警告提示
110
+ - Toast 消息提示
111
+ - NoticeBar 滚动通知
112
+ - TopTips 顶部提示
113
+ - SwipeAction 滑动单元格
114
+ - Collapse 折叠面板
115
+ - Popup 弹出层
116
+ - Modal 模态框
117
+ - fullScreen 压窗屏
118
+
119
+ ---
120
+
121
+ ### 布局组件(11)
122
+
123
+ - Line 线条
124
+ - Card 卡片
125
+ - Mask 遮罩层
126
+ - NoNetwork 无网络提示
127
+ - Grid 宫格布局
128
+ - Swiper 轮播图
129
+ - TimeLine 时间轴
130
+ - Skeleton 骨架屏
131
+ - Sticky 吸顶
132
+ - Waterfall 瀑布流
133
+ - Divider 分割线
134
+
135
+ ---
136
+
137
+ ### 导航组件(11)
138
+
139
+ - Dropdown 下拉菜单
140
+ - Tabbar 底部导航栏
141
+ - BackTop 返回顶部
142
+ - Navbar 导航栏
143
+ - Tabs 标签
144
+ - TabsSwiper 全屏选项卡
145
+ - Subsection 分段器
146
+ - IndexList 索引列表
147
+ - Steps 步骤条
148
+ - Empty 内容为空
149
+ - Section 查看更多
150
+
151
+ ---
152
+
153
+ ### 其他组件(8)
154
+
155
+ - MessageInput 验证码输入
156
+ - Loadmore 加载更多
157
+ - ReadMore 展开阅读更多
158
+ - LazyLoad 懒加载
159
+ - Gap 间隔槽
160
+ - Avatar 头像
161
+ - Link 超链接
162
+ - Loading 加载动画
163
+
164
+ ---
@@ -44,9 +44,9 @@ defineOptions({
44
44
  /**
45
45
  * actionSheet 操作菜单
46
46
  * @description 本组件用于从底部弹出一个操作菜单,供用户选择并返回结果。本组件功能类似于uni的uni.showActionSheetAPI,配置更加灵活,所有平台都表现一致。
47
- * @tutorial https://uview-pro.anyup.cn/docs/components/actionSheet.html
48
- * @property {Array<Object>} list 按钮的文字数组,见官方文档示例
49
- * @property {Object} tips 顶部的提示文字,见官方文档示例
47
+ * @tutorial https://uview-pro.netlify.app/components/actionSheet.html
48
+ * @property {Array<{ text: string; subText?: string; color?: string; fontSize?: string; disabled?: boolean }>} list 按钮的文字数组,见官方文档示例
49
+ * @property {{text: string; color?: string; fontSize?: string}} tips 顶部的提示文字,见官方文档示例
50
50
  * @property {String} cancel-text 取消按钮的提示文字
51
51
  * @property {Boolean} cancel-btn 是否显示底部的取消按钮(默认true)
52
52
  * @property {Number String} border-radius 弹出部分顶部左右的圆角值,单位rpx(默认0)
@@ -67,7 +67,7 @@ const props = defineProps({
67
67
  },
68
68
  /** 按钮的文字数组,可以自定义颜色和字体大小,字体单位为rpx */
69
69
  list: {
70
- type: Array as () => Array<any>,
70
+ type: Array as () => Array<{ text: string; subText?: string; color?: string; fontSize?: string; disabled?: boolean }>,
71
71
  default: () => []
72
72
  },
73
73
  /** 顶部的提示文字 */
@@ -25,7 +25,7 @@ let base64Avatar =
25
25
  /**
26
26
  * avatar 头像
27
27
  * @description 本组件一般用于展示头像的地方,如个人中心,或者评论列表页的用户头像展示等场所。
28
- * @tutorial https://uview-pro.anyup.cn/docs/components/avatar.html
28
+ * @tutorial https://uview-pro.netlify.app/components/avatar.html
29
29
  * @property {String} bg-color 背景颜色,一般显示文字时用(默认#ffffff)
30
30
  * @property {String} src 头像路径,如加载失败,将会显示默认头像
31
31
  * @property {String Number} size 头像尺寸,可以为指定字符串(large, default, mini),或者数值,单位rpx(默认default)
@@ -29,7 +29,7 @@ defineOptions({
29
29
  /**
30
30
  * badge 角标
31
31
  * @description 本组件一般用于展示头像的地方,如个人中心,或者评论列表页的用户头像展示等场所。
32
- * @tutorial https://uview-pro.anyup.cn/docs/components/badge.html
32
+ * @tutorial https://uview-pro.netlify.app/components/badge.html
33
33
  * @property {String|Number} count 展示的数字,大于 overflowCount 时显示为 ${overflowCount}+,为0且show-zero为false时隐藏
34
34
  * @property {Boolean} is-dot 不展示数字,只有一个小点(默认false)
35
35
  * @property {Boolean} absolute 组件是否绝对定位,为true时,offset参数才有效(默认true)
@@ -15,7 +15,7 @@
15
15
  :hover-stay-time="Number(hoverStayTime)"
16
16
  :disabled="disabled"
17
17
  :form-type="formType"
18
- :open-type="openType"
18
+ :open-type="disabled || loading ? undefined : openType"
19
19
  :app-parameter="appParameter"
20
20
  :hover-stop-propagation="hoverStopPropagation"
21
21
  :send-message-title="sendMessageTitle"
@@ -25,11 +25,15 @@
25
25
  :session-from="sessionFrom"
26
26
  :send-message-img="sendMessageImg"
27
27
  :show-message-card="showMessageCard"
28
- @getphonenumber="getphonenumber"
28
+ @getAuthorize="getAuthorize"
29
29
  @getuserinfo="getuserinfo"
30
+ @contact="contact"
31
+ @getphonenumber="getphonenumber"
30
32
  @error="error"
31
- @opensetting="opensetting"
32
33
  @launchapp="launchapp"
34
+ @opensetting="opensetting"
35
+ @chooseavatar="chooseavatar"
36
+ @agreeprivacyauthorization="agreeprivacyauthorization"
33
37
  :style="[
34
38
  customStyle,
35
39
  {
@@ -57,7 +61,7 @@
57
61
  </template>
58
62
 
59
63
  <script setup lang="ts">
60
- import { ref, computed, nextTick } from 'vue';
64
+ import { ref, computed, nextTick, type PropType } from 'vue';
61
65
  import { $u } from '../../';
62
66
 
63
67
  defineOptions({
@@ -66,7 +70,7 @@ defineOptions({
66
70
  /**
67
71
  * button 按钮
68
72
  * @description Button 按钮
69
- * @tutorial https://uview-pro.anyup.cn/docs/components/button.html
73
+ * @tutorial https://uview-pro.netlify.app/components/button.html
70
74
  * @property {String} size 按钮的大小
71
75
  * @property {Boolean} ripple 是否开启点击水波纹效果
72
76
  * @property {String} ripple-bg-color 水波纹的背景色,ripple为true时有效
@@ -74,7 +78,7 @@ defineOptions({
74
78
  * @property {Boolean} plain 按钮是否镂空,背景色透明
75
79
  * @property {Boolean} disabled 是否禁用
76
80
  * @property {Boolean} hair-line 是否显示按钮的细边框(默认true)
77
- * @property {Boolean} shape 按钮外观形状,见文档说明
81
+ * @property {String} shape 按钮外观形状,见文档说明
78
82
  * @property {Boolean} loading 按钮名称前是否带 loading 图标(App-nvue 平台,在 ios 上为雪花,Android上为圆圈)
79
83
  * @property {String} form-type 用于 <form> 组件,点击分别会触发 <form> 组件的 submit/reset 事件
80
84
  * @property {String} open-type 开放能力
@@ -83,23 +87,60 @@ defineOptions({
83
87
  * @property {Number} hover-start-time 按住后多久出现点击态,单位毫秒
84
88
  * @property {Number} hover-stay-time 手指松开后点击态保留时间,单位毫秒
85
89
  * @property {Object} custom-style 对按钮的自定义样式,对象形式,见文档说明
90
+ * @property {String} app-parameter 打开 APP 时,向 APP 传递的参数,open-type=launchApp时有效
91
+ * @property {Boolean} hover-stop-propagation 指定是否阻止本节点的祖先节点出现点击态,微信小程序有效
92
+ * @property {String} lang 指定返回用户信息的语言,zh_CN 简体中文,zh_TW 繁体中文,en 英文。只微信小程序有效
93
+ * @property {String} session-from 会话来源,open-type="contact"时有效。只微信小程序有效
94
+ * @property {String} send-message-title 会话内消息卡片标题,open-type="contact"时有效
95
+ * @property {String} send-message-path 会话内消息卡片点击跳转小程序路径,open-type="contact"时有效
96
+ * @property {String} send-message-img 会话内消息卡片图片,open-type="contact"时有效
97
+ * @property {Boolean} show-message-card 是否显示会话内消息卡片,open-type="contact"时有效
98
+ * @property {Number|String} throttle-time 节流,一定时间内只能触发一次,单位毫秒
99
+ * @property {String} scope 支付宝小程序,当 open-type 为 getAuthorize 时有效。可选值:'phoneNumber' | 'userInfo'
86
100
  * @event {Function} click 按钮点击
87
101
  * @event {Function} getphonenumber open-type="getPhoneNumber"时有效
88
102
  * @event {Function} getuserinfo 用户点击该按钮时,会返回获取到的用户信息,从返回参数的detail中获取到的值同uni.getUserInfo
89
103
  * @event {Function} error 当使用开放能力时,发生错误的回调
90
104
  * @event {Function} opensetting 在打开授权设置页并关闭后回调
91
105
  * @event {Function} launchapp 打开 APP 成功的回调
106
+ * @event {Function} contact 客服消息回调
107
+ * @event {Function} chooseavatar 头像选择回调
108
+ * @event {Function} agreeprivacyauthorization 用户点击允许授权回调
92
109
  * @example <u-button>月落</u-button>
93
110
  */
94
111
 
95
- const emit = defineEmits<{
96
- (e: 'click', event: any): void;
97
- (e: 'getphonenumber', res: any): void;
98
- (e: 'getuserinfo', res: any): void;
99
- (e: 'error', res: any): void;
100
- (e: 'opensetting', res: any): void;
101
- (e: 'launchapp', res: any): void;
102
- }>();
112
+ const emit = defineEmits(['click', 'getuserinfo', 'contact', 'getphonenumber', 'error', 'launchapp', 'opensetting', 'chooseavatar', 'agreeprivacyauthorization']);
113
+
114
+ type ButtonScope = 'phoneNumber' | 'userInfo';
115
+
116
+ type ButtonOpenType =
117
+ | 'feedback'
118
+ | 'share'
119
+ | 'getUserInfo'
120
+ | 'contact'
121
+ | 'getPhoneNumber'
122
+ | 'launchApp'
123
+ | 'openSetting'
124
+ | 'chooseAvatar'
125
+ | 'getAuthorize'
126
+ | 'lifestyle'
127
+ | 'contactShare'
128
+ | 'openGroupProfile'
129
+ | 'openGuildProfile'
130
+ | 'openPublicProfile'
131
+ | 'shareMessageToFriend'
132
+ | 'addFriend'
133
+ | 'addColorSign'
134
+ | 'addGroupApp'
135
+ | 'addToFavorites'
136
+ | 'chooseAddress'
137
+ | 'chooseInvoiceTitle'
138
+ | 'login'
139
+ | 'subscribe'
140
+ | 'favorite'
141
+ | 'watchLater'
142
+ | 'openProfile'
143
+ | 'agreePrivacyAuthorization';
103
144
 
104
145
  const props = defineProps({
105
146
  /** 是否细边框 */
@@ -116,8 +157,10 @@ const props = defineProps({
116
157
  disabled: { type: Boolean, default: false },
117
158
  /** 是否加载中 */
118
159
  loading: { type: Boolean, default: false },
160
+ /** 支付宝小程序,当 open-type 为 getAuthorize 时有效 */
161
+ scope: { type: String as PropType<ButtonScope>, default: '' },
119
162
  /** 开放能力,具体请看uniapp稳定关于button组件部分说明 */
120
- openType: { type: String, default: '' },
163
+ openType: { type: String as PropType<ButtonOpenType>, default: '' },
121
164
  /** 用于 <form> 组件,点击分别会触发 <form> 组件的 submit/reset 事件 */
122
165
  formType: { type: String, default: '' },
123
166
  /** 打开 APP 时,向 APP 传递的参数,open-type=launchApp时有效 */
@@ -278,32 +321,66 @@ function getElQuery(): Promise<any[]> {
278
321
  /**
279
322
  * open-type="getPhoneNumber"时有效
280
323
  */
281
- function getphonenumber(res: any) {
282
- emit('getphonenumber', res);
324
+ function getphonenumber(event: any) {
325
+ emit('getphonenumber', event);
283
326
  }
284
327
  /**
285
328
  * 用户点击该按钮时,会返回获取到的用户信息,从返回参数的detail中获取到的值同uni.getUserInfo
286
329
  */
287
- function getuserinfo(res: any) {
288
- emit('getuserinfo', res);
330
+ function getuserinfo(event: any) {
331
+ emit('getuserinfo', event);
289
332
  }
290
333
  /**
291
334
  * 当使用开放能力时,发生错误的回调
292
335
  */
293
- function error(res: any) {
294
- emit('error', res);
336
+ function error(event: any) {
337
+ emit('error', event);
295
338
  }
296
339
  /**
297
340
  * 在打开授权设置页并关闭后回调
298
341
  */
299
- function opensetting(res: any) {
300
- emit('opensetting', res);
342
+ function opensetting(event: any) {
343
+ emit('opensetting', event);
301
344
  }
302
345
  /**
303
346
  * 打开 APP 成功的回调
304
347
  */
305
- function launchapp(res: any) {
306
- emit('launchapp', res);
348
+ function launchapp(event: any) {
349
+ emit('launchapp', event);
350
+ }
351
+
352
+ /**
353
+ * 支付宝小程序授权
354
+ * @param event
355
+ */
356
+ function getAuthorize(event: any) {
357
+ if (props.scope === 'phoneNumber') {
358
+ getphonenumber(event);
359
+ } else if (props.scope === 'userInfo') {
360
+ getuserinfo(event);
361
+ }
362
+ }
363
+
364
+ /**
365
+ * 客服消息回调
366
+ * @param event
367
+ */
368
+ function contact(event: any) {
369
+ emit('contact', event);
370
+ }
371
+ /**
372
+ * 头像选择回调
373
+ * @param event
374
+ */
375
+ function chooseavatar(event: any) {
376
+ emit('chooseavatar', event);
377
+ }
378
+ /**
379
+ * 用户点击允许授权回调
380
+ * @param event
381
+ */
382
+ function agreeprivacyauthorization(event: any) {
383
+ emit('agreeprivacyauthorization', event);
307
384
  }
308
385
  </script>
309
386
 
@@ -82,7 +82,7 @@ defineOptions({
82
82
  /**
83
83
  * card 卡片
84
84
  * @description 卡片组件一般用于多个列表条目,且风格统一的场景
85
- * @tutorial https://uview-pro.anyup.cn/docs/components/card.html
85
+ * @tutorial https://uview-pro.netlify.app/components/card.html
86
86
  * @property {Boolean} full 卡片与屏幕两侧是否留空隙(默认false)
87
87
  * @property {String} title 头部左边的标题
88
88
  * @property {String} title-color 标题颜色(默认#303133)
@@ -17,7 +17,7 @@ defineOptions({
17
17
  /**
18
18
  * cellGroup 单元格父组件Group
19
19
  * @description cell单元格一般用于一组列表的情况,比如个人中心页,设置页等。搭配u-cell-item
20
- * @tutorial https://uview-pro.anyup.cn/docs/components/cell.html
20
+ * @tutorial https://uview-pro.netlify.app/components/cell.html
21
21
  * @property {String} title 分组标题
22
22
  * @property {Boolean} border 是否显示外边框(默认true)
23
23
  * @property {Object} title-style 分组标题的的样式,对象形式,如{'font-size': '24rpx'} 或 {'fontSize': '24rpx'}
@@ -45,7 +45,7 @@ defineOptions({
45
45
  /**
46
46
  * cellItem 单元格Item
47
47
  * @description cell单元格一般用于一组列表的情况,比如个人中心页,设置页等。搭配u-cell-group使用
48
- * @tutorial https://uview-pro.anyup.cn/docs/components/cell.html
48
+ * @tutorial https://uview-pro.netlify.app/components/cell.html
49
49
  * @property {String} title 左侧标题
50
50
  * @property {String} icon 左侧图标名,只支持uView内置图标,见Icon 图标
51
51
  * @property {Object} icon-style 左边图标的样式,对象形式
@@ -26,7 +26,7 @@ defineOptions({
26
26
  /**
27
27
  * checkbox 复选框
28
28
  * @description 该组件需要搭配checkboxGroup组件使用,以便用户进行操作时,获得当前复选框组的选中情况。
29
- * @tutorial https://uview-pro.anyup.cn/docs/components/checkbox.html
29
+ * @tutorial https://uview-pro.netlify.app/components/checkbox.html
30
30
  * @property {String Number} icon-size 图标大小,单位rpx(默认20)
31
31
  * @property {String Number} label-size label字体大小,单位rpx(默认28)
32
32
  * @property {String Number} name checkbox组件的标示符
@@ -15,7 +15,7 @@ defineOptions({
15
15
  /**
16
16
  * checkboxGroup 开关选择器父组件Group
17
17
  * @description 复选框组件一般用于需要多个选择的场景,该组件功能完整,使用方便
18
- * @tutorial https://uview-pro.anyup.cn/docs/components/checkbox.html
18
+ * @tutorial https://uview-pro.netlify.app/components/checkbox.html
19
19
  * @property {String Number} max 最多能选中多少个checkbox(默认999)
20
20
  * @property {String Number} size 组件整体的大小,单位rpx(默认40)
21
21
  * @property {Boolean} disabled 是否禁用所有checkbox(默认false)
@@ -43,7 +43,7 @@ defineOptions({
43
43
  /**
44
44
  * circleProgress 环形进度条
45
45
  * @description 展示操作或任务的当前进度,比如上传文件,是一个圆形的进度条。注意:此组件的percent值只能动态增加,不能动态减少。
46
- * @tutorial https://uview-pro.anyup.cn/docs/components/circleProgress.html
46
+ * @tutorial https://uview-pro.netlify.app/components/circleProgress.html
47
47
  * @property {String Number} percent 圆环进度百分比值,为数值类型,0-100
48
48
  * @property {String} inactive-color 圆环的底色,默认为灰色(该值无法动态变更)(默认#ececec)
49
49
  * @property {String} active-color 圆环激活部分的颜色(该值无法动态变更)(默认#19be6b)