uview-plus 3.6.17 → 3.6.26

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 (87) hide show
  1. package/changelog.md +30 -0
  2. package/components/u-action-sheet/u-action-sheet.vue +1 -1
  3. package/components/u-album/u-album.vue +1 -1
  4. package/components/u-alert/u-alert.vue +1 -1
  5. package/components/u-avatar/u-avatar.vue +1 -1
  6. package/components/u-avatar-group/u-avatar-group.vue +1 -1
  7. package/components/u-button/u-button.vue +1 -1
  8. package/components/u-calendar/month.vue +1 -1
  9. package/components/u-calendar/u-calendar.vue +1 -1
  10. package/components/u-cascader/u-cascader.vue +5 -3
  11. package/components/u-checkbox-group/u-checkbox-group.vue +1 -1
  12. package/components/u-choose/u-choose.vue +1 -1
  13. package/components/u-circle-progress/u-circle-progress.vue +1 -1
  14. package/components/u-code/u-code.vue +1 -1
  15. package/components/u-code-input/u-code-input.vue +1 -1
  16. package/components/u-col/u-col.vue +1 -1
  17. package/components/u-collapse/u-collapse.vue +1 -1
  18. package/components/u-collapse-item/u-collapse-item.vue +2 -2
  19. package/components/u-column-notice/u-column-notice.vue +1 -1
  20. package/components/u-count-to/u-count-to.vue +1 -1
  21. package/components/u-datetime-picker/u-datetime-picker.vue +1 -1
  22. package/components/u-divider/u-divider.vue +1 -1
  23. package/components/u-dragsort/u-dragsort.vue +45 -23
  24. package/components/u-dropdown/u-dropdown.vue +1 -1
  25. package/components/u-dropdown-item/u-dropdown-item.vue +1 -1
  26. package/components/u-empty/u-empty.vue +1 -1
  27. package/components/u-float-button/u-float-button.vue +1 -1
  28. package/components/u-form/u-form.vue +2 -2
  29. package/components/u-form-item/u-form-item.vue +21 -19
  30. package/components/u-gap/u-gap.vue +1 -1
  31. package/components/u-goods-sku/u-goods-sku.vue +1 -1
  32. package/components/u-grid/u-grid.vue +1 -1
  33. package/components/u-grid-item/u-grid-item.vue +1 -1
  34. package/components/u-icon/icons.js +2 -1
  35. package/components/u-icon/u-icon.vue +1 -1
  36. package/components/u-input/input.js +1 -1
  37. package/components/u-keyboard/u-keyboard.vue +1 -1
  38. package/components/u-line/u-line.vue +1 -1
  39. package/components/u-line-progress/u-line-progress.vue +1 -1
  40. package/components/u-link/u-link.vue +1 -1
  41. package/components/u-list/u-list.vue +1 -1
  42. package/components/u-list-item/u-list-item.vue +1 -1
  43. package/components/u-loading-icon/u-loading-icon.vue +1 -1
  44. package/components/u-loading-page/u-loading-page.vue +1 -1
  45. package/components/u-loadmore/u-loadmore.vue +1 -1
  46. package/components/u-modal/u-modal.vue +1 -1
  47. package/components/u-navbar/u-navbar.vue +1 -1
  48. package/components/u-navbar-mini/u-navbar-mini.vue +1 -1
  49. package/components/u-no-network/u-no-network.vue +1 -1
  50. package/components/u-notice-bar/u-notice-bar.vue +1 -1
  51. package/components/u-overlay/u-overlay.vue +1 -1
  52. package/components/u-picker/props.js +10 -0
  53. package/components/u-picker/u-picker.vue +2 -0
  54. package/components/u-popup/u-popup.vue +1 -1
  55. package/components/u-poster/u-poster.vue +1 -1
  56. package/components/u-radio/u-radio.vue +1 -1
  57. package/components/u-radio-group/u-radio-group.vue +1 -1
  58. package/components/u-rate/u-rate.vue +1 -1
  59. package/components/u-read-more/u-read-more.vue +1 -1
  60. package/components/u-row/u-row.vue +1 -1
  61. package/components/u-row-notice/u-row-notice.vue +1 -1
  62. package/components/u-safe-bottom/u-safe-bottom.vue +1 -1
  63. package/components/u-scroll-list/u-scroll-list.vue +1 -1
  64. package/components/u-search/u-search.vue +1 -1
  65. package/components/u-skeleton/u-skeleton.vue +1 -1
  66. package/components/u-sticky/u-sticky.vue +1 -1
  67. package/components/u-subsection/u-subsection.vue +1 -1
  68. package/components/u-swipe-action/u-swipe-action.vue +1 -1
  69. package/components/u-swipe-action-item/u-swipe-action-item.vue +1 -1
  70. package/components/u-swiper/u-swiper.vue +1 -1
  71. package/components/u-swiper-indicator/u-swiper-indicator.vue +1 -1
  72. package/components/u-switch/u-switch.vue +1 -1
  73. package/components/u-tabbar/u-tabbar.vue +1 -1
  74. package/components/u-tabbar-item/u-tabbar-item.vue +1 -1
  75. package/components/u-table/u-table.vue +1 -1
  76. package/components/u-tabs/u-tabs.vue +2 -2
  77. package/components/u-tabs-item/u-tabs-item.vue +1 -1
  78. package/components/u-tag/u-tag.vue +1 -1
  79. package/components/u-text/u-text.vue +1 -1
  80. package/components/u-textarea/u-textarea.vue +1 -1
  81. package/components/u-toast/u-toast.vue +1 -1
  82. package/components/u-toolbar/u-toolbar.vue +1 -1
  83. package/components/u-tooltip/u-tooltip.vue +2 -2
  84. package/components/u-upload/utils.js +6 -10
  85. package/components/u-view/u-view.vue +1 -1
  86. package/libs/config/config.js +1 -1
  87. package/package.json +1 -1
