美文网首页
Modal 弹框

Modal 弹框

作者: 稻草人_9ac7 | 来源:发表于2020-02-16 22:45 被阅读0次
<template>
<div>
    <Button @click="modal2 = true">头部和底部风格按钮</Button>
    <Modal v-model="modal2" width="360">
        <p slot="header" style="color:#f60;text-align:center">
            <Icon type="ios-information-circle"></Icon>
            <span>弹框标题</span>
        </p>
        <div style="text-align:center">
            <p>弹框的提示内容</p>
        </div>
        <div slot="footer">
            <Button type="error" size="large" long :loading="modal_loading" @click="del">删除</Button>
        </div>
    </Modal>
    
    </div>
</template>
<script>
    export default {
        data () {
            return {
                modal2: false,
                modal_loading: false
            }
        },
        methods: {
            del () {
                this.modal_loading = true;
                setTimeout(() => {
                    this.modal_loading = false;
                    this.modal2 = false;
                    this.$Message.success('Successfully delete');
                }, 2000);
            }
        }
    }
</script>

结果图:


结果图

相关文章

网友评论

      本文标题:Modal 弹框

      本文链接:https://www.haomeiwen.com/subject/cscvfhtx.html