uview-plus 3.1.37 → 3.1.38

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/changelog.md CHANGED
@@ -1,3 +1,5 @@
1
+ ## 3.1.38(2023-10-08)
2
+ 修复u-slider
1
3
  ## 3.1.37(2023-09-13)
2
4
  完善emits定义及修复code-input双向数据绑定
3
5
  ## 3.1.36(2023-08-08)
@@ -44,6 +44,7 @@ export default {
44
44
  type: [String, Number],
45
45
  default: defprops.codeInput.value
46
46
  },
47
+ // #endif
47
48
  // 是否自动获取焦点
48
49
  focus: {
49
50
  type: Boolean,
@@ -82,7 +82,12 @@
82
82
  }
83
83
  },
84
84
  watch: {
85
+ // #ifdef VUE2
85
86
  value: {
87
+ // #endif
88
+ // #ifdef VUE3
89
+ modelValue: {
90
+ // #endif
86
91
  immediate: true,
87
92
  handler(val) {
88
93
  // 转为字符串,超出部分截掉
@@ -29,6 +29,7 @@ export default {
29
29
  type: [String, Number],
30
30
  default: defprops.slider.value
31
31
  },
32
+ // #endif
32
33
  // 滑块右侧已选择部分的背景色
33
34
  activeColor: {
34
35
  type: String,
@@ -170,9 +170,9 @@ function addStyle(customStyle, target = 'object') {
170
170
  * @param {string|number} value 需要添加单位的值
171
171
  * @param {string} unit 添加的单位名 比如px
172
172
  */
173
- function addUnit(value = 'auto', unit = '') {
174
- if (!unit) {
175
- unit = uni.$u.config.unit || 'px'
173
+ function addUnit(value = 'auto', unit = '') {
174
+ if (!unit) {
175
+ unit = uni.$u.config.unit || 'px'
176
176
  }
177
177
  value = String(value)
178
178
  // 用uView内置验证规则中的number判断是否为数值
@@ -212,7 +212,9 @@ function deepMerge(target = {}, source = {}) {
212
212
  for (const prop in source) {
213
213
  if (!source.hasOwnProperty(prop)) continue
214
214
  if (prop in target) {
215
- if (typeof target[prop] !== 'object') {
215
+ if (source[prop] == null) {
216
+ target[prop] = source[prop]
217
+ }else if (typeof target[prop] !== 'object') {
216
218
  target[prop] = source[prop]
217
219
  } else if (typeof source[prop] !== 'object') {
218
220
  target[prop] = source[prop]
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.37",
5
+ "version": "3.1.38",
6
6
  "description": "uview-plus已兼容vue3,全面的组件和便捷的工具会让您信手拈来,如鱼得水",
7
7
  "keywords": [
8
8
  "uview",