package/changelog.md CHANGED
@@ -1,3 +1,33 @@
1
+ ## 3.6.26(2025-12-16)
2
+ add: picker增加maskClass/maskStyle属性
3
+
4
+
5
+ ## 3.6.25(2025-12-15)
6
+ fix: 修复cascader对列表数据层级差异的兼容问题
7
+
8
+ ## 3.6.24(2025-12-14)
9
+ fix: 修复将empty组件的mode设置为wifi后图标不能显示的问题 #928
10
+
11
+ ## 3.6.23(2025-12-13)
12
+ fix: 修复cascader已选中三级菜单后再选择二级菜单时tabs报错问题
13
+
14
+ ## 3.6.22(2025-12-12)
15
+ fix: dragsort组件拖动抖动的问题
16
+
17
+ ## 3.6.21(2025-12-09)
18
+ fix: form-item初始化时机优化
19
+
20
+ ## 3.6.20(2025-12-08)
21
+ improvment: 优化form组件语法普适性
22
+
23
+ ## 3.6.19(2025-12-01)
24
+ fix: 修复商品SKU组件i18n
25
+
26
+ fix: Choose组件会有width警告提示 #915
27
+
28
+ ## 3.6.18(2025-11-30)
29
+ feature: upload组件file模式支持微信小程序chooseMessageFile的extension属性 #913
30
+
1
31
  ## 3.6.17(2025-11-18)
2
32
  add: picker-data支持表单验证
3
33
 
