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] 数字键盘 $_onConfirm 方法关闭可控 #474

Closed
gongph opened this issue Jun 19, 2019 · 1 comment
Closed

[feature request] 数字键盘 $_onConfirm 方法关闭可控 #474

gongph opened this issue Jun 19, 2019 · 1 comment
Assignees
Labels
@Components Components related discuss Need discuss feature New feature or request

Comments

@gongph
Copy link

gongph commented Jun 19, 2019

Hi, @xxyan0205 现在组件中的数字键盘点击支付按钮后默认就隐藏了键盘,源码如下:

$_onConfirm() {
this.$emit('confirm')
this.hide()

但是我想在这个方法之前做些事情不想让它自动隐藏却做不到,能否让用户决定隐藏与否?

<md-number-keyboard @confirm="handleConfirm"/>
export default {
  ...
  methods: {
    handleConfirm () {
      if (!this.number) return // 这里无法return
      this.$emit('number:confirm')
    }
  }
@supergaojian supergaojian added discuss Need discuss feature New feature or request labels Jun 19, 2019
@xxyan0205 xxyan0205 added the @Components Components related label Jun 19, 2019
@gongph
Copy link
Author

gongph commented Jun 19, 2019

谢谢关注。@hide@confirm 两个事件最终都会走到 handleHide() 方法,导致无法区分来源(来自 hide 操作还是 confirm 操作)业务逻辑无法处理。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
@Components Components related discuss Need discuss feature New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants