提交 9a53eb54 编写于 作者: taohebin@dcloud.io's avatar taohebin@dcloud.io

feat:input 增加hold-keyboard示例

上级 0dfd2ab3
......@@ -153,7 +153,19 @@
<view class="input-wrapper">
<input class="uni-input" :adjust-position="true" />
</view>
</view>
</view>
<view>
<view class="uni-title" style="flex-direction: row;align-items: center;">
<text class="uni-title-text">设置hold-keyboard</text>
<switch style="margin-left: 10px;" @change="changeHoldKeyboard" :checked="holdKeyboard"></switch>
</view>
<view class="input-wrapper">
<input class="uni-input" :hold-keyboard="holdKeyboard" value="hold-keyboard" />
</view>
</view>
<view>
<view class="uni-title">
......@@ -245,7 +257,8 @@
onMaxLengthInputValue:"",
inputMaxLengthFocus:false,
inputPasswordValue:"",
inputFocusKeyBoardChangeValue:true
inputFocusKeyBoardChangeValue:true,
holdKeyboard:false
}
},
methods: {
......@@ -303,15 +316,19 @@
return this.onMaxLengthInputValue.length
},
changeCursorColor(event: SwitchChangeEvent){
const transparent = event.detail.value;
if(transparent){
const checked = event.detail.value;
if(checked){
this.cursor_color = "red"
}else{
this.cursor_color = "#3393E2"
}
const input = uni.getElementById<UniInputElement>("uni-input-cursor-color")
input?.focus()
},
},
changeHoldKeyboard(event: SwitchChangeEvent){
const checked = event.detail.value;
this.holdKeyboard = checked
}
}
}
</script>
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册