提交 5bb6ccf0 编写于 作者: D dongwei 提交者: wanggang

add test cases

Signed-off-by: Ndongwei <dongwei@kaihongdigi.com>
上级 4599842e
......@@ -175,5 +175,33 @@
<piece id="closablePropFalse" closable="false" content="content">
</piece>
<text class="sub-title">
特有属性 -- icon
</text>
<piece id="closablePropTrue" closable="true" content="content" icon="common/images/image.png">
</piece>
<text class="sub-title">
特有属性 -- tid
</text>
<piece class="propNewAdd" content="content"
tid="id">
</piece>
<piece class="propNewAdd" content="content"
tid="">
</piece>
<div>
<piece id="ifPropTrue" content="content"
if="true">
</piece>
<piece class="propNewAdd" content="content"
elif="true">
</piece>
<piece class="propNewAdd" content="content"
elif="false">
</piece>
</div>
</div>
</div>
......@@ -7,30 +7,30 @@
<text class="sub-title">
piece通用样式1
</text>
<piece class="style1">
<piece class="style1" content="content">
</piece>
<text class="sub-title">
piece通用样式2
</text>
<piece class="style2">
<piece class="style2" content="content">
</piece>
<text class="sub-title">
piece通用样式3
</text>
<piece class="style3">
<piece class="style3" content="content">
</piece>
<text class="sub-title">
piece通用样式4
</text>
<piece class="style4">
<piece class="style4" content="content">
</piece>
<text class="sub-title">
piece通用样式5
</text>
<div class="contain1">
<piece class="style5">
<piece class="style5" content="content">
</piece>
<piece class="style6">
<piece class="style6" content="content">
</piece>
</div>
</div>
......@@ -43,12 +43,12 @@
<text class="sub-title">
div动画样式1
</text>
<piece class="ani1" >
<piece class="ani1" content="content">
</piece>
<text class="sub-title">
div动画样式2
</text>
<piece class="ani2" >
<piece class="ani2" content="content">
</piece>
</div>
</div>
......@@ -67,7 +67,7 @@
<piece id="prop1" class="prop1"
disabled = "true" focusable ="true"
data-name ="prop1" click-effect="spring-medium"
dir ="rtl">
dir ="rtl" content="content">
</piece>
<text class="sub-title">
piece通用属性2
......@@ -75,7 +75,7 @@
<piece class="prop2" ref ="prop2"
disabled = "false" focusable ="false"
data-name ="prop2" click-effect="spring-large"
dir ="ltr">
dir ="ltr" content="content">
</piece>
<text class="sub-title">
piece通用属性3
......@@ -100,14 +100,15 @@
piece通用事件1
</text>
<piece class ="event1" ontouchstart="touchStart" ontouchmove="touchMove"
ontouchend="touchEnd" ontouchcancel="touchCancel">
ontouchend="touchEnd" ontouchcancel="touchCancel" content="content">
</piece>
<text class="sub-title">
piece通用事件2
</text>
<piece class ="event2" onclick="click" ondoubleclick="doubleClick"
onlongpress="longPress" onfocus="focus" onblur="blur" onkey="key"
onswipe="swipe" onattached="attached" ondetached="detached">
onswipe="swipe" onattached="attached" ondetached="detached"
content="content">
</piece>
<text class="sub-title">
piece通用事件3
......@@ -117,12 +118,13 @@
ondragstart="dragStart" ondrag="drag"
ondragend="dragEnd" ondragenter="dragEnter"
ondragover="dragOver" ondragleave="dragLeave"
ondrop="drop">
ondrop="drop" content="content">
</piece>
<text class="sub-title">
div特有事件1
piece特有事件1
</text>
<piece content="event" closable="true" onclose="closePiece"></piece>
<piece content="event" closable="true" onaccessibility="onAccessibility"></piece>
</div>
<div style="background-color: #000000; width: 100%; height: 2px;">
</div>
......@@ -131,19 +133,22 @@
通用方法
</text>
<text class="sub-title">
div通用方法1
piece通用方法1
</text>
<piece id="function1" class="function1" ontouchstart="functionTest1">
<piece id="function1" class="function1"
ontouchstart="functionTest1" content="content">
</piece>
<text class="sub-title">
div通用方法2
piece通用方法2
</text>
<piece id="function2" class="function2" ontouchstart="functionTest2">
<piece id="function2" class="function2"
ontouchstart="functionTest2" content="content">
</piece>
<text class="sub-title">
div通用方法3
piece通用方法3
</text>
<piece id="function3" class="function3" ontouchstart="functionTest3">
<piece id="function3" class="function3"
content="content" ontouchstart="functionTest3">
</piece>
</div>
</div>
......@@ -159,22 +164,22 @@
<text class="sub-title">
div渐变样式1
</text>
<piece class="gradient1">
<piece class="gradient1" content="content">
</piece>
<text class="sub-title">
div渐变样式2
</text>
<piece class="gradient2">
<piece class="gradient2" content="content">
</piece>
<text class="sub-title">
div渐变样式3
</text>
<piece class="gradient3">
<piece class="gradient3" content="content">
</piece>
<text class="sub-title">
div渐变样式4
</text>
<piece class="gradient4">
<piece class="gradient4" content="content">
</piece>
</div>
<div style="background-color: #000000; width: 100%; height: 2px;">
......@@ -187,7 +192,7 @@
piece无障碍1
</text>
<piece class="access1" accessibilitygroup ="true"
accessibilitytext="这是piece"
accessibilitytext="这是piece" content="content"
accessibilitydescription="点击此按键会弹出一个对话框"
accessibilityimportance="no-hide-descendants">
</piece>
......
......@@ -491,5 +491,12 @@ export default {
prompt.showToast({
message: 'closePiece'
});
},
onAccessibility(event) {
if (event.eventType == 1) {
console.log("onAccessibility" + event.eventType);
}
console.log("onAccessibility" + JSON.stringify(event));
}
}
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册