账号密码登录
微信安全登录
微信扫描二维码登录

登录后绑定QQ、微信即可实现信息互通

手机验证码登录
找回密码返回
邮箱找回 手机找回
注册账号返回
其他登录方式
分享
  • 收藏
    X
    对iview的Modal进一步封装在我们的项目中。
    49
    0

    iView的模态对话框: https://www.iviewui.com/compo...

    请看这一个:

    <template>
        <Button type="primary" @click="modal6 = true">Display dialog box</Button>
        <Modal
            v-model="modal6"
            title="Title"
            :loading="loading"
            @on-ok="asyncOK">
            <p>After you click ok, the dialog box will close in 2 seconds.</p>
        </Modal>
    </template>
    <script>
        export default {
            data () {
                return {
                    modal6: false,
                    loading: true
                }
            },
            methods: {
                asyncOK () {
                    setTimeout(() => {
                        this.modal6 = false;
                    }, 2000);
                }
            }
        }
    </script>
    

    我们使用它的时候,一般会写一个<Modal><template>中,我们能否封装下它?我们可以看到iView的Message是多么的方便。
    使用的时候直接:this.$Message.info("消息")

    是否能够封装成这样来使用?

    0
    打赏
    收藏
    点击回答
        全部回答
    • 0
    更多回答
    扫一扫访问手机版
    • 回到顶部
    • 回到顶部