mirror of
https://github.com/openharmony/third_party_jsframework.git
synced 2026-07-19 22:43:32 -04:00
!519 【misc软件服务子系统】wallpapaer部件增加api mock
Merge pull request !519 from wangdongqi/OpenHarmony-3.1-Release
This commit is contained in:
@@ -48,6 +48,18 @@ export function mockWallpaper() {
|
||||
})
|
||||
}
|
||||
},
|
||||
getFile: function (...args) {
|
||||
console.warn("wallpaper.getFile 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, paramMock.paramNumberMock)
|
||||
} else {
|
||||
return new Promise((resolve, reject) => {
|
||||
resolve(paramMock.paramNumberMock);
|
||||
})
|
||||
}
|
||||
},
|
||||
getMinHeight: function (...args) {
|
||||
console.warn("wallpaper.getMinHeight interface mocked in the Previewer. How this interface works on the" +
|
||||
" Previewer may be different from that on a real device.")
|
||||
|
||||
Reference in New Issue
Block a user