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

Add hold event to change value of <n-input-number/> #1293

Closed
sondh0127 opened this issue Oct 8, 2021 · 3 comments · Fixed by #2391
Closed

Add hold event to change value of <n-input-number/> #1293

sondh0127 opened this issue Oct 8, 2021 · 3 comments · Fixed by #2391

Comments

@sondh0127
Copy link
Contributor

This function solves the problem (这个功能解决的问题)

we can change the value of input number in single hold click

Expected API (期望的 API)

The element-plus team use this 'v-repeat-click' directive

 <span
  v-if="controls"
  v-repeat-click="increase"
  class="el-input-number__increase"
  role="button"
  :class="{ 'is-disabled': maxDisabled }"
  @keydown.enter="increase"
>
  <i :class="`el-icon-${controlsAtRight ? 'arrow-up' : 'plus'}`"></i>
</span>

https://github.com/element-plus/element-plus/blob/dev/packages/directives/repeat-click/index.ts

@github-actions github-actions bot added the feature request New feature or request label Oct 8, 2021
@Talljack
Copy link
Contributor

Which demo in element?

@sondh0127
Copy link
Contributor Author

Which demo in element?
This one
https://element-plus.org/en-US/component/input-number.html

@Talljack
Copy link
Contributor

Which demo in element?
This one
https://element-plus.org/en-US/component/input-number.html

I think you can be specific like https://element-plus.org/en-US/component/input-number.html#steps

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

Successfully merging a pull request may close this issue.

3 participants