提交 9f037567 编写于 作者: 辛宝Otto's avatar 辛宝Otto 🥊

refactor(iOS): 移除注释,补充兼容代码

上级 9e381bd4
......@@ -51,7 +51,7 @@ export function initLaunchOptions({
extend(enterOptions, launchOptions)
const app = getNativeApp()
const schemaLink = app.getLaunchOptionsSync()
const schemaLink = app?.getLaunchOptionsSync?.() ?? {}
return extend({}, launchOptions, schemaLink)
}
......
......@@ -75,13 +75,11 @@ export function initScope(
})
Object.defineProperty(vm, '$getPageStyle', {
get() {
// @ts-expect-error TODO fix types by hdx
return vm.$nativePage!.getPageStyle.bind(vm.$nativePage!)
},
})
Object.defineProperty(vm, '$setPageStyle', {
get() {
// @ts-expect-error TODO fix types by hdx
return vm.$nativePage!.setPageStyle.bind(vm.$nativePage!)
},
})
......
......@@ -18,8 +18,9 @@ export const getLaunchOptionsSync = defineSyncApi<GetLaunchOptionsSync>(
API_GET_LAUNCH_OPTIONS_SYNC,
() => {
const app = getNativeApp()
const baseInfo = getLaunchOptions()
const schemaInfo = app.getLaunchOptionsSync()
const schemaInfo = app?.getLaunchOptionsSync?.() ?? {}
return Object.assign({}, baseInfo, schemaInfo)
}
)
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册