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.
- package/changelog.md +7 -0
- package/{libs/config/props → components/u-icon}/icon.js +1 -1
- package/{libs/config/props → components/u-link}/link.js +1 -1
- package/{libs/config/props → components/u-loading-icon}/loadingIcon.js +1 -1
- package/{libs/config/props → components/u-navbar}/navbar.js +1 -1
- package/components/u-tabs/u-tabs.vue +0 -1
- package/components/u-transition/transition.js +18 -163
- package/components/u-transition/transitionMixin.js +163 -0
- package/components/u-transition/u-transition.vue +2 -2
- package/libs/config/props.js +88 -88
- package/libs/function/index.js +1 -1
- package/package.json +1 -1
- package/libs/config/props/transition.js +0 -18
- /package/{libs/config/props → components/u-action-sheet}/actionSheet.js +0 -0
- /package/{libs/config/props → components/u-album}/album.js +0 -0
- /package/{libs/config/props → components/u-alert}/alert.js +0 -0
- /package/{libs/config/props → components/u-avatar}/avatar.js +0 -0
- /package/{libs/config/props → components/u-avatar-group}/avatarGroup.js +0 -0
- /package/{libs/config/props → components/u-back-top}/backtop.js +0 -0
- /package/{libs/config/props → components/u-badge}/badge.js +0 -0
- /package/{libs/config/props → components/u-button}/button.js +0 -0
- /package/{libs/config/props → components/u-calendar}/calendar.js +0 -0
- /package/{libs/config/props → components/u-car-keyboard}/carKeyboard.js +0 -0
- /package/{libs/config/props → components/u-cell}/cell.js +0 -0
- /package/{libs/config/props → components/u-cell-group}/cellGroup.js +0 -0
- /package/{libs/config/props → components/u-checkbox}/checkbox.js +0 -0
- /package/{libs/config/props → components/u-checkbox-group}/checkboxGroup.js +0 -0
- /package/{libs/config/props → components/u-circle-progress}/circleProgress.js +0 -0
- /package/{libs/config/props → components/u-code}/code.js +0 -0
- /package/{libs/config/props → components/u-code-input}/codeInput.js +0 -0
- /package/{libs/config/props → components/u-col}/col.js +0 -0
- /package/{libs/config/props → components/u-collapse}/collapse.js +0 -0
- /package/{libs/config/props → components/u-collapse-item}/collapseItem.js +0 -0
- /package/{libs/config/props → components/u-column-notice}/columnNotice.js +0 -0
- /package/{libs/config/props → components/u-count-down}/countDown.js +0 -0
- /package/{libs/config/props → components/u-count-to}/countTo.js +0 -0
- /package/{libs/config/props → components/u-datetime-picker}/datetimePicker.js +0 -0
- /package/{libs/config/props → components/u-divider}/divider.js +0 -0
- /package/{libs/config/props → components/u-empty}/empty.js +0 -0
- /package/{libs/config/props → components/u-form}/form.js +0 -0
- /package/{libs/config/props → components/u-form-item}/formItem.js +0 -0
- /package/{libs/config/props → components/u-gap}/gap.js +0 -0
- /package/{libs/config/props → components/u-grid}/grid.js +0 -0
- /package/{libs/config/props → components/u-grid-item}/gridItem.js +0 -0
- /package/{libs/config/props → components/u-image}/image.js +0 -0
- /package/{libs/config/props → components/u-index-anchor}/indexAnchor.js +0 -0
- /package/{libs/config/props → components/u-index-list}/indexList.js +0 -0
- /package/{libs/config/props → components/u-input}/input.js +0 -0
- /package/{libs/config/props → components/u-keyboard}/keyboard.js +0 -0
- /package/{libs/config/props → components/u-line}/line.js +0 -0
- /package/{libs/config/props → components/u-line-progress}/lineProgress.js +0 -0
- /package/{libs/config/props → components/u-list}/list.js +0 -0
- /package/{libs/config/props → components/u-list-item}/listItem.js +0 -0
- /package/{libs/config/props → components/u-loading-page}/loadingPage.js +0 -0
- /package/{libs/config/props → components/u-loadmore}/loadmore.js +0 -0
- /package/{libs/config/props → components/u-modal}/modal.js +0 -0
- /package/{libs/config/props → components/u-no-network}/noNetwork.js +0 -0
- /package/{libs/config/props → components/u-notice-bar}/noticeBar.js +0 -0
- /package/{libs/config/props → components/u-notify}/notify.js +0 -0
- /package/{libs/config/props → components/u-number-box}/numberBox.js +0 -0
- /package/{libs/config/props → components/u-number-keyboard}/numberKeyboard.js +0 -0
- /package/{libs/config/props → components/u-overlay}/overlay.js +0 -0
- /package/{libs/config/props → components/u-parse}/parse.js +0 -0
- /package/{libs/config/props → components/u-picker}/picker.js +0 -0
- /package/{libs/config/props → components/u-popup}/popup.js +0 -0
- /package/{libs/config/props → components/u-radio}/radio.js +0 -0
- /package/{libs/config/props → components/u-radio-group}/radioGroup.js +0 -0
- /package/{libs/config/props → components/u-rate}/rate.js +0 -0
- /package/{libs/config/props → components/u-read-more}/readMore.js +0 -0
- /package/{libs/config/props → components/u-row}/row.js +0 -0
- /package/{libs/config/props → components/u-row-notice}/rowNotice.js +0 -0
- /package/{libs/config/props → components/u-scroll-list}/scrollList.js +0 -0
- /package/{libs/config/props → components/u-search}/search.js +0 -0
- /package/{libs/config/props → components/u-section}/section.js +0 -0
- /package/{libs/config/props → components/u-skeleton}/skeleton.js +0 -0
- /package/{libs/config/props → components/u-slider}/slider.js +0 -0
- /package/{libs/config/props → components/u-status-bar}/statusBar.js +0 -0
- /package/{libs/config/props → components/u-steps}/steps.js +0 -0
- /package/{libs/config/props → components/u-steps-item}/stepsItem.js +0 -0
- /package/{libs/config/props → components/u-sticky}/sticky.js +0 -0
- /package/{libs/config/props → components/u-subsection}/subsection.js +0 -0
- /package/{libs/config/props → components/u-swipe-action}/swipeAction.js +0 -0
- /package/{libs/config/props → components/u-swipe-action-item}/swipeActionItem.js +0 -0
- /package/{libs/config/props → components/u-swiper}/swiper.js +0 -0
- /package/{libs/config/props → components/u-swiper-indicator}/swipterIndicator.js +0 -0
- /package/{libs/config/props → components/u-switch}/switch.js +0 -0
- /package/{libs/config/props → components/u-tabbar}/tabbar.js +0 -0
- /package/{libs/config/props → components/u-tabbar-item}/tabbarItem.js +0 -0
- /package/{libs/config/props → components/u-tabs}/tabs.js +0 -0
- /package/{libs/config/props → components/u-tag}/tag.js +0 -0
- /package/{libs/config/props → components/u-text}/text.js +0 -0
- /package/{libs/config/props → components/u-textarea}/textarea.js +0 -0
- /package/{libs/config/props → components/u-toast}/toast.js +0 -0
- /package/{libs/config/props → components/u-toolbar}/toolbar.js +0 -0
- /package/{libs/config/props → components/u-tooltip}/tooltip.js +0 -0
- /package/{libs/config/props → components/u-upload}/upload.js +0 -0
package/changelog.md
CHANGED
|
@@ -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
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
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
|
|
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,
|
|
68
|
+
mixins: [mpMixin, mixin, transitionMixin, props],
|
|
69
69
|
watch: {
|
|
70
70
|
show: {
|
|
71
71
|
handler(newVal) {
|
package/libs/config/props.js
CHANGED
|
@@ -5,94 +5,94 @@
|
|
|
5
5
|
*/
|
|
6
6
|
import config from './config'
|
|
7
7
|
|
|
8
|
-
import ActionSheet from '
|
|
9
|
-
import Album from '
|
|
10
|
-
import Alert from '
|
|
11
|
-
import Avatar from '
|
|
12
|
-
import AvatarGroup from '
|
|
13
|
-
import Backtop from '
|
|
14
|
-
import Badge from '
|
|
15
|
-
import Button from '
|
|
16
|
-
import Calendar from '
|
|
17
|
-
import CarKeyboard from '
|
|
18
|
-
import Cell from '
|
|
19
|
-
import CellGroup from '
|
|
20
|
-
import Checkbox from '
|
|
21
|
-
import CheckboxGroup from '
|
|
22
|
-
import CircleProgress from '
|
|
23
|
-
import Code from '
|
|
24
|
-
import CodeInput from '
|
|
25
|
-
import Col from '
|
|
26
|
-
import Collapse from '
|
|
27
|
-
import CollapseItem from '
|
|
28
|
-
import ColumnNotice from '
|
|
29
|
-
import CountDown from '
|
|
30
|
-
import CountTo from '
|
|
31
|
-
import DatetimePicker from '
|
|
32
|
-
import Divider from '
|
|
33
|
-
import Empty from '
|
|
34
|
-
import Form from '
|
|
35
|
-
import GormItem from '
|
|
36
|
-
import Gap from '
|
|
37
|
-
import Grid from '
|
|
38
|
-
import GridItem from '
|
|
39
|
-
import Icon from '
|
|
40
|
-
import Image from '
|
|
41
|
-
import IndexAnchor from '
|
|
42
|
-
import IndexList from '
|
|
43
|
-
import Input from '
|
|
44
|
-
import Keyboard from '
|
|
45
|
-
import Line from '
|
|
46
|
-
import LineProgress from '
|
|
47
|
-
import Link from '
|
|
48
|
-
import List from '
|
|
49
|
-
import ListItem from '
|
|
50
|
-
import LoadingIcon from '
|
|
51
|
-
import LoadingPage from '
|
|
52
|
-
import Loadmore from '
|
|
53
|
-
import Modal from '
|
|
54
|
-
import Navbar from '
|
|
55
|
-
import NoNetwork from '
|
|
56
|
-
import NoticeBar from '
|
|
57
|
-
import Notify from '
|
|
58
|
-
import NumberBox from '
|
|
59
|
-
import NumberKeyboard from '
|
|
60
|
-
import Overlay from '
|
|
61
|
-
import Parse from '
|
|
62
|
-
import Picker from '
|
|
63
|
-
import Popup from '
|
|
64
|
-
import Radio from '
|
|
65
|
-
import RadioGroup from '
|
|
66
|
-
import Rate from '
|
|
67
|
-
import ReadMore from '
|
|
68
|
-
import Row from '
|
|
69
|
-
import RowNotice from '
|
|
70
|
-
import ScrollList from '
|
|
71
|
-
import Search from '
|
|
72
|
-
import Section from '
|
|
73
|
-
import Skeleton from '
|
|
74
|
-
import Slider from '
|
|
75
|
-
import StatusBar from '
|
|
76
|
-
import Steps from '
|
|
77
|
-
import StepsItem from '
|
|
78
|
-
import Sticky from '
|
|
79
|
-
import Subsection from '
|
|
80
|
-
import SwipeAction from '
|
|
81
|
-
import SwipeActionItem from '
|
|
82
|
-
import Swiper from '
|
|
83
|
-
import SwipterIndicator from '
|
|
84
|
-
import Switch from '
|
|
85
|
-
import Tabbar from '
|
|
86
|
-
import TabbarItem from '
|
|
87
|
-
import Tabs from '
|
|
88
|
-
import Tag from '
|
|
89
|
-
import Text from '
|
|
90
|
-
import Textarea from '
|
|
91
|
-
import Toast from '
|
|
92
|
-
import Toolbar from '
|
|
93
|
-
import Tooltip from '
|
|
94
|
-
import Transition from '
|
|
95
|
-
import Upload from '
|
|
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
|
package/libs/function/index.js
CHANGED
package/package.json
CHANGED
|
@@ -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
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|