vue.js 彈層


 

<div class="open-box"  v-if="SystemShow" @click="ColseShow">
            <div class="open-box-content">
                <h3>系統提示</h3>
                <p>系統檢測到您是天下醫家的醫護人員
                    <br>可以通過APP進行點餐
                    <br>獲得更多優惠</p>
                <div class="open-box-btn">
                    <div class="open-box-btn-left">
                        <button>繼續使用</button>
                    </div>
                    <div class="open-box-btn-right">
                        <button>下載天下醫家</button>
                    </div>
                </div>
            </div>
        </div>

<style>

.open-box {
    position: fixed;
    background: rgba(0, 0, 0, 0.4);
    width: 100%;
    height: 100%;
    left: 0;   /**定位時需注意  不然ios找不到顯示地方**/
    top: 0;  /**定位時需注意  不然ios找不到顯示地方**/
    z-index: 100;
    color: #fff;
    text-align: center;
}

.open-box-content {
    background: #fff;
    border-radius: 3px;
    width: 305px;
    margin: 0 auto;
    margin-top: 35%;
}

.open-box-content h3 {
    width: 100%;
    color: #5089fc;
    text-align: center;
    border-bottom: solid 1px #5089fc;
    height: 55px;
    line-height: 55px;
    font-size: 21px;
}

.open-box-content p {
    width: 100%;
    text-align: center;
    line-height: 24px;
    color: #333333;
    font-size: 16px;
    margin-top: 20px;
}

.open-box-btn {
    width: 100%;
    overflow: hidden;
    padding: 25px 0 18px;
}

.open-box-btn-left {
    width: 50%;
    float: left;
}

.open-box-btn-left button {
    width: 90%;
    border-radius: 2px;
    border: none;
    background: #e6e6e6;
    color: #656565;
    height: 40px;
    line-height: 38px;
    font-size: 16px;
    outline: none;
    cursor: pointer;
}

.open-box-btn-right {
    width: 50%;
    float: right;
}

.open-box-btn-right button {
    width: 90%;
    border-radius: 2px;
    border: none;
    background: #5089fc;
    color: #ffffff;
    height: 40px;
    line-height: 38px;
    font-size: 16px;
    outline: none;
    cursor: pointer;
}

</style>

<script>
export default {
    data() {
            return {
           
                OpenAppShwo: true

            }
        },
        methods: {
          //在哪調用  就在哪@click="方法名" 
            OpenApp() {
                this.OpenAppShwo = !this.OpenAppShwo

            },
            CloseAp() {

                this.OpenAppShwo = !this.OpenAppShwo
            }
        }
}
</script>


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM