当前位置:网站首页>抖音实战~点赞数量弹框
抖音实战~点赞数量弹框
2022-07-02 22:10:00 【gblfy】

组件
在components下面新建ge-popup.vue
<template>
<view>
<view class="mask"></view>
<!--绑定微信-->
<view class="wxbox">
<view class="weixin">
<image src="../static/dz.jpg"></image>
</view>
<view class="tips">"{
{nickName}}"共获得{
{
likeNum}}个赞</view>
<view class="tips" @click="close">确定</view>
</view>
</view>
</template>
<script>
export default {
props: {
nickName: {
type: String,
default: '昕泽之源'
},
likeNum: {
type: Number,
default: 1
}
},
data() {
return {
};
},
methods: {
close() {
this.$emit('close');
}
}
}
</script>
<style lang="scss">
.mask {
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
z-index: 888;
background-color: rgba(0, 0, 0, 0.6);
}
//微信弹窗
.wxbox {
position: absolute;
top: 20%;
z-index: 998;
width: 80%;
left: 10%;
background-color: #fff;
.weixin {
text-align: center;
image {
width: 100%;
height: 120px;
}
}
.tips {
padding: 10rpx 20rpx;
text-align: center;
font-size: 35rpx;
color: #333;
}
}
</style>
使用
<template>
<view>
<popup v-show="isMask" :nickName="nickName" :likeNum="likeNum" @close="closeMask()"></popup>
</view>
</template>
<script>
import popup from "@/components/ge-popup.vue";
export default {
components: {
popup
},
data() {
return {
nickName: "昕泽之源2",
isMask: true,
likeNum: 10
}
},
onLoad() {
},
methods: {
closeMask() {
//关闭弹窗
console.log("isMask")
this.isMask = false;
},
update() {
console.log('更新操作');
}
}
}
</script>
<style>
</style>
边栏推荐
- Jericho's thimble reaction when directly touching the prototype is abnormal [chapter]
- 电路设计者常用的学习网站
- SQL advanced syntax
- 聊聊内存模型与内存序
- Solving ordinary differential equations with MATLAB
- Redis expiration policy +conf record
- AES高級加密協議的動機闡述
- Pytorch training CPU usage continues to grow (Bug)
- Learning records of data analysis (II) -- simple use of response surface method and design expert
- Loss function~
猜你喜欢
随机推荐
Pytorch training CPU usage continues to grow (Bug)
【硬件】标准阻值的由来
程序员版本的八荣八耻~
Methods to solve the tampering of Chrome browser and edeg browser homepage
Chow-Liu Tree
Static file display problem
Go multithreaded data search
最小生成树 Minimum Spanning Tree
Ping domain name error unknown host, NSLOOKUP / system d-resolve can be resolved normally, how to Ping the public network address?
[hardware] origin of standard resistance value
The kth largest element in the [leetcode] array [215]
[npuctf2020]ezlogin XPath injection
[leetcode] most elements [169]
Innovation strength is recognized again! Tencent security MSS was the pioneer of cloud native security guard in 2022
antd组件upload上传xlsx文件,并读取文件内容
[leetcode] reverse string [344]
严守工期,确保质量,这家AI数据标注公司做到了!
WebRTC音视频采集和播放示例及MediaStream媒体流解析
景联文科技低价策略帮助AI企业降低模型训练成本
Uniapp wechat login returns user name and Avatar









