|
@@ -48,17 +48,16 @@ export struct XWebview {
|
|
|
XWebManager.onClose(() => {
|
|
|
router.back()
|
|
|
})
|
|
|
- if (this.xController) {
|
|
|
- this.xController.getUrl = () => {
|
|
|
- return this.controller.getUrl()
|
|
|
- }
|
|
|
- this.xController.getTitle = () => {
|
|
|
- return this.controller.getTitle()
|
|
|
- }
|
|
|
- this.xController.refresh = () => {
|
|
|
- this.controller.refresh()
|
|
|
- }
|
|
|
+ XWebManager.onGetUrl = () => {
|
|
|
+ return this.controller.getUrl()
|
|
|
+ }
|
|
|
+ XWebManager.onGetTitle = () => {
|
|
|
+ return this.controller.getTitle()
|
|
|
}
|
|
|
+ XWebManager.onRefresh = () => {
|
|
|
+ this.controller.refresh()
|
|
|
+ }
|
|
|
+
|
|
|
|
|
|
SZYXLocalStorageHelper.storage.setOrCreate('refresh_web_base', -1)
|
|
|
SZYXLocalStorageHelper.storage.setOrCreate(SZYXLocalStorageKeys.XWebViewCLose, undefined)
|
|
@@ -135,7 +134,7 @@ export struct XWebview {
|
|
|
Button({ buttonStyle: ButtonStyleMode.TEXTUAL }) {
|
|
|
if (this.clickMenu?.img) {
|
|
|
Image(this.clickMenu?.img)
|
|
|
- .width(15).height(15)
|
|
|
+ .width(15).height(15).objectFit(ImageFit.Contain)
|
|
|
} else if (this.clickMenu?.text) {
|
|
|
Text(this.clickMenu.text)
|
|
|
.fontColor(this.clickMenu?.color ?? '#17171A')
|
|
@@ -152,7 +151,7 @@ export struct XWebview {
|
|
|
}.width(65)
|
|
|
.onClick(() => {
|
|
|
if (this.clickMenu) {
|
|
|
- this.clickMenu?.onClick && this.clickMenu?.onClick()
|
|
|
+ XWebManager.menuClick()
|
|
|
return
|
|
|
}
|
|
|
if (this.dialogController != null) {
|