vuejs 组件
VueLongpress (VueLongpress)
A VueJS (2.x) button component that requires you to keep pressing to confirm a given action.
一个VueJS(2.x)按钮组件,要求您按住以确认给定的操作。
Confirmation button for sensitive action, which requires to be hold for an amount of seconds
确认按钮,用于敏感操作,需要按住几秒钟
这是什么? (What is this?)
A component that will generate a button that requires you to keep pressing for a given time to execute a given action.
该组件将生成一个按钮,该按钮要求您在给定时间内持续按下以执行给定操作。
我为什么需要那个? (Why would i need that?)
Think of a sensitive scenario, something like deleting a user's data, you might need to confirm for 5 seconds that you actually want to delete it, to prevent unintentional clicks
考虑到一个敏感的情况,例如删除用户的数据,您可能需要确认5秒钟才真正想要删除它,以防止意外点击
现场演示 (Live Demo)
https://jsfiddle.net/qr9ykxpp/
https://jsfiddle.net/qr9ykxpp/
翻译自: https://vuejsexamples.com/a-vuejs-button-component-that-requires-you-to-keep-pressing/
vuejs 组件