2020-08-27 17:18:57 +08:00

616 B

layout
templateLayout
<template>
    <Wb-switch :confirm="confirm"></Wb-switch>
</template>
<script>
export default {
    methods: {
        confirm() {
            return new Promise((resolve, reject)=>{
                this.$Message({
                    title: '警告', // 可以传入文本和domString
                    template: '是否切换状态?', // 可以传入文本和domString
                }).then(function (index) {
                    if (index == 0) {
                        resolve()
                    }
                })
            })
        },
    }
}
</script>