uview-plus 3.1.48 → 3.1.49

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.
package/README.md CHANGED
@@ -7,14 +7,14 @@
7
7
  [![stars](https://img.shields.io/github/stars/ijry/uview-plus?style=flat-square&logo=GitHub)](https://github.com/ijry/uview-plus)
8
8
  [![forks](https://img.shields.io/github/forks/ijry/uview-plus?style=flat-square&logo=GitHub)](https://github.com/ijry/uview-plus)
9
9
  [![issues](https://img.shields.io/github/issues/ijry/uview-plus?style=flat-square&logo=GitHub)](https://github.com/ijry/uview-plus/issues)
10
- [![release](https://img.shields.io/github/v/release/ijry/uview-plus?style=flat-square)](https://gitee.com/uiadmin/uview-plus/releases)
10
+ [![release](https://img.shields.io/github/v/release/ijry/uview-plus?style=flat-square)](https://gitee.com/jry/uview-plus/releases)
11
11
  [![license](https://img.shields.io/github/license/ijry/uview-plus?style=flat-square)](https://en.wikipedia.org/wiki/MIT_License)
12
12
 
13
13
  ## 说明
14
14
 
15
15
  uview-plus,是uni-app全面兼容vue3/nvue的uni-app生态框架,全面的组件和便捷的工具会让您信手拈来,如鱼得水。uview-plus是基于uView2.x移植的支持vue3的版本,感谢uView。
16
16
 
17
- ## [官方文档:https://uiadmin.net/uview-plus](https://uiadmin.net/uview-plus)
17
+ ## [官方文档:https://uview-plus.jiangruyi.com](https://uview-plus.jiangruyi.com)
18
18
 
19
19
 
20
20
  ## 预览
@@ -22,18 +22,18 @@ uview-plus,是uni-app全面兼容vue3/nvue的uni-app生态框架,全面的
22
22
  您可以通过**微信**扫码,查看最佳的演示效果。
23
23
  <br>
24
24
  <br>
25
- <img src="https://uiadmin.net/uview-plus/common/h5_qrcode.png" width="220" height="220" >
25
+ <img src="https://uview-plus.jiangruyi.com/common/h5_qrcode.png" width="220" height="220" >
26
26
 
27
27
  ## 链接
28
28
 
29
- - [官方文档](https://uiadmin.net/uview-plus)
30
- - [更新日志](https://uiadmin.net/uview-plus/components/changelog.html)
31
- - [升级指南](https://uiadmin.net/uview-plus/components/changeGuide.html)
32
- - [关于我们](https://uiadmin.net/uview-plus/cooperation/about.html)
29
+ - [官方文档](https://uview-plus.jiangruyi.com)
30
+ - [更新日志](https://uview-plus.jiangruyi.com/components/changelog.html)
31
+ - [升级指南](https://uview-plus.jiangruyi.com/components/changeGuide.html)
32
+ - [关于我们](https://uview-plus.jiangruyi.com/cooperation/about.html)
33
33
 
34
34
  ## 交流反馈
35
35
 
36
- 欢迎加入我们的QQ群交流反馈:[点此跳转](https://uiadmin.net/uview-plus/components/addQQGroup.html)
36
+ 欢迎加入我们的QQ群交流反馈:[点此跳转](https://uview-plus.jiangruyi.com/components/addQQGroup.html)
37
37
 
38
38
  ## 关于PR
39
39
 
@@ -44,11 +44,11 @@ uview-plus,是uni-app全面兼容vue3/nvue的uni-app生态框架,全面的
44
44
 
45
45
  #### **uni-app插件市场链接** —— [https://ext.dcloud.net.cn/plugin?name=uview-plus](https://ext.dcloud.net.cn/plugin?name=uview-plus)
46
46
 
47
- 请通过[官网安装文档](https://uiadmin.net/uview-plus/components/install.html)了解更详细的内容
47
+ 请通过[官网安装文档](https://uview-plus.jiangruyi.com/components/install.html)了解更详细的内容
48
48
 
49
49
  ## 快速上手
50
50
 
51
- 请通过[快速上手](https://uiadmin.net/uview-plus/components/quickstart.html)了解更详细的内容
51
+ 请通过[快速上手](https://uview-plus.jiangruyi.com/components/quickstart.html)了解更详细的内容
52
52
 
53
53
  ## 使用方法
54
54
  配置easycom规则后,自动按需引入,无需`import`组件,直接引用即可。
package/changelog.md CHANGED
@@ -1,3 +1,7 @@
1
+ ## 3.1.49(2024-03-27)
2
+ 日期时间组件支持自带输入框
3
+ fix: popup弹窗滚动穿透问题
4
+ fix: 修复小程序numberbox bug
1
5
  ## 3.1.48(2024-03-18)
2
6
  fix:[plugin:uni:pre-css] Unbalanced delimiter found in string
3
7
  ## 3.1.47(2024-03-18)
@@ -33,7 +33,7 @@
33
33
  /**
34
34
  * backTop 返回顶部
35
35
  * @description 本组件一个用于长页面,滑动一定距离后,出现返回顶部按钮,方便快速返回顶部的场景。
36
- * @tutorial https://uiadmin.net/uview-plus/components/backTop.html
36
+ * @tutorial https://uview-plus.jiangruyi.com/components/backTop.html
37
37
  *
38
38
  * @property {String} mode 返回顶部的形状,circle-圆形,square-方形 (默认 'circle' )
39
39
  * @property {String} icon 自定义图标 (默认 'arrow-upward' ) 见官方文档示例
@@ -14,7 +14,7 @@
14
14
  /**
15
15
  * badge 徽标数
16
16
  * @description 该组件一般用于图标右上角显示未读的消息数量,提示用户点击,有圆点和圆包含文字两种形式。
17
- * @tutorial https://uiadmin.net/uview-plus/components/badge.html
17
+ * @tutorial https://uview-plus.jiangruyi.com/components/badge.html
18
18
  *
19
19
  * @property {Boolean} isDot 是否显示圆点 (默认 false )
20
20
  * @property {String | Number} value 显示的内容
@@ -74,7 +74,7 @@
74
74
  /**
75
75
  * keyboard 键盘组件
76
76
  * @description 此为uView自定义的键盘面板,内含了数字键盘,车牌号键,身份证号键盘3种模式,都有可以打乱按键顺序的选项。
77
- * @tutorial https://uiadmin.net/uview-plus/components/keyboard.html
77
+ * @tutorial https://uview-plus.jiangruyi.com/components/keyboard.html
78
78
  * @property {Boolean} random 是否打乱键盘的顺序
79
79
  * @event {Function} change 点击键盘触发
80
80
  * @event {Function} backspace 点击退格键触发
@@ -51,7 +51,7 @@
51
51
  /**
52
52
  * cell 单元格
53
53
  * @description cell单元格一般用于一组列表的情况,比如个人中心页,设置页等。
54
- * @tutorial https://uiadmin.net/uview-plus/components/cell.html
54
+ * @tutorial https://uview-plus.jiangruyi.com/components/cell.html
55
55
  * @property {String | Number} title 标题
56
56
  * @property {String | Number} label 标题下方的描述信息
57
57
  * @property {String | Number} value 右侧的内容
@@ -19,7 +19,7 @@
19
19
  /**
20
20
  * cellGroup 单元格
21
21
  * @description cell单元格一般用于一组列表的情况,比如个人中心页,设置页等。
22
- * @tutorial https://uiadmin.net/uview-plus/components/cell.html
22
+ * @tutorial https://uview-plus.jiangruyi.com/components/cell.html
23
23
  *
24
24
  * @property {String} title 分组标题
25
25
  * @property {Boolean} border 是否显示外边框 (默认 true )
@@ -38,7 +38,7 @@
38
38
  /**
39
39
  * checkbox 复选框
40
40
  * @description 复选框组件一般用于需要多个选择的场景,该组件功能完整,使用方便
41
- * @tutorial https://uiadmin.net/uview-plus/components/checkbox.html
41
+ * @tutorial https://uview-plus.jiangruyi.com/components/checkbox.html
42
42
  * @property {String | Number | Boolean} name checkbox组件的标示符
43
43
  * @property {String} shape 形状,square为方形,circle为圆型
44
44
  * @property {String | Number} size 整体的大小
@@ -18,7 +18,7 @@
18
18
  /**
19
19
  * u-count-down 倒计时
20
20
  * @description 该组件一般使用于某个活动的截止时间上,通过数字的变化,给用户明确的时间感受,提示用户进行某一个行为操作。
21
- * @tutorial https://uiadmin.net/uview-plus/components/countDown.html
21
+ * @tutorial https://uview-plus.jiangruyi.com/components/countDown.html
22
22
  * @property {String | Number} time 倒计时时长,单位ms (默认 0 )
23
23
  * @property {String} format 时间格式,DD-日,HH-时,mm-分,ss-秒,SSS-毫秒 (默认 'HH:mm:ss' )
24
24
  * @property {Boolean} autoStart 是否自动开始倒计时 (默认 true )
@@ -1,5 +1,18 @@
1
1
  export default {
2
2
  props: {
3
+ // 是否显示input
4
+ hasInput: {
5
+ type: Boolean,
6
+ default: () => false
7
+ },
8
+ placeholder: {
9
+ type: String,
10
+ default: () => '请选择'
11
+ },
12
+ format: {
13
+ type: String,
14
+ default: () => 'YYYY-MM-DD HH:mm'
15
+ },
3
16
  // 是否打开组件
4
17
  show: {
5
18
  type: Boolean,
@@ -1,7 +1,15 @@
1
1
  <template>
2
+ <view v-if="hasInput">
3
+ <u-input
4
+ :placeholder="placeholder"
5
+ border="surround"
6
+ v-model="inputValue"
7
+ @click="showByClickInput = !showByClickInput"
8
+ ></u-input>
9
+ </view>
2
10
  <u-picker
3
11
  ref="picker"
4
- :show="show"
12
+ :show="show || (hasInput && showByClickInput)"
5
13
  :popupMode="popupMode"
6
14
  :closeOnClickOverlay="closeOnClickOverlay"
7
15
  :columns="columns"
@@ -43,7 +51,7 @@
43
51
  * @tutorial https://ijry.github.io/uview-plus/components/datetimePicker.html
44
52
  * @property {Boolean} show 用于控制选择器的弹出与收起 ( 默认 false )
45
53
  * @property {Boolean} showToolbar 是否显示顶部的操作栏 ( 默认 true )
46
- * @property {String | Number} value 绑定值
54
+ * @property {String | Number} modelValue 绑定值
47
55
  * @property {String} title 顶部标题
48
56
  * @property {String} mode 展示格式 mode=date为日期选择,mode=time为时间选择,mode=year-month为年月选择,mode=datetime为日期时间选择 ( 默认 ‘datetime )
49
57
  * @property {Number} maxDate 可选的最大时间 默认值为后10年
@@ -74,6 +82,9 @@
74
82
  mixins: [mpMixin, mixin, props],
75
83
  data() {
76
84
  return {
85
+ // 原来的日期选择器不方便,这里增加一个hasInput选项支持类似element的自带输入框的功能。
86
+ inputValue: '', // 表单显示值
87
+ showByClickInput: false, // 是否在hasInput模式下显示日期选择弹唱
77
88
  columns: [],
78
89
  innerDefaultIndex: [],
79
90
  innerFormatter: (type, value) => value
@@ -88,6 +99,7 @@
88
99
  // #ifdef VUE3
89
100
  modelValue(newValue) {
90
101
  this.init()
102
+ this.inputValue = dayjs(newValue).format(this.format || 'YYYY-MM-DD HH:mm')
91
103
  },
92
104
  // #endif
93
105
  // #ifdef VUE2
@@ -133,6 +145,9 @@
133
145
  },
134
146
  // 点击工具栏的取消按钮
135
147
  cancel() {
148
+ if (this.hasInput) {
149
+ this.showByClickInput = false
150
+ }
136
151
  this.$emit('cancel')
137
152
  },
138
153
  // 点击工具栏的确定按钮
@@ -141,12 +156,16 @@
141
156
  value: this.innerValue,
142
157
  mode: this.mode
143
158
  })
159
+ this.inputValue = dayjs(this.innerValue).format(this.format || 'YYYY-MM-DD HH:mm')
144
160
  // #ifdef VUE3
145
161
  this.$emit('update:modelValue', this.innerValue)
146
162
  // #endif
147
163
  // #ifdef VUE2
148
164
  this.$emit('input', this.innerValue)
149
165
  // #endif
166
+ if (this.hasInput) {
167
+ this.showByClickInput = false
168
+ }
150
169
  },
151
170
  //用正则截取输出值,当出现多组数字时,抛出错误
152
171
  intercept(e,type){
@@ -214,7 +233,7 @@
214
233
  setTimeout(() => {
215
234
  this.updateIndexs(value)
216
235
  }, 0);
217
-
236
+
218
237
  },
219
238
  // 更新索引
220
239
  updateIndexs(value) {
@@ -70,7 +70,7 @@
70
70
  /**
71
71
  * Image 图片
72
72
  * @description 此组件为uni-app的image组件的加强版,在继承了原有功能外,还支持淡入动画、加载中、加载失败提示、圆角值和形状等。
73
- * @tutorial https://uiadmin.net/uview-plus/components/image.html
73
+ * @tutorial https://uview-plus.jiangruyi.com/components/image.html
74
74
  * @property {String} src 图片地址
75
75
  * @property {String} mode 裁剪模式,见官网说明 (默认 'aspectFill' )
76
76
  * @property {String | Number} width 宽度,单位任意,如果为数值,则为px单位 (默认 '300' )
@@ -33,7 +33,7 @@
33
33
  /**
34
34
  * IndexAnchor 列表锚点
35
35
  * @description
36
- * @tutorial https://uiadmin.net/uview-plus/components/indexList.html
36
+ * @tutorial https://uview-plus.jiangruyi.com/components/indexList.html
37
37
  * @property {String | Number} text 列表锚点文本内容
38
38
  * @property {String} color 列表锚点文字颜色 ( 默认 '#606266' )
39
39
  * @property {String | Number} size 列表锚点文字大小,单位默认px ( 默认 14 )
@@ -25,7 +25,7 @@
25
25
  /**
26
26
  * IndexItem
27
27
  * @description
28
- * @tutorial https://uiadmin.net/uview-plus/components/indexList.html
28
+ * @tutorial https://uview-plus.jiangruyi.com/components/indexList.html
29
29
  * @property {String}
30
30
  * @event {Function}
31
31
  * @example
@@ -110,7 +110,7 @@
110
110
  /**
111
111
  * IndexList 索引列表
112
112
  * @description 通过折叠面板收纳内容区域
113
- * @tutorial https://uiadmin.net/uview-plus/components/indexList.html
113
+ * @tutorial https://uview-plus.jiangruyi.com/components/indexList.html
114
114
  * @property {String} inactiveColor 右边锚点非激活的颜色 ( 默认 '#606266' )
115
115
  * @property {String} activeColor 右边锚点激活的颜色 ( 默认 '#5677fc' )
116
116
  * @property {Array} indexList 索引字符列表,数组形式
@@ -82,7 +82,7 @@ import mixin from '../../libs/mixin/mixin.js';
82
82
  /**
83
83
  * Input 输入框
84
84
  * @description 此组件为一个输入框,默认没有边框和样式,是专门为配合表单组件u-form而设计的,利用它可以快速实现表单验证,输入内容,下拉选择等功能。
85
- * @tutorial https://uiadmin.net/uview-plus/components/input.html
85
+ * @tutorial https://uview-plus.jiangruyi.com/components/input.html
86
86
  * @property {String | Number} value 输入的值
87
87
  * @property {String} type 输入框类型,见上方说明 ( 默认 'text' )
88
88
  * @property {Boolean} fixed 如果 textarea 是在一个 position:fixed 的区域,需要显示指定属性 fixed 为 true,兼容性:微信小程序、百度小程序、字节跳动小程序、QQ小程序 ( 默认 false )
@@ -148,10 +148,13 @@ export default {
148
148
  // 在H5中,外部value变化后,修改input中的值,不会触发@input事件,此时手动调用值变化方法
149
149
  if (
150
150
  this.firstChange === false &&
151
- this.changeFromInner === false
151
+ this.changeFromInner === false
152
152
  ) {
153
153
  this.valueChange();
154
- } else {
154
+ } else {
155
+ // 尝试调用u-form的验证方法
156
+ uni.$u.formValidate(this, "change");
157
+ }
155
158
  /* #endif */
156
159
  this.firstChange = false;
157
160
  // 重置changeFromInner的值为false,标识下一次引起默认为外部引起的
@@ -171,7 +174,10 @@ export default {
171
174
  this.changeFromInner === false
172
175
  ) {
173
176
  this.valueChange();
174
- } else {
177
+ } else {
178
+ // 尝试调用u-form的验证方法
179
+ uni.$u.formValidate(this, "change");
180
+ }
175
181
  /* #endif */
176
182
  this.firstChange = false;
177
183
  // 重置changeFromInner的值为false,标识下一次引起默认为外部引起的
@@ -30,6 +30,21 @@
30
30
  </view>
31
31
 
32
32
  <slot name="input">
33
+ <!-- #ifdef MP-WEIXIN -->
34
+ <input
35
+ :disabled="disabledInput || disabled"
36
+ :cursor-spacing="getCursorSpacing"
37
+ :class="{ 'u-number-box__input--disabled': disabled || disabledInput }"
38
+ :value="currentValue"
39
+ class="u-number-box__input"
40
+ @blur="onBlur"
41
+ @focus="onFocus"
42
+ @input="onInput"
43
+ type="number"
44
+ :style="[inputStyle]"
45
+ />
46
+ <!-- #endif -->
47
+ <!-- #ifndef MP-WEIXIN -->
33
48
  <input
34
49
  :disabled="disabledInput || disabled"
35
50
  :cursor-spacing="getCursorSpacing"
@@ -42,6 +57,7 @@
42
57
  type="number"
43
58
  :style="[inputStyle]"
44
59
  />
60
+ <!-- #endif -->
45
61
  </slot>
46
62
  <view
47
63
  class="u-number-box__slot"
@@ -81,7 +97,7 @@
81
97
  /**
82
98
  * numberBox 步进器
83
99
  * @description 该组件一般用于商城购物选择物品数量的场景。
84
- * @tutorial https://uiadmin.net/uview-plus/components/numberBox.html
100
+ * @tutorial https://uview-plus.jiangruyi.com/components/numberBox.html
85
101
  * @property {String | Number} name 步进器标识符,在change回调返回
86
102
  * @property {String | Number} value 用于双向绑定的值,初始化时设置设为默认min值(最小值) (默认 0 )
87
103
  * @property {String | Number} min 最小值 (默认 1 )
@@ -295,6 +311,10 @@
295
311
  }
296
312
  formatted = this.format(formatted)
297
313
  this.emitChange(formatted);
314
+ // #ifdef MP-WEIXIN
315
+ return formatted
316
+ // #endif
317
+
298
318
  },
299
319
  // 发出change事件
300
320
  emitChange(value) {
@@ -14,7 +14,7 @@
14
14
  /**
15
15
  * StatbusBar 状态栏占位
16
16
  * @description 本组件主要用于状态填充,比如在自定导航栏的时候,它会自动适配一个恰当的状态栏高度。
17
- * @tutorial https://uiadmin.net/uview-plus/components/statusBar.html
17
+ * @tutorial https://uview-plus.jiangruyi.com/components/statusBar.html
18
18
  * @property {String} bgColor 背景色 (默认 'transparent' )
19
19
  * @property {String | Object} customStyle 自定义样式
20
20
  * @example <u-status-bar></u-status-bar>
@@ -14,7 +14,7 @@
14
14
  /**
15
15
  * Steps 步骤条
16
16
  * @description 该组件一般用于完成一个任务要分几个步骤,标识目前处于第几步的场景。
17
- * @tutorial https://uiadmin.net/uview-plus/components/steps.html
17
+ * @tutorial https://uview-plus.jiangruyi.com/components/steps.html
18
18
  * @property {String} direction row-横向,column-竖向 (默认 'row' )
19
19
  * @property {String | Number} current 设置当前处于第几步 (默认 0 )
20
20
  * @property {String} activeColor 激活状态颜色 (默认 '#3c9cff' )
@@ -56,7 +56,7 @@
56
56
  /**
57
57
  * StepsItem 步骤条的子组件
58
58
  * @description 本组件需要和u-steps配合使用
59
- * @tutorial https://uiadmin.net/uview-plus/components/steps.html
59
+ * @tutorial https://uview-plus.jiangruyi.com/components/steps.html
60
60
  * @property {String} title 标题文字
61
61
  * @property {String} current 描述文本
62
62
  * @property {String | Number} iconSize 图标大小 (默认 17 )
@@ -6,7 +6,7 @@
6
6
  @tap="clickHandler"
7
7
  :class="classes"
8
8
  :style="[mergeStyle]"
9
- @touchmove="noop"
9
+ @touchmove.stop.prevent="noop"
10
10
  >
11
11
  <slot />
12
12
  </view>
@@ -136,7 +136,7 @@
136
136
  /**
137
137
  * upload 上传
138
138
  * @description 该组件用于上传图片场景
139
- * @tutorial https://uiadmin.net/uview-plus/components/upload.html
139
+ * @tutorial https://uview-plus.jiangruyi.com/components/upload.html
140
140
  * @property {String} accept 接受的文件类型, 可选值为all media image file video (默认 'image' )
141
141
  * @property {String | Array} capture 图片或视频拾取模式,当accept为image类型时设置capture可选额外camera可以直接调起摄像头(默认 ['album', 'camera'] )
142
142
  * @property {Boolean} compressed 当accept为video时生效,是否压缩视频,默认为true(默认 true )
package/index.js CHANGED
@@ -43,7 +43,7 @@ const $u = {
43
43
  test,
44
44
  type: ['primary', 'success', 'error', 'warning', 'info'],
45
45
  http: new Request(),
46
- config, // uView配置信息相关,比如版本号
46
+ config, // uview-plus配置信息相关,比如版本号
47
47
  zIndex,
48
48
  debounce,
49
49
  throttle,
@@ -68,10 +68,6 @@ const install = (Vue) => {
68
68
  // #ifndef APP-NVUE
69
69
  // 只有vue,挂载到Vue.prototype才有意义,因为nvue中全局Vue.prototype和Vue.mixin是无效的
70
70
  Vue.config.globalProperties.$u = $u
71
- // 暂时兼容vue2的$nextTick写法
72
- Vue.config.globalProperties.$nextTick = (cb) => {
73
- cb();
74
- }
75
71
  Vue.mixin(mixin)
76
72
  // #endif
77
73
  }
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "id": "uview-plus",
3
3
  "name": "uview-plus",
4
4
  "displayName": "uview-plus3.0重磅发布,全面的Vue3移动组件库。",
5
- "version": "3.1.48",
5
+ "version": "3.1.49",
6
6
  "description": "uview-plus已兼容vue3,全面的组件和便捷的工具会让您信手拈来,如鱼得水",
7
7
  "keywords": [
8
8
  "uview",