提交 f77e3986 编写于 作者: Z zhangxinyue

bug fix

Signed-off-by: Nzhangxinyue <zhangxinyue38@huawei.com>
上级 fa0592de
...@@ -24,7 +24,6 @@ let loadedUrl; ...@@ -24,7 +24,6 @@ let loadedUrl;
@Component @Component
struct Index { struct Index {
controller:WebController = new WebController() controller:WebController = new WebController()
controllerTwo: web_webview.WebviewController = new web_webview.WebviewController();
responseweb: WebResourceResponse = new WebResourceResponse() responseweb: WebResourceResponse = new WebResourceResponse()
@State str:string="emitStoreWebArchive" @State str:string="emitStoreWebArchive"
@State text:string="" @State text:string=""
...@@ -180,8 +179,7 @@ struct Index { ...@@ -180,8 +179,7 @@ struct Index {
this.controller.refresh() this.controller.refresh()
var origin = this.controller.getPageHeight() var origin = this.controller.getPageHeight()
var zoomInCalled = false var zoomInCalled = false
setTimeout(()=>{ setTimeout(()=>{
this.controllerTwo.zoomIn()
if (this.controller.getPageHeight() > origin) { if (this.controller.getPageHeight() > origin) {
zoomInCalled = true zoomInCalled = true
} }
...@@ -237,24 +235,6 @@ struct Index { ...@@ -237,24 +235,6 @@ struct Index {
},3000) },3000)
return false return false
}) })
Web({src:$rawfile('index.html'),controller:this.controllerTwo})
.databaseAccess(true)
.zoomAccess(this.zoomAccessValue)
.textZoomRatio(this.textRatio)
.onConsole((event) => {
let level = event.message.getMessageLevel()
let msg = event.message.getMessage()
let lineNumber = event.message.getLineNumber().toString()
let sourceId = event.message.getSourceId()
console.log("lineNumber:" + lineNumber)
setTimeout(()=>{
Utils.emitEvent(lineNumber,420)
},3000)
setTimeout(()=>{
Utils.emitEvent(sourceId,422)
},3000)
return false
})
} }
} }
} }
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册