Skip to content

GDialog 对话框

所有属性都继承自element-plus

基础用法

<template>
  <div>
    <g-button type="primary" @click="dialog = true">open dialog</g-button>
    <g-dialog v-model="dialog" title="标题" width="300px">
      我是内容
    </g-dialog>
  </div>
</template>

<script setup lang="ts">
import { GDialog, GButton } from 'gao-components-plus'
import { ref } from 'vue';
const dialog  = ref(false)
</script>

属性

除以下属性外,其他属性都继承自element-plus

名称描述类型默认值
showFooter显示底部操作按钮Booleantrue
showCancel显示取消按钮Booleantrue
showConfirm显示确认按钮Booleantrue
cancelText取消按钮文本String取消
confirmText确认按钮文本String确认

emit事件

名称描述类型默认值
confirm确认() => void-
cancel取消() => void-

除以上方法外,其他方法都继承自element-plus

Released under the MIT License.