story#6462,阻止输入框默认行为

This commit is contained in:
2025-05-21 14:00:04 +08:00
parent 0a668e6f57
commit cc083b7551

View File

@ -81,7 +81,7 @@
:value="item.value"> :value="item.value">
</el-option> </el-option>
</el-select> </el-select>
<el-input @focus.native.capture.prevent="handleFocus" v-model="areaName" placeholder="请选择发布省市" :class="{'customSel':true,'customInput':true , 'has-value': areaName }" clearable></el-input> <el-input readonly @focus.native.prevent="handleFocus" v-model="areaName" placeholder="请选择发布省市" :class="{'customSel':true,'customInput':true , 'has-value': areaName }" clearable></el-input>
<el-input readonly @focus="showDatePicker = true" v-model="dateVal" placeholder="请选择发布日期" :class="{'customSel':true,'customInput':true , 'has-value': dateVal }" clearable></el-input> <el-input readonly @focus="showDatePicker = true" v-model="dateVal" placeholder="请选择发布日期" :class="{'customSel':true,'customInput':true , 'has-value': dateVal }" clearable></el-input>
</div> </div>
<div class="contentWrap" v-show="!show"> <div class="contentWrap" v-show="!show">
@ -251,7 +251,7 @@ export default {
}, },
methods:{ methods:{
handleFocus(e) { handleFocus(e) {
e.preventDefault(); e.preventDefault(); // 阻止默认键盘弹出
this.areaShow = true; this.areaShow = true;
}, },
confirmHandle(val){ confirmHandle(val){