|
@@ -57,13 +57,15 @@
|
|
|
id="productInfoEdit-unit-input"
|
|
|
placeholder="请输入基本单位"
|
|
|
ref="unit"
|
|
|
- @keydown.enter.native="nextFocus('unit', 'productBrandSn', $event)"
|
|
|
+ @keydown.enter.native="nextFocus('unit', 'UNIT', $event, 'vSelect')"
|
|
|
allowClear/>
|
|
|
<v-select
|
|
|
style="width: 20%"
|
|
|
code="UNIT"
|
|
|
@change="unitChange"
|
|
|
id="productInfoEdit-unit"
|
|
|
+ ref="UNIT"
|
|
|
+ @keydown.enter.native="nextFocus('UNIT', 'productBrandSn', $event)"
|
|
|
placeholder="快速选择单位"></v-select>
|
|
|
</a-input-group>
|
|
|
</a-form-model-item>
|
|
@@ -280,13 +282,17 @@ export default {
|
|
|
})
|
|
|
},
|
|
|
// 回车键快捷定位表单下一项
|
|
|
- nextFocus (nowRef, nextRef, event) {
|
|
|
+ nextFocus (nowRef, nextRef, event, isComponent) {
|
|
|
const _this = this
|
|
|
if (_this.$refs[nowRef]) {
|
|
|
_this.$nextTick(() => {
|
|
|
- event.target.blur()
|
|
|
if (_this.$refs[nextRef]) {
|
|
|
- _this.$refs[nextRef].focus()
|
|
|
+ event.target.blur()
|
|
|
+ if (isComponent == 'vSelect') {
|
|
|
+ _this.$refs[nextRef].$children[0].focus()
|
|
|
+ } else {
|
|
|
+ _this.$refs[nextRef].focus()
|
|
|
+ }
|
|
|
}
|
|
|
})
|
|
|
}
|