Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature Request] table formatter params #6606

Closed
believeZJP opened this issue Aug 21, 2017 · 2 comments
Closed

[Feature Request] table formatter params #6606

believeZJP opened this issue Aug 21, 2017 · 2 comments

Comments

@believeZJP
Copy link

Existing Component

Yes

Component Name

el-table

Description

when I want to Transfer parameters to formatter ,it cover the default row and column. how to transfer the row to .
link: https://jsfiddle.net/believezjp/xf9j7x9r/
js is error ,so the table can't show correctly.

@Leopoldthecoder
Copy link
Contributor

@lhajh
Copy link

lhajh commented Sep 7, 2017

@Leopoldthecoder 最好把这个例子也放到官网上面
在官网只找到这个例子

    <el-table-column
      prop="address"
      label="地址"
      :formatter="formatter">
    </el-table-column>

      formatter(row, column, cellValue) {
        return row.address;
      }

并没有这个例子

     <el-table-column
      prop="address"
      label="地址"
      :formatter="(row, column) => formatter2(row, column, 'address')">
    </el-table-column>

      formatter2(row, column, prop) {
      	// The problem is here. can't get row correctly~~~
        return row[prop];
      }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants