js listen to input paste event All In One
js listen to input paste event All In One
<textarea
class="text-content-textarea"
v-model="texts"
@input="updateInput"
@paste="pasteHandler"
type="textarea"
:rows="rows"
placeholder="请输入内容">
</textarea>
<!-- <el-input
class="text-content-textarea"
v-model="texts"
@input="updateInput"
@native.paste="pasteHandler"
type="textarea"
:rows="2"
placeholder="请输入内容">
</el-input> -->
vue .native event modifier
<template>
<div>
<special-button @click="onClick" />
</div>
</template>
<template>
<div>
<special-button @click.native="onClick" />
</div>
</template>
breaking change ❌
v-on.native modifier removed
https://v3.vuejs.org/guide/migration/v-on-native-modifier-removed.html#v-on-native-modifier-removed
<my-component
v-on:close="handleComponentEvent"
v-on:click.native="handleNativeClickEvent"
/>
refs
https://yossiabramov.com/blog/the-native-event-modifier-in-vue-js
©xgqfrms 2012-2020
www.cnblogs.com/xgqfrms 发布文章使用:只允许注册用户才可以访问!
原创文章,版权所有©️xgqfrms, 禁止转载 🈲️,侵权必究⚠️!
本文首发于博客园,作者:xgqfrms,原文链接:https://www.cnblogs.com/xgqfrms/p/15628339.html
未经授权禁止转载,违者必究!