未验证 提交 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 {
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%")
}
......
......@@ -40,6 +40,7 @@ struct promptExample {
],
success: function(data) {
console.log('dialog success callback,click button : ' + data.tapIndex);
Utils.emitEvent(this.text,404)
},
fail: function(data) {
console.log('dialog fail callback' + data.errMsg);
......@@ -63,6 +64,7 @@ struct promptExample {
],
success: function(data) {
console.log('dialog success callback,click button : ' + data.index);
Utils.emitEvent(this.text,404)
},
cancel: function() {
console.log('dialog cancel callback');
......@@ -97,7 +99,6 @@ struct promptExample {
console.info('showDialog error: ' + err);
})
})
Button('showActionMenu2')
.key('button6')
.backgroundColor('#ffe20b48')
......@@ -118,6 +119,7 @@ struct promptExample {
]
})
.then(data => {
Utils.emitEvent(this.text,404)
console.info('showActionMenu success, click button: ' + data.index);
})
.catch(err => {
......@@ -185,7 +187,6 @@ struct promptExample {
.fontSize(20)
.margin({top: 20})
.onClick(()=> {
try {
promptAction.showActionMenu({
title: 'showActionMenu Title Info',
......@@ -211,6 +212,7 @@ struct promptExample {
};
})
Button('showDialog2')
.key('button5')
.backgroundColor('#ffe20b56')
......@@ -241,10 +243,6 @@ struct promptExample {
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 {
.fontSize(20)
.margin({top: 20})
.onClick(() => {
routery.push({
uri: 'pages/ohosRouterB',
params: {
data: 'B Page'
}
try {
router.enableBackPageAlert({
message: 'Message Info'
});
} catch(error) {
console.error(`enableBackPageAlert failed, code is ${error.code}, message is ${error.message}`);
}
});
Button('disableAlertBeforeBackPage')
......
......@@ -24,29 +24,14 @@ struct ClipAndMaskExample {
@State maskType: CommonShapeMethod= new Rect({ width: 280, height: 280 });
@State clipType: CommonShapeMethod= new Circle({ width: 280, height: 280 });
polygonInterface:PolygonInterface = Polygon
circle : CircleInterface = Circle
line: LineInterface = Line
ellsple :EllipseInterface = Ellipse
pathInterface : PathInterface = Path
shape:ShapeInterface = Shape
rect: RectInterface = Rect
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) => {
if (eventData != null) {
console.info("shapeClipping page state change called:" + JSON.stringify(eventData));
......
......@@ -23,6 +23,8 @@ let loadedUrl;
@Entry
@Component
struct Index {
controllerhandler :ControllerHandler = new ControllerHandler();
fullscreenexithandler :FullScreenExitHandler = new FullScreenExitHandler();
ConsoleMessage:ConsoleMessage=new ConsoleMessage();
webconTextmenuparam:webConTextMenuParam = new webConTextMenuParam();
controllerhader: ControllerHandler = new ControllerHandler();
......@@ -111,6 +113,9 @@ struct Index {
this.handler.constructor();
this.handler.exitFullScreen();
})
.onFileSelectorShow((event) => {
this.handler = event.handler;
})
.onSslErrorEventReceive((event) => {
AlertDialog.show({
title: 'onSslErrorEventReceive',
......@@ -618,6 +623,62 @@ struct Index {
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:
console.info("can not match case")
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册