1. 修复modal组件按钮写错问题

2. 尝试解决安卓端swiper卡死问题
parent 174642f1
<template>
<view>
<u-modal v-model="show" :title-style="{color: 'red'}"></u-modal>
<u-modal v-model="show" :title-style="{color: 'red'}">
<view class="slot-content">
<rich-text :nodes="content"></rich-text>
</view>
</u-modal>
<u-button @click="open">
打开模态框
</u-button>
......@@ -11,7 +15,11 @@
export default {
data() {
return {
show: false
show: false,
content: `
空山新雨后<br>
天气晚来秋
`
}
},
methods: {
......@@ -21,6 +29,10 @@
}
}
</script>
<style>
<style lang="scss" scoped>
.slot-content {
font-size: 28rpx;
color: $u-content-color;
padding-left: 30rpx;
}
</style>
\ No newline at end of file
......@@ -16,7 +16,7 @@
class="u-model-footer-button"
type="default"
:style="[cancelBtnStyle]"
@click="confirm"
@tap="cancel"
>
{{cancelText}}
</view>
......@@ -26,7 +26,7 @@
hover-class="btn-hover"
class="u-model-footer-button hairline-left"
:style="[confirmBtnStyle]"
@tap="close"
@tap="confirm"
>
{{confirmText}}
</view>
......@@ -181,7 +181,7 @@ export default {
this.$emit('confirm');
this.$emit('input', false);
},
close() {
cancel() {
this.$emit('cancel');
this.$emit('input', false);
}
......
......@@ -2,7 +2,7 @@
<view class="u-swiper-wrap" :style="{
borderRadius: `${borderRadius}rpx`,
}">
<swiper @change="change" :current="current" :interval="interval" :circular="circular" :duration="duration" :autoplay="autoplay"
<swiper @change="change" @animationfinish="animationfinish" :current="current" :interval="interval" :circular="circular" :duration="duration" :autoplay="autoplay"
:previous-margin="effect3d ? effect3dPreviousMargin + 'rpx' : '0'" :next-margin="effect3d ? effect3dPreviousMargin + 'rpx' : '0'"
:style="{
height: height + 'rpx'
......@@ -180,7 +180,15 @@
this.$emit('click', index);
},
change(e) {
// #ifdef MP-TOUTIAO
this.current = e.detail.current;
// #endif
},
// 头条小程序不支持animationfinish事件,改由change事件
animationfinish() {
// #ifndef MP-TOUTIAO
this.current = e.detail.current;
// #endif
}
}
};
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment