Element-ui Dialog 对话框
原文链接:https://note.noxussj.top/?source=sifo
用于弹出窗口
按需引入形式
如果是残缺引入可跳过此步骤
import Vue from 'vue'
import {Dialog} from 'element-ui'
import 'element-ui/lib/theme-chalk/base.css'
import 'element-ui/lib/theme-chalk/dialog.css'
Vue.use(Dialog)
根底应用
<template>
<el-button @click="dialogVisible = true"> 点击关上 Dialog</el-button>
<el-dialog title="提醒" :visible.sync="dialogVisible" width="30%">
<span> 这是一段信息 </span>
<span slot="footer" class="dialog-footer">
<el-button @click="dialogVisible = false"> 取 消 </el-button>
<el-button type="primary" @click="dialogVisible = false"> 确 定 </el-button>
</span>
</el-dialog>
</template>
<script>
export default {data() {
return {dialogVisible: false}
}
}
</script>
Attributes
原文链接:https://note.noxussj.top/?source=sifo