@@ -122,7 +122,7 @@
122
122
  /**
123
123
  * ActionSheet 操作菜单
124
124
  * @description 本组件用于从底部弹出一个操作菜单,供用户选择并返回结果。本组件功能类似于uni的uni.showActionSheetAPI,配置更加灵活,所有平台都表现一致。
125
- * @tutorial https://ijry.github.io/uview-plus/components/actionSheet.html
125
+ * @tutorial https://uview-plus.jiangruyi.com/components/actionSheet.html
126
126
  *
127
127
  * @property {Boolean} show 操作菜单是否展示 (默认 false )
128
128
  * @property {String} title 操作菜单标题
@@ -75,7 +75,7 @@ const dom = uni.requireNativePlugin('dom')
75
75
  /**
76
76
  * Album 相册
77
77
  * @description 本组件提供一个类似相册的功能,让开发者开发起来更加得心应手。减少重复的模板代码
78
- * @tutorial https://ijry.github.io/uview-plus/components/album.html
78
+ * @tutorial https://uview-plus.jiangruyi.com/components/album.html
79
79
  *
80
80
  * @property {Array} urls 图片地址列表 Array<String>|Array<Object>形式
81
81
  * @property {String} keyName 指定从数组的对象元素中读取哪个属性作为图片地址
@@ -74,7 +74,7 @@
74
74
  /**
75
75
  * Alert 警告提示
76
76
  * @description 警告提示,展现需要关注的信息。
77
- * @tutorial https://ijry.github.io/uview-plus/components/alertTips.html
77
+ * @tutorial https://uview-plus.jiangruyi.com/components/alertTips.html
78
78
  *
79
79
  * @property {String} title 显示的文字
80
80
  * @property {String} type 使用预设的颜色 (默认 'warning' )
@@ -63,7 +63,7 @@
63
63
  /**
64
64
  * Avatar 头像
65
65
  * @description 本组件一般用于展示头像的地方,如个人中心,或者评论列表页的用户头像展示等场所。
66
- * @tutorial https://ijry.github.io/uview-plus/components/avatar.html
66
+ * @tutorial https://uview-plus.jiangruyi.com/components/avatar.html
67
67
  *
68
68
  * @property {String} src 头像路径,如加载失败,将会显示默认头像(不能为相对路径)
69
69
  * @property {String} shape 头像形状 ( circle (默认) | square)
@@ -40,7 +40,7 @@
40
40
  /**
41
41
  * AvatarGroup 头像组
42
42
  * @description 本组件一般用于展示头像的地方,如个人中心,或者评论列表页的用户头像展示等场所。
43
- * @tutorial https://ijry.github.io/uview-plus/components/avatar.html
43
+ * @tutorial https://uview-plus.jiangruyi.com/components/avatar.html
44
44
  *
45
45
  * @property {Array} urls 头像图片组 (默认 [] )
46
46
  * @property {String | Number} maxCount 最多展示的头像数量 ( 默认 5 )
@@ -121,7 +121,7 @@ import color from '../../libs/config/color';
121
121
  /**
122
122
  * button 按钮
123
123
  * @description Button 按钮
124
- * @tutorial https://ijry.github.io/uview-plus/components/button.html
124
+ * @tutorial https://uview-plus.jiangruyi.com/components/button.html
125
125
  *
126
126
  * @property {Boolean} hairline 是否显示按钮的细边框 (默认 true )
127
127
  * @property {String} type 按钮的预置样式,info,primary,error,warning,success (默认 'info' )
@@ -359,7 +359,7 @@
359
359
  // 获取每个月份区域的尺寸
360
360
  getMonthRectByPromise(el) {
361
361
  // #ifndef APP-NVUE
362
- // $uGetRect为uView自带的节点查询简化方法,详见文档介绍:https://ijry.github.io/uview-plus/js/getRect.html
362
+ // $uGetRect为uView自带的节点查询简化方法,详见文档介绍:https://uview-plus.jiangruyi.com/js/getRect.html
363
363
  // 组件内部一般用this.$uGetRect,对外的为uni.$u.getRect,二者功能一致,名称不同
364
364
  return new Promise(resolve => {
365
365
  this.$uGetRect(`.${el}`).then(size => {
@@ -82,7 +82,7 @@ import test from '../../libs/function/test';
82
82
  /**
83
83
  * Calendar 日历
84
84
  * @description 此组件用于单个选择日期,范围选择日期等,日历被包裹在底部弹起的容器中.
85
- * @tutorial https://ijry.github.io/uview-plus/components/calendar.html
85
+ * @tutorial https://uview-plus.jiangruyi.com/components/calendar.html
86
86
  *
87
87
  * @property {String} title 标题内容 (默认 日期选择 )
88
88
  * @property {Boolean} showTitle 是否显示标题 (默认 true )
@@ -243,9 +243,11 @@
243
243
  this.$set(this.selectedValueIndexs, levelIndex, index);
244
244
 
245
245
  // 清除后续级别的选中值
246
- for (let i = levelIndex + 1; i < this.selectedValueIndexs.length; i++) {
247
- this.$set(this.selectedValueIndexs, i, undefined);
248
- }
246
+ this.selectedValueIndexs.splice(levelIndex + 1);
247
+ this.tabsIndex = Math.min(this.tabsIndex, levelIndex);
248
+
249
+ // 清除后续级别的列表
250
+ this.levelList.splice(levelIndex + 1);
249
251
 
250
252
  // 获取当前选中项
251
253
  const currentItem = this.levelList[levelIndex][index];
@@ -14,7 +14,7 @@
14
14
  /**
15
15
  * checkboxGroup 复选框组
16
16
  * @description 复选框组件一般用于需要多个选择的场景,该组件功能完整,使用方便
17
- * @tutorial https://ijry.github.io/uview-plus/components/checkbox.html
17
+ * @tutorial https://uview-plus.jiangruyi.com/components/checkbox.html
18
18
  * @property {String} name 标识符
19
19
  * @property {Array} value 绑定的值
20
20
  * @property {String} shape 形状,circle-圆形,square-方形 (默认 'square' )
@@ -23,7 +23,7 @@
23
23
  :scroll-x="wrap === false"
24
24
  :class="['up-choose', wrap ? 'up-choose-wrap' : 'up-choose-nowrap']">
25
25
  <template :key="item.id" v-for="(item,index) in options">
26
- <view :style="{width: width, display: 'inline-block'}">
26
+ <view :style="{width: itemWidth, display: 'inline-block'}">
27
27
  <slot :item="item" :index="index">
28
28
  <up-tag :type="index == currentIndex ? 'primary' : 'info'"
29
29
  size="large" :plain="index == currentIndex ? false : true"
@@ -37,7 +37,7 @@
37
37
  /**
38
38
  * CircleProgress 圆形进度条 TODO: 待完善
39
39
  * @description 展示操作或任务的当前进度,比如上传文件,是一个圆形的进度环。
40
- * @tutorial https://ijry.github.io/uview-plus/components/circleProgress.html
40
+ * @tutorial https://uview-plus.jiangruyi.com/components/circleProgress.html
41
41
  * @property {String | Number} percentage 圆环进度百分比值,为数值类型,0-100 (默认 30 )
42
42
  * @example
43
43
  */
