JModal - xinwu-yang/cube-vue GitHub Wiki

JModal Modal弹窗组件

一个基于ant design Modal组件二次封装的弹窗组件,支持设置全屏弹窗。

代码演示

<template>
	<j-modal title="弹窗标题" width="1200" :visible="visible" :switchFullscreen="true">
    弹窗内容部分
  </j-modal>
</template>
<script>
	export default {
    data() {
      return {
        visible: false
      }
    }
  }
</script>

api

props

属性 说明 类型 必填 默认值
title 标题 string
visible(.sync) 是否显示弹窗 boolean false
fullscreen(.sync) 是否全屏 boolean false
switchFullscreen 是否允许切换全屏 boolean false
okClose 点确定按钮时是否关闭弹窗 boolean true
其他属性 参考ant design Modal组件

事件

事件名称 说明 回调参数
ok 点击确定按钮时调用 function(e)
cancel 点击取消按钮时调用 function(e)
⚠️ **GitHub.com Fallback** ⚠️