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

This commit is contained in:
2025-05-21 14:10:45 +08:00
parent 8e20adbba3
commit 9df87ac518

View File

@ -81,7 +81,7 @@
:value="item.value">
</el-option>
</el-select>
<el-input @focus.native.prevent="handleFocus" v-model="areaName" placeholder="请选择发布省市" :class="{'customSel':true,'customInput':true , 'has-value': areaName }" clearable></el-input>
<el-input @focus="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>
</div>
<div class="contentWrap" v-show="!show">
@ -197,6 +197,7 @@ export default {
dateVal: '',
showDatePicker: false,
areaShow:false,
isClearing:false,
}
},
watch:{
@ -251,8 +252,10 @@ export default {
},
methods:{
handleFocus(e) {
e.preventDefault(); // 阻止默认键盘弹出
console.log("e",e)
e.preventDefault(); // 阻止默认行为(键盘弹出)
this.areaShow = true;
// 监听清空按钮的点击事件
},
confirmHandle(val){
if(val[0].name.includes('市')){