@@ -11,7 +11,7 @@
11
11
  /**
12
12
  * Code 验证码输入框
13
13
  * @description 考虑到用户实际发送验证码的场景,可能是一个按钮,也可能是一段文字,提示语各有不同,所以本组件 不提供界面显示,只提供提示语,由用户将提示语嵌入到具体的场景
14
- * @tutorial https://ijry.github.io/uview-plus/components/code.html
14
+ * @tutorial https://uview-plus.jiangruyi.com/components/code.html
15
15
  * @property {String | Number} seconds 倒计时所需的秒数(默认 60 )
16
16
  * @property {String} startText 开始前的提示语,见官网说明(默认 '获取验证码' )
17
17
  * @property {String} changeText 倒计时期间的提示语,必须带有字母"x",见官网说明(默认 'X秒重新获取' )
@@ -58,7 +58,7 @@
58
58
  /**
59
59
  * CodeInput 验证码输入
60
60
  * @description 该组件一般用于验证用户短信验证码的场景,也可以结合uview-plus的键盘组件使用
61
- * @tutorial https://ijry.github.io/uview-plus/components/codeInput.html
61
+ * @tutorial https://uview-plus.jiangruyi.com/components/codeInput.html
62
62
  * @property {String | Number} maxlength 最大输入长度 (默认 6 )
63
63
  * @property {Boolean} dot 是否用圆点填充 (默认 false )
64
64
  * @property {String} mode 显示模式,box-盒子模式,line-底部横线模式 (默认 'box' )
@@ -20,7 +20,7 @@
20
20
  /**
21
21
  * CodeInput 栅格系统的列
22
22
  * @description 该组件一般用于Layout 布局 通过基础的 12 分栏,迅速简便地创建布局
23
- * @tutorial https://ijry.github.io/uview-plus/components/Layout.html
23
+ * @tutorial https://uview-plus.jiangruyi.com/components/Layout.html
24
24
  * @property {String | Number} span 栅格占据的列数,总12等份 (默认 12 )
25
25
  * @property {String | Number} offset 分栏左边偏移,计算方式与span相同 (默认 0 )
26
26
  * @property {String} justify 水平排列方式,可选值为`start`(或`flex-start`)、`end`(或`flex-end`)、`center`、`around`(或`space-around`)、`between`(或`space-between`) (默认 'start' )
@@ -12,7 +12,7 @@
12
12
  /**
13
13
  * collapse 折叠面板
14
14
  * @description 通过折叠面板收纳内容区域
15
- * @tutorial https://ijry.github.io/uview-plus/components/collapse.html
15
+ * @tutorial https://uview-plus.jiangruyi.com/components/collapse.html
16
16
  * @property {String | Number | Array} value 当前展开面板的name,非手风琴模式:[<string | number>],手风琴模式:string | number
17
17
  * @property {Boolean} accordion 是否手风琴模式( 默认 false )
18
18
  * @property {Boolean} border 是否显示外边框 ( 默认 true )
@@ -71,7 +71,7 @@
71
71
  /**
72
72
  * collapseItem 折叠面板Item
73
73
  * @description 通过折叠面板收纳内容区域(搭配u-collapse使用)
74
- * @tutorial https://ijry.github.io/uview-plus/components/collapse.html
74
+ * @tutorial https://uview-plus.jiangruyi.com/components/collapse.html
75
75
  * @property {String} title 标题
76
76
  * @property {String} value 标题右侧内容
77
77
  * @property {String} label 标题下方的描述信息
@@ -201,7 +201,7 @@
201
201
  // 查询内容高度
202
202
  queryRect() {
203
203
  // #ifndef APP-NVUE
204
- // $uGetRect为uView自带的节点查询简化方法,详见文档介绍:https://ijry.github.io/uview-plus/js/getRect.html
204
+ // $uGetRect为uView自带的节点查询简化方法,详见文档介绍:https://uview-plus.jiangruyi.com/js/getRect.html
205
205
  // 组件内部一般用this.$uGetRect,对外的为uni.$u.getRect,二者功能一致,名称不同
206
206
  return new Promise(resolve => {
207
207
  this.$uGetRect(`#${this.elId}`).then(size => {
@@ -66,7 +66,7 @@
66
66
  /**
67
67
  * ColumnNotice 滚动通知中的垂直滚动 内部组件
68
68
  * @description 该组件用于滚动通告场景,是其中的垂直滚动方式
69
- * @tutorial https://ijry.github.io/uview-plus/components/noticeBar.html
69
+ * @tutorial https://uview-plus.jiangruyi.com/components/noticeBar.html
70
70
  * @property {Array} text 显示的内容,字符串
71
71
  * @property {String} icon 是否显示左侧的音量图标 ( 默认 'volume' )
72
72
  * @property {String} mode 通告模式,link-显示右箭头,closable-显示右侧关闭图标
@@ -17,7 +17,7 @@ import { addUnit } from '../../libs/function/index';
17
17
  /**
18
18
  * countTo 数字滚动
19
19
  * @description 该组件一般用于需要滚动数字到某一个值的场景,目标要求是一个递增的值。
20
- * @tutorial https://ijry.github.io/uview-plus/components/countTo.html
20
+ * @tutorial https://uview-plus.jiangruyi.com/components/countTo.html
21
21
  * @property {String | Number} startVal 开始的数值,默认从0增长到某一个数(默认 0 )
22
22
  * @property {String | Number} endVal 要滚动的目标数值,必须 (默认 0 )
23
23
  * @property {String | Number} duration 滚动到目标数值的动画持续时间,单位为毫秒(ms) (默认 2000 )
@@ -65,7 +65,7 @@
65
65
  /**
66
66
  * DatetimePicker 时间日期选择器
67
67
  * @description 此选择器用于时间日期
68
- * @tutorial https://ijry.github.io/uview-plus/components/datetimePicker.html
68
+ * @tutorial https://uview-plus.jiangruyi.com/components/datetimePicker.html
69
69
  * @property {Boolean} show 用于控制选择器的弹出与收起 ( 默认 false )
70
70
  * @property {Boolean} showToolbar 是否显示顶部的操作栏 ( 默认 true )
71
71
  * @property {String | Number} modelValue 绑定值
@@ -38,7 +38,7 @@
38
38
  /**
39
39
  * divider 分割线
40
40
  * @description 区隔内容的分割线,一般用于页面底部"没有更多"的提示。
41
- * @tutorial https://ijry.github.io/uview-plus/components/divider.html
41
+ * @tutorial https://uview-plus.jiangruyi.com/components/divider.html
42
42
  * @property {Boolean} dashed 是否虚线 (默认 false )
43
43
  * @property {Boolean} hairline 是否细线 (默认 true )
44
44
  * @property {Boolean} dot 是否以点替代文字,优先于text字段起作用 (默认 false )
@@ -1,6 +1,6 @@
1
1
  <template>
2
2
  <view class="u-dragsort"
3
- :class="[direction == 'horizontal' ? 'u-dragsort--horizontal' : '', direction == 'all' ? 'u-dragsort--all' : '']">
3
+ :class="[direction == 'horizontal' ? 'u-dragsort--horizontal' : '', direction == 'vertical' ? 'u-dragsort--vertical' : '', direction == 'all' ? 'u-dragsort--all' : '']">
4
4
  <movable-area class="u-dragsort-area" :style="movableAreaStyle">
5
5
  <movable-view v-for="(item, index) in list" :key="item.id" :id="`u-dragsort-item-${index}`"
6
6
  class="u-dragsort-item" :class="{ 'dragging': dragIndex === index }"
@@ -20,7 +20,7 @@
20
20
  <script>
21
21
  import { mpMixin } from '../../libs/mixin/mpMixin';
22
22
  import { mixin } from '../../libs/mixin/mixin';
23
- import { addStyle, addUnit, sleep } from '../../libs/function/index';
23
+ import { sleep } from '../../libs/function/index';
24
24
  export default {
25
25
  name: 'u-dragsort',
26
26
  // #ifdef MP
@@ -74,7 +74,7 @@ export default {
74
74
  };
75
75
  } else if (this.direction === 'horizontal') {
76
76
  return {
77
- height: '100%',
77
+ height: `${this.itemHeight}px`,
78
78
  width: `${this.list.length * this.itemWidth}px`
79
79
  };
80
80
  } else {
@@ -171,21 +171,42 @@ export default {
171
171
  },
172
172
  updatePositions() {
173
173
  // 更新所有项目的位置
174
- this.list.forEach((item, index) => {
174
+ this.list = this.list.map((item, index) => {
175
+ // 当前正在拖动的项目保持拖动位置不动,避免抖动
176
+ if (this.dragIndex === index) {
177
+ return {
178
+ ...item,
179
+ x: this.currentPosition.x,
180
+ y: this.currentPosition.y
181
+ }
182
+ }
183
+
175
184
  if (this.direction === 'vertical') {
176
- item.y = index * this.itemHeight;
177
- item.x = 0;
178
- } else if (this.direction === 'horizontal') {
179
- item.x = index * this.itemWidth;
180
- item.y = 0;
181
- } else {
182
- // all模式,网格布局
183
- const col = index % this.columns;
184
- const row = Math.floor(index / this.columns);
185
- item.x = col * this.itemWidth;
186
- item.y = row * this.itemHeight;
185
+ return {
186
+ ...item,
187
+ x: 0,
188
+ y: index * this.itemHeight
189
+ }
187
190
  }
188
- });
191
+
192
+ if (this.direction === 'horizontal') {
193
+ return {
194
+ ...item,
195
+ x: index * this.itemWidth,
196
+ y: 0
197
+ }
198
+ }
199
+
200
+ // all模式,网格布局
201
+ const col = index % this.columns
202
+ const row = Math.floor(index / this.columns)
203
+
204
+ return {
205
+ ...item,
206
+ x: col * this.itemWidth,
207
+ y: row * this.itemHeight
208
+ }
209
+ })
189
210
  },
190
211
  onTouchStart(index) {
191
212
  this.dragIndex = index;
@@ -330,12 +351,14 @@ export default {
330
351
  }
331
352
 
332
353
  .u-dragsort-item-content {
333
- padding: 0px;
334
- text-align: center;
354
+ padding: 0;
335
355
  box-sizing: border-box;
336
- padding-bottom: 6px;
337
- border-radius: 8rpx;
338
- transition: all 0.3s ease;
356
+ }
357
+ }
358
+
359
+ &.u-dragsort--vertical {
360
+ .u-dragsort-item {
361
+ height: auto;
339
362
  }
340
363
  }
341
364
 
@@ -347,9 +370,8 @@ export default {
347
370
  }
348
371
 
349
372
  .u-dragsort-item {
350
- display: flex;
351
373
  width: auto;
352
- height: 100%;
374
+ height: auto;
353
375
  }
354
376
  }
355
377
 
@@ -41,7 +41,7 @@
41
41
  /**
42
42
  * dropdown 下拉菜单
43
43
  * @description 该组件一般用于向下展开菜单,同时可切换多个选项卡的场景
44
- * @tutorial https://ijry.github.io/uview-plus/components/dropdown.html
44
+ * @tutorial https://uview-plus.jiangruyi.com/components/dropdown.html
45
45
  * @property {String} active-color 标题和选项卡选中的颜色(默认#2979ff)
46
46
  * @property {String} inactive-color 标题和选项卡未选中的颜色(默认#606266)
47
47
  * @property {Boolean} close-on-click-mask 点击遮罩是否关闭菜单(默认true)
@@ -28,7 +28,7 @@
28
28
  /**
29
29
  * dropdown-item 下拉菜单
30
30
  * @description 该组件一般用于向下展开菜单,同时可切换多个选项卡的场景
31
- * @tutorial https://ijry.github.io/uview-plus/components/dropdown.html
31
+ * @tutorial https://uview-plus.jiangruyi.com/components/dropdown.html
32
32
  * @property {String | Number} v-model 双向绑定选项卡选择值
33
33
  * @property {String} title 菜单项标题
34
34
  * @property {Array[Object]} options 选项数据,如果传入了默认slot,此参数无效
@@ -39,7 +39,7 @@
39
39
  /**
40
40
  * empty 内容为空
41
41
  * @description 该组件用于需要加载内容,但是加载的第一页数据就为空,提示一个"没有内容"的场景, 我们精心挑选了十几个场景的图标,方便您使用。
42
- * @tutorial https://ijry.github.io/uview-plus/components/empty.html
42
+ * @tutorial https://uview-plus.jiangruyi.com/components/empty.html
43
43
  * @property {String} icon 内置图标名称,或图片路径,建议绝对路径
44
44
  * @property {String} text 提示文字
45
45
  * @property {String} textColor 文字颜色 (默认 '#c0c4cc' )
@@ -54,7 +54,7 @@ import { addStyle, addUnit, deepMerge } from '../../libs/function/index';
54
54
  /**
55
55
  * FloatButton 悬浮按钮
56
56
  * @description 悬浮按钮常用于屏幕右下角点击展开的操作菜单
57
- * @tutorial https://ijry.github.io/uview-plus/components/floatButton.html
57
+ * @tutorial https://uview-plus.jiangruyi.com/components/floatButton.html
58
58
  * @property {String} backgroundColor 背景颜色
59
59
  * @event {Function} click 点击触发事件
60
60
  * @example <up-float-button></up-float-button>
@@ -16,7 +16,7 @@
16
16
  /**
17
17
  * Form 表单
18
18
  * @description 此组件一般用于表单场景,可以配置Input输入框,Select弹出框,进行表单验证等。
19
- * @tutorial https://ijry.github.io/uview-plus/components/form.html
19
+ * @tutorial https://uview-plus.jiangruyi.com/components/form.html
20
20
  * @property {Object} model 当前form的需要验证字段的集合
21
21
  * @property {Object | Function | Array} rules 验证规则
22
22
  * @property {String} errorType 错误的提示方式,见上方说明 ( 默认 message )
@@ -28,7 +28,7 @@
28
28
  * @example <up-form labelPosition="left" :model="model1" :rules="rules" ref="form1"></up-form>
29
29
  */
