微信公众号二维码长按识别时,不是识别,而是放大

<template>
    <div class="wzhalertcode" :style="{visibility:txqrcodeFlag?'visible':'hidden'}">
        <div class="qrcodeBox">
            <div class="qrcodeBoxtitle">{{wzhtopstr}}</div>
            <img :src="txqrcodeImg"  />
            <p class="qrcodeBoxMsg">-{{short_name}}-</p>
            <slot></slot>
            <div @click="txqrcodetap" class="qrcodeclose">关闭</div>
        </div>
    </div>
</template>
<script>
export default {
    name:'wzhalertcode',
    props: {
        txqrcodeFlag:{
            type:Boolean,
            default:false
        },
        short_name: {
            type: 'string',
        },
        txqrcodeImg:{
            type: 'string',
        },
        wzhtopstr:{
            type: 'string',
        },
    },
    data(){
        return {
        };
    },
    created(){
    },
    methods:{
        txqrcodetap:function(){
           this.$emit('update:txqrcodeFlag',false);
        },
    },
    mounted(){
    }
}
</script>
<style scoped  lang="less">
.wzhalertcode{
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
    width: 100%;
    height: 100%;
    display: -webkit-box;
    display: -moz-flex;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-pack: center;
    -ms-flex-pack: center;
    -moz-justify-content: center;
    justify-content: center;
    -webkit-box-align: center;
    -ms-flex-align: center;
    -moz-align-items: center;
    align-items: center;
    visibility: hidden;
    z-index: 10000;
    background-color: rgba(0,0,0,0.4);
    .qrcodeBox{
        display: block;
        width: 450px;
        background-color: #fff;
        border-radius: 20px;
        position: absolute;
        top: 25%;
        left: 50%;
        transform: translate(-50%, 0%);

        display: -webkit-box;
        display: -moz-flex;
        display: -ms-flexbox;
        display: flex;
        -moz-flex-direction: column;
        -ms-flex-direction: column;
        flex-direction: column;
        -webkit-user-select: none;
        -moz-user-select: none;
        user-select: none;
        z-index: 20;

        max-height: 90%;
        -webkit-box-direction: normal;
        -ms-user-select: none;
        max-width: 100%;
        -webkit-box-orient: vertical;


        .qrcodeBoxtitle{
            font-size: 16px;/*no*/
            text-align: center;
            height: 60px;
            line-height: 60px;
            font-weight: bold;
            padding-top: 8px;/*no*/
            padding-bottom: 15px;/*no*/
        }
        img{
            display: block;
            width:380px;
            margin:0 auto;
            max-width: 380px;
        }
        .qrcodeBoxMsg{
            font-size: 12px;/*no*/
            text-align: center;
            padding-top: 10px;/*no*/
            margin-bottom: 20px;
        }
        .qrcodeclose{
            display: block;
            width: 100%;
            text-align: center;
            height:60px;
            line-height: 60px;
            font-size: 14px;/*no*/
            color: #999;
            border-top: 1px solid #ccc;/*no*/
        }

    }
}
</style>

 

我用的是vue,这是个组件

  • 1
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值