zollero / el-search-table-pagination

🐶 Combine Form, Table and Pagination components of Element UI together.
MIT License
306 stars 79 forks source link

自定义操作列无法显示button #21

Closed younglee1 closed 6 years ago

younglee1 commented 6 years ago

您好,我在使用时候在表格最右侧加了一列操作列,想要在每一行加一个编辑和删除按钮,但是列能出来button却不能显示,请问是什么问题? 以下是我的代码:

image

image

zollero commented 6 years ago

image

请阅读文档

https://github.com/zollero/el-search-table-pagination/blob/master/docs/zh_CN.md#slots

younglee1 commented 6 years ago

你好,我确实是按照文档中格式来写的,最右侧也多出了一列,只是button没有显示出来

zollero commented 6 years ago

代码贴出来,不要截图

younglee1 commented 6 years ago
<div>
  <el-search-table-pagination
    type="local"
    :data="teamData"
    :page-sizes="[10, 20, 50]"
    :columns="columns"
    stripe
    highlight-current-row
    :form-options="formOptions">
      <el-table-column label="Operate" slot="append" width="200px">
        <template slot-scope="scope">
          <el-button
            size="mini">Edit</el-button>
          <el-button
            size="mini"
            type="danger">Delete</el-button>
        </template>
      </el-table-column>
    </el-search-table-pagination>
</div>
zollero commented 6 years ago

这个应该是可以的。 https://codepen.io/zollero/pen/OEqGZy 你看看代码是不是其他地方有问题

younglee1 commented 6 years ago

好的,我再看一下,谢谢了