30
30
  export default {
31
- name: "u-form",
31
+ name: "up-form",
32
32
  mixins: [mpMixin, mixin, props],
33
33
  provide() {
34
34
  return {
@@ -1,10 +1,10 @@
1
1
  <template>
2
- <view class="u-form-item" :class="{'u-form-item--error':(!!message && parentData.errorType === 'message')}">
2
+ <view class="u-form-item" :class="{'u-form-item--error':(!!message && parentData['errorType'] === 'message')}">
3
3
  <view
4
4
  class="u-form-item__body"
5
5
  @tap="clickHandler"
6
6
  :style="[addStyle(customStyle), {
7
- flexDirection: (labelPosition || parentData.labelPosition) === 'left' ? 'row' : 'column'
7
+ flexDirection: (labelPosition || parentData['labelPosition']) === 'left' ? 'row' : 'column'
8
8
  }]"
9
9
  >
10
10
  <!-- 微信小程序中,将一个参数设置空字符串,结果会变成字符串"true" -->
@@ -12,10 +12,10 @@
12
12
  <!-- {{required}} -->
13
13
  <view
14
14
  class="u-form-item__body__left"
15
- v-if="required || leftIcon || label"
15
+ v-if="required || leftIcon != '' || label != ''"
16
16
  :style="{
17
- width: addUnit(labelWidth || parentData.labelWidth),
18
- marginBottom: (labelPosition || parentData.labelPosition) === 'left' ? 0 : '5px',
17
+ width: addUnit(labelWidth || parentData['labelWidth']),
18
+ marginBottom: (labelPosition || parentData['labelPosition']) === 'left' ? 0 : '5px',
19
19
  }"
