uview-plus 3.3.18 → 3.3.20

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 (96) hide show
  1. package/changelog.md +7 -0
  2. package/{libs/config/props → components/u-icon}/icon.js +1 -1
  3. package/{libs/config/props → components/u-link}/link.js +1 -1
  4. package/{libs/config/props → components/u-loading-icon}/loadingIcon.js +1 -1
  5. package/{libs/config/props → components/u-navbar}/navbar.js +1 -1
  6. package/components/u-tabs/u-tabs.vue +0 -1
  7. package/components/u-transition/transition.js +18 -163
  8. package/components/u-transition/transitionMixin.js +163 -0
  9. package/components/u-transition/u-transition.vue +2 -2
  10. package/libs/config/props.js +88 -88
  11. package/libs/function/index.js +1 -1
  12. package/package.json +1 -1
  13. package/libs/config/props/transition.js +0 -18
  14. /package/{libs/config/props → components/u-action-sheet}/actionSheet.js +0 -0
  15. /package/{libs/config/props → components/u-album}/album.js +0 -0
  16. /package/{libs/config/props → components/u-alert}/alert.js +0 -0
  17. /package/{libs/config/props → components/u-avatar}/avatar.js +0 -0
  18. /package/{libs/config/props → components/u-avatar-group}/avatarGroup.js +0 -0
  19. /package/{libs/config/props → components/u-back-top}/backtop.js +0 -0
  20. /package/{libs/config/props → components/u-badge}/badge.js +0 -0
  21. /package/{libs/config/props → components/u-button}/button.js +0 -0
  22. /package/{libs/config/props → components/u-calendar}/calendar.js +0 -0
  23. /package/{libs/config/props → components/u-car-keyboard}/carKeyboard.js +0 -0
  24. /package/{libs/config/props → components/u-cell}/cell.js +0 -0
  25. /package/{libs/config/props → components/u-cell-group}/cellGroup.js +0 -0
  26. /package/{libs/config/props → components/u-checkbox}/checkbox.js +0 -0
  27. /package/{libs/config/props → components/u-checkbox-group}/checkboxGroup.js +0 -0
  28. /package/{libs/config/props → components/u-circle-progress}/circleProgress.js +0 -0
  29. /package/{libs/config/props → components/u-code}/code.js +0 -0
  30. /package/{libs/config/props → components/u-code-input}/codeInput.js +0 -0
  31. /package/{libs/config/props → components/u-col}/col.js +0 -0
  32. /package/{libs/config/props → components/u-collapse}/collapse.js +0 -0
  33. /package/{libs/config/props → components/u-collapse-item}/collapseItem.js +0 -0
  34. /package/{libs/config/props → components/u-column-notice}/columnNotice.js +0 -0
  35. /package/{libs/config/props → components/u-count-down}/countDown.js +0 -0
  36. /package/{libs/config/props → components/u-count-to}/countTo.js +0 -0
  37. /package/{libs/config/props → components/u-datetime-picker}/datetimePicker.js +0 -0
  38. /package/{libs/config/props → components/u-divider}/divider.js +0 -0
  39. /package/{libs/config/props → components/u-empty}/empty.js +0 -0
  40. /package/{libs/config/props → components/u-form}/form.js +0 -0
  41. /package/{libs/config/props → components/u-form-item}/formItem.js +0 -0
  42. /package/{libs/config/props → components/u-gap}/gap.js +0 -0
  43. /package/{libs/config/props → components/u-grid}/grid.js +0 -0
  44. /package/{libs/config/props → components/u-grid-item}/gridItem.js +0 -0
  45. /package/{libs/config/props → components/u-image}/image.js +0 -0
  46. /package/{libs/config/props → components/u-index-anchor}/indexAnchor.js +0 -0
  47. /package/{libs/config/props → components/u-index-list}/indexList.js +0 -0
  48. /package/{libs/config/props → components/u-input}/input.js +0 -0
  49. /package/{libs/config/props → components/u-keyboard}/keyboard.js +0 -0
  50. /package/{libs/config/props → components/u-line}/line.js +0 -0
  51. /package/{libs/config/props → components/u-line-progress}/lineProgress.js +0 -0
  52. /package/{libs/config/props → components/u-list}/list.js +0 -0
  53. /package/{libs/config/props → components/u-list-item}/listItem.js +0 -0
  54. /package/{libs/config/props → components/u-loading-page}/loadingPage.js +0 -0
  55. /package/{libs/config/props → components/u-loadmore}/loadmore.js +0 -0
  56. /package/{libs/config/props → components/u-modal}/modal.js +0 -0
  57. /package/{libs/config/props → components/u-no-network}/noNetwork.js +0 -0
  58. /package/{libs/config/props → components/u-notice-bar}/noticeBar.js +0 -0
  59. /package/{libs/config/props → components/u-notify}/notify.js +0 -0
  60. /package/{libs/config/props → components/u-number-box}/numberBox.js +0 -0
  61. /package/{libs/config/props → components/u-number-keyboard}/numberKeyboard.js +0 -0
  62. /package/{libs/config/props → components/u-overlay}/overlay.js +0 -0
  63. /package/{libs/config/props → components/u-parse}/parse.js +0 -0
  64. /package/{libs/config/props → components/u-picker}/picker.js +0 -0
  65. /package/{libs/config/props → components/u-popup}/popup.js +0 -0
  66. /package/{libs/config/props → components/u-radio}/radio.js +0 -0
  67. /package/{libs/config/props → components/u-radio-group}/radioGroup.js +0 -0
  68. /package/{libs/config/props → components/u-rate}/rate.js +0 -0
  69. /package/{libs/config/props → components/u-read-more}/readMore.js +0 -0
  70. /package/{libs/config/props → components/u-row}/row.js +0 -0
  71. /package/{libs/config/props → components/u-row-notice}/rowNotice.js +0 -0
  72. /package/{libs/config/props → components/u-scroll-list}/scrollList.js +0 -0
  73. /package/{libs/config/props → components/u-search}/search.js +0 -0
  74. /package/{libs/config/props → components/u-section}/section.js +0 -0
  75. /package/{libs/config/props → components/u-skeleton}/skeleton.js +0 -0
  76. /package/{libs/config/props → components/u-slider}/slider.js +0 -0
  77. /package/{libs/config/props → components/u-status-bar}/statusBar.js +0 -0
  78. /package/{libs/config/props → components/u-steps}/steps.js +0 -0
  79. /package/{libs/config/props → components/u-steps-item}/stepsItem.js +0 -0
  80. /package/{libs/config/props → components/u-sticky}/sticky.js +0 -0
  81. /package/{libs/config/props → components/u-subsection}/subsection.js +0 -0
  82. /package/{libs/config/props → components/u-swipe-action}/swipeAction.js +0 -0
  83. /package/{libs/config/props → components/u-swipe-action-item}/swipeActionItem.js +0 -0
  84. /package/{libs/config/props → components/u-swiper}/swiper.js +0 -0
  85. /package/{libs/config/props → components/u-swiper-indicator}/swipterIndicator.js +0 -0
  86. /package/{libs/config/props → components/u-switch}/switch.js +0 -0
  87. /package/{libs/config/props → components/u-tabbar}/tabbar.js +0 -0
  88. /package/{libs/config/props → components/u-tabbar-item}/tabbarItem.js +0 -0
  89. /package/{libs/config/props → components/u-tabs}/tabs.js +0 -0
  90. /package/{libs/config/props → components/u-tag}/tag.js +0 -0
  91. /package/{libs/config/props → components/u-text}/text.js +0 -0
  92. /package/{libs/config/props → components/u-textarea}/textarea.js +0 -0
  93. /package/{libs/config/props → components/u-toast}/toast.js +0 -0
  94. /package/{libs/config/props → components/u-toolbar}/toolbar.js +0 -0
  95. /package/{libs/config/props → components/u-tooltip}/tooltip.js +0 -0
  96. /package/{libs/config/props → components/u-upload}/upload.js +0 -0
