2 Star 17 Fork 26

Archer/vue-element-plus-admin-doc

Create your Gitee Account
Explore and code with more than 13.5 million developers,Free private repositories !:)
Sign up
文件
.github/workflows
.vitepress
components
avatars.md
button.md
content-detail-wrap.md
count-to.md
descriptions.md
dialog.md
echart.md
editor.md
error.md
footer.md
form.md
highlight.md
i-agree.md
icon-picker.md
icon.md
image-viewer.md
infotip.md
input-password.md
introduction.md
json-editor.md
permission.md
qrcode.md
search.md
sticky.md
table.md
video-player.md
video-viewer.md
waterfall.md
dep
donate
guide
hooks
public
.gitignore
.prettierignore
CNAME
README.md
favicon.ico
index.md
package.json
prettier.config.js
tsconfig.json
vite.config.ts
windi.config.ts
yarn.lock
This repository doesn't specify license. Please pay attention to the specific project description and its upstream code dependency when using it.
Clone or Download
dialog.md 1.42 KB
Copy Edit Raw Blame History

Dialog 弹窗组件

element-plusDialog 组件进行封装。

Dialog 组件位于 src/components/Dialog

用法

<script setup lang="ts">
import { Dialog } from '@/components/Dialog'
import { ElButton } from 'element-plus'
import { ref } from 'vue'

const dialogVisible = ref(false)
</script>

<template>
  <ElButton type="primary" @click="dialogVisible = !dialogVisible">
    open
  </ElButton>
  <Dialog v-model="dialogVisible" title="dialog">
    <div v-for="v in 10000" :key="v">{{ v }}</div>
    <template #footer>
      <el-button @click="dialogVisible = false">close</el-button>
    </template>
  </Dialog>
</template>

Dialog 属性

除以下参数外,还支持 element-plusDialog 所有属性,详见

属性 说明 类型 可选值 默认值
modelValue 是否显示弹窗,支持v-model boolean - false
fullscreen 是否显示全屏按钮 boolean - true
title 弹窗标题 string - Dialog
maxHeight 弹窗内容最大高度 string/number - 500px

Dialog 插槽

插槽名 说明 子标签
- 弹窗内容 -
title 弹窗标题内容 -
footer 弹窗底部内容 -
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/kailong110120130/vue-element-plus-admin-doc.git
git@gitee.com:kailong110120130/vue-element-plus-admin-doc.git
kailong110120130
vue-element-plus-admin-doc
vue-element-plus-admin-doc
master

Search