Skip to content

Commit

Permalink
wip(x-web): UniPage 保留 $setPageStyle & $getPageStyle
Browse files Browse the repository at this point in the history
  • Loading branch information
zhenyuWang committed Sep 29, 2024
1 parent 579310b commit 24069d9
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
2 changes: 2 additions & 0 deletions packages/global.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -93,8 +93,10 @@ declare class UniPageImpl implements UniPage {
getParentPageByJS: () => UniPage | null
getDialogPages(): UniDialogPage[]
getPageStyle(): UTSJSONObject
$getPageStyle(): UTSJSONObject
getPageStyleByJS(): UTSJSONObject
setPageStyle(style: UTSJSONObject): void
$setPageStyle(style: UTSJSONObject): void
setPageStyleByJS(style: UTSJSONObject): void
getElementById(id: string.IDString | string): UniElement | null
getAndroidView(): null
Expand Down
6 changes: 6 additions & 0 deletions packages/uni-h5/src/framework/setup/page.ts
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,13 @@ export class UniPageImpl extends UniBasePageImpl implements UniPage {
getPageStyle(): UTSJSONObject {
return new UTSJSONObject({})
}
$getPageStyle(): UTSJSONObject {
return this.getPageStyle()
}
setPageStyle(style: UTSJSONObject): void {}
$setPageStyle(style: UTSJSONObject): void {
this.setPageStyle(style)
}
getElementById(id: string.IDString | string): UniElement | null {
const currentPage = getCurrentPage() as unknown as UniPage
if (currentPage !== this) {
Expand Down

0 comments on commit 24069d9

Please sign in to comment.