20
20
  >
21
21
  <!-- 为了块对齐 -->
@@ -37,7 +37,7 @@
37
37
  <text
38
38
  class="u-form-item__body__left__content__label"
39
39
  :style="[parentData.labelStyle, {
40
- justifyContent: parentData.labelAlign === 'left' ? 'flex-start' : parentData.labelAlign === 'center' ? 'center' : 'flex-end'
40
+ justifyContent: parentData['labelAlign'] === 'left' ? 'flex-start' : parentData['labelAlign'] === 'center' ? 'center' : 'flex-end'
41
41
  }]"
42
42
  >{{ label }}</text>
43
43
  </view>
@@ -50,7 +50,7 @@
50
50
  </view>
51
51
  <view
52
52
  class="item__body__right__content__icon"
53
- v-if="$slots.right"
53
+ v-if="$slots['right']"
54
54
  >
55
55
  <slot name="right" />
56
56
  </view>
@@ -59,17 +59,17 @@
59
59
  </view>
60
60
  <slot name="error">
61
61
  <text
62
- v-if="!!message && parentData.errorType === 'message'"
62
+ v-if="!!message && parentData['errorType'] === 'message'"
63
63
  class="u-form-item__body__right__message"
64
64
  :style="{
65
- marginLeft: addUnit((labelPosition || parentData.labelPosition) === 'top' ? 0 : (labelWidth || parentData.labelWidth))
65
+ marginLeft: addUnit((labelPosition || parentData['labelPosition']) === 'top' ? 0 : (labelWidth || parentData['labelWidth']))
66
66
  }"
