|
@@ -31,6 +31,8 @@
|
|
|
:min="0"
|
|
|
:max="999999"
|
|
|
placeholder="请输入"
|
|
|
+ ref="cost"
|
|
|
+ @keyup.enter.native="onSubmit"
|
|
|
style="width: 100%;" />
|
|
|
</a-form-model-item>
|
|
|
<div style="display: flex;justify-content: center;padding: 30px 0;">
|
|
@@ -120,6 +122,15 @@ export default {
|
|
|
// 父页面传过来的弹框状态
|
|
|
openModal (newValue, oldValue) {
|
|
|
this.isShow = newValue
|
|
|
+ if (newValue) {
|
|
|
+ // 默认首项获取焦点
|
|
|
+ const _this = this
|
|
|
+ setTimeout(() => {
|
|
|
+ if (_this.$refs['cost']) {
|
|
|
+ _this.$refs['cost'].focus()
|
|
|
+ }
|
|
|
+ }, 300)
|
|
|
+ }
|
|
|
},
|
|
|
// 重定义的弹框状态
|
|
|
isShow (newValue, oldValue) {
|