mirror of
https://github.com/openharmony/third_party_jsframework.git
synced 2026-07-01 13:36:00 -04:00
@@ -66,6 +66,30 @@ export function mockInputMethod() {
|
||||
resolve(paramMock.paramBooleanMock);
|
||||
})
|
||||
}
|
||||
},
|
||||
showSoftKeyboard: function (...args) {
|
||||
console.warn("InputMethodController.showSoftKeyboard interface mocked in the Previewer. How this interface works on" +
|
||||
" the Previewer may be different from that on a real device.")
|
||||
const len = args.length
|
||||
if (typeof args[len - 1] === 'function') {
|
||||
args[len - 1].call(this, paramMock.businessErrorMock);
|
||||
} else {
|
||||
return new Promise((resolve, reject) => {
|
||||
resolve();
|
||||
})
|
||||
}
|
||||
},
|
||||
hideSoftKeyboard: function (...args) {
|
||||
console.warn("InputMethodController.hideSoftKeyboard interface mocked in the Previewer. How this interface works on" +
|
||||
" the Previewer may be different from that on a real device.")
|
||||
const len = args.length
|
||||
if (typeof args[len - 1] === 'function') {
|
||||
args[len - 1].call(this, paramMock.businessErrorMock);
|
||||
} else {
|
||||
return new Promise((resolve, reject) => {
|
||||
resolve();
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
const InputMethodSettingMock = {
|
||||
|
||||
Reference in New Issue
Block a user