element-ui中el-dialog使⽤技巧
项⽬需求需要在弹框的标题⾏添加下载按钮,⼀开始看官⽅⽂档,没有找到解决⽅法,官⽅的按钮都是放在弹框底部的,官⽅⽂档中有个slot,没看懂啥意思,但是解决的⽅法就是它
利⽤插巢slot给el-dialog弹框标题添加下载按钮学习自律
<el-dialog
v-dialogDrag
top="25vh"
:visible.sync="dialogFormVisible"
手机死机怎么办
append-to-body
:clo-on-click-modal=fal
国航行李托运规定
>
<div slot="title" class="header-title">
<span> {{this.tableTitle}} </span>
<download-excel :data="tableData" :fields="json_fields" :name="fileName">
<el-button type="primary" id="exportBtn" >导出</el-button>
</download-excel>
</div>河虾炒韭菜
</el-dialog>
利⽤插巢slot给el-dialog弹框标题添加图标及标题,弹框内嵌套表格
<el-dialog :title="title" :visible.sync="dialogVisible">
网络掉包
<div slot="title" class="header-title">
<img :src="src" alt="">
牛仔半身裙
<span>{{title}}</span>
</div>
<el-table :data="gridData" height="308">
<el-table-column property="date" label="⽇期" width="80" align="center"></el-table-column>个中三昧
<el-table-column property="name" label="名称" width="120"></el-table-column>
<el-table-column property="address" label="地址" show-overflow-tooltip></el-table-column>
</el-table>
人工菌</el-dialog>