提交 ef1cf050 编写于 作者: D dongwei

add test cases

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