vue中按回車鍵進行條件搜尋

2021-10-20 20:59:49 字數 2416 閱讀 9242

搜尋條件:

="views_box"

:gutter=

"20"

>

"4">

商品id:<

/div>

"dataform.id" placeholder=

"請輸入商品id"

@keydown.enter.native=

"seachenterfun"

>

<

/el-input>

<

/el-col>

"4">

商品名稱:<

/div>

v-model=

"dataform.goodsname"

placeholder=

"輸入商品名稱"

@keydown.enter.native=

"seachenterfun"

>

<

/el-input>

<

/el-col>

"4">

**商:<

/div>

"請選擇" v-model=

"dataform.supplier" @keydown.enter.native=

"seachenterfun" clearable>

v-for=

"(item, index) in supplier"

:key=

"index"

:label=

"item.supplier"

:value=

"item.supplierid"

>

<

/el-option>

<

/el-select>

<

/el-col>

"4">

商品分類:<

/div>

v-model=

"dataform.classification"

:options=

"optionsclassifi"

clearable

@keydown.enter.native=

"seachenterfun"

>

<

/el-cascader>

<

/el-col>

"4">

狀態:<

/div>

"請選擇" v-model=

"dataform.state" clearable @keydown.enter.native=

"seachenterfun"

>

v-for=

"item in state"

:key=

"item.value"

:label=

"item.label"

:value=

"item.value"

>

<

/el-option>

<

/el-select>

<

/el-col>

"1.2"

>

"primary" size=

"small" @click=

"search()"

>搜尋<

/el-button

>

<

/el-col>

"2">

"small" @click=

"resetting"

>重置<

/el-button>

<

/el-col>

"1.8"

>

"primary" size=

"small" @click=

"exports"

>匯出<

/el-button>

<

/el-col>

<

/el-row>

@keydown.enter.native=

"seachenterfun"

如:

"4">

商品id:<

/div>

"dataform.id" placeholder=

"請輸入商品id"

@keydown.enter.native=

"seachenterfun"

>

<

/el-input>

<

/el-col>

然後在methods: {}裡面寫入方法,在方法裡面呼叫search()方法

seachenterfun

(e)}

,

按回車鍵實現登入

password keyup.enter.native login type password v model form.password placeholder 密碼 prefix icon myicon myicon key el input el form item primary class...

vue element ui 回車鍵搜尋功能

乙個小問題 但是浪費了我很長時間找解決辦法 記錄一下 希望可以幫助到你哦 1.如果是使用了element ui 的el input,需要加.native,不然不起作用 value placeholder 請選擇 keyup.enter.native searchenterfun el input s...

datagridview 按回車鍵橫向移動問題

我在作乙個關於記件工資系統時候,datagridview 按回車鍵預設是向下一行移動,操作文員為了輸入更快一點,需要按回車鍵就橫向移動繼續輸入資料,其操作文員主要用右手操作鍵盤的數字鍵區域,每天輸入量大,所以必須要解決這個實際問題 我在網上搜尋了一些 private void dgv jj prev...