67
67
  >{{ message }}</text>
68
68
  </slot>
69
69
  <u-line
70
70
  v-if="borderBottom"
71
- :color="message && parentData.errorType === 'border-bottom' ? color.error : propsLine.color"
72
- :customStyle="`margin-top: ${message && parentData.errorType === 'message' ? '5px' : 0}`"
71
+ :color="message && parentData['errorType'] === 'border-bottom' ? color['error'] : propsLine['color']"
72
+ :customStyle="`margin-top: ${message && parentData['errorType'] === 'message' ? '5px' : 0}`"
73
73
  ></u-line>
74
74
  </view>
75
75
  </template>
@@ -84,7 +84,7 @@
84
84
  /**
85
85
  * Form 表单
86
86
  * @description 此组件一般用于表单场景,可以配置Input输入框,Select弹出框,进行表单验证等。
87
- * @tutorial https://ijry.github.io/uview-plus/components/form.html
87
+ * @tutorial https://uview-plus.jiangruyi.com/components/form.html
88
88
  * @property {String} label input的label提示语
89
89
  * @property {String} prop 绑定的值
90
90
  * @property {Array} rules 绑定的规则
@@ -98,7 +98,7 @@
98
98
  * @example <u-form-item label="姓名" prop="userInfo.name" borderBottom ref="item1"></u-form-item>
99
99
  */
