未验证 提交 63fef9bd 编写于 作者: O openharmony_ci 提交者: Gitee

!6088 【ACE子系统】新增用例

Merge pull request !6088 from splaneguo/master
...@@ -138,6 +138,23 @@ export default struct Common_ts_ets_apiStaticClear { ...@@ -138,6 +138,23 @@ export default struct Common_ts_ets_apiStaticClear {
console.info("PersistProp emit action state err: " + JSON.stringify(err.message)) console.info("PersistProp emit action state err: " + JSON.stringify(err.message))
} }
}) })
Text("common_ts_ets_api-clear")
.width(320)
.height(70)
.fontSize(20)
.opacity(1)
.align(Alignment.TopStart)
.fontColor(0xCCCCCC)
.lineHeight(25)
.border({ width: 1 })
.padding(10)
.textAlign(TextAlign.Center)
.textOverflow({ overflow: TextOverflow.None })
.key("staticClearText")
.onClick(() => {
AppStorage.clear()
})
}.width("100%").height("100%") }.width("100%").height("100%")
} }
......
...@@ -40,6 +40,7 @@ struct promptExample { ...@@ -40,6 +40,7 @@ struct promptExample {
], ],
success: function(data) { success: function(data) {
console.log('dialog success callback,click button : ' + data.tapIndex); console.log('dialog success callback,click button : ' + data.tapIndex);
Utils.emitEvent(this.text,404)
}, },
fail: function(data) { fail: function(data) {
console.log('dialog fail callback' + data.errMsg); console.log('dialog fail callback' + data.errMsg);
...@@ -63,6 +64,7 @@ struct promptExample { ...@@ -63,6 +64,7 @@ struct promptExample {
], ],
success: function(data) { success: function(data) {
console.log('dialog success callback,click button : ' + data.index); console.log('dialog success callback,click button : ' + data.index);
Utils.emitEvent(this.text,404)
}, },
cancel: function() { cancel: function() {
console.log('dialog cancel callback'); console.log('dialog cancel callback');
...@@ -97,7 +99,6 @@ struct promptExample { ...@@ -97,7 +99,6 @@ struct promptExample {
console.info('showDialog error: ' + err); console.info('showDialog error: ' + err);
}) })
}) })
Button('showActionMenu2') Button('showActionMenu2')
.key('button6') .key('button6')
.backgroundColor('#ffe20b48') .backgroundColor('#ffe20b48')
...@@ -118,6 +119,7 @@ struct promptExample { ...@@ -118,6 +119,7 @@ struct promptExample {
] ]
}) })
.then(data => { .then(data => {
Utils.emitEvent(this.text,404)
console.info('showActionMenu success, click button: ' + data.index); console.info('showActionMenu success, click button: ' + data.index);
}) })
.catch(err => { .catch(err => {
...@@ -185,7 +187,6 @@ struct promptExample { ...@@ -185,7 +187,6 @@ struct promptExample {
.fontSize(20) .fontSize(20)
.margin({top: 20}) .margin({top: 20})
.onClick(()=> { .onClick(()=> {
try { try {
promptAction.showActionMenu({ promptAction.showActionMenu({
title: 'showActionMenu Title Info', title: 'showActionMenu Title Info',
...@@ -211,6 +212,7 @@ struct promptExample { ...@@ -211,6 +212,7 @@ struct promptExample {
}; };
}) })
Button('showDialog2') Button('showDialog2')
.key('button5') .key('button5')
.backgroundColor('#ffe20b56') .backgroundColor('#ffe20b56')
...@@ -241,10 +243,6 @@ struct promptExample { ...@@ -241,10 +243,6 @@ struct promptExample {
console.error(`showActionMenu args error code is ${error.code}, message is ${error.message}`); console.error(`showActionMenu args error code is ${error.code}, message is ${error.message}`);
}; };
}) })
} }
} }
} }
\ No newline at end of file
...@@ -196,12 +196,13 @@ struct OhosRouterA { ...@@ -196,12 +196,13 @@ struct OhosRouterA {
.fontSize(20) .fontSize(20)
.margin({top: 20}) .margin({top: 20})
.onClick(() => { .onClick(() => {
routery.push({ try {
uri: 'pages/ohosRouterB', router.enableBackPageAlert({
params: { message: 'Message Info'
data: 'B Page'
}
}); });
} catch(error) {
console.error(`enableBackPageAlert failed, code is ${error.code}, message is ${error.message}`);
}
}); });
Button('disableAlertBeforeBackPage') Button('disableAlertBeforeBackPage')
......
...@@ -24,29 +24,14 @@ struct ClipAndMaskExample { ...@@ -24,29 +24,14 @@ struct ClipAndMaskExample {
@State maskType: CommonShapeMethod= new Rect({ width: 280, height: 280 }); @State maskType: CommonShapeMethod= new Rect({ width: 280, height: 280 });
@State clipType: CommonShapeMethod= new Circle({ width: 280, height: 280 }); @State clipType: CommonShapeMethod= new Circle({ width: 280, height: 280 });
polygonInterface:PolygonInterface = Polygon polygonInterface:PolygonInterface = Polygon
circle : CircleInterface = Circle
line: LineInterface = Line
ellsple :EllipseInterface = Ellipse
pathInterface : PathInterface = Path pathInterface : PathInterface = Path
shape:ShapeInterface = Shape shape:ShapeInterface = Shape
rect: RectInterface = Rect rect: RectInterface = Rect
polylineInterface:PolylineInterface = Polyline polylineInterface:PolylineInterface = Polyline
ellsple: EllipseAttribute = new Ellipse({
width:'150px',
height: '150px'
})
circle : CircleAttribute = new Circle({
width:'150px',
height: '150px'
})
line : LineAttribute = new Line({
width:'15px',
height: '15px'
})
private stateChangCallBack = (eventData) => { private stateChangCallBack = (eventData) => {
if (eventData != null) { if (eventData != null) {
console.info("shapeClipping page state change called:" + JSON.stringify(eventData)); console.info("shapeClipping page state change called:" + JSON.stringify(eventData));
......
...@@ -23,6 +23,8 @@ let loadedUrl; ...@@ -23,6 +23,8 @@ let loadedUrl;
@Entry @Entry
@Component @Component
struct Index { struct Index {
controllerhandler :ControllerHandler = new ControllerHandler();
fullscreenexithandler :FullScreenExitHandler = new FullScreenExitHandler();
ConsoleMessage:ConsoleMessage=new ConsoleMessage(); ConsoleMessage:ConsoleMessage=new ConsoleMessage();
webconTextmenuparam:webConTextMenuParam = new webConTextMenuParam(); webconTextmenuparam:webConTextMenuParam = new webConTextMenuParam();
controllerhader: ControllerHandler = new ControllerHandler(); controllerhader: ControllerHandler = new ControllerHandler();
...@@ -111,6 +113,9 @@ struct Index { ...@@ -111,6 +113,9 @@ struct Index {
this.handler.constructor(); this.handler.constructor();
this.handler.exitFullScreen(); this.handler.exitFullScreen();
}) })
.onFileSelectorShow((event) => {
this.handler = event.handler;
})
.onSslErrorEventReceive((event) => { .onSslErrorEventReceive((event) => {
AlertDialog.show({ AlertDialog.show({
title: 'onSslErrorEventReceive', title: 'onSslErrorEventReceive',
...@@ -618,6 +623,62 @@ struct Index { ...@@ -618,6 +623,62 @@ struct Index {
break; break;
} }
case "emitfullscreenexithandler":{
setTimeout(()=>{
fullscreenexithandler.constructor()
Utils.emitEvent('succesful',69)
},3000)
break;
}
case "emitcontrollerhandler":{
setTimeout(()=>{
controllerhandler.constructor()
Utils.emitEvent('succesful',69)
},3000)
break;
}
case "emitwebconTextmenuparam":{
setTimeout(()=>{
webconTextmenuparam.constructor()
Utils.emitEvent('succesful',69)
},3000)
break;
}
case "emitportsonMessageEvent":{
setTimeout(()=>{
this.ports[0].onMessageEvent((result: string) => {
console.log("received message from html5, on message:" + result);
Utils.emitEvent('succesful',69)
})
},3000)
break;
}
case "emitportsonMessageEvent":{
setTimeout(()=>{
this.ports[0].onMessageEvent((result: string) => {
console.log("received message from html5, on message:" + result);
Utils.emitEvent('succesful',69)
})
},3000)
break;
}
case "emitportsonMessageEvent":{
setTimeout(()=>{
this.ports[0].onMessageEvent((result: string) => {
console.log("received message from html5, on message:" + result);
Utils.emitEvent('succesful',69)
})
},3000)
break;
}
}
default: default:
console.info("can not match case") console.info("can not match case")
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册