beta
This commit is contained in:
@@ -0,0 +1,64 @@
|
||||
<template>
|
||||
<uni-popup ref="popup" type="center"
|
||||
background-color="#777D90"
|
||||
mask-background-color="rgba(0,0,0,0)"
|
||||
@change="change">
|
||||
<view class="pop-inner">
|
||||
<view class="pop-title" v-if="title">{{ title }}</view>
|
||||
<view class="pop-content" v-if="content">{{ content }}</view>
|
||||
</view>
|
||||
</uni-popup>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: "Notice",
|
||||
props: {
|
||||
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
title: '',
|
||||
content: ''
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
open(args) {
|
||||
this.$nextTick(() => {
|
||||
this.title = args.title
|
||||
this.content = args.content
|
||||
this.$refs.popup.open()
|
||||
setTimeout(() => {
|
||||
this.$refs.popup.close()
|
||||
}, 3000)
|
||||
})
|
||||
},
|
||||
close() {
|
||||
this.$refs.popup.close()
|
||||
},
|
||||
change(e) {
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.pop-inner{
|
||||
align-items: center;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
flex-direction: column;
|
||||
}
|
||||
:deep(.uni-popup__wrapper.center){
|
||||
text-align: center;
|
||||
background-color: #777D90;
|
||||
color: #fff;
|
||||
height: 226px;
|
||||
width: 504px;
|
||||
font-size: 28px;
|
||||
border-radius: 30px;
|
||||
}
|
||||
</style>
|
||||
Reference in New Issue
Block a user