package/changelog.md CHANGED
@@ -1,3 +1,10 @@
1
+ ## 3.3.20(2024-08-15)
2
+ refactor: props默认值文件移至组件文件夹内便于查找
3
+ ## 3.3.19(2024-08-14)
4
+ fix: 修复2被rpx兼容处理只在数字值生效
5
+
6
+ add: 增加swiper自定义插槽示例
7
+
1
8
  ## 3.3.18(2024-08-13)
2
9
  feat: 新增支持datetime-picker工具栏插槽及picker插槽支持修复
3
10
  ## 3.3.17(2024-08-12)
@@ -7,7 +7,7 @@
7
7
  * @lastTime : 2021-08-20 18:00:14
8
8
  * @FilePath : /u-view2.0/uview-ui/libs/config/props/icon.js
9
9
  */
10
- import config from '../config'
10
+ import config from '../../libs/config/config'
11
11
 
12
12
  const {
13
13
  color
@@ -7,7 +7,7 @@
7
7
  * @lastTime : 2021-08-20 17:45:36
8
8
  * @FilePath : /u-view2.0/uview-ui/libs/config/props/link.js
9
9
  */
10
- import config from '../config'
10
+ import config from '../../libs/config/config'
11
11
 
12
12
  const {
13
13
  color
@@ -7,7 +7,7 @@
7
7
  * @lastTime : 2021-08-20 17:45:47
8
8
  * @FilePath : /u-view2.0/uview-ui/libs/config/props/loadingIcon.js
9
9
  */
10
- import config from '../config'
10
+ import config from '../../libs/config/config'
11
11
 
12
12
  const {
13
13
  color
@@ -7,7 +7,7 @@
7
7
  * @lastTime : 2021-08-20 17:16:18
8
8
  * @FilePath : /u-view2.0/uview-ui/libs/config/props/navbar.js
9
9
  */
10
- import color from '../color'
10
+ import color from '../../libs/config/color'
11
11
  export default {
12
12
  // navbar 组件
13
13
  navbar: {
@@ -178,7 +178,6 @@
178
178
  // 获取下划线的数值px表示法
179
179
  const lineWidth = getPx(this.lineWidth);
180
180
  this.lineOffsetLeft = lineOffsetLeft + (tabItem.rect.width - lineWidth) / 2
181
- console.log(lineOffsetLeft)
182
181
  // #ifdef APP-NVUE
183
182
  // 第一次移动滑块,无需过渡时间
184
183
  this.animation(this.lineOffsetLeft, this.firstTime ? 0 : parseInt(this.duration))
@@ -1,163 +1,18 @@
1
- // 定义一个一定时间后自动成功的promise,让调用nextTick方法处,进入下一个then方法
2
- const waitTick = () => new Promise(resolve => setTimeout(resolve, 1000 / 50))
3
- // nvue动画模块实现细节抽离在外部文件
4
- // #ifdef APP-NVUE
5
- import animationMap from './nvue-ani-map.js'
6
- // #endif
7
-
8
- // #ifndef APP-NVUE
9
- // 定义类名,通过给元素动态切换类名,赋予元素一定的css动画样式
10
- const getClassNames = (name) => ({
11
- enter: `u-${name}-enter u-${name}-enter-active`,
12
- 'enter-to': `u-${name}-enter-to u-${name}-enter-active`,
13
- leave: `u-${name}-leave u-${name}-leave-active`,
14
- 'leave-to': `u-${name}-leave-to u-${name}-leave-active`
15
- })
16
- // #endif
17
-
18
- // #ifdef APP-NVUE
19
- // 引入nvue(weex)的animation动画模块,文档见:
20
- // https://weex.apache.org/zh/docs/modules/animation.html#transition
21
- const animation = uni.requireNativePlugin('animation')
22
- const getStyle = (name) => animationMap[name]
23
- // #endif
24
-
25
- import { nextTick } from 'vue'
26
- import { sleep } from '../../libs/function/index';
27
- export default {
28
- methods: {
29
- // 组件被点击发出事件
30
- clickHandler() {
31
- this.$emit('click')
32
- },
33
- // #ifndef APP-NVUE
34
- // vue版本的组件进场处理
35
- async vueEnter() {
36
- // 动画进入时的类名
37
- const classNames = getClassNames(this.mode)
38
- // 定义状态和发出动画进入前事件
39
- this.status = 'enter'
40
- this.$emit('beforeEnter')
41
- this.inited = true
42
- this.display = true
43
- this.classes = classNames.enter
44
- await nextTick();
45
- {
46
- // https://github.com/umicro/uView2.0/issues/545
47
- await sleep(20)
48
- // 标识动画尚未结束
49
- this.$emit('enter')
50
- this.transitionEnded = false
51
- // 组件动画进入后触发的事件
52
- this.$emit('afterEnter')
53
- // 赋予组件enter-to类名
54
- this.classes = classNames['enter-to']
55
- }
56
- },
57
- // 动画离场处理
58
- async vueLeave() {
59
- // 如果不是展示状态,无需执行逻辑
60
- if (!this.display) return
61
- const classNames = getClassNames(this.mode)
62
- // 标记离开状态和发出事件
63
- this.status = 'leave'
64
- this.$emit('beforeLeave')
65
- // 获得类名
66
- this.classes = classNames.leave
67
-
68
- await nextTick();
69
- {
70
- // 动画正在离场的状态
71
- this.transitionEnded = false
72
- this.$emit('leave')
73
- // 组件执行动画,到了执行的执行时间后,执行一些额外处理
74
- setTimeout(this.onTransitionEnd, this.duration)
75
- this.classes = classNames['leave-to']
76
- }
77
- },
78
- // #endif
79
- // #ifdef APP-NVUE
80
- // nvue版本动画进场
81
- async nvueEnter() {
82
- // 获得样式的名称
83
- const currentStyle = getStyle(this.mode)
84
- // 组件动画状态和发出事件
85
- this.status = 'enter'
86
- this.$emit('beforeEnter')
87
- // 展示生成组件元素
88
- this.inited = true
89
- this.display = true
90
- // 在nvue安卓上,由于渲染速度慢,在弹窗,键盘,日历等组件中,渲染其中的内容需要时间
91
- // 导致出现弹窗卡顿,这里让其一开始为透明状态,等一定时间渲染完成后,再让其隐藏起来,再让其按正常逻辑出现
92
- this.viewStyle = {
93
- opacity: 0
94
- }
95
- // 等待弹窗内容渲染完成
96
- await nextTick();
97
- {
98
- // 合并样式
99
- this.viewStyle = currentStyle.enter
100
- Promise.resolve()
101
- .then(waitTick)
102
- .then(() => {
103
- // 组件开始进入前的事件
104
- this.$emit('enter')
105
- // nvue的transition动画模块需要通过ref调用组件,注意此处的ref不同于vue的this.$refs['u-transition']用法
106
- animation.transition(this.$refs['u-transition'].ref, {
107
- styles: currentStyle['enter-to'],
108
- duration: this.duration,
109
- timingFunction: this.timingFunction,
110
- needLayout: false,
111
- delay: 0
112
- }, () => {
113
- // 动画执行完毕,发出事件
114
- this.$emit('afterEnter')
115
- })
116
- })
117
- .catch(() => {})
118
- }
119
- },
120
- nvueLeave() {
121
- if (!this.display) {
122
- return
123
- }
124
- const currentStyle = getStyle(this.mode)
125
- // 定义状态和事件
126
- this.status = 'leave'
127
- this.$emit('beforeLeave')
128
- // 合并样式
129
- this.viewStyle = currentStyle.leave
130
- // 放到promise中处理执行过程
131
- Promise.resolve()
132
- .then(waitTick) // 等待几十ms
133
- .then(() => {
134
- this.transitionEnded = false
135
- // 动画正在离场的状态
136
- this.$emit('leave')
137
- animation.transition(this.$refs['u-transition'].ref, {
138
- styles: currentStyle['leave-to'],
139
- duration: this.duration,
140
- timingFunction: this.timingFunction,
141
- needLayout: false,
142
- delay: 0
143
- }, () => {
144
- this.onTransitionEnd()
145
- })
146
- })
147
- .catch(() => {})
148
- },
149
- // #endif
150
- // 完成过渡后触发
151
- onTransitionEnd() {
152
- // 如果已经是结束的状态,无需再处理
153
- if (this.transitionEnded) return
154
- this.transitionEnded = true
155
- // 发出组件动画执行后的事件
156
- this.$emit(this.status === 'leave' ? 'afterLeave' : 'afterEnter')
157
- if (!this.show && this.display) {
158
- this.display = false
159
- this.inited = false
160
- }
161
- }
162
- }
163
- }
1
+ /*
2
+ * @Author : LQ
3
+ * @Description :
4
+ * @version : 1.0
5
+ * @Date : 2021-08-20 16:44:21
6
+ * @LastAuthor : LQ
7
+ * @lastTime : 2021-08-20 16:59:00
8
+ * @FilePath : /u-view2.0/uview-ui/libs/config/props/transition.js
9
+ */
10
+ export default {
11
+ // transition动画组件的props
12
+ transition: {
13
+ show: false,
14
+ mode: 'fade',
15
+ duration: '300',
16
+ timingFunction: 'ease-out'
17
+ }
18
+ }
@@ -0,0 +1,163 @@
1
+ // 定义一个一定时间后自动成功的promise,让调用nextTick方法处,进入下一个then方法
2
+ const waitTick = () => new Promise(resolve => setTimeout(resolve, 1000 / 50))
3
+ // nvue动画模块实现细节抽离在外部文件
4
+ // #ifdef APP-NVUE
5
+ import animationMap from './nvue-ani-map.js'
6
+ // #endif
7
+
8
+ // #ifndef APP-NVUE
9
+ // 定义类名,通过给元素动态切换类名,赋予元素一定的css动画样式
10
+ const getClassNames = (name) => ({
11
+ enter: `u-${name}-enter u-${name}-enter-active`,
12
+ 'enter-to': `u-${name}-enter-to u-${name}-enter-active`,
13
+ leave: `u-${name}-leave u-${name}-leave-active`,
14
+ 'leave-to': `u-${name}-leave-to u-${name}-leave-active`
15
+ })
16
+ // #endif
17
+
18
+ // #ifdef APP-NVUE
19
+ // 引入nvue(weex)的animation动画模块,文档见:
20
+ // https://weex.apache.org/zh/docs/modules/animation.html#transition
21
+ const animation = uni.requireNativePlugin('animation')
22
+ const getStyle = (name) => animationMap[name]
23
+ // #endif
24
+
25
+ import { nextTick } from 'vue'
26
+ import { sleep } from '../../libs/function/index';
27
+ export default {
28
+ methods: {
29
+ // 组件被点击发出事件
30
+ clickHandler() {
31
+ this.$emit('click')
32
+ },
33
+ // #ifndef APP-NVUE
34
+ // vue版本的组件进场处理
35
+ async vueEnter() {
36
+ // 动画进入时的类名
37
+ const classNames = getClassNames(this.mode)
38
+ // 定义状态和发出动画进入前事件
39
+ this.status = 'enter'
40
+ this.$emit('beforeEnter')
41
+ this.inited = true
42
+ this.display = true
43
+ this.classes = classNames.enter
44
+ await nextTick();
45
+ {
46
+ // https://github.com/umicro/uView2.0/issues/545
47
+ await sleep(20)
48
+ // 标识动画尚未结束
49
+ this.$emit('enter')
50
+ this.transitionEnded = false
51
+ // 组件动画进入后触发的事件
52
+ this.$emit('afterEnter')
53
+ // 赋予组件enter-to类名
54
+ this.classes = classNames['enter-to']
55
+ }
56
+ },
57
+ // 动画离场处理
58
+ async vueLeave() {
59
+ // 如果不是展示状态,无需执行逻辑
60
+ if (!this.display) return
61
+ const classNames = getClassNames(this.mode)
62
+ // 标记离开状态和发出事件
63
+ this.status = 'leave'
64
+ this.$emit('beforeLeave')
65
+ // 获得类名
66
+ this.classes = classNames.leave
67
+
68
+ await nextTick();
69
+ {
70
+ // 动画正在离场的状态
71
+ this.transitionEnded = false
72
+ this.$emit('leave')
73
+ // 组件执行动画,到了执行的执行时间后,执行一些额外处理
74
+ setTimeout(this.onTransitionEnd, this.duration)
75
+ this.classes = classNames['leave-to']
76
+ }
77
+ },
78
+ // #endif
79
+ // #ifdef APP-NVUE
80
+ // nvue版本动画进场
81
+ async nvueEnter() {
82
+ // 获得样式的名称
83
+ const currentStyle = getStyle(this.mode)
84
+ // 组件动画状态和发出事件
85
+ this.status = 'enter'
86
+ this.$emit('beforeEnter')
87
+ // 展示生成组件元素
88
+ this.inited = true
89
+ this.display = true
90
+ // 在nvue安卓上,由于渲染速度慢,在弹窗,键盘,日历等组件中,渲染其中的内容需要时间
91
+ // 导致出现弹窗卡顿,这里让其一开始为透明状态,等一定时间渲染完成后,再让其隐藏起来,再让其按正常逻辑出现
92
+ this.viewStyle = {
93
+ opacity: 0
94
+ }
95
+ // 等待弹窗内容渲染完成
96
+ await nextTick();
97
+ {
98
+ // 合并样式
99
+ this.viewStyle = currentStyle.enter
100
+ Promise.resolve()
101
+ .then(waitTick)
102
+ .then(() => {
103
+ // 组件开始进入前的事件
104
+ this.$emit('enter')
105
+ // nvue的transition动画模块需要通过ref调用组件,注意此处的ref不同于vue的this.$refs['u-transition']用法
106
+ animation.transition(this.$refs['u-transition'].ref, {
107
+ styles: currentStyle['enter-to'],
108
+ duration: this.duration,
109
+ timingFunction: this.timingFunction,
110
+ needLayout: false,
111
+ delay: 0
112
+ }, () => {
113
+ // 动画执行完毕,发出事件
114
+ this.$emit('afterEnter')
115
+ })
116
+ })
117
+ .catch(() => {})
118
+ }
119
+ },
120
+ nvueLeave() {
121
+ if (!this.display) {
122
+ return
123
+ }
124
+ const currentStyle = getStyle(this.mode)
125
+ // 定义状态和事件
126
+ this.status = 'leave'
127
+ this.$emit('beforeLeave')
128
+ // 合并样式
129
+ this.viewStyle = currentStyle.leave
130
+ // 放到promise中处理执行过程
131
+ Promise.resolve()
132
+ .then(waitTick) // 等待几十ms
133
+ .then(() => {
134
+ this.transitionEnded = false
135
+ // 动画正在离场的状态
136
+ this.$emit('leave')
137
+ animation.transition(this.$refs['u-transition'].ref, {
138
+ styles: currentStyle['leave-to'],
139
+ duration: this.duration,
140
+ timingFunction: this.timingFunction,
141
+ needLayout: false,
142
+ delay: 0
143
+ }, () => {
144
+ this.onTransitionEnd()
145
+ })
146
+ })
147
+ .catch(() => {})
148
+ },
149
+ // #endif
150
+ // 完成过渡后触发
151
+ onTransitionEnd() {
152
+ // 如果已经是结束的状态,无需再处理
153
+ if (this.transitionEnded) return
154
+ this.transitionEnded = true
155
+ // 发出组件动画执行后的事件
156
+ this.$emit(this.status === 'leave' ? 'afterLeave' : 'afterEnter')
157
+ if (!this.show && this.display) {
158
+ this.display = false
159
+ this.inited = false
160
+ }
161
+ }
162
+ }
163
+ }
@@ -18,7 +18,7 @@ import { mpMixin } from '../../libs/mixin/mpMixin';
18
18
  import { mixin } from '../../libs/mixin/mixin';
19
19
  import { addStyle } from '../../libs/function/index';
20
20
  // 组件的methods方法,由于内容较长,写在外部文件中通过mixin引入
21
- import transition from "./transition.js";
21
+ import transitionMixin from "./transitionMixin.js";
22
22
  /**
23
23
  * transition 动画组件
24
24
  * @description
@@ -65,7 +65,7 @@ export default {
65
65
  }
66
66
  },
67
67
  // 将mixin挂在到组件中,实际上为一个vue格式对象。
68
- mixins: [mpMixin, mixin, transition, props],
68
+ mixins: [mpMixin, mixin, transitionMixin, props],
69
69
  watch: {
70
70
  show: {
71
71
  handler(newVal) {
@@ -5,94 +5,94 @@
5
5
  */
6
6
  import config from './config'
7
7
 
8
- import ActionSheet from './props/actionSheet'
9
- import Album from './props/album'
10
- import Alert from './props/alert'
11
- import Avatar from './props/avatar'
12
- import AvatarGroup from './props/avatarGroup'
13
- import Backtop from './props/backtop'
14
- import Badge from './props/badge'
15
- import Button from './props/button'
16
- import Calendar from './props/calendar'
17
- import CarKeyboard from './props/carKeyboard'
18
- import Cell from './props/cell'
19
- import CellGroup from './props/cellGroup'
20
- import Checkbox from './props/checkbox'
21
- import CheckboxGroup from './props/checkboxGroup'
22
- import CircleProgress from './props/circleProgress'
23
- import Code from './props/code'
24
- import CodeInput from './props/codeInput'
25
- import Col from './props/col'
26
- import Collapse from './props/collapse'
27
- import CollapseItem from './props/collapseItem'
28
- import ColumnNotice from './props/columnNotice'
29
- import CountDown from './props/countDown'
30
- import CountTo from './props/countTo'
31
- import DatetimePicker from './props/datetimePicker'
32
- import Divider from './props/divider'
33
- import Empty from './props/empty'
34
- import Form from './props/form'
35
- import GormItem from './props/formItem'
36
- import Gap from './props/gap'
37
- import Grid from './props/grid'
38
- import GridItem from './props/gridItem'
39
- import Icon from './props/icon'
40
- import Image from './props/image'
41
- import IndexAnchor from './props/indexAnchor'
42
- import IndexList from './props/indexList'
43
- import Input from './props/input'
44
- import Keyboard from './props/keyboard'
45
- import Line from './props/line'
46
- import LineProgress from './props/lineProgress'
47
- import Link from './props/link'
48
- import List from './props/list'
49
- import ListItem from './props/listItem'
50
- import LoadingIcon from './props/loadingIcon'
51
- import LoadingPage from './props/loadingPage'
52
- import Loadmore from './props/loadmore'
53
- import Modal from './props/modal'
54
- import Navbar from './props/navbar'
55
- import NoNetwork from './props/noNetwork'
56
- import NoticeBar from './props/noticeBar'
57
- import Notify from './props/notify'
58
- import NumberBox from './props/numberBox'
59
- import NumberKeyboard from './props/numberKeyboard'
60
- import Overlay from './props/overlay'
61
- import Parse from './props/parse'
62
- import Picker from './props/picker'
63
- import Popup from './props/popup'
64
- import Radio from './props/radio'
65
- import RadioGroup from './props/radioGroup'
66
- import Rate from './props/rate'
67
- import ReadMore from './props/readMore'
68
- import Row from './props/row'
69
- import RowNotice from './props/rowNotice'
70
- import ScrollList from './props/scrollList'
71
- import Search from './props/search'
72
- import Section from './props/section'
73
- import Skeleton from './props/skeleton'
74
- import Slider from './props/slider'
75
- import StatusBar from './props/statusBar'
76
- import Steps from './props/steps'
77
- import StepsItem from './props/stepsItem'
78
- import Sticky from './props/sticky'
79
- import Subsection from './props/subsection'
80
- import SwipeAction from './props/swipeAction'
81
- import SwipeActionItem from './props/swipeActionItem'
82
- import Swiper from './props/swiper'
83
- import SwipterIndicator from './props/swipterIndicator'
84
- import Switch from './props/switch'
85
- import Tabbar from './props/tabbar'
86
- import TabbarItem from './props/tabbarItem'
87
- import Tabs from './props/tabs'
88
- import Tag from './props/tag'
89
- import Text from './props/text'
90
- import Textarea from './props/textarea'
91
- import Toast from './props/toast'
92
- import Toolbar from './props/toolbar'
93
- import Tooltip from './props/tooltip'
94
- import Transition from './props/transition'
95
- import Upload from './props/upload'
8
+ import ActionSheet from '../../components/u-action-sheet/actionSheet'
9
+ import Album from '../../components/u-album/album'
10
+ import Alert from '../../components/u-alert/alert'
11
+ import Avatar from '../../components/u-avatar/avatar'
12
+ import AvatarGroup from '../../components/u-avatar-group/avatarGroup'
13
+ import Backtop from '../../components/u-back-top/backtop'
14
+ import Badge from '../../components/u-badge/badge'
15
+ import Button from '../../components/u-button/button'
16
+ import Calendar from '../../components/u-calendar/calendar'
17
+ import CarKeyboard from '../../components/u-car-keyboard/carKeyboard'
18
+ import Cell from '../../components/u-cell/cell'
19
+ import CellGroup from '../../components/u-cell-group/cellGroup'
20
+ import Checkbox from '../../components/u-checkbox/checkbox'
21
+ import CheckboxGroup from '../../components/u-checkbox-group/checkboxGroup'
22
+ import CircleProgress from '../../components/u-circle-progress/circleProgress'
23
+ import Code from '../../components/u-code/code'
24
+ import CodeInput from '../../components/u-code-input/codeInput'
25
+ import Col from '../../components/u-col/col'
26
+ import Collapse from '../../components/u-collapse/collapse'
27
+ import CollapseItem from '../../components/u-collapse-item/collapseItem'
28
+ import ColumnNotice from '../../components/u-column-notice/columnNotice'
29
+ import CountDown from '../../components/u-count-down/countDown'
30
+ import CountTo from '../../components/u-count-to/countTo'
31
+ import DatetimePicker from '../../components/u-datetime-picker/datetimePicker'
32
+ import Divider from '../../components/u-divider/divider'
33
+ import Empty from '../../components/u-empty/empty'
34
+ import Form from '../../components/u-form/form'
35
+ import GormItem from '../../components/u-form-item/formItem'
36
+ import Gap from '../../components/u-gap/gap'
37
+ import Grid from '../../components/u-grid/grid'
38
+ import GridItem from '../../components/u-grid-item/gridItem'
39
+ import Icon from '../../components/u-icon/icon'
40
+ import Image from '../../components/u-image/image'
41
+ import IndexAnchor from '../../components/u-index-anchor/indexAnchor'
42
+ import IndexList from '../../components/u-index-list/indexList'
43
+ import Input from '../../components/u-input/input'
44
+ import Keyboard from '../../components/u-keyboard/keyboard'
45
+ import Line from '../../components/u-line/line'
46
+ import LineProgress from '../../components/u-line-progress/lineProgress'
47
+ import Link from '../../components/u-link/link'
48
+ import List from '../../components/u-list/list'
49
+ import ListItem from '../../components/u-list-item/listItem'
50
+ import LoadingIcon from '../../components/u-loading-icon/loadingIcon'
51
+ import LoadingPage from '../../components/u-loading-page/loadingPage'
52
+ import Loadmore from '../../components/u-loadmore/loadmore'
53
+ import Modal from '../../components/u-modal/modal'
54
+ import Navbar from '../../components/u-navbar/navbar'
55
+ import NoNetwork from '../../components/u-no-network/noNetwork'
56
+ import NoticeBar from '../../components/u-notice-bar/noticeBar'
57
+ import Notify from '../../components/u-notify/notify'
58
+ import NumberBox from '../../components/u-number-box/numberBox'
59
+ import NumberKeyboard from '../../components/u-number-keyboard/numberKeyboard'
60
+ import Overlay from '../../components/u-overlay/overlay'
61
+ import Parse from '../../components/u-parse/parse'
62
+ import Picker from '../../components/u-picker/picker'
63
+ import Popup from '../../components/u-popup/popup'
64
+ import Radio from '../../components/u-radio/radio'
65
+ import RadioGroup from '../../components/u-radio-group/radioGroup'
66
+ import Rate from '../../components/u-rate/rate'
67
+ import ReadMore from '../../components/u-read-more/readMore'
68
+ import Row from '../../components/u-row/row'
69
+ import RowNotice from '../../components/u-row-notice/rowNotice'
70
+ import ScrollList from '../../components/u-scroll-list/scrollList'
71
+ import Search from '../../components/u-search/search'
72
+ import Section from '../../components/u-section/section'
73
+ import Skeleton from '../../components/u-skeleton/skeleton'
74
+ import Slider from '../../components/u-slider/slider'
75
+ import StatusBar from '../../components/u-status-bar/statusBar'
76
+ import Steps from '../../components/u-steps/steps'
77
+ import StepsItem from '../../components/u-steps-item/stepsItem'
78
+ import Sticky from '../../components/u-sticky/sticky'
79
+ import Subsection from '../../components/u-subsection/subsection'
80
+ import SwipeAction from '../../components/u-swipe-action/swipeAction'
81
+ import SwipeActionItem from '../../components/u-swipe-action-item/swipeActionItem'
82
+ import Swiper from '../../components/u-swiper/swiper'
83
+ import SwipterIndicator from '../../components/u-swiper-indicator/swipterIndicator'
84
+ import Switch from '../../components/u-switch/switch'
85
+ import Tabbar from '../../components/u-tabbar/tabbar'
86
+ import TabbarItem from '../../components/u-tabbar-item/tabbarItem'
87
+ import Tabs from '../../components/u-tabs/tabs'
88
+ import Tag from '../../components/u-tag/tag'
89
+ import Text from '../../components/u-text/text'
90
+ import Textarea from '../../components/u-textarea/textarea'
91
+ import Toast from '../../components/u-toast/toast'
92
+ import Toolbar from '../../components/u-toolbar/toolbar'
93
+ import Tooltip from '../../components/u-tooltip/tooltip'
94
+ import Transition from '../../components/u-transition/transition'
95
+ import Upload from '../../components/u-upload/upload'
96
96
 
97
97
  const {
98
98
  color
@@ -181,7 +181,7 @@ export function addUnit(value = 'auto', unit = '') {
181
181
  if (!unit) {
182
182
  unit = config.unit || 'px'
183
183
  }
184
- if (unit == 'rpx') {
184
+ if (unit == 'rpx' && testNumber(String(value))) {
185
185
  value = value * 2
186
186
  }
187
187
  value = String(value)
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.3.18",
5
+ "version": "3.3.20",
6
6
  "description": "零云®uview-plus已兼容vue3,全面的组件和便捷的工具会让您信手拈来,如鱼得水",
7
7
  "keywords": [
8
8
  "uview",
@@ -1,18 +0,0 @@
1
- /*
2
- * @Author : LQ
3
- * @Description :
4
- * @version : 1.0
5
- * @Date : 2021-08-20 16:44:21
6
- * @LastAuthor : LQ
7
- * @lastTime : 2021-08-20 16:59:00
8
- * @FilePath : /u-view2.0/uview-ui/libs/config/props/transition.js
9
- */
10
- export default {
11
- // transition动画组件的props
12
- transition: {
13
- show: false,
14
- mode: 'fade',
15
- duration: '300',
16
- timingFunction: 'ease-out'
17
- }
18
- }
File without changes
File without changes
File without changes
File without changes