xgqfrms™, xgqfrms® : xgqfrms's offical website of cnblogs! xgqfrms™, xgqfrms® : xgqfrms's offical website of GitHub!

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, 禁止转载 🈲️,侵权必究⚠️!


posted @ 2021-12-01 12:01  xgqfrms  阅读(41)  评论(7编辑  收藏  举报