Commit a6b63d4b authored by Facius's avatar Facius

feat: 答题页面左右滑动提示遮罩

parent fc58922f
<template>
<u-mask :show="show" :mask-close-able="false" :customStyle="customStyle">
<view class="tip-view">
<view class="tip-content">
<image class="tip-image" :src="imageUrl"></image>
<view class="tip-message">
<text>{{ message }}</text>
</view>
<view class="tip-btn-view">
<u-button
:custom-style="buttonStyle"
shape="circle"
type="primary"
@click="handleClick"
>
{{ buttonText }}
</u-button>
</view>
</view>
</view>
</u-mask>
</template>
<script>
/**
* @description 创建一个遮罩层,提示文字和图片
* @property {Boolean} visible 是否显示遮罩(默认false)
* @property {Object} custom-style 自定义样式对象,见上方说明
* @example <OperationTips :visible.sync="visible"></OperationTips>
*/
export default {
props: {
show: {
type: Boolean,
default: false,
},
message: {
type: String,
default: '左右滑动可切换上下题',
},
buttonText: {
type: String,
default: '我知道了',
},
customStyle: {
type: Object,
default() {
return {}
},
},
},
data() {
return {}
},
computed: {
imageUrl() {
return '/static/logo.png'
},
buttonStyle() {
return {
backgroundColor: '#FFFFFF',
width: '304rpx',
height: '104rpx',
color: '#2953FF',
fontWeight: 'bold',
fontSize: '32rpx',
}
},
},
methods: {
handleClick() {
this.$emit('update:show', false)
this.$emit('click')
},
},
}
</script>
<style lang="scss" scoped>
.tip-view {
display: flex;
justify-content: center;
align-items: center;
height: 100%;
.tip-content {
margin-top: 200rpx;
text-align: center;
.tip-image {
width: 670rpx;
height: 136rpx;
margin-bottom: 60rpx;
}
.tip-message {
font-size: 44rpx;
text-align: center;
color: #ffffff;
font-weight: bold;
}
.tip-btn-view {
padding-top: 288rpx;
}
}
}
</style>
...@@ -107,7 +107,6 @@ export default { ...@@ -107,7 +107,6 @@ export default {
font-size: 28rpx; font-size: 28rpx;
text-align: center; text-align: center;
color: #5a6073; color: #5a6073;
text-align: center;
} }
.pop-content { .pop-content {
......
...@@ -132,6 +132,7 @@ export default { ...@@ -132,6 +132,7 @@ export default {
border-radius: 24rpx; border-radius: 24rpx;
.top { .top {
width: 100%; width: 100%;
margin-left: 6rpx;
.avatar { .avatar {
padding-right: 16rpx; padding-right: 16rpx;
.avatar-list { .avatar-list {
...@@ -174,7 +175,6 @@ export default { ...@@ -174,7 +175,6 @@ export default {
.topics { .topics {
flex-flow: column; flex-flow: column;
flex: 1; flex: 1;
padding-left: 40rpx;
border-right: 2rpx solid #e8ebf3; border-right: 2rpx solid #e8ebf3;
.topics-lists { .topics-lists {
width: 100%; width: 100%;
......
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