uview-plus 3.8.49 → 3.8.86
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 +2043 -1827
- package/components/u-action-sheet/props.js +3 -1
- package/components/u-action-sheet/u-action-sheet.vue +1 -0
- package/components/u-album/props.js +3 -1
- package/components/u-alert/props.js +4 -2
- package/components/u-avatar/props.js +4 -1
- package/components/u-avatar-group/props.js +4 -1
- package/components/u-back-top/props.js +4 -1
- package/components/u-badge/props.js +4 -1
- package/components/u-barcode/u-barcode.vue +46 -15
- package/components/u-box/props.js +5 -2
- package/components/u-button/props.js +4 -1
- package/components/u-button/vue.scss +3 -3
- package/components/u-calendar/calendar.js +14 -2
- package/components/u-calendar/month.vue +41 -6
- package/components/u-calendar/props.js +63 -1
- package/components/u-calendar/u-calendar.vue +311 -2
- package/components/u-calendar-strip/props.js +3 -1
- package/components/u-canvas/u-canvas.vue +734 -423
- package/components/u-car-keyboard/props.js +3 -1
- package/components/u-card/props.js +3 -1
- package/components/u-cell/props.js +4 -1
- package/components/u-cell/u-cell.vue +1 -1
- package/components/u-cell-group/props.js +4 -1
- package/components/u-checkbox/props.js +4 -1
- package/components/u-checkbox/u-checkbox.vue +7 -3
- package/components/u-checkbox-group/props.js +3 -1
- package/components/u-circle-progress/props.js +4 -1
- package/components/u-code/props.js +4 -1
- package/components/u-code-input/props.js +4 -1
- package/components/u-col/props.js +4 -1
- package/components/u-collapse/props.js +4 -1
- package/components/u-collapse-item/props.js +4 -1
- package/components/u-color-picker/u-color-picker.vue +1 -0
- package/components/u-column-notice/props.js +4 -1
- package/components/u-count-down/props.js +4 -1
- package/components/u-count-to/props.js +4 -1
- package/components/u-cropper/u-cropper.vue +95 -51
- package/components/u-datetime-picker/props.js +4 -1
- package/components/u-divider/props.js +4 -1
- package/components/u-dragsort/u-dragsort.vue +2 -1
- package/components/u-dropdown/props.js +3 -1
- package/components/u-dropdown-item/props.js +3 -1
- package/components/u-empty/props.js +4 -1
- package/components/u-form/props.js +4 -1
- package/components/u-form-item/props.js +4 -1
- package/components/u-gap/props.js +4 -1
- package/components/u-grid/props.js +4 -1
- package/components/u-grid-item/props.js +4 -1
- package/components/u-guide/props.js +3 -1
- package/components/u-icon/props.js +4 -1
- package/components/u-icon/u-icon.vue +2 -2
- package/components/u-icon/upicon.ttf +0 -0
- package/components/u-icon/util.js +29 -7
- package/components/u-image/props.js +4 -1
- package/components/u-image/u-image.vue +280 -267
- package/components/u-index-anchor/props.js +4 -1
- package/components/u-index-item/props.js +2 -1
- package/components/u-index-list/props.js +4 -1
- package/components/u-input/props.js +3 -1
- package/components/u-input/u-input.vue +10 -1
- package/components/u-keyboard/props.js +4 -1
- package/components/u-line/props.js +4 -1
- package/components/u-line-progress/props.js +6 -3
- package/components/u-link/props.js +4 -1
- package/components/u-list/props.js +4 -1
- package/components/u-list-item/props.js +4 -1
- package/components/u-loading-icon/props.js +4 -1
- package/components/u-loading-page/props.js +3 -1
- package/components/u-loadmore/props.js +4 -1
- package/components/u-markdown/u-markdown.vue +45 -3
- package/components/u-modal/props.js +4 -1
- package/components/u-navbar/props.js +4 -2
- package/components/u-navbar/u-navbar.vue +15 -9
- package/components/u-no-network/props.js +4 -1
- package/components/u-notice-bar/props.js +4 -1
- package/components/u-notify/props.js +4 -1
- package/components/u-number-box/props.js +4 -1
- package/components/u-number-box/u-number-box.vue +2 -2
- package/components/u-number-keyboard/props.js +4 -1
- package/components/u-overlay/props.js +4 -1
- package/components/u-pagination/u-pagination.vue +60 -39
- package/components/u-parse/props.js +4 -1
- package/components/u-picker/props.js +4 -1
- package/components/u-picker/u-picker.vue +15 -0
- package/components/u-picker-column/props.js +3 -1
- package/components/u-popover/props.js +2 -1
- package/components/u-popup/props.js +4 -1
- package/components/u-poster/u-poster.vue +29 -14
- package/components/u-qrcode/qrcode.js +88 -87
- package/components/u-qrcode/u-qrcode.vue +138 -256
- package/components/u-radio/props.js +4 -1
- package/components/u-radio/u-radio.vue +7 -3
- package/components/u-radio-group/props.js +4 -1
- package/components/u-rate/props.js +4 -1
- package/components/u-read-more/props.js +4 -1
- package/components/u-row/props.js +4 -1
- package/components/u-row-notice/props.js +4 -1
- package/components/u-safe-bottom/props.js +2 -1
- package/components/u-scroll-list/props.js +4 -1
- package/components/u-search/props.js +3 -1
- package/components/u-skeleton/props.js +4 -1
- package/components/u-slider/props.js +3 -1
- package/components/u-slider/u-slider.vue +70 -28
- package/components/u-status-bar/props.js +4 -1
- package/components/u-steps/props.js +4 -1
- package/components/u-steps-item/props.js +4 -1
- package/components/u-sticky/props.js +4 -1
- package/components/u-sticky/u-sticky.vue +11 -0
- package/components/u-subsection/props.js +3 -1
- package/components/u-swipe-action/props.js +4 -1
- package/components/u-swipe-action-item/props.js +4 -1
- package/components/u-swipe-action-item/u-swipe-action-item.vue +14 -0
- package/components/u-swiper/props.js +9 -1
- package/components/u-swiper/swiper.js +1 -0
- package/components/u-swiper/u-swiper.vue +2 -0
- package/components/u-swiper-indicator/props.js +4 -1
- package/components/u-switch/props.js +4 -1
- package/components/u-tabbar/props.js +3 -1
- package/components/u-tabbar-item/props.js +4 -1
- package/components/u-table/props.js +3 -1
- package/components/u-table2/tableRow.vue +155 -69
- package/components/u-table2/u-table2.vue +328 -140
- package/components/u-tabs/props.js +4 -1
- package/components/u-tabs-item/props.js +3 -1
- package/components/u-tag/props.js +4 -1
- package/components/u-td/props.js +3 -1
- package/components/u-text/props.js +4 -1
- package/components/u-textarea/props.js +3 -1
- package/components/u-textarea/u-textarea.vue +16 -5
- package/components/u-th/props.js +3 -1
- package/components/u-toolbar/props.js +4 -1
- package/components/u-tooltip/props.js +10 -2
- package/components/u-tooltip/tooltip.js +2 -1
- package/components/u-tooltip/u-tooltip.vue +31 -3
- package/components/u-tr/props.js +3 -1
- package/components/u-transition/nvue-ani-map.js +75 -68
- package/components/u-transition/props.js +4 -1
- package/components/u-transition/transitionMixin.js +164 -163
- package/components/u-upload/props.js +4 -1
- package/components/u-upload/u-upload.vue +47 -40
- package/components/u-waterfall/u-waterfall.vue +50 -51
- package/index.js +65 -8
- package/libs/config/props.js +179 -204
- package/libs/css/components.scss +3 -0
- package/libs/function/uni-api-shims.js +29 -0
- package/libs/i18n/index.js +71 -36
- package/libs/i18n/locale-packs.js +11 -0
- package/libs/i18n/locales/all.js +23 -0
- package/libs/i18n/locales/{de.json → de.js} +1 -1
- package/libs/i18n/locales/{en.json → en.js} +2 -2
- package/libs/i18n/locales/{es.json → es.js} +1 -1
- package/libs/i18n/locales/{fr.json → fr.js} +2 -2
- package/libs/i18n/locales/{ja.json → ja.js} +1 -1
- package/libs/i18n/locales/{ko.json → ko.js} +1 -1
- package/libs/i18n/locales/{ru.json → ru.js} +1 -1
- package/libs/i18n/locales/{th.json → th.js} +1 -1
- package/libs/i18n/locales/{zh-Hans.json → zh-Hans.js} +1 -1
- package/libs/i18n/locales/{zh-Hant.json → zh-Hant.js} +1 -1
- package/libs/mixin/mixin.js +14 -4
- package/libs/util/gcanvas/bridge/bridge-weex.js +10 -5
- package/package.json +4 -5
- package/tsconfig.json +18 -0
- package/types/comps/calendar.d.ts +57 -0
- package/types/comps/checkbox.d.ts +12 -0
- package/types/comps/lineProgress.d.ts +5 -0
- package/types/comps/navbar.d.ts +3 -3
- package/types/comps/swiper.d.ts +5 -0
- package/types/comps/tooltip.d.ts +36 -1
- /package/components/u-markdown/{marked.esm.js → marked.esm.mjs} +0 -0
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
import { defineMixin } from '../../libs/vue'
|
|
2
|
-
import
|
|
2
|
+
import TabsDefaultProps from './tabs'
|
|
3
|
+
import { registerComponentProps } from '../../libs/config/props.js'
|
|
4
|
+
|
|
5
|
+
const defProps = registerComponentProps(TabsDefaultProps)
|
|
3
6
|
export const props = defineMixin({
|
|
4
7
|
props: {
|
|
5
8
|
// 滑块的移动过渡时间,单位ms
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import { defineMixin } from '../../libs/vue'
|
|
2
|
-
import
|
|
2
|
+
import { registerComponentProps } from '../../libs/config/props.js'
|
|
3
|
+
|
|
4
|
+
const defProps = registerComponentProps({ tabsItem: {} })
|
|
3
5
|
export const props = defineMixin({
|
|
4
6
|
props: {
|
|
5
7
|
|
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
import { defineMixin } from '../../libs/vue'
|
|
2
|
-
import
|
|
2
|
+
import TagDefaultProps from './tag'
|
|
3
|
+
import { registerComponentProps } from '../../libs/config/props.js'
|
|
4
|
+
|
|
5
|
+
const defProps = registerComponentProps(TagDefaultProps)
|
|
3
6
|
export const props = defineMixin({
|
|
4
7
|
props: {
|
|
5
8
|
// 标签类型info、primary、success、warning、error
|
package/components/u-td/props.js
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import { defineMixin } from '../../libs/vue'
|
|
2
|
-
import
|
|
2
|
+
import { registerComponentProps } from '../../libs/config/props.js'
|
|
3
|
+
|
|
4
|
+
const defProps = registerComponentProps({ td: {} })
|
|
3
5
|
export const props = defineMixin({
|
|
4
6
|
props: {
|
|
5
7
|
|
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
import { defineMixin } from '../../libs/vue'
|
|
2
|
-
import
|
|
2
|
+
import TextDefaultProps from './text'
|
|
3
|
+
import { registerComponentProps } from '../../libs/config/props.js'
|
|
4
|
+
|
|
5
|
+
const defProps = registerComponentProps(TextDefaultProps)
|
|
3
6
|
export const props = defineMixin({
|
|
4
7
|
props: {
|
|
5
8
|
// 主题颜色
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { defineMixin } from '../../libs/vue'
|
|
2
|
-
import
|
|
2
|
+
import TextareaDefaultProps from './textarea'
|
|
3
|
+
import { registerComponentProps } from '../../libs/config/props.js'
|
|
3
4
|
|
|
5
|
+
const defProps = registerComponentProps(TextareaDefaultProps)
|
|
4
6
|
export const props = defineMixin({
|
|
5
7
|
props: {
|
|
6
8
|
// 输入框的内容
|
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
class="u-textarea__count"
|
|
35
35
|
:style="countStyle"
|
|
36
36
|
v-if="count"
|
|
37
|
-
>{{
|
|
37
|
+
>{{ valueLength }}/{{ maxlength }}</text
|
|
38
38
|
>
|
|
39
39
|
<!-- #endif -->
|
|
40
40
|
</view>
|
|
@@ -106,7 +106,7 @@ export default {
|
|
|
106
106
|
value: {
|
|
107
107
|
immediate: true,
|
|
108
108
|
handler(newVal, oldVal) {
|
|
109
|
-
this.innerValue = newVal;
|
|
109
|
+
this.innerValue = this.normalizeValue(newVal);
|
|
110
110
|
/* #ifdef H5 */
|
|
111
111
|
// 在H5中,外部value变化后,修改input中的值,不会触发@input事件,此时手动调用值变化方法
|
|
112
112
|
if (
|
|
@@ -126,7 +126,7 @@ export default {
|
|
|
126
126
|
modelValue: {
|
|
127
127
|
immediate: true,
|
|
128
128
|
handler(newVal, oldVal) {
|
|
129
|
-
this.innerValue = newVal;
|
|
129
|
+
this.innerValue = this.normalizeValue(newVal);
|
|
130
130
|
/* #ifdef H5 */
|
|
131
131
|
// 在H5中,外部value变化后,修改input中的值,不会触发@input事件,此时手动调用值变化方法
|
|
132
132
|
if (
|
|
@@ -144,6 +144,10 @@ export default {
|
|
|
144
144
|
// #endif
|
|
145
145
|
},
|
|
146
146
|
computed: {
|
|
147
|
+
// 字数统计安全取值,避免 v-model 为 null/undefined/number 时访问 length 报错
|
|
148
|
+
valueLength() {
|
|
149
|
+
return String(this.innerValue ?? '').length
|
|
150
|
+
},
|
|
147
151
|
placeholderStyleInner() {
|
|
148
152
|
if (this.placeholderStyle) {
|
|
149
153
|
return addStyle(this.placeholderStyle, typeof this.placeholderStyle === 'string' ? 'string' : 'object')
|
|
@@ -225,6 +229,12 @@ export default {
|
|
|
225
229
|
methods: {
|
|
226
230
|
addStyle,
|
|
227
231
|
addUnit,
|
|
232
|
+
// 统一将外部值归一为可安全展示/统计的内容
|
|
233
|
+
normalizeValue(value) {
|
|
234
|
+
if (value === null || value === undefined) return ''
|
|
235
|
+
// textarea 展示与统计均按字符串处理
|
|
236
|
+
return typeof value === 'number' ? String(value) : value
|
|
237
|
+
},
|
|
228
238
|
// 在微信小程序中,不支持将函数当做props参数,故只能通过ref形式调用
|
|
229
239
|
setFormatter(e) {
|
|
230
240
|
this.innerFormatter = e
|
|
@@ -241,10 +251,11 @@ export default {
|
|
|
241
251
|
this.$emit("linechange", e);
|
|
242
252
|
},
|
|
243
253
|
onInput(e) {
|
|
244
|
-
let { value
|
|
254
|
+
let { value } = e.detail || {};
|
|
255
|
+
value = this.normalizeValue(value)
|
|
245
256
|
// 格式化过滤方法
|
|
246
257
|
const formatter = this.formatter || this.innerFormatter
|
|
247
|
-
const formatValue = formatter(value)
|
|
258
|
+
const formatValue = this.normalizeValue(formatter(value))
|
|
248
259
|
// 为了避免props的单向数据流特性,需要先将innerValue值设置为当前值,再在$nextTick中重新赋予设置后的值才有效
|
|
249
260
|
this.innerValue = value
|
|
250
261
|
this.$nextTick(() => {
|
package/components/u-th/props.js
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import { defineMixin } from '../../libs/vue'
|
|
2
|
-
import
|
|
2
|
+
import { registerComponentProps } from '../../libs/config/props.js'
|
|
3
|
+
|
|
4
|
+
const defProps = registerComponentProps({ th: {} })
|
|
3
5
|
export const props = defineMixin({
|
|
4
6
|
props: {
|
|
5
7
|
|
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
import { defineMixin } from '../../libs/vue'
|
|
2
|
-
import
|
|
2
|
+
import ToolbarDefaultProps from './toolbar'
|
|
3
|
+
import { registerComponentProps } from '../../libs/config/props.js'
|
|
4
|
+
|
|
5
|
+
const defProps = registerComponentProps(ToolbarDefaultProps)
|
|
3
6
|
export const props = defineMixin({
|
|
4
7
|
props: {
|
|
5
8
|
// 是否展示工具条
|
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
import { defineMixin } from '../../libs/vue'
|
|
2
|
-
import
|
|
2
|
+
import TooltipDefaultProps from './tooltip'
|
|
3
|
+
import { registerComponentProps } from '../../libs/config/props.js'
|
|
4
|
+
|
|
5
|
+
const defProps = registerComponentProps(TooltipDefaultProps)
|
|
3
6
|
export const props = defineMixin({
|
|
4
7
|
props: {
|
|
5
8
|
// 需要显示的提示文字
|
|
@@ -76,6 +79,11 @@ export const props = defineMixin({
|
|
|
76
79
|
show: {
|
|
77
80
|
type: Boolean,
|
|
78
81
|
default: () => defProps.tooltip.show
|
|
82
|
+
},
|
|
83
|
+
// 是否开启单例模式,开启该属性的tooltip同一页面同时只显示一个
|
|
84
|
+
singleton: {
|
|
85
|
+
type: Boolean,
|
|
86
|
+
default: () => defProps.tooltip.singleton
|
|
79
87
|
}
|
|
80
88
|
}
|
|
81
|
-
})
|
|
89
|
+
})
|
|
@@ -108,6 +108,7 @@
|
|
|
108
108
|
// #ifdef APP-NVUE
|
|
109
109
|
const dom = uni.requireNativePlugin('dom')
|
|
110
110
|
// #endif
|
|
111
|
+
let activeSingletonTooltip = null
|
|
111
112
|
/**
|
|
112
113
|
* Tooltip
|
|
113
114
|
* @description
|
|
@@ -123,9 +124,12 @@
|
|
|
123
124
|
* @property {Boolean} showCopy 是否显示复制按钮(默认 true )
|
|
124
125
|
* @property {Array} buttons 扩展的按钮组
|
|
125
126
|
* @property {Boolean} overlay 是否显示透明遮罩以防止触摸穿透(默认 true )
|
|
127
|
+
* @property {Boolean} singleton 是否开启单例模式,开启该属性的tooltip同一页面同时只显示一个(默认 false )
|
|
126
128
|
* @property {Object} customStyle 定义需要用到的外部样式
|
|
127
129
|
*
|
|
128
|
-
* @event {Function}
|
|
130
|
+
* @event {Function} open 打开时触发
|
|
131
|
+
* @event {Function} close 关闭时触发
|
|
132
|
+
* @event {Function} update:show 显示状态变化时触发
|
|
129
133
|
* @example
|
|
130
134
|
*/
|
|
131
135
|
export default {
|
|
@@ -240,7 +244,13 @@
|
|
|
240
244
|
mounted() {
|
|
241
245
|
this.init()
|
|
242
246
|
},
|
|
243
|
-
|
|
247
|
+
beforeUnmount() {
|
|
248
|
+
this.clearActiveTooltip()
|
|
249
|
+
},
|
|
250
|
+
beforeDestroy() {
|
|
251
|
+
this.clearActiveTooltip()
|
|
252
|
+
},
|
|
253
|
+
emits: ["click", "open", "close", "update:show"],
|
|
244
254
|
methods: {
|
|
245
255
|
addStyle,
|
|
246
256
|
addUnit,
|
|
@@ -262,15 +272,33 @@
|
|
|
262
272
|
},
|
|
263
273
|
// 打开tooltip
|
|
264
274
|
open() {
|
|
275
|
+
if (this.singleton && activeSingletonTooltip && activeSingletonTooltip !== this) {
|
|
276
|
+
activeSingletonTooltip.close()
|
|
277
|
+
}
|
|
278
|
+
if (this.singleton) {
|
|
279
|
+
activeSingletonTooltip = this
|
|
280
|
+
}
|
|
281
|
+
if (this.showTooltip && this.tooltipTop === 0) return
|
|
265
282
|
this.tooltipTop = 0
|
|
266
283
|
this.showTooltip = true
|
|
284
|
+
this.$emit('update:show', true)
|
|
267
285
|
this.$emit('open')
|
|
268
286
|
},
|
|
269
287
|
// 关闭tooltip
|
|
270
288
|
close() {
|
|
289
|
+
if (activeSingletonTooltip === this) {
|
|
290
|
+
activeSingletonTooltip = null
|
|
291
|
+
}
|
|
292
|
+
if (!this.showTooltip) return
|
|
271
293
|
this.showTooltip = false
|
|
294
|
+
this.$emit('update:show', false)
|
|
272
295
|
this.$emit('close')
|
|
273
296
|
},
|
|
297
|
+
clearActiveTooltip() {
|
|
298
|
+
if (activeSingletonTooltip === this) {
|
|
299
|
+
activeSingletonTooltip = null
|
|
300
|
+
}
|
|
301
|
+
},
|
|
274
302
|
// 点击透明遮罩
|
|
275
303
|
overlayClickHandler() {
|
|
276
304
|
this.close()
|
|
@@ -405,4 +433,4 @@
|
|
|
405
433
|
}
|
|
406
434
|
}
|
|
407
435
|
}
|
|
408
|
-
</style>
|
|
436
|
+
</style>
|
package/components/u-tr/props.js
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import { defineMixin } from '../../libs/vue'
|
|
2
|
-
import
|
|
2
|
+
import { registerComponentProps } from '../../libs/config/props.js'
|
|
3
|
+
|
|
4
|
+
const defProps = registerComponentProps({ tr: {} })
|
|
3
5
|
export const props = defineMixin({
|
|
4
6
|
props: {
|
|
5
7
|
|
|
@@ -1,68 +1,75 @@
|
|
|
1
|
-
export default {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
}
|
|
1
|
+
export default {
|
|
2
|
+
// 无动画模式:直接显示/隐藏,供 pageInline 等常驻场景使用
|
|
3
|
+
none: {
|
|
4
|
+
enter: { opacity: 1 },
|
|
5
|
+
'enter-to': { opacity: 1 },
|
|
6
|
+
leave: { opacity: 1 },
|
|
7
|
+
'leave-to': { opacity: 0 }
|
|
8
|
+
},
|
|
9
|
+
fade: {
|
|
10
|
+
enter: { opacity: 0 },
|
|
11
|
+
'enter-to': { opacity: 1 },
|
|
12
|
+
leave: { opacity: 1 },
|
|
13
|
+
'leave-to': { opacity: 0 }
|
|
14
|
+
},
|
|
15
|
+
'fade-up': {
|
|
16
|
+
enter: { opacity: 0, transform: 'translateY(100%)' },
|
|
17
|
+
'enter-to': { opacity: 1, transform: 'translateY(0)' },
|
|
18
|
+
leave: { opacity: 1, transform: 'translateY(0)' },
|
|
19
|
+
'leave-to': { opacity: 0, transform: 'translateY(100%)' }
|
|
20
|
+
},
|
|
21
|
+
'fade-down': {
|
|
22
|
+
enter: { opacity: 0, transform: 'translateY(-100%)' },
|
|
23
|
+
'enter-to': { opacity: 1, transform: 'translateY(0)' },
|
|
24
|
+
leave: { opacity: 1, transform: 'translateY(0)' },
|
|
25
|
+
'leave-to': { opacity: 0, transform: 'translateY(-100%)' }
|
|
26
|
+
},
|
|
27
|
+
'fade-left': {
|
|
28
|
+
enter: { opacity: 0, transform: 'translateX(-100%)' },
|
|
29
|
+
'enter-to': { opacity: 1, transform: 'translateY(0)' },
|
|
30
|
+
leave: { opacity: 1, transform: 'translateY(0)' },
|
|
31
|
+
'leave-to': { opacity: 0, transform: 'translateX(-100%)' }
|
|
32
|
+
},
|
|
33
|
+
'fade-right': {
|
|
34
|
+
enter: { opacity: 0, transform: 'translateX(100%)' },
|
|
35
|
+
'enter-to': { opacity: 1, transform: 'translateY(0)' },
|
|
36
|
+
leave: { opacity: 1, transform: 'translateY(0)' },
|
|
37
|
+
'leave-to': { opacity: 0, transform: 'translateX(100%)' }
|
|
38
|
+
},
|
|
39
|
+
'slide-up': {
|
|
40
|
+
enter: { transform: 'translateY(100%)' },
|
|
41
|
+
'enter-to': { transform: 'translateY(0)' },
|
|
42
|
+
leave: { transform: 'translateY(0)' },
|
|
43
|
+
'leave-to': { transform: 'translateY(100%)' }
|
|
44
|
+
},
|
|
45
|
+
'slide-down': {
|
|
46
|
+
enter: { transform: 'translateY(-100%)' },
|
|
47
|
+
'enter-to': { transform: 'translateY(0)' },
|
|
48
|
+
leave: { transform: 'translateY(0)' },
|
|
49
|
+
'leave-to': { transform: 'translateY(-100%)' }
|
|
50
|
+
},
|
|
51
|
+
'slide-left': {
|
|
52
|
+
enter: { transform: 'translateX(-100%)' },
|
|
53
|
+
'enter-to': { transform: 'translateY(0)' },
|
|
54
|
+
leave: { transform: 'translateY(0)' },
|
|
55
|
+
'leave-to': { transform: 'translateX(-100%)' }
|
|
56
|
+
},
|
|
57
|
+
'slide-right': {
|
|
58
|
+
enter: { transform: 'translateX(100%)' },
|
|
59
|
+
'enter-to': { transform: 'translateY(0)' },
|
|
60
|
+
leave: { transform: 'translateY(0)' },
|
|
61
|
+
'leave-to': { transform: 'translateX(100%)' }
|
|
62
|
+
},
|
|
63
|
+
zoom: {
|
|
64
|
+
enter: { transform: 'scale(0.95)' },
|
|
65
|
+
'enter-to': { transform: 'scale(1)' },
|
|
66
|
+
leave: { transform: 'scale(1)' },
|
|
67
|
+
'leave-to': { transform: 'scale(0.95)' }
|
|
68
|
+
},
|
|
69
|
+
'fade-zoom': {
|
|
70
|
+
enter: { opacity: 0, transform: 'scale(0.95)' },
|
|
71
|
+
'enter-to': { opacity: 1, transform: 'scale(1)' },
|
|
72
|
+
leave: { opacity: 1, transform: 'scale(1)' },
|
|
73
|
+
'leave-to': { opacity: 0, transform: 'scale(0.95)' }
|
|
74
|
+
}
|
|
75
|
+
}
|
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
import { defineMixin } from '../../libs/vue'
|
|
2
|
-
import
|
|
2
|
+
import TransitionDefaultProps from './transition'
|
|
3
|
+
import { registerComponentProps } from '../../libs/config/props.js'
|
|
4
|
+
|
|
5
|
+
const defProps = registerComponentProps(TransitionDefaultProps)
|
|
3
6
|
export const props = defineMixin({
|
|
4
7
|
props: {
|
|
5
8
|
// 是否展示组件
|