mirror of
https://gitee.com/openharmony/third_party_jsframework
synced 2024-11-23 06:40:59 +00:00
Signed-off-by: qixiao-meng <qimeng11@huawei.com>
feat: add lockScreen api
This commit is contained in:
parent
c9a52beed2
commit
db74e93614
@ -53,6 +53,18 @@ export function mockScreenLock() {
|
||||
})
|
||||
}
|
||||
},
|
||||
lockScreen: function (...args) {
|
||||
console.warn("screenLock.lockScreen 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) => {
|
||||
resolve();
|
||||
})
|
||||
}
|
||||
},
|
||||
on: function (...args) {
|
||||
console.warn("screenLock.on interface mocked in the Previewer. How this interface works on the" +
|
||||
" Previewer may be different from that on a real device.")
|
||||
|
Loading…
Reference in New Issue
Block a user