提交 c8ed2eed 编写于 作者: D dongwei

add test cases

Signed-off-by: Ndongwei <dongwei@kaihongdigi.com>
上级 11f95e21
/**
* Copyright (c) 2022 Shenzhen kaiHong Digital Industry Development Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
.container {
flex-direction:row;
width:100%;
height:100%;
}
.title{
width: 100%;
font-size: 18px;
margin: 2px;
padding: 2px;
font-weight: bold;
text-align: center;
}
.sub-title{
width: 100%;
font-size: 14px;
text-align: left;
margin: 2px;
padding: 2px;
}
.prop-container{
flex-direction: column;
flex-weight: 1;
}
#idProp {
flex-weight: 1;
background-color:#f00000;
width: 100%;
margin-left: 10px;
margin-right: 10px;
padding-start: 10px;
padding-end: 10px;
}
.classProp {
flex-weight: 1;
background-color:#0f0000;
width: 100%;
margin-left: 10px;
margin-right: 10px;
padding-start: 10px;
padding-end: 10px;
}
#classPropNone {
flex-weight: 1;
background-color:#0000e0;
width: 100%;
margin-left: 10px;
margin-right: 10px;
padding-start: 10px;
padding-end: 10px;
}
#refProp {
flex-weight: 1;
background-color:#00f000;
width: 100%;
margin-left: 10px;
margin-right: 10px;
padding-start: 10px;
padding-end: 10px;
}
#refPropNone {
flex-weight: 1;
background-color:#00000e;
width: 100%;
margin-left: 10px;
margin-right: 10px;
padding-start: 10px;
padding-end: 10px;
}
#disabledPropTrue {
flex-weight: 1;
background-color:#000f00;
width: 100%;
margin-left: 10px;
margin-right: 10px;
padding-start: 10px;
padding-end: 10px;
}
#disabledPropFalse {
flex-weight: 1;
background-color:#0000f0;
width: 100%;
margin-left: 10px;
margin-right: 10px;
padding-start: 10px;
padding-end: 10px;
}
#disabledPropNone {
flex-weight: 1;
background-color:#d00000;
width: 100%;
margin-left: 10px;
margin-right: 10px;
padding-start: 10px;
padding-end: 10px;
}
#focusablePropTrue {
flex-weight: 1;
background-color:#00000f;
width: 100%;
margin-left: 10px;
margin-right: 10px;
padding-start: 10px;
padding-end: 10px;
}
#focusablePropFalse {
flex-weight: 1;
background-color:#ff0000;
width: 100%;
margin-left: 10px;
margin-right: 10px;
padding-start: 10px;
padding-end: 10px;
}
#focusablePropNone {
flex-weight: 1;
background-color:#0d0000;
width: 100%;
margin-left: 10px;
margin-right: 10px;
padding-start: 10px;
padding-end: 10px;
}
#dataProp {
flex-weight: 1;
background-color:#0ff000;
width: 100%;
margin-left: 10px;
margin-right: 10px;
padding-start: 10px;
padding-end: 10px;
}
#dataPropNone {
flex-weight: 1;
background-color:#00d000;
width: 100%;
margin-left: 10px;
margin-right: 10px;
padding-start: 10px;
padding-end: 10px;
}
#clickEffectPropSmall {
height: 15px;
background-color:#00ff00;
width: 100%;
margin-left: 10px;
margin-right: 10px;
padding-start: 10px;
padding-end: 10px;
}
#clickEffectPropMedium {
height: 15px;
background-color:#000ff0;
width: 100%;
margin-left: 10px;
margin-right: 10px;
padding-start: 10px;
padding-end: 10px;
}
#clickEffectPropLarge {
height: 15px;
background-color:#fff000;
width: 100%;
margin-left: 10px;
margin-right: 10px;
padding-start: 10px;
padding-end: 10px;
}
#clickEffectPropNone{
height: 15px;
background-color:#000d00;
width: 100%;
margin-left: 10px;
margin-right: 10px;
padding-start: 10px;
padding-end: 10px;
}
#dirPropRtl {
flex-weight: 1;
background-color:#0fff00;
width: 100%;
margin-left: 10px;
margin-right: 10px;
padding-start: 10px;
padding-end: 10px;
}
#dirPropAuto {
flex-weight: 1;
background-color:#00fff0;
width: 100%;
margin-left: 10px;
margin-right: 10px;
padding-start: 10px;
padding-end: 10px;
}
#dirPropLtr {
flex-weight: 1;
background-color:#000fff;
width: 100%;
margin-left: 10px;
margin-right: 10px;
padding-start: 10px;
padding-end: 10px;
}
#dirPropNone {
flex-weight: 1;
background-color:#0000d0;
width: 100%;
margin-left: 10px;
margin-right: 10px;
padding-start: 10px;
padding-end: 10px;
}
#forPropNull {
flex-weight: 1;
background-color:#ffff00;
width: 100%;
margin-left: 10px;
margin-right: 10px;
padding-start: 10px;
padding-end: 10px;
}
#forPropOne {
flex-weight: 1;
background-color:#00e000;
width: 100%;
margin-left: 10px;
margin-right: 10px;
padding-start: 10px;
padding-end: 10px;
}
#forPropThree {
flex-weight: 1;
background-color:#000e00;
width: 100%;
margin-left: 10px;
margin-right: 10px;
padding-start: 10px;
padding-end: 10px;
}
#ifPropTrue {
flex-weight: 1;
background-color:#0ffff0;
width: 100%;
margin-left: 10px;
margin-right: 10px;
padding-start: 10px;
padding-end: 10px;
}
#ifPropFalse {
flex-weight: 1;
background-color:#00ffff;
width: 100%;
margin-left: 10px;
margin-right: 10px;
padding-start: 10px;
padding-end: 10px;
}
#ifPropNone {
flex-weight: 1;
background-color:#00000d;
width: 100%;
margin-left: 10px;
margin-right: 10px;
padding-start: 10px;
padding-end: 10px;
}
#showPropTrue {
flex-weight: 1;
background-color:#e00000;
width: 100%;
margin-left: 10px;
margin-right: 10px;
padding-start: 10px;
padding-end: 10px;
}
#showPropFalse {
flex-weight: 1;
background-color:#0e0000;
width: 100%;
margin-left: 10px;
margin-right: 10px;
padding-start: 10px;
padding-end: 10px;
}
#showPropNone {
flex-weight: 1;
background-color:#c00000;
width: 100%;
margin-left: 10px;
margin-right: 10px;
padding-start: 10px;
padding-end: 10px;
}
.specific-container{
flex-direction: column;
flex-weight: 1;
}
#typeXsNull{
flex-weight: 1;
background-color:#c00000;
width: 100%;
margin-left: 10px;
margin-right: 10px;
padding-start: 10px;
padding-end: 10px;
margin-bottom: 4px;
}
#typeXs1{
flex-weight: 1;
background-color:#c00000;
width: 100%;
margin-left: 10px;
margin-right: 10px;
padding-start: 10px;
padding-end: 10px;
margin-bottom: 4px;
}
#typeXsObject{
flex-weight: 1;
background-color:#c00000;
width: 100%;
margin-left: 10px;
margin-right: 10px;
padding-start: 10px;
padding-end: 10px;
margin-bottom: 4px;
}
#typeSmNull{
flex-weight: 1;
background-color:#c00000;
width: 100%;
margin-left: 10px;
margin-right: 10px;
padding-start: 10px;
padding-end: 10px;
margin-bottom: 4px;
}
#typeSm1{
flex-weight: 1;
background-color:#c00000;
width: 100%;
margin-left: 10px;
margin-right: 10px;
padding-start: 10px;
padding-end: 10px;
margin-bottom: 4px;
}
#typeSmObject{
flex-weight: 1;
background-color:#c00000;
width: 100%;
margin-left: 10px;
margin-right: 10px;
padding-start: 10px;
padding-end: 10px;
margin-bottom: 4px;
}
#typeMdNull{
flex-weight: 1;
background-color:#c00000;
width: 100%;
margin-left: 10px;
margin-right: 10px;
padding-start: 10px;
padding-end: 10px;
margin-bottom: 4px;
}
#typeMd1{
flex-weight: 1;
background-color:#c00000;
width: 100%;
margin-left: 10px;
margin-right: 10px;
padding-start: 10px;
padding-end: 10px;
margin-bottom: 4px;
}
#typeMdObject{
flex-weight: 1;
background-color:#c00000;
width: 100%;
margin-left: 10px;
margin-right: 10px;
padding-start: 10px;
padding-end: 10px;
margin-bottom: 4px;
}
#typeLgNull{
flex-weight: 1;
background-color:#c00000;
width: 100%;
margin-left: 10px;
margin-right: 10px;
padding-start: 10px;
padding-end: 10px;
margin-bottom: 4px;
}
#typeLg1{
flex-weight: 1;
background-color:#c00000;
width: 100%;
margin-left: 10px;
margin-right: 10px;
padding-start: 10px;
padding-end: 10px;
margin-bottom: 4px;
}
#typeLgObject{
flex-weight: 1;
background-color:#c00000;
width: 100%;
margin-left: 10px;
margin-right: 10px;
padding-start: 10px;
padding-end: 10px;
margin-bottom: 4px;
}
#typeSpan1{
flex-weight: 1;
background-color:#c00000;
width: 100%;
margin-left: 10px;
margin-right: 10px;
padding-start: 10px;
padding-end: 10px;
margin-bottom: 4px;
}
#typeSpan3{
flex-weight: 1;
background-color:#c00000;
width: 100%;
margin-left: 10px;
margin-right: 10px;
padding-start: 10px;
padding-end: 10px;
margin-bottom: 4px;
}
#typeOffset1{
flex-weight: 1;
background-color:#c00000;
width: 100%;
margin-left: 10px;
margin-right: 10px;
padding-start: 10px;
padding-end: 10px;
margin-bottom: 4px;
}
#typeOffset3{
flex-weight: 1;
background-color:#c00000;
width: 100%;
margin-left: 10px;
margin-right: 10px;
padding-start: 10px;
padding-end: 10px;
margin-bottom: 4px;
}
.propNewAdd{
height: 15px;
margin-bottom: 3px;
background-color:#c00000;
width: 100%;
margin-left: 10px;
margin-right: 10px;
padding-start: 10px;
padding-end: 10px;
}
\ No newline at end of file
<!--/**
* Copyright (c) 2022 Shenzhen Kaihong Digital Industry Development Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/-->
<div class="container">
<div class="prop-container">
<text class="title">
div通用属性
</text>
<text class="sub-title">
通用属性 -- id
</text>
<grid-col id="idProp">
</grid-col>
<text class="sub-title">
通用属性 -- class
</text>
<grid-col id="classProp"
class="classProp">
</grid-col>
<grid-col id="classPropNone"
class="">
</grid-col>
<text class="sub-title">
通用属性 -- style
</text>
<grid-col id="styleProp"
style="width:10%;height:20px;background-color:red">
</grid-col>
<text class="sub-title">
通用属性 -- ref
</text>
<grid-col id="refProp"
ref="refProp">
</grid-col>
<grid-col id="refPropNone"
ref="">
</grid-col>
<text class="sub-title">
通用属性 -- disabled
</text>
<grid-col id="disabledPropTrue"
disabled="true">
</grid-col>
<grid-col id="disabledPropFalse"
disabled="false">
</grid-col>
<grid-col id="disabledPropNone"
disabled="">
</grid-col>
<text class="sub-title">
通用属性 -- focusable
</text>
<grid-col id="focusablePropTrue"
focusable="true">
</grid-col>
<grid-col id="focusablePropFalse"
focusable="false">
</grid-col>
<grid-col id="focusablePropNone"
focusable="">
</grid-col>
<text class="sub-title">
通用属性 -- data-*
</text>
<grid-col id="dataProp"
data-div="通用属性 -- data-*">
</grid-col>
<grid-col id="dataPropNone"
data-div="">
</grid-col>
<text class="sub-title">
通用属性 -- click-effect
</text>
<grid-col id="clickEffectPropSmall"
click-effect="spring-small">
</grid-col>
<grid-col id="clickEffectPropMedium"
click-effect="spring-medium">
</grid-col>
<grid-col id="clickEffectPropLarge"
click-effect="spring-large">
</grid-col>
<grid-col id="clickEffectPropNone"
click-effect="">
</grid-col>
<text class="sub-title">
通用属性 -- dir
</text>
<grid-col id="dirPropRtl"
dir="rtl">
</grid-col>
<grid-col id="dirPropAuto"
dir="auto">
</grid-col>
<grid-col id="dirPropLtr"
dir="ltr">
</grid-col>
<grid-col id="dirPropNone"
dir="">
</grid-col>
<text class="sub-title">
渲染属性 -- for
</text>
<grid-col id="forPropNull"
for="">
</grid-col>
<grid-col id="forPropOne"
for="{{listOne}}">
</grid-col>
<grid-col id="forPropThree"
for="{{listThree}}">
</grid-col>
<text class="sub-title">
渲染属性 -- if
</text>
<grid-col id="ifPropTrue"
if="true">
</grid-col>
<text class="sub-title">
渲染属性 -- show
</text>
<grid-col id="showPropTrue"
show="true">
</grid-col>
<grid-col id="showPropFalse"
show="false">
</grid-col>
<grid-col id="showPropNone"
show="">
</grid-col>
</div>
<div style="background-color: #000000; width: 2px; height: 100%;">
</div>
<div class="specific-container">
<text class="title">
div特有属性
</text>
<text class="title">
grid-col特有属性 xs
</text>
<grid-col id="typeXsNull"
xs="">
</grid-col>
<grid-col id="typeXs1"
xs="1">
</grid-col>
<grid-col id="typeXsObject"
xs="{{Object}}">
</grid-col>
<text class="title">
grid-col特有属性 sm
</text>
<grid-col id="typeSmNull"
sm="">
</grid-col>
<grid-col id="typeSm1"
sm="1">
</grid-col>
<grid-col id="typeSmObject"
sm="{{Object}}">
</grid-col>
<text class="title">
grid-col特有属性 md
</text>
<grid-col id="typeMdNull"
md="">
</grid-col>
<grid-col id="typeMd1"
md="1">
</grid-col>
<grid-col id="typeMdObject"
md="{{Object}}">
</grid-col>
<text class="title">
grid-col特有属性 lg
</text>
<grid-col id="typeLgNull"
lg="">
</grid-col>
<grid-col id="typeLg1"
lg="1">
</grid-col>
<grid-col id="typeLgObject"
lg="{{Object}}">
</grid-col>
<text class="title">
特有属性 span
</text>
<grid-col id="typeSpan1"
span="1">
</grid-col>
<grid-col id="typeSpan3"
span="3">
</grid-col>
<text class="title">
特有属性 offset
</text>
<grid-col id="typeOffset1"
offset="1">
</grid-col>
<grid-col id="typeOffset3"
offset="3">
</grid-col>
<text class="sub-title">
特有属性 -- grid-col
</text>
<grid-col class="propNewAdd"
grid-col="grid-col">
</grid-col>
<grid-col class="propNewAdd"
grid-col="">
</grid-col>
<text class="sub-title">
特有属性 -- tid
</text>
<grid-col class="propNewAdd"
tid="id">
</grid-col>
<grid-col class="propNewAdd"
tid="">
</grid-col>
<text class="sub-title">
特有属性 -- elif
</text>
<grid-col class="propNewAdd"
if="false">
</grid-col>
<grid-col class="propNewAdd"
elif="true">
</grid-col>
<grid-col class="propNewAdd"
elif="false">
</grid-col>
</div>
</div>
/**
* Copyright (c) 2022 Shenzhen Kaihong Digital Industry Development Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import prompt from '@system.prompt';
export default {
data:{
Object:{"span": 1, "offset": 0},
listOne:[{}],
listThree:[{},{},{}],
idProp : null,
classProp : null,
classPropNone : null,
styleProp : null,
refProp : null,
refPropNone : null,
disabledPropTrue : null,
disabledPropFalse : null,
disabledPropNone : null,
focusablePropTrue : null,
focusablePropFalse : null,
focusablePropNone : null,
dataProp : null,
dataPropNone : null,
clickEffectPropSmall : null,
clickEffectPropMedium : null,
clickEffectPropLarge : null,
clickEffectPropNone : null,
dirPropRtl : null,
dirPropAuto : null,
dirPropLtr : null,
dirPropNone : null,
forPropNull : null,
forPropOne : null,
forPropThree : null,
ifPropTrue : null,
showPropTrue : null,
showPropFalse : null,
showPropNone : null,
typeXsNull : null,
typeXs1 : null,
typeXsObject : null,
typeSmNll : null,
typeSm1 : null,
typeSmObject : null,
typeMdNull : null,
typeMd1 : null,
typeMdObject : null,
typeLgNull : null,
typeLg1 : null,
typeLgObject : null,
typeSpan1 : null,
typeSpan3 : null,
typeOffset1 : null,
typeOffset3 : null,
},
onShow(){
this.getCommonPropValues();
globalThis.value = {
idProp : this.idProp,
classProp : this.classProp,
classPropNone : this.classPropNone,
styleProp : this.styleProp,
refProp : this.refProp,
refPropNone : this.refPropNone,
disabledPropTrue : this.disabledPropTrue,
disabledPropFalse : this.disabledPropFalse,
disabledPropNone : this.disabledPropNone,
focusablePropTrue : this.focusablePropTrue,
focusablePropFalse : this.focusablePropFalse,
focusablePropNone : this.focusablePropNone,
dataProp : this.dataProp,
dataPropNone : this.dataPropNone,
clickEffectPropSmall : this.clickEffectPropSmall,
clickEffectPropMedium : this.clickEffectPropMedium,
clickEffectPropLarge : this.clickEffectPropLarge,
clickEffectPropNone : this.clickEffectPropNone,
dirPropRtl : this.dirPropRtl,
dirPropAuto : this.dirPropAuto,
dirPropLtr : this.dirPropLtr,
dirPropNone : this.dirPropNone,
forPropNull : this.forPropNull,
forPropOne : this.forPropOne,
forPropThree : this.forPropThree,
ifPropTrue : this.ifPropTrue,
showPropTrue : this.showPropTrue,
showPropFalse : this.showPropFalse,
showPropNone : this.showPropNone,
typeXsNull : this.typeXsNull,
typeXs1 : this.typeXs1,
typeXsObject : this.typeXsObject,
typeSmNll : this.typeSmNll,
typeSm1 : this.typeSm1,
typeSmObject : this.typeSmObject,
typeMdNull : this.typeMdNull,
typeMd1 : this.typeMd1,
typeMdObject : this.typeMdObject,
typeLgNull : this.typeLgNull,
typeLg1 : this.typeLg1,
typeLgObject : this.typeLgObject,
typeSpan1 : this.typeSpan1,
typeSpan3 : this.typeSpan3,
typeOffset1 : this.typeOffset1,
typeOffset3 : this.typeOffset3,
}
},
getCommonPropValues(){
this.idProp = this.$element("idProp").getInspector()
this.classProp = this.$element("classProp").getInspector()
this.classPropNone = this.$element("classPropNone").getInspector()
this.styleProp = this.$element("styleProp").getInspector()
this.refProp = this.$element("refProp").getInspector()
this.refPropNone = this.$element("refPropNone").getInspector()
this.disabledPropTrue = this.$element("disabledPropTrue").getInspector()
this.disabledPropFalse = this.$element("disabledPropFalse").getInspector()
this.disabledPropNone = this.$element("disabledPropNone").getInspector()
this.focusablePropTrue = this.$element("focusablePropTrue").getInspector()
this.focusablePropFalse = this.$element("focusablePropFalse").getInspector()
this.focusablePropNone = this.$element("focusablePropNone").getInspector()
this.dataProp = this.$element("dataProp").getInspector()
this.dataPropNone = this.$element("dataPropNone").getInspector()
this.clickEffectPropSmall = this.$element("clickEffectPropSmall").getInspector()
this.clickEffectPropMedium = this.$element("clickEffectPropMedium").getInspector()
this.clickEffectPropLarge = this.$element("clickEffectPropLarge").getInspector()
this.clickEffectPropNone = this.$element("clickEffectPropNone").getInspector()
this.dirPropRtl = this.$element("dirPropRtl").getInspector()
this.dirPropAuto = this.$element("dirPropAuto").getInspector()
this.dirPropLtr = this.$element("dirPropLtr").getInspector()
this.dirPropNone = this.$element("dirPropNone").getInspector()
this.forPropNull = this.$element("forPropNull").getInspector()
this.forPropOne = this.$element("forPropOne").getInspector()
this.forPropThree = this.$element("forPropThree").getInspector()
this.ifPropTrue = this.$element("ifPropTrue").getInspector()
this.showPropTrue = this.$element("showPropTrue").getInspector()
this.showPropFalse = this.$element("showPropFalse").getInspector()
this.showPropNone = this.$element("showPropNone").getInspector()
//特有属性
this.typeXsNull = this.$element("typeXsNull").getInspector()
this.typeXs1 = this.$element("typeXs1").getInspector()
this.typeXsObject = this.$element("typeXsObject").getInspector()
this.typeSmNll = this.$element("typeSmNll").getInspector()
this.typeSm1 = this.$element("typeSm1").getInspector()
this.typeSmObject = this.$element("typeSmObject").getInspector()
this.typeMdNull = this.$element("typeMdNull").getInspector()
this.typeMd1 = this.$element("typeMd1").getInspector()
this.typeMdObject = this.$element("typeMdObject").getInspector()
this.typeLgNull = this.$element("typeLgNull").getInspector()
this.typeLg1 = this.$element("typeLg1").getInspector()
this.typeLgObject = this.$element("typeLgObject").getInspector()
this.typeSpan1 = this.$element("typeSpan1").getInspector()
this.typeSpan3 = this.$element("typeSpan3").getInspector()
this.typeOffset1 = this.$element("typeOffset1").getInspector()
this.typeOffset3 = this.$element("typeOffset3").getInspector()
},
}
......@@ -222,6 +222,7 @@
</div>
<div style="background-color: #000000; width: 100%; height: 2px;">
</div>
<div class="access-container">
<text class="title">
无障碍
......
/**
* Copyright (c) 2022 Shenzhen Kaihong Digital Industry Development Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册