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

在角色选择器上添加@change事件,会导致触发两次事件 #1086

Closed
767616827 opened this issue Apr 13, 2020 · 2 comments
Closed

Comments

@767616827
Copy link

767616827 commented Apr 13, 2020

版本号:

2.1.4

问题描述:

在角色选择器上添加@change事件,会导致触发两次事件
,但是将v-model删除就没有这个问题了,麻烦看下是否需要优化

截图&代码:

友情提示: 未按格式要求发帖,会直接删掉。

@zhangdaiscott
Copy link
Member

已确认存在问题,处理中

@zhangdaiscott
Copy link
Member

image
117行

      selectValue: {
        deep: true,
        handler(val) {
          let rows = val.map(key => this.dataSourceMap[key])
          let data = val.join(',')
          if (data !== this.value) {
            this.$emit('select', rows)
            this.$emit('input', data)
            this.$emit('change', data)
          }
        }
      }

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