qiu111
qiu111
  • 发布:2022-03-28 17:07
  • 更新:2022-10-31 09:42
  • 阅读:3108

分类:uni-app

要回复文章请先登录注册

lelele

lelele

回复 5***@qq.com :
// 全局写入hideKeyboard方法

Vue.prototype.hideKeyboard = function() {

var interval = setInterval(function() {

uni.hideKeyboard(); //隐藏软键盘

console.log('刷新')

}, 20);

setTimeout(() => {

clearInterval(interval);

console.log('停止刷新')

}, 1000);

}
2022-10-31 09:42
lelele

lelele

回复 1***@qq.com :
// 全局写入hideKeyboard方法

Vue.prototype.hideKeyboard = function() {

var interval = setInterval(function() {

uni.hideKeyboard(); //隐藏软键盘

console.log('刷新')

}, 20);

setTimeout(() => {

clearInterval(interval);

console.log('停止刷新')

}, 1000);

}
2022-10-31 09:42
lelele

lelele

回复 l***@163.com :
// 全局写入hideKeyboard方法

Vue.prototype.hideKeyboard = function() {

var interval = setInterval(function() {

uni.hideKeyboard(); //隐藏软键盘

console.log('刷新')

}, 20);

setTimeout(() => {

clearInterval(interval);

console.log('停止刷新')

}, 1000);

}
2022-10-31 09:42
lelele

lelele

回复 lelele :
// 全局写入hideKeyboard方法

Vue.prototype.hideKeyboard = function() {

var interval = setInterval(function() {

uni.hideKeyboard(); //隐藏软键盘

console.log('刷新')

}, 20);

setTimeout(() => {

clearInterval(interval);

console.log('停止刷新')

}, 1000);

}
2022-10-31 09:40
lelele

lelele

写个小功能还要有偿吗?亲测这种方法可解决
// 全局写入hideKeyboard方法
Vue.prototype.hideKeyboard方法 = function() {
var interval = setInterval(function() {
uni.hideKeyboard(); //隐藏软键盘
console.log('刷新')
}, 20);
setTimeout(() => {
clearInterval(interval);
console.log('停止刷新')
}, 1000);
}
2022-10-31 09:39
2***@qq.com

2***@qq.com

是否受限于webview 版本
2022-08-20 18:00
9***@qq.com

9***@qq.com

狭隘
2022-08-18 16:22
l***@163.com

l***@163.com

好使,
2022-07-29 17:06
l***@163.com

l***@163.com

兄弟,我现在也遇到这样的问题,纠结好几天了,期待你的答复
2022-07-29 16:05
pure111

pure111

nvue可以吗
2022-07-28 17:29