Scoped Slot的用法在官网可以看到大概信息,但是不具体。案例有的话我慢慢添加
1、自定义表格显示数据时列的内容
单独写了案例。添加链接描述
2、自定义列的表单中内容
首先\lsfw-ui\src\const\crud\admin\sysxxfsjl.js文件中,要配置formslot:true
然后在对应的vue文件中\src\views\admin\sysxxfsjl.vue对template 设置slot-scope="scope"和 slot="htfjmcForm"属性即可(列表单的prop+Form(htfjmcForm))
<template slot-scope="scope" slot="htfjmcForm">
<el-upload
:headers="headers"
:show-file-list="true"
:on-success="handleAvatarSuccess"
accept=".doc,.docx,.pdf.xls,.xlsx,.wps"
action="/admin/sys-file/upload">
<el-button size="small" icon="el-icon-link" type="primary">上传合同</el-button>
<el-link type="primary" v-show="fileExist" target="_blank" :href="fileviewURL"><i class="el-icon-view el-icon--right"></i>查看合同</el-link>
</el-upload>
</template>
3、自定义列的表单中内容
4、自定义暂无数据的卡槽
5、自定义折叠板的内容
首先\lsfw-ui\src\const\crud\admin\sysxxfsjl.js文件中,要配置expand: true