Commit f5670085 by 前端

失去焦点事件

1 parent a7f37904
......@@ -2,7 +2,7 @@
* @Author: 前端 qianduan01@didihu.com.cn
* @Date: 2024-02-23 09:47:18
* @LastEditors: 前端 qianduan01@didihu.com.cn
* @LastEditTime: 2024-03-06 17:16:14
* @LastEditTime: 2024-03-06 18:04:49
* @FilePath: \dj-scrm-wx-work-attachment-psd\src\views\ai\index.vue
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
......@@ -19,9 +19,9 @@
<div class="card-desc">{{ item }}</div>
</div>
<van-field v-if="isInput" v-model="identityValue" @blur="handleBlur" placeholder="请输入身份" class="car-input" />
<van-field v-if="isInput" ref="input" v-model="identityValue" @blur="handleBlur" placeholder="请输入身份" class="car-input" />
<div class="card-item" v-else>
<span @click="isInput = !isInput">{{ identityValue ? identityValue : '自定义' }}</span>
<span @click="handleFocus">{{ identityValue ? identityValue : '自定义' }}</span>
</div>
</div>
<div class="card-title">用车意向</div>
......@@ -77,6 +77,12 @@ export default {
})
)
},
handleFocus() {
this.isInput = !this.isInput
this.$nextTick(()=>{
this.$refs.input.focus()
})
},
handleBlur() {
this.isInput = false
},
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!