100
100
  export default {
101
- name: 'u-form-item',
101
+ name: 'up-form-item',
102
102
  mixins: [mpMixin, mixin, props],
103
103
  data() {
104
104
  return {
@@ -127,7 +127,9 @@
127
127
  }
128
128
  },
129
129
  mounted() {
130
- this.init()
130
+ this.$nextTick(() => {
131
+ this.init()
132
+ })
131
133
  },
132
134
  emits: ["click"],
133
135
  watch: {
@@ -146,7 +148,7 @@
146
148
  // 父组件的实例
147
149
  this.updateParentData()
148
150
  if (!this.parent) {
149
- error('u-form-item需要结合u-form组件使用')
151
+ error('u-form-item需要结合up-form组件使用')
150
152
  }
151
153
  },
152
154
  // 手动设置校验的规则,如果规则中有函数的话,微信小程序中会过滤掉,所以只能手动调用设置规则
@@ -161,7 +163,7 @@
161
163
  // 获取父组件的参数
162
164
  updateParentData() {
163
165
  // 此方法写在mixin中
164
- this.getParentData('u-form');
166
+ this.getParentData('up-form');
165
167
  },
166
168
  // 移除u-form-item的校验结果
167
169
  clearValidate() {
@@ -170,9 +172,9 @@
170
172
  // 清空当前的组件的校验结果,并重置为初始值
171
173
  resetField() {
172
174
  // 找到原始值
173
- const value = getProperty(this.parent.originalModel, this.prop)
174
- // 将u-form的model的prop属性链还原原始值
175
- setProperty(this.parent.model, this.prop, value)
175
+ const value = getProperty(this.parent.$data['originalModel'], this.prop)
176
+ // 将up-form的model的prop属性链还原原始值
177
+ setProperty(this.parent.$props['model'], this.prop, value)
176
178
  // 移除校验结果
177
179
  this.message = null
178
180
  },
@@ -10,7 +10,7 @@
10
10
  /**
11
11
  * gap 间隔槽
12
12
  * @description 该组件一般用于内容块之间的用一个灰色块隔开的场景,方便用户风格统一,减少工作量
13
- * @tutorial https://ijry.github.io/uview-plus/components/gap.html
13
+ * @tutorial https://uview-plus.jiangruyi.com/components/gap.html
14
14
  * @property {String} bgColor 背景颜色 (默认 'transparent' )
15
15
  * @property {String | Number} height 分割槽高度,单位px (默认 20 )
16
16
  * @property {String | Number} marginTop 与前一个组件的距离,单位px( 默认 0 )
@@ -48,7 +48,7 @@
48
48
  </view>
49
49
 
50
50
  <view class="up-goods-sku__content__count">
51
- <view class="up-goods-sku__content__count__title">{{ t('"up.goodsSku.buyAmount"') }}</view>
51
+ <view class="up-goods-sku__content__count__title">{{ t('up.goodsSku.buyAmount') }}</view>
52
52
  <view class="up-goods-sku__content__count__control">
53
53
  <up-number-box
54
54
  v-model="buyNum"
@@ -16,7 +16,7 @@
16
16
  /**
17
17
  * grid 宫格布局
18
18
  * @description 宫格组件一般用于同时展示多个同类项目的场景,可以给宫格的项目设置徽标组件(badge),或者图标等,也可以扩展为左右滑动的轮播形式。
19
- * @tutorial https://ijry.github.io/uview-plus/components/grid.html
19
+ * @tutorial https://uview-plus.jiangruyi.com/components/grid.html
20
20
  * @property {String | Number} col 宫格的列数(默认 3 )
21
21
  * @property {Boolean} border 是否显示宫格的边框(默认 false )
22
22
  * @property {String} align 宫格对齐方式,表现为数量少的时候,靠左,居中,还是靠右 (默认 'left' )
@@ -33,7 +33,7 @@
33
33
  /**
34
34
  * gridItem 提示
35
35
  * @description 宫格组件一般用于同时展示多个同类项目的场景,可以给宫格的项目设置徽标组件(badge),或者图标等,也可以扩展为左右滑动的轮播形式。搭配u-grid使用
36
- * @tutorial https://ijry.github.io/uview-plus/components/grid.html
36
+ * @tutorial https://uview-plus.jiangruyi.com/components/grid.html
37
37
  * @property {String | Number} name 宫格的name ( 默认 null )
38
38
  * @property {String} bgColor 宫格的背景颜色 (默认 'transparent' )
39
39
  * @property {Object} customStyle 自定义样式,对象形式
@@ -203,6 +203,7 @@ export default {
203
203
  'uicon-empty-list': '\ue68b',
204
204
  'uicon-empty-page': '\ue627',
205
205
  'uicon-empty-order': '\ue639',
206
+ 'uicon-empty-wifi': '\ue668',
206
207
  'uicon-man': '\ue697',
207
208
  'uicon-woman': '\ue69c',
208
209
  'uicon-man-add': '\ue61c',
@@ -211,4 +212,4 @@ export default {
211
212
  'uicon-man-delete-fill': '\ue66a',
212
213
  'uicon-zh': '\ue70a',
213
214
  'uicon-en': '\ue692'
214
- }
215
+ }
@@ -46,7 +46,7 @@
46
46
  /**
47
47
  * icon 图标
48
48
  * @description 基于字体的图标集,包含了大多数常见场景的图标。
49
- * @tutorial https://ijry.github.io/uview-plus/components/icon.html
49
+ * @tutorial https://uview-plus.jiangruyi.com/components/icon.html
50
50
  * @property {String} name 图标名称,见示例图标集
51
51
  * @property {String} color 图标颜色,可接受主题色 (默认 color['u-content-color'] )
52
52
  * @property {String | Number} size 图标字体大小,单位px (默认 '16px' )