element [Feature Request] el-table type selection with slot header and template custom

ukqbszuj  于 2023-02-04  发布在  其他
关注(0)|答案(1)|浏览(159)

Existing Component

Yes

Component Name

el-table

Description

<el-table-column type="selection" prop="ok" label="check">
          <template slot="header">
            <el-checkbox v-model="all">check</el-checkbox>
          </template>
          <template slot-scope="scope">
            <el-checkbox v-model="all" />
            <span>{{ scope.row.ok }}</span>
          </template>
        </el-table-column>

i need el-table-column with type selection
but in value i need custom or showing the checkbox with data value row.ok and change header of checkbox to string.
then i have 3 column where the column have checkbox and string with different data
how to trigger the all checkbox are checked in column1, column2 and column3 ?

before

  • // {checkbox}
{checkbox}
{checkbox}
{checkbox}

after

  • // {checkbox}
string label
{checkbox} string value ok
{checkbox} string value ok

the data looks like

data() {
    return {
         tableData: {
ok: 'john' ....
ok: 'doe'.....
q9yhzks0

q9yhzks01#

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

相关问题