第七色在线视频,2021少妇久久久久久久久久,亚洲欧洲精品成人久久av18,亚洲国产精品特色大片观看完整版,孙宇晨将参加特朗普的晚宴

為了賬號安全,請及時綁定郵箱和手機立即綁定
已解決430363個問題,去搜搜看,總會有你想問的

Vue鍵盤事件為何要加上native?

Vue鍵盤事件為何要加上native?

慕容3067478 2018-11-22 18:06:42
<template><el-form :model="ruleForm2" :rules="rules2" ref="ruleForm2" label-position="left" label-width="0px"         class="demo-ruleForm login-container" >    <h3 class="title">系統(tǒng)登錄</h3>    <el-form-item prop="account">        <el-input type="text" v-model="ruleForm2.account" auto-complete="off" placeholder="賬號"></el-input>    </el-form-item>    <el-form-item prop="password">        <el-input type="password" v-model="ruleForm2.password" auto-complete="off" placeholder="密碼" @keyup.enter.native="handleSubmit2"></el-input>    </el-form-item>    <el-form-item style="width:100%;">        <el-button type="primary" style="width:100%;"  @click.native.prevent="handleSubmit2" :loading="logining" >登錄        </el-button>    </el-form-item></el-form></template>@keyup.enter這里必須加上 .native 才能生效.
查看完整描述

1 回答

?
忽然笑

TA貢獻1806條經(jīng)驗 獲得超5個贊

因為你@keyup.enter是寫在一個封裝好的組件上 
如果你寫在一個input上就不需要.native 
至于為什么,請參考vue文檔

查看完整回答
反對 回復 2018-12-15
  • 1 回答
  • 0 關注
  • 786 瀏覽
慕課專欄
更多

添加回答

舉報

0/150
提交
取消
微信客服

購課補貼
聯(lián)系客服咨詢優(yōu)惠詳情

幫助反饋 APP下載

慕課網(wǎng)APP
您的移動學習伙伴

公眾號

掃描二維碼
關注慕課網(wǎng)微信公眾號