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

配置: columns > component.name 中组件 $emit 中断 #79

Open
liaojiankai opened this issue Mar 5, 2020 · 1 comment
Open

配置: columns > component.name 中组件 $emit 中断 #79

liaojiankai opened this issue Mar 5, 2020 · 1 comment

Comments

@liaojiankai
Copy link

renderCustomComponent.vue 中 组件emit派发出去的事件 在 d2-crud.vue 188行没有进行处理无法继续向外emit事件。只能render 形式处理事件

@liaojiankai
Copy link
Author

简单解决
on="item.component && !!item.component.on && item.component.on"
在 render on 添加事件

<render-custom-component
     v-else-if="item.component && item.component.name"
     v-model="scope.row[item.key]"
     :component-name="item.component.name"
      :props="item.component.props ? item.component.props : null"
       :scope="scope"
       on="item.component && !!item.component.on && item.component.on"
       >
 </render-custom-component>
render (h) {
    let self = this
    return h(self.componentName, {
      props: {
        value: self.value,
        scope: self.scope,
        ...self.props
      },
      on: self.on ? self.on : {}
    })
  }

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

1 participant