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

请问如何在button里,拿到当前行的index值,即scope.$index值 #16

Open
Eva-Zhy opened this issue Jun 9, 2019 · 3 comments

Comments

@Eva-Zhy
Copy link

Eva-Zhy commented Jun 9, 2019

删除 <script> export default { props: ['row', 'col', 'column'], methods: { todo () { this.$emit('row-editor', this.row, this.col) } } } </script>
@kele59
Copy link

kele59 commented Jul 5, 2019

这个问题也一直困扰着我,懒得去修改源码了,现在直接用 id 去解决的

@kele59
Copy link

kele59 commented Jul 5, 2019

@Eva-Zhy
改一下源码即可

    getCptBind ({ row, column, $index}, col) {
      // 原仓库未传递 $index
      const index = $index
      const props = { row, col, column, index }
      const handler = col.propsHandler
      return handler && handler(props) || props
    }

@Eva-Zhy
Copy link
Author

Eva-Zhy commented Jul 8, 2019

好的,谢谢,我去尝试一下

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

2 participants