mirror of
https://github.com/openharmony/third_party_jsframework.git
synced 2026-07-18 12:35:31 -04:00
!608 相机类型悬浮窗及模态窗口相关接口
Merge pull request !608 from ZhengJiangliang/master
This commit is contained in:
@@ -31,7 +31,9 @@ export const WindowType = {
|
||||
TYPE_LAUNCHER_RECENT: 11,
|
||||
TYPE_LAUNCHER_DOCK: 12,
|
||||
TYPE_VOICE_INTERACTION: 13,
|
||||
TYPE_POINTER: 14
|
||||
TYPE_POINTER: 14,
|
||||
TYPE_FLOAT_CAMERA: 15,
|
||||
TYPE_DIALOG: 16
|
||||
}
|
||||
|
||||
export const AvoidAreaType= {
|
||||
@@ -534,7 +536,7 @@ export const Window = {
|
||||
if (typeof args[len - 1] === 'function') {
|
||||
if (args[0] === 'keyboardHeightChange'|| args[0] === 'systemAvoidAreaChange'
|
||||
|| args[0] === 'windowSizeChange'|| args[0] === 'touchOutside'|| args[0] === 'avoidAreaChange'
|
||||
|| args[0] === 'screenshot'
|
||||
|| args[0] === 'screenshot' || args[0] === 'dialogTargetTouch'
|
||||
){
|
||||
console.warn(`Window.on you has registered ${args[0]} event`)
|
||||
} else {
|
||||
@@ -551,7 +553,7 @@ export const Window = {
|
||||
if (typeof args[len - 1] === 'function') {
|
||||
if (args[0] === 'keyboardHeightChange'|| args[0] === 'systemAvoidAreaChange'
|
||||
|| args[0] === 'windowSizeChange'|| args[0] === 'touchOutside'|| args[0] === 'avoidAreaChange'
|
||||
|| args[0] === 'screenshot'
|
||||
|| args[0] === 'screenshot' || args[0] === 'dialogTargetTouch'
|
||||
){
|
||||
console.warn(`Window.off you has registered ${args[0]} event`)
|
||||
} else {
|
||||
@@ -609,6 +611,21 @@ export const Window = {
|
||||
})
|
||||
}
|
||||
},
|
||||
bindDialogTarget: function(...args) {
|
||||
console.warn("Window.bindDialogTarget 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
|
||||
/* 参数带有function,需特殊判断,原型如下 */
|
||||
/* bindDialogTarget(token: rpc.RemoteObject, deathCallback: Callback<void>): Promise<void>; */
|
||||
/* bindDialogTarget(token: rpc.RemoteObject, deathCallback: Callback<void>, callback: AsyncCallback<void>); */
|
||||
if (typeof args[len - 2] === 'function') {
|
||||
args[len - 1].call(this, paramMock.businessErrorMock)
|
||||
} else {
|
||||
return new Promise((resolve) => {
|
||||
resolve()
|
||||
})
|
||||
}
|
||||
},
|
||||
}
|
||||
|
||||
export const windowMock = Window
|
||||
|
||||
Reference in New Issue
Block a user