标签:eth lis EDA current port maxheight nbsp change app
1)在封装组件中使用table具名插槽,并自定义具名插槽,对外开发使用:commonTable
<template> <div class="common-table-style"> <el-table :data="tableData" tooltip-effect="dark" border highlight-current-row :max-height="maxHeight" :empty-text="emptyText" @sort-change="sortChange" @filter-change="filterChange" @selection-change="selectionChange" ref="commonRef" > <slot></slot> <div slot="append"> <slot name="xxxx"></slot> </div> </el-table> </div> </template>
2)封装组件的使用方法:
<template> <div v-loading="loading"> <sn-table :tableData="entityTableData.list" class="mt20"> <el-table-column label="名称" prop="name" show-overflow-tooltip></el-table-column> <el-table-column label="中文名" prop="entityChName" show-overflow-tooltip></el-table-column> <div slot="xxxxx"> more content </div> </sn-table> </div> </template>
标签:eth lis EDA current port maxheight nbsp change app
原文地址:https://www.cnblogs.com/zhang134you/p/11792925.html