diff --git a/ace/ace_standard/src/main/config.json b/ace/ace_standard/src/main/config.json index f22db2a0e3bf9f2bd11ecdc59e8cb6955c65dee0..dfff1010f3c4bab27c16fe91374150b70fd2eeee 100755 --- a/ace/ace_standard/src/main/config.json +++ b/ace/ace_standard/src/main/config.json @@ -84,12 +84,18 @@ "pages/qrcode/index", "pages/select/index", "pages/div/router/index", - "pages/badge/index", - "pages/dialog/index", - "pages/form/index", - "pages/list/index", - "pages/listItem/index", - "pages/listItemGroup/index", + "pages/badge/router/index", + "pages/badge/prop/index", + "pages/dialog/router/index", + "pages/dialog/prop/index", + "pages/form/router/index", + "pages/form/prop/index", + "pages/list/router/index", + "pages/list/prop/index", + "pages/listItem/router/index", + "pages/listItem/prop/index", + "pages/listItemGroup/router/index", + "pages/listItemGroup/prop/index", "pages/marquee/index", "pages/imageAnimator/index", "pages/panel/router/index", @@ -100,7 +106,10 @@ "pages/refresh/prop/index", "pages/stack/router/index", "pages/stack/prop/index", - "pages/stepper/index", + "pages/stepper/router/index", + "pages/stepper/prop/index", + "pages/stepperItem/router/index", + "pages/stepperItem/prop/index", "pages/swiper/router/index", "pages/swiper/prop/index", "pages/tabs/router/index", diff --git a/ace/ace_standard/src/main/js/default/pages/badge/prop/index.css b/ace/ace_standard/src/main/js/default/pages/badge/prop/index.css new file mode 100644 index 0000000000000000000000000000000000000000..96a1844e7a592df254ad8d6c3792fc23e7fd4d35 --- /dev/null +++ b/ace/ace_standard/src/main/js/default/pages/badge/prop/index.css @@ -0,0 +1,489 @@ +/** + * 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; +} + +#placementRight{ + flex-weight: 1; + background-color:#c00000; + width: 100%; + margin-left: 10px; + margin-right: 10px; + padding-start: 10px; + padding-end: 10px; +} + +#placementRightTop{ + flex-weight: 1; + background-color:red; + width: 100%; + margin-left: 10px; + margin-right: 10px; + padding-start: 10px; + padding-end: 10px; +} + +#placementLeft{ + flex-weight: 1; + background-color:salmon; + width: 100%; + margin-left: 10px; + margin-right: 10px; + padding-start: 10px; + padding-end: 10px; +} + +#placementNone{ + flex-weight: 1; + background-color:saddlebrown; + width: 100%; + margin-left: 10px; + margin-right: 10px; + padding-start: 10px; + padding-end: 10px; +} + +#count{ + flex-weight: 1; + background-color:#000000; + width: 100%; + margin-left: 10px; + margin-right: 10px; + padding-start: 10px; + padding-end: 10px; +} + +#visibleTrue{ + flex-weight: 1; + background-color:#000000; + width: 100%; + margin-left: 10px; + margin-right: 10px; + padding-start: 10px; + padding-end: 10px; +} + +#visibleFalse{ + flex-weight: 1; + background-color:#f1f1f1; + width: 100%; + margin-left: 10px; + margin-right: 10px; + padding-start: 10px; + padding-end: 10px; +} + +#visibleNone{ + flex-weight: 1; + background-color:hotpink; + width: 100%; + margin-left: 10px; + margin-right: 10px; + padding-start: 10px; + padding-end: 10px; +} + +#maxcount{ + flex-weight: 1; + background-color:#212121; + width: 100%; + margin-left: 10px; + margin-right: 10px; + padding-start: 10px; + padding-end: 10px; +} + +#maxcountNone{ + flex-weight: 1; + background-color:skyblue; + width: 100%; + margin-left: 10px; + margin-right: 10px; + padding-start: 10px; + padding-end: 10px; +} + +#config{ + flex-weight: 1; + background-color:antiquewhite; + width: 100%; + margin-left: 10px; + margin-right: 10px; + padding-start: 10px; + padding-end: 10px; +} + +#configNone{ + flex-weight: 1; + background-color:saddlebrown; + width: 100%; + margin-left: 10px; + margin-right: 10px; + padding-start: 10px; + padding-end: 10px; +} + +#label{ + flex-weight: 1; + background-color:skyblue; + width: 100%; + margin-left: 10px; + margin-right: 10px; + padding-start: 10px; + padding-end: 10px; +} + +#labelNone{ + flex-weight: 1; + background-color:navy; + width: 100%; + margin-left: 10px; + margin-right: 10px; + padding-start: 10px; + padding-end: 10px; +} + + diff --git a/ace/ace_standard/src/main/js/default/pages/badge/prop/index.hml b/ace/ace_standard/src/main/js/default/pages/badge/prop/index.hml new file mode 100644 index 0000000000000000000000000000000000000000..93ab9ceac5421a38ece4098ab225f301c150f214 --- /dev/null +++ b/ace/ace_standard/src/main/js/default/pages/badge/prop/index.hml @@ -0,0 +1,217 @@ + + +
+
+ + badge通用属性 + + + + 通用属性 -- id + + + + + + 通用属性 -- class + + + + + + + + + 通用属性 -- style + + + + + + 通用属性 -- ref + + + + + + + + 通用属性 -- disabled + + + + + + + + + + 通用属性 -- focusable + + + + + + + + + + 通用属性 -- data-* + + + + + + + + 通用属性 -- click-effect + + + + + + + + + + + + 通用属性 -- dir + + + + + + + + + + + + 渲染属性 -- for + + + + + + + + + + 渲染属性 -- if + + + + + + 渲染属性 -- show + + + + + + + +
+ +
+
+
+ + bagde特有属性 + + + + 特有属性 -- placement + + + + + + + + + + + + 特有属性 -- count + + + + + + 特有属性 -- visible + + + + + + + + + + 特有属性 -- maxcount + + + + + + + + 特有属性 -- config + + + + + + + + 特有属性 -- label + + + + + +
+
diff --git a/ace/ace_standard/src/main/js/default/pages/badge/prop/index.js b/ace/ace_standard/src/main/js/default/pages/badge/prop/index.js new file mode 100644 index 0000000000000000000000000000000000000000..d22e483631e7dc42ee0520a0db05f9b71eef4598 --- /dev/null +++ b/ace/ace_standard/src/main/js/default/pages/badge/prop/index.js @@ -0,0 +1,125 @@ +/** + * 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:{ + 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, + ifPropFalse : null, + ifPropNone : null, + showPropTrue : null, + showPropFalse : null, + showPropNone : null, + badgeconfig:{ + badgeColor:"#0a59f7", + textColor:"#ffffff", + } + }, + + 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 + } + }, + + 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() + }, +} diff --git a/ace/ace_standard/src/main/js/default/pages/badge/index.css b/ace/ace_standard/src/main/js/default/pages/badge/router/index.css similarity index 100% rename from ace/ace_standard/src/main/js/default/pages/badge/index.css rename to ace/ace_standard/src/main/js/default/pages/badge/router/index.css diff --git a/ace/ace_standard/src/main/js/default/pages/badge/index.hml b/ace/ace_standard/src/main/js/default/pages/badge/router/index.hml similarity index 100% rename from ace/ace_standard/src/main/js/default/pages/badge/index.hml rename to ace/ace_standard/src/main/js/default/pages/badge/router/index.hml diff --git a/ace/ace_standard/src/main/js/default/pages/badge/index.js b/ace/ace_standard/src/main/js/default/pages/badge/router/index.js similarity index 100% rename from ace/ace_standard/src/main/js/default/pages/badge/index.js rename to ace/ace_standard/src/main/js/default/pages/badge/router/index.js diff --git a/ace/ace_standard/src/main/js/default/pages/badge/style/index.css b/ace/ace_standard/src/main/js/default/pages/badge/style/index.css new file mode 100644 index 0000000000000000000000000000000000000000..2ec15c756d56485ef7913fb0c194d6355622c5f0 --- /dev/null +++ b/ace/ace_standard/src/main/js/default/pages/badge/style/index.css @@ -0,0 +1,354 @@ +/** + * 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%; + padding: 1px; +} + +.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; +} + +.style-container{ + flex-direction: column; + width: 50%; +} + +#styleOne{ + width: 150px; + height: 20px; + padding-top: 1px; + padding-left: 2px; + padding-right: 3px; + padding-bottom: 0.5px; + margin-left: 1px; + margin-top: 2px; + margin-right: 3px; + margin-bottom: 0.5px; + border-left-style: solid; + border-right-style: dashed; + border-top-style: dotted; + border-bottom-style: solid; + border-left-width: 1px; + border-right-width: 1.5px; + border-top-width: 2px; + border-bottom-width: 0.5px; + border-left-color: #ff0000; + border-right-color: #00ff00; + border-top-color: #0000ff; + border-bottom-color: #fff000; + border-bottom-left-radius: 5px; + border-bottom-right-radius: 15px; + border-top-left-radius: 10px; + border-top-right-radius: 0px; + opacity: 0.5; + align-self:flex-end; +} + +#styleTwo{ + width: 150px; + height: 20px; + padding-start: 1px; + padding-end: 2px; + margin-start: 1px; + margin-end: 2px; + border-style: dotted; + border-width: 2px; + border-color:#0f00f0; + border-radius:5px; + opacity: 1.5; + align-self:flex-start; +} + +#styleThree{ + width: 50px; + height: 20px; + padding: 2px; + margin:1px; + border-left: 1px solid #ff0000; + border-right: 2px dashed #00ff00; + border-top: 1.5px dotted #0000ff; + border-bottom: 2.5px dotted #fff000; + opacity: 1; + align-self:baseline; +} + +#styleFour{ + width: 50px; + height: 20px; + align-self:center; + border: 2px solid #00ff00; +} + +#styleFive{ + width: 150px; + height: 40px; + border: 5px; + border-image-source: url('/common/images/image.png'); + border-image-slice: 5px 10px 10px 5px; + border-image-width: 10px 5px 5px 10px; + border-image-outset: 10px 5px 10px 5px; + border-image-repeat: repeat; +} + +#styleSix{ + width: 100%; + height: 2%; + background-color: #ff0000; + padding-top: 1%; + padding-left: 2%; + padding-right: 3%; + padding-bottom: 0.5%; + margin-left: 1%; + margin-top: 2%; + margin-right: 1.5%; + margin-bottom: 0.5%; +} + +#styleSeven{ + width: 70%; + height: 1%; + padding-start: 1%; + padding-end: 2%; + margin-start: 1%; + margin-end: 2%; + background-color: #00ff00; +} + +#styleEight{ + width: 60%; + height: 1%; + margin: 1%; + padding: 2%; + background-color: #0000ff; +} + +#styleNine{ + width: 100%; + height: 40px; + display:flex; +} + +#styleFive{ + width: 100%; + height: 40px; + border: 5px; + border-image-source: url('/common/images/image.png'); + border-image-slice: 5px 10px 10px 5px; + border-image-width: 10px 5px 5px 10px; + border-image-outset: 10px 5px 10px 5px; + border-image-repeat: repeat; +} + +#styleTen{ + width: 100%; + height: 400%; + display: none; + background-color: #ff0000; +} + +#styleEleven{ + height: 40%; + background-color: #00ff00; + flex:1 1 20px; + z-index:10; +} + +#styleTwelve{ + height: 50%; + background-color: #ff00ff; + flex-grow:2; + flex-shrink: 3; + flex-basis: 30px; + z-index:13; +} + +#styleThirteen{ + position: absolute; + left: 10px; + top: 20px; + width: 10px; + height: 10px; + background-color: #00ff00; + z-index:12; +} + +#styleFourteen{ + position: absolute; + right: 10px; + bottom: 20px; + width: 10px; + height: 10px; + background-color: #0000ff; + z-index:3; +} + +#styleFifteen{ + position: absolute; + left: 10%; + top: 20%; + width: 10px; + height: 10px; + background-color: #fff000; + z-index:5; +} + +#styleSixteen{ + position: absolute; + right: 10%; + bottom: 20%; + width: 10px; + height: 10px; + background-color: #00ffff; + z-index:15; +} + +#styleSeventeen{ + position: absolute; + start: 50px; + width: 10px; + height: 10px; + background-color: #ffff00; + z-index:7; +} + +#styleEighteen{ + position: absolute; + end: 20px; + width: 10px; + height: 10px; + background-color: #00ffff; + z-index:4; +} + +#styleNineteen{ + position: absolute; + start: 20%; + width: 10px; + height: 10px; + background-color: #ffff00; + z-index:1; +} + +#styleTwenty{ + position: absolute; + end: 20%; + width: 10px; + height: 10px; + background-color: #00ffff; + z-index:17; +} + +#styleTwentyOne{ + height: 20px; + box-shadow: 2px 4px; + flex-weight: 1; + margin:5px; +} + +#styleTwentyTwo{ + flex-weight: 1; + height: 20px; + box-shadow: 2px 4px 6px 8px; + margin:5px; +} + +#styleTwentyThree{ + flex-weight: 1; + height: 20px; + box-shadow: 1px 2px 3px 4px #ff0000; + margin:5px; +} + +#styleTwentyFour{ + width: 150px; + height: 20px; + background-color: #00ffff; + clip-path:inset(2 23); + visibility: visible; +} + +#styleTwentyFive{ + width: 150px; + height: 20px; + background-color: #00ffff; + visibility: hidden; +} + +#styleTwentySix{ + width: 150px; + height: 20px; + background-color: #999999; +} + +#styleTwentySeven{ + width: 150px; + height: 20px; + background: linear-gradient(pink,#fff000); +} + +#styleTwentyNine{ + width: 150px; + height: 20px; + background-image:url('common/images/image.png'); + background-size:contain; + background-repeat: repeat-x; + background-position: center; +} + +#styleThirty{ + width: 150px; + height: 20px; + background-image:url('common/images/image.png'); + background-size:50px 10px; + background-repeat: no-repeat; + background-position: 10px 10px; +} + +#styleThirtyOne{ + width: 150px; + height: 20px; + background-image:url('common/images/image.png'); + background-size:10% 20%; + background-repeat: repeat; + background-position: 30% 40%; +} + +#styleThirtyTwo{ + width: 150px; + height: 20px; + background: linear-gradient(pink,#fff000); + clip-path: margin-box; + image-fill: #000fff; + mask-image: url('common/images/icon.png'); + mask-size: cover; + mask-position: center; +} diff --git a/ace/ace_standard/src/main/js/default/pages/badge/style/index.hml b/ace/ace_standard/src/main/js/default/pages/badge/style/index.hml new file mode 100644 index 0000000000000000000000000000000000000000..52113e7fea60cb85c9c80649cec14e5624389403 --- /dev/null +++ b/ace/ace_standard/src/main/js/default/pages/badge/style/index.hml @@ -0,0 +1,111 @@ + + +
+
+ + badge通用样式 + + + + 通用样式 1-8 \n width height padding margin border opacity align-self + + + + + + + + + + + + + + + + + + + + 通用样式9-20 \n display flex z-index position + +
+ + + + + + + + + + + + + + + + + + + + + + +
+ + + 通用样式21-23 box-shadow + +
+ + + + + + +
+ + + 通用样式23-25 visibility clip-path + + + + + + + + 通用样式26-31 background + + + + + + + + + + + + + + 通用样式32 clip-path image-fill mask-image + + + +
+
+ diff --git a/ace/ace_standard/src/main/js/default/pages/badge/style/index.js b/ace/ace_standard/src/main/js/default/pages/badge/style/index.js new file mode 100644 index 0000000000000000000000000000000000000000..8452f14bb05344e8032c4c0dbcf73b5b023d4e34 --- /dev/null +++ b/ace/ace_standard/src/main/js/default/pages/badge/style/index.js @@ -0,0 +1,117 @@ +/** + * 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. + */ + +export default { + data:{ + styleOne : null, + styleTwo : null, + styleThree : null, + styleFour : null, + styleFive : null, + styleSix : null, + styleSeven : null, + styleEight : null, + styleNine : null, + styleTen : null, + styleEleven : null, + styleTwelve : null, + styleThirteen : null, + styleFourteen : null, + styleFifteen : null, + styleSixteen : null, + styleSeventeen : null, + styleEighteen : null, + styleNineteen : null, + styleTwenty : null, + styleTwentyOne : null, + styleTwentyTwo : null, + styleTwentyThree : null, + styleTwentyFour : null, + styleTwentyFive : null, + styleTwentySix : null, + styleTwentySeven : null, + styleTwentyNine : null, + styleThirty : null, + styleThirtyOne : null, + styleThirtyTwo : null + }, + + onShow(){ + this.getCommonStyleValues(); + globalThis.value = { + styleOne : this.styleOne, + styleTwo : this.styleTwo, + styleThree : this.styleThree, + styleFour : this.styleFour, + styleFive : this.styleFive, + styleSix : this.styleSix, + styleSeven : this.styleSeven, + styleEight : this.styleEight, + styleNine : this.styleNine, + styleTen : this.styleTen, + styleEleven : this.styleEleven, + styleTwelve : this.styleTwelve, + styleThirteen : this.styleThirteen, + styleFourteen : this.styleFourteen, + styleFifteen : this.styleFifteen, + styleSixteen : this.styleSixteen, + styleSeventeen : this.styleSeventeen, + styleEighteen : this.styleEighteen, + styleNineteen : this.styleNineteen, + styleTwenty : this.styleTwenty, + styleTwentyOne : this.styleTwentyOne, + styleTwentyTwo : this.styleTwentyTwo, + styleTwentyThree : this.styleTwentyThree, + styleTwentyFour : this.styleTwentyFour, + styleTwentyFive : this.styleTwentyFive, + styleTwentySix : this.styleTwentySix, + styleThirty : this.styleThirty, + styleThirtyOne : this.styleThirtyOne, + styleThirtyTwo : this.styleThirtyTwo + } + }, + + getCommonStyleValues(){ + this.styleOne = this.$element("styleOne").getInspector() + this.styleTwo = this.$element("styleTwo").getInspector() + this.styleThree = this.$element("styleThree").getInspector() + this.styleFour = this.$element("styleFour").getInspector() + this.styleFive = this.$element("styleFive").getInspector() + this.styleSix = this.$element("styleSix").getInspector() + this.styleSeven = this.$element("styleSeven").getInspector() + this.styleEight = this.$element("styleEight").getInspector() + this.styleNine = this.$element("styleNine").getInspector() + this.styleTen = this.$element("styleTen").getInspector() + this.styleEleven = this.$element("styleEleven").getInspector() + this.styleTwelve = this.$element("styleTwelve").getInspector() + this.styleThirteen = this.$element("styleThirteen").getInspector() + this.styleFourteen = this.$element("styleFourteen").getInspector() + this.styleFifteen = this.$element("styleFifteen").getInspector() + this.styleSixteen = this.$element("styleSixteen").getInspector() + this.styleSeventeen = this.$element("styleSeventeen").getInspector() + this.styleEighteen = this.$element("styleEighteen").getInspector() + this.styleNineteen = this.$element("styleNineteen").getInspector() + this.styleTwenty = this.$element("styleTwenty").getInspector() + this.styleTwentyOne = this.$element("styleTwentyOne").getInspector() + this.styleTwentyTwo = this.$element("styleTwentyTwo").getInspector() + this.styleTwentyThree = this.$element("styleTwentyThree").getInspector() + this.styleTwentyFour = this.$element("styleTwentyFour").getInspector() + this.styleTwentyFive = this.$element("styleTwentyFive").getInspector() + this.styleTwentySix = this.$element("styleTwentySix").getInspector() + this.styleThirty = this.$element("styleThirty").getInspector() + this.styleThirtyOne = this.$element("styleThirtyOne").getInspector() + this.styleThirtyTwo = this.$element("styleThirtyTwo").getInspector() + }, +} diff --git a/ace/ace_standard/src/main/js/default/pages/dialog/index.css b/ace/ace_standard/src/main/js/default/pages/dialog/index.css deleted file mode 100644 index 035b596bb0dea6951bd409173f5471a7457ae056..0000000000000000000000000000000000000000 --- a/ace/ace_standard/src/main/js/default/pages/dialog/index.css +++ /dev/null @@ -1,47 +0,0 @@ -.doc-page { - flex-direction: column; - justify-content: center; - align-items: center; - margin-top: 50px; -} -.btn-div { - width: 100%; - height: 200px; - flex-direction: column; - align-items: center; - justify-content: center; - margin: 10px; -} -.btn { - background-color: brown; - margin: 10px; -} -.txt { - font-weight: bold; - font-size: 39px; -} -.dialog-main { - width: 500px; - height: 300px; - margin: 30px; -} -.dialog-div { - flex-direction: column; - align-items: center; -} -.inner-txt { - width: 400px; - height: 160px; - flex-direction: column; - align-items: center; - justify-content: space-around; -} -.inner-btn { - width: 400px; - height: 120px; - justify-content: space-around; - align-items: center; -} -.btn-txt { - background-color: brown; -} \ No newline at end of file diff --git a/ace/ace_standard/src/main/js/default/pages/dialog/index.hml b/ace/ace_standard/src/main/js/default/pages/dialog/index.hml deleted file mode 100644 index 80b6268b6a0067bb44278027b02bc2fcc56133e0..0000000000000000000000000000000000000000 --- a/ace/ace_standard/src/main/js/default/pages/dialog/index.hml +++ /dev/null @@ -1,77 +0,0 @@ -
-
- - - - - -
- -
-
- Simple dialog -
-
- - -
-
-
- -
-
- dialog通用属性1 -
-
- - -
-
-
- -
-
- dialog通用属性2 -
-
- - -
-
-
- -
-
- dialog特有属性 -
-
- - -
-
-
- -
-
- dialog无障碍 -
-
- - -
-
-
-
\ No newline at end of file diff --git a/ace/ace_standard/src/main/js/default/pages/dialog/index.js b/ace/ace_standard/src/main/js/default/pages/dialog/index.js deleted file mode 100644 index 1341b400dc4867659008e72cfcb9ab89838b3011..0000000000000000000000000000000000000000 --- a/ace/ace_standard/src/main/js/default/pages/dialog/index.js +++ /dev/null @@ -1,62 +0,0 @@ -/** - * 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 { - showDialog1() { - this.$element('simpleDialog1').show() - }, - showDialog2() { - this.$element('simpleDialog2').show() - }, - showDialog3() { - this.$element('simpleDialog3').show() - }, - showDialog4() { - this.$element('simpleDialog3').show() - }, - showDialog5() { - this.$element('simpleDialog5').show() - }, - cancelDialog() { - prompt.showToast({ - message: 'Dialog cancelled' - }) - }, - cancelSchedule() { - this.$element('simpleDialog1').close() - this.$element('simpleDialog2').close() - this.$element('simpleDialog3').close() - this.$element('simpleDialog4').close() - this.$element('simpleDialog5').close() - prompt.showToast({ - message: 'Successfully cancelled' - }) - }, - setSchedule() { - this.$element('simpleDialog1').close() - this.$element('simpleDialog2').close() - this.$element('simpleDialog3').close() - this.$element('simpleDialog4').close() - this.$element('simpleDialog5').close() - prompt.showToast({ - message: 'Successfully confirmed' - }) - }, - doubleClick(){ - prompt.showToast({ - message: 'doubleClick' - }) - } -} \ No newline at end of file diff --git a/ace/ace_standard/src/main/js/default/pages/dialog/prop/index.css b/ace/ace_standard/src/main/js/default/pages/dialog/prop/index.css new file mode 100644 index 0000000000000000000000000000000000000000..08fe4e7de4a39ed42462f69e5dd536590dde8f85 --- /dev/null +++ b/ace/ace_standard/src/main/js/default/pages/dialog/prop/index.css @@ -0,0 +1,405 @@ +/** + * 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:red; + margin-left: 10px; + margin-right: 10px; + padding-start: 10px; + padding-end: 10px; + height: 100px; +} + +.classProp { + flex-weight: 1; + background-color:#0f0000; + width: 100%; + margin-left: 10px; + margin-right: 10px; + padding-start: 10px; + padding-end: 10px; + height: 100px; +} + +#classPropNone { + flex-weight: 1; + background-color:#0000e0; + width: 100%; + margin-left: 10px; + margin-right: 10px; + padding-start: 10px; + padding-end: 10px; + height: 100px; +} + +#refProp { + flex-weight: 1; + background-color:#00f000; + width: 100%; + margin-left: 10px; + margin-right: 10px; + padding-start: 10px; + padding-end: 10px; + height: 100px; +} + +#refPropNone { + flex-weight: 1; + background-color:#00000e; + width: 100%; + margin-left: 10px; + margin-right: 10px; + padding-start: 10px; + padding-end: 10px; + height: 100px; +} + +#disabledPropTrue { + flex-weight: 1; + background-color:#000f00; + width: 100%; + margin-left: 10px; + margin-right: 10px; + padding-start: 10px; + padding-end: 10px; + height: 100px; +} + +#disabledPropFalse { + flex-weight: 1; + background-color:#0000f0; + width: 100%; + margin-left: 10px; + margin-right: 10px; + padding-start: 10px; + padding-end: 10px; + height: 100px; +} + +#disabledPropNone { + flex-weight: 1; + background-color:#d00000; + width: 100%; + margin-left: 10px; + margin-right: 10px; + padding-start: 10px; + padding-end: 10px; + height: 100px; +} + +#focusablePropTrue { + flex-weight: 1; + background-color:#00000f; + width: 100%; + margin-left: 10px; + margin-right: 10px; + padding-start: 10px; + padding-end: 10px; + height: 100px; +} + +#focusablePropFalse { + flex-weight: 1; + background-color:#ff0000; + width: 100%; + margin-left: 10px; + margin-right: 10px; + padding-start: 10px; + padding-end: 10px; + height: 100px; +} + +#focusablePropNone { + flex-weight: 1; + background-color:#0d0000; + width: 100%; + margin-left: 10px; + margin-right: 10px; + padding-start: 10px; + padding-end: 10px; + height: 100px; +} + +#dataProp { + flex-weight: 1; + background-color:#0ff000; + width: 100%; + margin-left: 10px; + margin-right: 10px; + padding-start: 10px; + padding-end: 10px; + height: 100px; +} + +#dataPropNone { + flex-weight: 1; + background-color:#00d000; + width: 100%; + margin-left: 10px; + margin-right: 10px; + padding-start: 10px; + padding-end: 10px; + height: 100px; +} + +#clickEffectPropSmall { + height: 100px; + background-color:#00ff00; + width: 100%; + margin-left: 10px; + margin-right: 10px; + padding-start: 10px; + padding-end: 10px; +} + +#clickEffectPropMedium { + height: 100px; + background-color:#000ff0; + width: 100%; + margin-left: 10px; + margin-right: 10px; + padding-start: 10px; + padding-end: 10px; +} + +#clickEffectPropLarge { + height: 100px; + background-color:#fff000; + width: 100%; + margin-left: 10px; + margin-right: 10px; + padding-start: 10px; + padding-end: 10px; +} + +#clickEffectPropNone{ + height: 100px; + 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; + height: 100px; +} + +#dirPropAuto { + flex-weight: 1; + background-color:#00fff0; + width: 100%; + margin-left: 10px; + margin-right: 10px; + padding-start: 10px; + padding-end: 10px; + height: 100px; +} + +#dirPropLtr { + flex-weight: 1; + background-color:#000fff; + width: 100%; + margin-left: 10px; + margin-right: 10px; + padding-start: 10px; + padding-end: 10px; + height: 100px; +} + +#dirPropNone { + flex-weight: 1; + background-color:#0000d0; + width: 100%; + margin-left: 10px; + margin-right: 10px; + padding-start: 10px; + padding-end: 10px; + height: 100px; +} + +#forPropNull { + flex-weight: 1; + background-color:#ffff00; + width: 100%; + margin-left: 10px; + margin-right: 10px; + padding-start: 10px; + padding-end: 10px; + height: 100px; +} + +#forPropOne { + flex-weight: 1; + background-color:#00e000; + width: 100%; + margin-left: 10px; + margin-right: 10px; + padding-start: 10px; + padding-end: 10px; + height: 100px; +} + +#forPropThree { + flex-weight: 1; + background-color:#000e00; + width: 100%; + margin-left: 10px; + margin-right: 10px; + padding-start: 10px; + padding-end: 10px; + height: 100px; +} + +#ifPropTrue { + flex-weight: 1; + background-color:#0ffff0; + width: 100%; + margin-left: 10px; + margin-right: 10px; + padding-start: 10px; + padding-end: 10px; + height: 100px; +} + +#ifPropFalse { + flex-weight: 1; + background-color:#00ffff; + width: 100%; + margin-left: 10px; + margin-right: 10px; + padding-start: 10px; + padding-end: 10px; + height: 100px; +} + +#ifPropNone { + flex-weight: 1; + background-color:#00000d; + width: 100%; + margin-left: 10px; + margin-right: 10px; + padding-start: 10px; + padding-end: 10px; + height: 100px; +} + +#showPropTrue { + flex-weight: 1; + background-color:#e00000; + width: 100%; + margin-left: 10px; + margin-right: 10px; + padding-start: 10px; + padding-end: 10px; + height: 100px; +} + +#showPropFalse { + flex-weight: 1; + background-color:#0e0000; + width: 100%; + margin-left: 10px; + margin-right: 10px; + padding-start: 10px; + padding-end: 10px; + height: 100px; +} + +#showPropNone { + flex-weight: 1; + background-color:#c00000; + width: 100%; + margin-left: 10px; + margin-right: 10px; + padding-start: 10px; + padding-end: 10px; + height: 100px; +} + +.specific-container{ + flex-direction: column; + flex-weight: 1; +} + +#dragableNone{ + flex-weight: 1; + background-color:#c00000; + width: 100%; + margin-left: 10px; + margin-right: 10px; + padding-start: 10px; + padding-end: 10px; + height: 100px; +} + +#dragableTrue{ + flex-weight: 1; + background-color:#c00000; + width: 100%; + margin-left: 10px; + margin-right: 10px; + padding-start: 10px; + padding-end: 10px; + height: 100px; +} + +#dragableFalse{ + flex-weight: 1; + background-color:#c00000; + width: 100%; + margin-left: 10px; + margin-right: 10px; + padding-start: 10px; + padding-end: 10px; + height: 100px; +} \ No newline at end of file diff --git a/ace/ace_standard/src/main/js/default/pages/dialog/prop/index.hml b/ace/ace_standard/src/main/js/default/pages/dialog/prop/index.hml new file mode 100644 index 0000000000000000000000000000000000000000..10500f8e851af7ecb4a9d53131c143c67768d581 --- /dev/null +++ b/ace/ace_standard/src/main/js/default/pages/dialog/prop/index.hml @@ -0,0 +1,242 @@ + + +
+
+ + dialog通用属性 + + + + 通用属性 -- id + + + + + + 通用属性 -- class + + + + + + + + + + + 通用属性 -- style + + + + + + + 通用属性 -- ref + + + + + + + + + + 通用属性 -- disabled + + + + + + + + + + + + + 通用属性 -- focusable + + + + + + + + + + + + + 通用属性 -- data-* + + + + + + + + + + 通用属性 -- click-effect + + + + + + + + + + + + + + + + 通用属性 -- dir + + + + + + + + + + + + + + + + 渲染属性 -- for + + + + + + + + + + + + + 渲染属性 -- if + + + + + + + 渲染属性 -- show + + + + + + + + + + +
+ +
+
+
+ + dialog特有属性 + + + + 特有属性 -- dragable + + + + + + + + + + + +
+
diff --git a/ace/ace_standard/src/main/js/default/pages/dialog/prop/index.js b/ace/ace_standard/src/main/js/default/pages/dialog/prop/index.js new file mode 100644 index 0000000000000000000000000000000000000000..578d659d5797564d082cd7cd52c30e25fea99401 --- /dev/null +++ b/ace/ace_standard/src/main/js/default/pages/dialog/prop/index.js @@ -0,0 +1,215 @@ +/** + * 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:{ + 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, + ifPropFalse : null, + ifPropNone : null, + showPropTrue : null, + showPropFalse : null, + showPropNone : null + }, + openidProp(){ + this.$element('idProp').show() + }, + openclassProp(){ + this.$element('classProp').show() + }, + openclassPropNone(){ + this.$element('classPropNone').show() + }, + openstyleProp(){ + this.$element('styleProp').show() + }, + openrefProp(){ + this.$element('refProp').show() + }, + openrefPropNone(){ + this.$element('refPropNone').show() + }, + opendisabledPropTrue(){ + this.$element('disabledPropTrue').show() + }, + opendisabledPropFalse(){ + this.$element('disabledPropFalse').show() + }, + opendisabledPropNone(){ + this.$element('disabledPropNone').show() + }, + openfocusablePropTrue(){ + this.$element('focusablePropTrue').show() + }, + openfocusablePropFalse(){ + this.$element('focusablePropFalse').show() + }, + openfocusablePropNone(){ + this.$element('focusablePropNone').show() + }, + opendataProp(){ + this.$element('dataProp').show() + }, + opendataPropNone(){ + this.$element('dataPropNone').show() + }, + openclickEffectPropSmall(){ + this.$element('clickEffectPropSmall').show() + }, + openclickEffectPropMedium(){ + this.$element('clickEffectPropMedium').show() + }, + openclickEffectPropLarge(){ + this.$element('clickEffectPropLarge').show() + }, + openclickEffectPropNone(){ + this.$element('clickEffectPropNone').show() + }, + opendirPropRtl(){ + this.$element('dirPropRtl').show() + }, + opendirPropAuto(){ + this.$element('dirPropAuto').show() + }, + opendirPropLtr(){ + this.$element('dirPropLtr').show() + }, + opendirPropNone(){ + this.$element('dirPropNone').show() + }, + openforPropNull(){ + this.$element('forPropNull').show() + }, + openforPropOne(){ + this.$element('forPropOne').show() + }, + openforPropThree(){ + this.$element('forPropThree').show() + }, + openifPropTrue(){ + this.$element('ifPropTrue').show() + }, + openshowPropTrue(){ + this.$element('showPropTrue').show() + }, + openshowPropFalse(){ + this.$element('showPropFalse').show() + }, + openshowPropNone(){ + this.$element('showPropNone').show() + }, + opendragableNone(){ + this.$element('dragableNone').show() + }, + opendragableTrue(){ + this.$element('dragableTrue').show() + }, + opendragableFalse(){ + this.$element('dragableFalse').show() + }, + 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 + } + }, + 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() + }, +} diff --git a/ace/ace_standard/src/main/js/default/pages/dialog/router/index.css b/ace/ace_standard/src/main/js/default/pages/dialog/router/index.css new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/ace/ace_standard/src/main/js/default/pages/dialog/router/index.hml b/ace/ace_standard/src/main/js/default/pages/dialog/router/index.hml new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/ace/ace_standard/src/main/js/default/pages/dialog/router/index.js b/ace/ace_standard/src/main/js/default/pages/dialog/router/index.js new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/ace/ace_standard/src/main/js/default/pages/dialog/style/index.css b/ace/ace_standard/src/main/js/default/pages/dialog/style/index.css new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/ace/ace_standard/src/main/js/default/pages/dialog/style/index.hml b/ace/ace_standard/src/main/js/default/pages/dialog/style/index.hml new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/ace/ace_standard/src/main/js/default/pages/dialog/style/index.js b/ace/ace_standard/src/main/js/default/pages/dialog/style/index.js new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/ace/ace_standard/src/main/js/default/pages/form/prop/index.css b/ace/ace_standard/src/main/js/default/pages/form/prop/index.css new file mode 100644 index 0000000000000000000000000000000000000000..7bbbb633af483616054a637b9aa9690c0910ae2d --- /dev/null +++ b/ace/ace_standard/src/main/js/default/pages/form/prop/index.css @@ -0,0 +1,347 @@ +/** + * 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; +} \ No newline at end of file diff --git a/ace/ace_standard/src/main/js/default/pages/form/prop/index.hml b/ace/ace_standard/src/main/js/default/pages/form/prop/index.hml new file mode 100644 index 0000000000000000000000000000000000000000..f908e6e13b420c9aa0dbf758c52ef1d1085750f0 --- /dev/null +++ b/ace/ace_standard/src/main/js/default/pages/form/prop/index.hml @@ -0,0 +1,166 @@ + + + +
+
+ + form通用属性 + + + + 通用属性 -- id + +
+
+ + + 通用属性 -- class + +
+
+
+
+ + + + 通用属性 -- style + +
+
+ + + 通用属性 -- ref + +
+
+
+
+ + + 通用属性 -- disabled + +
+
+
+
+
+
+ + + 通用属性 -- focusable + +
+
+
+
+
+
+ + + 通用属性 -- data-* + +
+
+
+
+ + + 通用属性 -- click-effect + +
+
+
+
+
+
+
+
+ + + 通用属性 -- dir + +
+
+
+
+
+
+
+
+ + + 渲染属性 -- for + +
+
+
+
+
+
+ + + 渲染属性 -- if + +
+
+ + + 渲染属性 -- show + +
+
+
+
+
+
+
+ +
+
+
+ + form特有属性 + +
+
\ No newline at end of file diff --git a/ace/ace_standard/src/main/js/default/pages/form/prop/index.js b/ace/ace_standard/src/main/js/default/pages/form/prop/index.js new file mode 100644 index 0000000000000000000000000000000000000000..5625ecb4562dc3d76b761fc475d00851748b3bf1 --- /dev/null +++ b/ace/ace_standard/src/main/js/default/pages/form/prop/index.js @@ -0,0 +1,121 @@ +/** + * 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:{ + 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, + ifPropFalse : null, + ifPropNone : null, + showPropTrue : null, + showPropFalse : null, + showPropNone : 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 + } + }, + + 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() + }, +} diff --git a/ace/ace_standard/src/main/js/default/pages/form/index.css b/ace/ace_standard/src/main/js/default/pages/form/router/index.css similarity index 100% rename from ace/ace_standard/src/main/js/default/pages/form/index.css rename to ace/ace_standard/src/main/js/default/pages/form/router/index.css diff --git a/ace/ace_standard/src/main/js/default/pages/form/index.hml b/ace/ace_standard/src/main/js/default/pages/form/router/index.hml similarity index 100% rename from ace/ace_standard/src/main/js/default/pages/form/index.hml rename to ace/ace_standard/src/main/js/default/pages/form/router/index.hml diff --git a/ace/ace_standard/src/main/js/default/pages/form/index.js b/ace/ace_standard/src/main/js/default/pages/form/router/index.js similarity index 100% rename from ace/ace_standard/src/main/js/default/pages/form/index.js rename to ace/ace_standard/src/main/js/default/pages/form/router/index.js diff --git a/ace/ace_standard/src/main/js/default/pages/form/style/index.css b/ace/ace_standard/src/main/js/default/pages/form/style/index.css new file mode 100644 index 0000000000000000000000000000000000000000..8dbb4da655bd07a0fbb825193368b823b9a68e68 --- /dev/null +++ b/ace/ace_standard/src/main/js/default/pages/form/style/index.css @@ -0,0 +1,354 @@ +/** + * 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%; + padding: 1px; +} + +.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; +} + +.style-container{ + flex-direction: column; + width: 50%; +} + +#styleOne{ + width: 150px; + height: 20px; + padding-top: 1px; + padding-left: 2px; + padding-right: 3px; + padding-bottom: 0.5px; + margin-left: 1px; + margin-top: 2px; + margin-right: 3px; + margin-bottom: 0.5px; + border-left-style: solid; + border-right-style: dashed; + border-top-style: dotted; + border-bottom-style: solid; + border-left-width: 1px; + border-right-width: 1.5px; + border-top-width: 2px; + border-bottom-width: 0.5px; + border-left-color: #ff0000; + border-right-color: #00ff00; + border-top-color: #0000ff; + border-bottom-color: #fff000; + border-bottom-left-radius: 5px; + border-bottom-right-radius: 15px; + border-top-left-radius: 10px; + border-top-right-radius: 0px; + opacity: 0.5; + align-self:flex-end; +} + +#styleTwo{ + width: 150px; + height: 20px; + padding-start: 1px; + padding-end: 2px; + margin-start: 1px; + margin-end: 2px; + border-style: dotted; + border-width: 2px; + border-color:#0f00f0; + border-radius:5px; + opacity: 1.5; + align-self:flex-start; +} + +#styleThree{ + width: 50px; + height: 20px; + padding: 2px; + margin:1px; + border-left: 1px solid #ff0000; + border-right: 2px dashed #00ff00; + border-top: 1.5px dotted #0000ff; + border-bottom: 2.5px dotted #fff000; + opacity: 1; + align-self:baseline; +} + +#styleFour{ + width: 50px; + height: 20px; + align-self:center; + border: 2px solid #00ff00; +} + +#styleFive{ + width: 150px; + height: 40px; + border: 5px; + border-image-source: url('/common/images/image.png'); + border-image-slice: 5px 10px 10px 5px; + border-image-width: 10px 5px 5px 10px; + border-image-outset: 10px 5px 10px 5px; + border-image-repeat: repeat; +} + +#styleSix{ + width: 100%; + height: 2%; + background-color: #ff0000; + padding-top: 1%; + padding-left: 2%; + padding-right: 3%; + padding-bottom: 0.5%; + margin-left: 1%; + margin-top: 2%; + margin-right: 1.5%; + margin-bottom: 0.5%; +} + +#styleSeven{ + width: 70%; + height: 1%; + padding-start: 1%; + padding-end: 2%; + margin-start: 1%; + margin-end: 2%; + background-color: #00ff00; +} + +#styleEight{ + width: 60%; + height: 1%; + margin: 1%; + padding: 2%; + background-color: #0000ff; +} + +#styleNine{ + width: 100%; + height: 40px; + display:flex; +} + +#styleFive{ + width: 100%; + height: 40px; + border: 5px; + border-image-source: url('/common/images/image.png'); + border-image-slice: 5px 10px 10px 5px; + border-image-width: 10px 5px 5px 10px; + border-image-outset: 10px 5px 10px 5px; + border-image-repeat: repeat; +} + +#styleTen{ + width: 100%; + height: 400%; + display: none; + background-color: #ff0000; +} + +#styleEleven{ + height: 40%; + background-color: #00ff00; + flex:1 1 20px; + z-index:10; +} + +#styleTwelve{ + height: 50%; + background-color: #ff00ff; + flex-grow:2; + flex-shrink: 3; + flex-basis: 30px; + z-index:13; +} + +#styleThirteen{ + position: absolute; + left: 10px; + top: 20px; + width: 10px; + height: 10px; + background-color: #00ff00; + z-index:12; +} + +#styleFourteen{ + position: absolute; + right: 10px; + bottom: 20px; + width: 10px; + height: 10px; + background-color: #0000ff; + z-index:3; +} + +#styleFifteen{ + position: absolute; + left: 10%; + top: 20%; + width: 10px; + height: 10px; + background-color: #fff000; + z-index:5; +} + +#styleSixteen{ + position: absolute; + right: 10%; + bottom: 20%; + width: 10px; + height: 10px; + background-color: #00ffff; + z-index:15; +} + +#styleSeventeen{ + position: absolute; + start: 50px; + width: 10px; + height: 10px; + background-color: #ffff00; + z-index:7; +} + +#styleEighteen{ + position: absolute; + end: 20px; + width: 10px; + height: 10px; + background-color: #00ffff; + z-index:4; +} + +#styleNineteen{ + position: absolute; + start: 20%; + width: 10px; + height: 10px; + background-color: #ffff00; + z-index:1; +} + +#styleTwenty{ + position: absolute; + end: 20%; + width: 10px; + height: 10px; + background-color: #00ffff; + z-index:17; +} + +#styleTwentyOne{ + height: 20px; + box-shadow: 2px 4px; + flex-weight: 1; + margin:5px; +} + +#styleTwentyTwo{ + flex-weight: 1; + height: 20px; + box-shadow: 2px 4px 6px 8px; + margin:5px; +} + +#styleTwentyThree{ + flex-weight: 1; + height: 20px; + box-shadow: 1px 2px 3px 4px #ff0000; + margin:5px; +} + +#styleTwentyFour{ + width: 150px; + height: 20px; + background-color: #00ffff; + clip-path:inset(2 23); + visibility: visible; +} + +#styleTwentyFive{ + width: 150px; + height: 20px; + background-color: #00ffff; + visibility: hidden; +} + +#styleTwentySix{ + width: 150px; + height: 20px; + background-color: #999999; +} + +#styleTwentySeven{ + width: 150px; + height: 20px; + background: linear-gradient(pink,#fff000); +} + +#styleTwentyNine{ + width: 150px; + height: 20px; + background-image:url('common/images/image.png'); + background-size:contain; + background-repeat: repeat-x; + background-position: center; +} + +#styleThirty{ + width: 150px; + height: 20px; + background-image:url('common/images/image.png'); + background-size:50px 10px; + background-repeat: no-repeat; + background-position: 10px 10px; +} + +#styleThirtyOne{ + width: 150px; + height: 20px; + background-image:url('common/images/image.png'); + background-size:10% 20%; + background-repeat: repeat; + background-position: 30% 40%; +} + +#styleThirtyTwo{ + width: 150px; + height: 20px; + background: linear-gradient(pink,#fff000); + clip-path: margin-box; + image-fill: #000fff; + mask-image: url('common/images/icon.png'); + mask-size: cover; + mask-position: center; +} \ No newline at end of file diff --git a/ace/ace_standard/src/main/js/default/pages/form/style/index.hml b/ace/ace_standard/src/main/js/default/pages/form/style/index.hml new file mode 100644 index 0000000000000000000000000000000000000000..8184c24ef4cdd723060fb23229606a51fdca1675 --- /dev/null +++ b/ace/ace_standard/src/main/js/default/pages/form/style/index.hml @@ -0,0 +1,111 @@ + + +
+
+ + div通用样式 + + + + 通用样式 1-8 \n width height padding margin border opacity align-self + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + 通用样式9-20 \n display flex z-index position + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + 通用样式21-23 box-shadow + +
+
+
+
+
+
+
+
+ + + 通用样式23-25 visibility clip-path + +
+
+
+
+ + + 通用样式26-31 background + +
+
+
+
+
+
+
+
+
+
+ + + 通用样式32 clip-path image-fill mask-image + +
+
+
+
+ diff --git a/ace/ace_standard/src/main/js/default/pages/form/style/index.js b/ace/ace_standard/src/main/js/default/pages/form/style/index.js new file mode 100644 index 0000000000000000000000000000000000000000..8452f14bb05344e8032c4c0dbcf73b5b023d4e34 --- /dev/null +++ b/ace/ace_standard/src/main/js/default/pages/form/style/index.js @@ -0,0 +1,117 @@ +/** + * 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. + */ + +export default { + data:{ + styleOne : null, + styleTwo : null, + styleThree : null, + styleFour : null, + styleFive : null, + styleSix : null, + styleSeven : null, + styleEight : null, + styleNine : null, + styleTen : null, + styleEleven : null, + styleTwelve : null, + styleThirteen : null, + styleFourteen : null, + styleFifteen : null, + styleSixteen : null, + styleSeventeen : null, + styleEighteen : null, + styleNineteen : null, + styleTwenty : null, + styleTwentyOne : null, + styleTwentyTwo : null, + styleTwentyThree : null, + styleTwentyFour : null, + styleTwentyFive : null, + styleTwentySix : null, + styleTwentySeven : null, + styleTwentyNine : null, + styleThirty : null, + styleThirtyOne : null, + styleThirtyTwo : null + }, + + onShow(){ + this.getCommonStyleValues(); + globalThis.value = { + styleOne : this.styleOne, + styleTwo : this.styleTwo, + styleThree : this.styleThree, + styleFour : this.styleFour, + styleFive : this.styleFive, + styleSix : this.styleSix, + styleSeven : this.styleSeven, + styleEight : this.styleEight, + styleNine : this.styleNine, + styleTen : this.styleTen, + styleEleven : this.styleEleven, + styleTwelve : this.styleTwelve, + styleThirteen : this.styleThirteen, + styleFourteen : this.styleFourteen, + styleFifteen : this.styleFifteen, + styleSixteen : this.styleSixteen, + styleSeventeen : this.styleSeventeen, + styleEighteen : this.styleEighteen, + styleNineteen : this.styleNineteen, + styleTwenty : this.styleTwenty, + styleTwentyOne : this.styleTwentyOne, + styleTwentyTwo : this.styleTwentyTwo, + styleTwentyThree : this.styleTwentyThree, + styleTwentyFour : this.styleTwentyFour, + styleTwentyFive : this.styleTwentyFive, + styleTwentySix : this.styleTwentySix, + styleThirty : this.styleThirty, + styleThirtyOne : this.styleThirtyOne, + styleThirtyTwo : this.styleThirtyTwo + } + }, + + getCommonStyleValues(){ + this.styleOne = this.$element("styleOne").getInspector() + this.styleTwo = this.$element("styleTwo").getInspector() + this.styleThree = this.$element("styleThree").getInspector() + this.styleFour = this.$element("styleFour").getInspector() + this.styleFive = this.$element("styleFive").getInspector() + this.styleSix = this.$element("styleSix").getInspector() + this.styleSeven = this.$element("styleSeven").getInspector() + this.styleEight = this.$element("styleEight").getInspector() + this.styleNine = this.$element("styleNine").getInspector() + this.styleTen = this.$element("styleTen").getInspector() + this.styleEleven = this.$element("styleEleven").getInspector() + this.styleTwelve = this.$element("styleTwelve").getInspector() + this.styleThirteen = this.$element("styleThirteen").getInspector() + this.styleFourteen = this.$element("styleFourteen").getInspector() + this.styleFifteen = this.$element("styleFifteen").getInspector() + this.styleSixteen = this.$element("styleSixteen").getInspector() + this.styleSeventeen = this.$element("styleSeventeen").getInspector() + this.styleEighteen = this.$element("styleEighteen").getInspector() + this.styleNineteen = this.$element("styleNineteen").getInspector() + this.styleTwenty = this.$element("styleTwenty").getInspector() + this.styleTwentyOne = this.$element("styleTwentyOne").getInspector() + this.styleTwentyTwo = this.$element("styleTwentyTwo").getInspector() + this.styleTwentyThree = this.$element("styleTwentyThree").getInspector() + this.styleTwentyFour = this.$element("styleTwentyFour").getInspector() + this.styleTwentyFive = this.$element("styleTwentyFive").getInspector() + this.styleTwentySix = this.$element("styleTwentySix").getInspector() + this.styleThirty = this.$element("styleThirty").getInspector() + this.styleThirtyOne = this.$element("styleThirtyOne").getInspector() + this.styleThirtyTwo = this.$element("styleThirtyTwo").getInspector() + }, +} diff --git a/ace/ace_standard/src/main/js/default/pages/list/prop/index.css b/ace/ace_standard/src/main/js/default/pages/list/prop/index.css new file mode 100644 index 0000000000000000000000000000000000000000..8128e01a33588b0f2290f1e4cdb740422eb57ecc --- /dev/null +++ b/ace/ace_standard/src/main/js/default/pages/list/prop/index.css @@ -0,0 +1,766 @@ +/** + * 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; +} +#scrollPageTrue{ + flex-weight: 1; + background-color:red; + width: 100%; + margin-left: 10px; + margin-right: 10px; + padding-start: 10px; + padding-end: 10px; +} + +#scrollPageFalse{ + flex-weight: 1; + background-color:skyblue; + width: 100%; + margin-left: 10px; + margin-right: 10px; + padding-start: 10px; + padding-end: 10px; +} + +#scrollPageNone{ + flex-weight: 1; + background-color:violet; + width: 100%; + margin-left: 10px; + margin-right: 10px; + padding-start: 10px; + padding-end: 10px; +} + +#cachedcount{ + flex-weight: 1; + background-color:red; + width: 100%; + margin-left: 10px; + margin-right: 10px; + padding-start: 10px; + padding-end: 10px; +} + +#scrollbarOff{ + flex-weight: 1; + background-color:yellow; + width: 100%; + margin-left: 10px; + margin-right: 10px; + padding-start: 10px; + padding-end: 10px; +} + +#scrollbarAuto{ + flex-weight: 1; + background-color:red; + width: 100%; + margin-left: 10px; + margin-right: 10px; + padding-start: 10px; + padding-end: 10px; +} + +#scrollbarOn{ + flex-weight: 1; + background-color:gray; + width: 100%; + margin-left: 10px; + margin-right: 10px; + padding-start: 10px; + padding-end: 10px; +} + +#scrollbarNone{ + flex-weight: 1; + background-color:magenta; + width: 100%; + margin-left: 10px; + margin-right: 10px; + padding-start: 10px; + padding-end: 10px; +} + +#scrolleffectSpring{ + flex-weight: 1; + background-color:gray; + width: 100%; + margin-left: 10px; + margin-right: 10px; + padding-start: 10px; + padding-end: 10px; +} + +#scrolleffectFade{ + flex-weight: 1; + background-color:red; + width: 100%; + margin-left: 10px; + margin-right: 10px; + padding-start: 10px; + padding-end: 10px; +} + +#scrolleffectNo{ + flex-weight: 1; + background-color:yellow; + width: 100%; + margin-left: 10px; + margin-right: 10px; + padding-start: 10px; + padding-end: 10px; +} + +#scrolleffectNone{ + flex-weight: 1; + background-color:maroon; + width: 100%; + margin-left: 10px; + margin-right: 10px; + padding-start: 10px; + padding-end: 10px; +} + +#indexerTrue{ + flex-weight: 1; + background-color:yellow; + width: 100%; + margin-left: 10px; + margin-right: 10px; + padding-start: 10px; + padding-end: 10px; +} + +#indexerFalse{ + flex-weight: 1; + background-color:red; + width: 100%; + margin-left: 10px; + margin-right: 10px; + padding-start: 10px; + padding-end: 10px; +} + +#indexerArray{ + flex-weight: 1; + background-color:salmon; + width: 100%; + margin-left: 10px; + margin-right: 10px; + padding-start: 10px; + padding-end: 10px; +} + +#indexerNone{ + flex-weight: 1; + background-color:khaki; + width: 100%; + margin-left: 10px; + margin-right: 10px; + padding-start: 10px; + padding-end: 10px; +} + +#indexercircleTrue{ + flex-weight: 1; + background-color:yellow; + width: 100%; + margin-left: 10px; + margin-right: 10px; + padding-start: 10px; + padding-end: 10px; +} + +#indexercircleFalse{ + flex-weight: 1; + background-color:saddlebrown; + width: 100%; + margin-left: 10px; + margin-right: 10px; + padding-start: 10px; + padding-end: 10px; +} + +#indexercircleNone{ + flex-weight: 1; + background-color:firebrick; + width: 100%; + margin-left: 10px; + margin-right: 10px; + padding-start: 10px; + padding-end: 10px; +} + +#indexermultiTrue{ + flex-weight: 1; + background-color:yellow; + width: 100%; + margin-left: 10px; + margin-right: 10px; + padding-start: 10px; + padding-end: 10px; +} + +#indexermultiFalse{ + flex-weight: 1; + background-color:violet; + width: 100%; + margin-left: 10px; + margin-right: 10px; + padding-start: 10px; + padding-end: 10px; +} + +#indexermultiNone{ + flex-weight: 1; + background-color:mediumslateblue; + width: 100%; + margin-left: 10px; + margin-right: 10px; + padding-start: 10px; + padding-end: 10px; +} + +#indexerbubbleTrue{ + flex-weight: 1; + background-color:yellow; + width: 100%; + margin-left: 10px; + margin-right: 10px; + padding-start: 10px; + padding-end: 10px; +} + +#indexerbubbleFalse{ + flex-weight: 1; + background-color:chartreuse; + width: 100%; + margin-left: 10px; + margin-right: 10px; + padding-start: 10px; + padding-end: 10px; +} + +#indexerbubbleNone{ + flex-weight: 1; + background-color:lightcoral; + width: 100%; + margin-left: 10px; + margin-right: 10px; + padding-start: 10px; + padding-end: 10px; +} + +#dividerTrue{ + flex-weight: 1; + background-color:yellow; + width: 100%; + margin-left: 10px; + margin-right: 10px; + padding-start: 10px; + padding-end: 10px; +} + +#dividerFalse{ + flex-weight: 1; + background-color:black; + width: 100%; + margin-left: 10px; + margin-right: 10px; + padding-start: 10px; + padding-end: 10px; +} + +#dividerNone{ + flex-weight: 1; + background-color:mediumblue; + width: 100%; + margin-left: 10px; + margin-right: 10px; + padding-start: 10px; + padding-end: 10px; +} + +#shapemodeDefault{ + flex-weight: 1; + background-color:yellow; + width: 100%; + margin-left: 10px; + margin-right: 10px; + padding-start: 10px; + padding-end: 10px; +} + +#shapemodeRect{ + flex-weight: 1; + background-color:black; + width: 100%; + margin-left: 10px; + margin-right: 10px; + padding-start: 10px; + padding-end: 10px; +} + +#shapemodeRound{ + flex-weight: 1; + background-color:salmon; + width: 100%; + margin-left: 10px; + margin-right: 10px; + padding-start: 10px; + padding-end: 10px; +} + +#shapemodeNone{ + flex-weight: 1; + background-color:blueviolet; + width: 100%; + margin-left: 10px; + margin-right: 10px; + padding-start: 10px; + padding-end: 10px; +} + +#updateeffectTrue{ + flex-weight: 1; + background-color:salmon; + width: 100%; + margin-left: 10px; + margin-right: 10px; + padding-start: 10px; + padding-end: 10px; +} + +#updateeffectFalse{ + flex-weight: 1; + background-color:black; + width: 100%; + margin-left: 10px; + margin-right: 10px; + padding-start: 10px; + padding-end: 10px; +} + +#updateeffectNone{ + flex-weight: 1; + background-color:maroon; + width: 100%; + margin-left: 10px; + margin-right: 10px; + padding-start: 10px; + padding-end: 10px; +} + +#chainanimationTrue{ + flex-weight: 1; + background-color:bisque; + width: 100%; + margin-left: 10px; + margin-right: 10px; + padding-start: 10px; + padding-end: 10px; +} + +#chainanimationFalse{ + flex-weight: 1; + background-color:black; + width: 100%; + margin-left: 10px; + margin-right: 10px; + padding-start: 10px; + padding-end: 10px; +} + +#chainanimationNone{ + flex-weight: 1; + background-color:bisque; + width: 100%; + margin-left: 10px; + margin-right: 10px; + padding-start: 10px; + padding-end: 10px; +} + +#initialindex{ + flex-weight: 1; + background-color:black; + width: 100%; + margin-left: 10px; + margin-right: 10px; + padding-start: 10px; + padding-end: 10px; +} + +#initialoffset{ + flex-weight: 1; + background-color:lightcoral; + width: 100%; + margin-left: 10px; + margin-right: 10px; + padding-start: 10px; + padding-end: 10px; +} + +#selected{ + flex-weight: 1; + background-color:mediumaquamarine; + width: 100%; + margin-left: 10px; + margin-right: 10px; + padding-start: 10px; + padding-end: 10px; +} + +#selectedNone{ + flex-weight: 1; + background-color:lavenderblush; + width: 100%; + margin-left: 10px; + margin-right: 10px; + padding-start: 10px; + padding-end: 10px; +} \ No newline at end of file diff --git a/ace/ace_standard/src/main/js/default/pages/list/prop/index.hml b/ace/ace_standard/src/main/js/default/pages/list/prop/index.hml new file mode 100644 index 0000000000000000000000000000000000000000..ca8498493e828225810cb66595d9dbca154872dd --- /dev/null +++ b/ace/ace_standard/src/main/js/default/pages/list/prop/index.hml @@ -0,0 +1,308 @@ + + +
+
+ + list通用属性 + + + + 通用属性 -- id + + + + + + 通用属性 -- class + + + + + + + + + 通用属性 -- style + + + + + + 通用属性 -- ref + + + + + + + + 通用属性 -- disabled + + + + + + + + + + 通用属性 -- focusable + + + + + + + + + + 通用属性 -- data-* + + + + + + + + 通用属性 -- click-effect + + + + + + + + + + + + 通用属性 -- dir + + + + + + + + + + + + 渲染属性 -- for + + + + + + + + + + 渲染属性 -- if + + + + + + 渲染属性 -- show + + + + + + + +
+ +
+
+
+ + list特有属性 + + + 特有属性 -- scrollpage + + + + + + + + + + 特有属性 -- cachedcount + + + + + + 特有属性 -- scrollbar + + + + + + + + + + + + 特有属性 -- scrolleffect + + + + + + + + + + + + 特有属性 -- indexer + + + + + + + + + + + + 特有属性 -- indexercircle + + + + + + + + + + 特有属性 -- indexermulti + + + + + + + + + + 特有属性 -- indexerbubble + + + + + + + + + + 特有属性 -- divider + + + + + + + + + + 特有属性 -- shapemode + + + + + + + + + + + + 特有属性 -- chainanimation + + + + + + + + + + 特有属性 -- updateeffect + + + + + + + + + + 特有属性 -- initialindex + + + + + + 特有属性 -- initialoffset + + + + + + 特有属性 -- selected + + + + + +
+
diff --git a/ace/ace_standard/src/main/js/default/pages/list/prop/index.js b/ace/ace_standard/src/main/js/default/pages/list/prop/index.js new file mode 100644 index 0000000000000000000000000000000000000000..e1fa1b8e44c764b3f34586de89f6657972d08e62 --- /dev/null +++ b/ace/ace_standard/src/main/js/default/pages/list/prop/index.js @@ -0,0 +1,122 @@ +/** + * 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:{ + 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, + ifPropFalse : null, + ifPropNone : null, + showPropTrue : null, + showPropFalse : null, + showPropNone : null, + array:['#',1,2,3,4,5,6,7,8] + }, + + 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 + } + }, + + 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() + }, +} diff --git a/ace/ace_standard/src/main/js/default/pages/list/index.css b/ace/ace_standard/src/main/js/default/pages/list/router/index.css similarity index 100% rename from ace/ace_standard/src/main/js/default/pages/list/index.css rename to ace/ace_standard/src/main/js/default/pages/list/router/index.css diff --git a/ace/ace_standard/src/main/js/default/pages/list/index.hml b/ace/ace_standard/src/main/js/default/pages/list/router/index.hml similarity index 100% rename from ace/ace_standard/src/main/js/default/pages/list/index.hml rename to ace/ace_standard/src/main/js/default/pages/list/router/index.hml diff --git a/ace/ace_standard/src/main/js/default/pages/list/index.js b/ace/ace_standard/src/main/js/default/pages/list/router/index.js similarity index 100% rename from ace/ace_standard/src/main/js/default/pages/list/index.js rename to ace/ace_standard/src/main/js/default/pages/list/router/index.js diff --git a/ace/ace_standard/src/main/js/default/pages/list/style/index.css b/ace/ace_standard/src/main/js/default/pages/list/style/index.css new file mode 100644 index 0000000000000000000000000000000000000000..c120f920a628ca9067e44609fc84321306e0211a --- /dev/null +++ b/ace/ace_standard/src/main/js/default/pages/list/style/index.css @@ -0,0 +1,405 @@ +/** + * 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%; + padding: 1px; +} + +.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; +} + +.style-container{ + flex-direction: column; + width: 50%; +} + +#styleOne{ + width: 150px; + height: 20px; + padding-top: 1px; + padding-left: 2px; + padding-right: 3px; + padding-bottom: 0.5px; + margin-left: 1px; + margin-top: 2px; + margin-right: 3px; + margin-bottom: 0.5px; + border-left-style: solid; + border-right-style: dashed; + border-top-style: dotted; + border-bottom-style: solid; + border-left-width: 1px; + border-right-width: 1.5px; + border-top-width: 2px; + border-bottom-width: 0.5px; + border-left-color: #ff0000; + border-right-color: #00ff00; + border-top-color: #0000ff; + border-bottom-color: #fff000; + border-bottom-left-radius: 5px; + border-bottom-right-radius: 15px; + border-top-left-radius: 10px; + border-top-right-radius: 0px; + opacity: 0.5; + align-self:flex-end; +} + +#styleTwo{ + width: 150px; + height: 20px; + padding-start: 1px; + padding-end: 2px; + margin-start: 1px; + margin-end: 2px; + border-style: dotted; + border-width: 2px; + border-color:#0f00f0; + border-radius:5px; + opacity: 1.5; + align-self:flex-start; +} + +#styleThree{ + width: 50px; + height: 20px; + padding: 2px; + margin:1px; + border-left: 1px solid #ff0000; + border-right: 2px dashed #00ff00; + border-top: 1.5px dotted #0000ff; + border-bottom: 2.5px dotted #fff000; + opacity: 1; + align-self:baseline; +} + +#styleFour{ + width: 50px; + height: 20px; + align-self:center; + border: 2px solid #00ff00; +} + +#styleFive{ + width: 150px; + height: 40px; + border: 5px; + border-image-source: url('/common/images/image.png'); + border-image-slice: 5px 10px 10px 5px; + border-image-width: 10px 5px 5px 10px; + border-image-outset: 10px 5px 10px 5px; + border-image-repeat: repeat; +} + +#styleSix{ + width: 100%; + height: 2%; + background-color: #ff0000; + padding-top: 1%; + padding-left: 2%; + padding-right: 3%; + padding-bottom: 0.5%; + margin-left: 1%; + margin-top: 2%; + margin-right: 1.5%; + margin-bottom: 0.5%; +} + +#styleSeven{ + width: 70%; + height: 1%; + padding-start: 1%; + padding-end: 2%; + margin-start: 1%; + margin-end: 2%; + background-color: #00ff00; +} + +#styleEight{ + width: 60%; + height: 1%; + margin: 1%; + padding: 2%; + background-color: #0000ff; +} + +#styleNine{ + width: 100%; + height: 40px; + display:flex; +} + +#styleFive{ + width: 100%; + height: 40px; + border: 5px; + border-image-source: url('/common/images/image.png'); + border-image-slice: 5px 10px 10px 5px; + border-image-width: 10px 5px 5px 10px; + border-image-outset: 10px 5px 10px 5px; + border-image-repeat: repeat; +} + +#styleTen{ + width: 100%; + height: 400%; + display: none; + background-color: #ff0000; +} + +#styleEleven{ + height: 40%; + background-color: #00ff00; + flex:1 1 20px; + z-index:10; +} + +#styleTwelve{ + height: 50%; + background-color: #ff00ff; + flex-grow:2; + flex-shrink: 3; + flex-basis: 30px; + z-index:13; +} + +#styleThirteen{ + position: absolute; + left: 10px; + top: 20px; + width: 10px; + height: 10px; + background-color: #00ff00; + z-index:12; +} + +#styleFourteen{ + position: absolute; + right: 10px; + bottom: 20px; + width: 10px; + height: 10px; + background-color: #0000ff; + z-index:3; +} + +#styleFifteen{ + position: absolute; + left: 10%; + top: 20%; + width: 10px; + height: 10px; + background-color: #fff000; + z-index:5; +} + +#styleSixteen{ + position: absolute; + right: 10%; + bottom: 20%; + width: 10px; + height: 10px; + background-color: #00ffff; + z-index:15; +} + +#styleSeventeen{ + position: absolute; + start: 50px; + width: 10px; + height: 10px; + background-color: #ffff00; + z-index:7; +} + +#styleEighteen{ + position: absolute; + end: 20px; + width: 10px; + height: 10px; + background-color: #00ffff; + z-index:4; +} + +#styleNineteen{ + position: absolute; + start: 20%; + width: 10px; + height: 10px; + background-color: #ffff00; + z-index:1; +} + +#styleTwenty{ + position: absolute; + end: 20%; + width: 10px; + height: 10px; + background-color: #00ffff; + z-index:17; +} + +#styleTwentyOne{ + height: 20px; + box-shadow: 2px 4px; + flex-weight: 1; + margin:5px; +} + +#styleTwentyTwo{ + flex-weight: 1; + height: 20px; + box-shadow: 2px 4px 6px 8px; + margin:5px; +} + +#styleTwentyThree{ + flex-weight: 1; + height: 20px; + box-shadow: 1px 2px 3px 4px #ff0000; + margin:5px; +} + +#styleTwentyFour{ + width: 150px; + height: 20px; + background-color: #00ffff; + clip-path:inset(2 23); + visibility: visible; +} + +#styleTwentyFive{ + width: 150px; + height: 20px; + background-color: #00ffff; + visibility: hidden; +} + +#styleTwentySix{ + width: 150px; + height: 20px; + background-color: #999999; +} + +#styleTwentySeven{ + width: 150px; + height: 20px; + background: linear-gradient(pink,#fff000); +} + +#styleTwentyNine{ + width: 150px; + height: 20px; + background-image:url('common/images/image.png'); + background-size:contain; + background-repeat: repeat-x; + background-position: center; +} + +#styleThirty{ + width: 150px; + height: 20px; + background-image:url('common/images/image.png'); + background-size:50px 10px; + background-repeat: no-repeat; + background-position: 10px 10px; +} + +#styleThirtyOne{ + width: 150px; + height: 20px; + background-image:url('common/images/image.png'); + background-size:10% 20%; + background-repeat: repeat; + background-position: 30% 40%; +} + +#styleThirtyTwo{ + width: 150px; + height: 20px; + background: linear-gradient(pink,#fff000); + clip-path: margin-box; + image-fill: #000fff; + mask-image: url('common/images/icon.png'); + mask-size: cover; + mask-position: center; +} +#dividerColor{ + width: 150px; + height: 20px; + padding-top: 1px; + padding-left: 2px; + padding-right: 3px; + padding-bottom: 0.5px; + margin-left: 1px; + margin-top: 2px; + margin-right: 3px; + margin-bottom: 0.5px; + border-left-style: solid; + border-right-style: dashed; + border-top-style: dotted; + border-bottom-style: solid; + border-left-width: 1px; + border-right-width: 1.5px; + border-top-width: 2px; + border-bottom-width: 0.5px; + border-left-color: #ff0000; + border-right-color: #00ff00; + border-top-color: #0000ff; + border-bottom-color: #fff000; + border-bottom-left-radius: 5px; + border-bottom-right-radius: 15px; + border-top-left-radius: 10px; + border-top-right-radius: 0px; + opacity: 0.5; + align-self:flex-end; +} +.top-list-item { + width:100%; + background-color:#D4F2E7; +} +.item-div { + flex-direction:column; + align-items:center; + justify-content:space-around; + height:240px; +} +.item-child { + width:100%; + height:60px; + justify-content:space-around; + align-items:center; +} +.item-group-child { + justify-content: center; + align-items: center; + width:100%; +} \ No newline at end of file diff --git a/ace/ace_standard/src/main/js/default/pages/list/style/index.hml b/ace/ace_standard/src/main/js/default/pages/list/style/index.hml new file mode 100644 index 0000000000000000000000000000000000000000..0b38809ed06985710ae53ada0372ccc1625a2d60 --- /dev/null +++ b/ace/ace_standard/src/main/js/default/pages/list/style/index.hml @@ -0,0 +1,117 @@ + + +
+
+ + list通用样式 + + + + 通用样式 1-8 \n width height padding margin border opacity align-self + + + + + + + + + + + + + + + + + + + + 通用样式9-20 \n display flex z-index position + +
+ + + + + + + + + + + + + + + + + + + + + + +
+ + + 通用样式21-23 box-shadow + +
+ + + + + + +
+ + + 通用样式23-25 visibility clip-path + + + + + + + + 通用样式26-31 background + + + + + + + + + + + + + + 通用样式32 clip-path image-fill mask-image + +
+
+
+
+ + list特有样式 + + +
+
+ diff --git a/ace/ace_standard/src/main/js/default/pages/list/style/index.js b/ace/ace_standard/src/main/js/default/pages/list/style/index.js new file mode 100644 index 0000000000000000000000000000000000000000..265bf5a1f7e745f919068f0968421c1a1a508be0 --- /dev/null +++ b/ace/ace_standard/src/main/js/default/pages/list/style/index.js @@ -0,0 +1,129 @@ +/** + * 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. + */ + +export default { + data:{ + direction: 'column', + list: [], + styleOne : null, + styleTwo : null, + styleThree : null, + styleFour : null, + styleFive : null, + styleSix : null, + styleSeven : null, + styleEight : null, + styleNine : null, + styleTen : null, + styleEleven : null, + styleTwelve : null, + styleThirteen : null, + styleFourteen : null, + styleFifteen : null, + styleSixteen : null, + styleSeventeen : null, + styleEighteen : null, + styleNineteen : null, + styleTwenty : null, + styleTwentyOne : null, + styleTwentyTwo : null, + styleTwentyThree : null, + styleTwentyFour : null, + styleTwentyFive : null, + styleTwentySix : null, + styleTwentySeven : null, + styleTwentyNine : null, + styleThirty : null, + styleThirtyOne : null, + styleThirtyTwo : null + }, + + onShow(){ + this.getCommonStyleValues(); + globalThis.value = { + styleOne : this.styleOne, + styleTwo : this.styleTwo, + styleThree : this.styleThree, + styleFour : this.styleFour, + styleFive : this.styleFive, + styleSix : this.styleSix, + styleSeven : this.styleSeven, + styleEight : this.styleEight, + styleNine : this.styleNine, + styleTen : this.styleTen, + styleEleven : this.styleEleven, + styleTwelve : this.styleTwelve, + styleThirteen : this.styleThirteen, + styleFourteen : this.styleFourteen, + styleFifteen : this.styleFifteen, + styleSixteen : this.styleSixteen, + styleSeventeen : this.styleSeventeen, + styleEighteen : this.styleEighteen, + styleNineteen : this.styleNineteen, + styleTwenty : this.styleTwenty, + styleTwentyOne : this.styleTwentyOne, + styleTwentyTwo : this.styleTwentyTwo, + styleTwentyThree : this.styleTwentyThree, + styleTwentyFour : this.styleTwentyFour, + styleTwentyFive : this.styleTwentyFive, + styleTwentySix : this.styleTwentySix, + styleThirty : this.styleThirty, + styleThirtyOne : this.styleThirtyOne, + styleThirtyTwo : this.styleThirtyTwo + } + }, + + getCommonStyleValues(){ + this.styleOne = this.$element("styleOne").getInspector() + this.styleTwo = this.$element("styleTwo").getInspector() + this.styleThree = this.$element("styleThree").getInspector() + this.styleFour = this.$element("styleFour").getInspector() + this.styleFive = this.$element("styleFive").getInspector() + this.styleSix = this.$element("styleSix").getInspector() + this.styleSeven = this.$element("styleSeven").getInspector() + this.styleEight = this.$element("styleEight").getInspector() + this.styleNine = this.$element("styleNine").getInspector() + this.styleTen = this.$element("styleTen").getInspector() + this.styleEleven = this.$element("styleEleven").getInspector() + this.styleTwelve = this.$element("styleTwelve").getInspector() + this.styleThirteen = this.$element("styleThirteen").getInspector() + this.styleFourteen = this.$element("styleFourteen").getInspector() + this.styleFifteen = this.$element("styleFifteen").getInspector() + this.styleSixteen = this.$element("styleSixteen").getInspector() + this.styleSeventeen = this.$element("styleSeventeen").getInspector() + this.styleEighteen = this.$element("styleEighteen").getInspector() + this.styleNineteen = this.$element("styleNineteen").getInspector() + this.styleTwenty = this.$element("styleTwenty").getInspector() + this.styleTwentyOne = this.$element("styleTwentyOne").getInspector() + this.styleTwentyTwo = this.$element("styleTwentyTwo").getInspector() + this.styleTwentyThree = this.$element("styleTwentyThree").getInspector() + this.styleTwentyFour = this.$element("styleTwentyFour").getInspector() + this.styleTwentyFive = this.$element("styleTwentyFive").getInspector() + this.styleTwentySix = this.$element("styleTwentySix").getInspector() + this.styleThirty = this.$element("styleThirty").getInspector() + this.styleThirtyOne = this.$element("styleThirtyOne").getInspector() + this.styleThirtyTwo = this.$element("styleThirtyTwo").getInspector() + }, + onInit(){ + this.list = [] + this.listAdd = [] + for (var i = 1; i <= 10; i++) { + var dataItem = { + value: 'GROUP' + i, + }; + this.list.push(dataItem); + } + } +} diff --git a/ace/ace_standard/src/main/js/default/pages/listItem/prop/index.css b/ace/ace_standard/src/main/js/default/pages/listItem/prop/index.css new file mode 100644 index 0000000000000000000000000000000000000000..4b14d03015386b6c6e89a243e53cf253c4bf34de --- /dev/null +++ b/ace/ace_standard/src/main/js/default/pages/listItem/prop/index.css @@ -0,0 +1,527 @@ +/** + * 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; + height: 15px; +} + +.classProp { + flex-weight: 1; + background-color:#0f0000; + width: 100%; + margin-left: 10px; + margin-right: 10px; + padding-start: 10px; + padding-end: 10px; + height: 15px; +} + +#classPropNone { + flex-weight: 1; + background-color:#0000e0; + width: 100%; + margin-left: 10px; + margin-right: 10px; + padding-start: 10px; + padding-end: 10px; + height: 15px; +} + +#refProp { + flex-weight: 1; + background-color:#00f000; + width: 100%; + margin-left: 10px; + margin-right: 10px; + padding-start: 10px; + padding-end: 10px; + height: 15px; +} + +#refPropNone { + flex-weight: 1; + background-color:#00000e; + width: 100%; + margin-left: 10px; + margin-right: 10px; + padding-start: 10px; + padding-end: 10px; + height: 15px; +} + +#disabledPropTrue { + flex-weight: 1; + background-color:#000f00; + width: 100%; + margin-left: 10px; + margin-right: 10px; + padding-start: 10px; + padding-end: 10px; + height: 15px; +} + +#disabledPropFalse { + flex-weight: 1; + background-color:#0000f0; + width: 100%; + margin-left: 10px; + margin-right: 10px; + padding-start: 10px; + padding-end: 10px; + height: 15px; +} + +#disabledPropNone { + flex-weight: 1; + background-color:#d00000; + width: 100%; + margin-left: 10px; + margin-right: 10px; + padding-start: 10px; + padding-end: 10px; + height: 15px; +} + +#focusablePropTrue { + flex-weight: 1; + background-color:#00000f; + width: 100%; + margin-left: 10px; + margin-right: 10px; + padding-start: 10px; + padding-end: 10px; + height: 15px; +} + +#focusablePropFalse { + flex-weight: 1; + background-color:#ff0000; + width: 100%; + margin-left: 10px; + margin-right: 10px; + padding-start: 10px; + padding-end: 10px; + height: 15px; +} + +#focusablePropNone { + flex-weight: 1; + background-color:#0d0000; + width: 100%; + margin-left: 10px; + margin-right: 10px; + padding-start: 10px; + padding-end: 10px; + height: 15px; +} + +#dataProp { + flex-weight: 1; + background-color:#0ff000; + width: 100%; + margin-left: 10px; + margin-right: 10px; + padding-start: 10px; + padding-end: 10px; + height: 15px; +} + +#dataPropNone { + flex-weight: 1; + background-color:#00d000; + width: 100%; + margin-left: 10px; + margin-right: 10px; + padding-start: 10px; + padding-end: 10px; + height: 15px; +} + +#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; + height: 15px; +} + +#dirPropAuto { + flex-weight: 1; + background-color:#00fff0; + width: 100%; + margin-left: 10px; + margin-right: 10px; + padding-start: 10px; + padding-end: 10px; + height: 15px; +} + +#dirPropLtr { + flex-weight: 1; + background-color:#000fff; + width: 100%; + margin-left: 10px; + margin-right: 10px; + padding-start: 10px; + padding-end: 10px; + height: 15px; +} + +#dirPropNone { + flex-weight: 1; + background-color:#0000d0; + width: 100%; + margin-left: 10px; + margin-right: 10px; + padding-start: 10px; + padding-end: 10px; + height: 15px; +} + +#forPropNull { + flex-weight: 1; + background-color:#ffff00; + width: 100%; + margin-left: 10px; + margin-right: 10px; + padding-start: 10px; + padding-end: 10px; + height: 15px; +} + +#forPropOne { + flex-weight: 1; + background-color:#00e000; + width: 100%; + margin-left: 10px; + margin-right: 10px; + padding-start: 10px; + padding-end: 10px; + height: 15px; +} + +#forPropThree { + flex-weight: 1; + background-color:#000e00; + width: 100%; + margin-left: 10px; + margin-right: 10px; + padding-start: 10px; + padding-end: 10px; + height: 15px; +} + +#ifPropTrue { + flex-weight: 1; + background-color:#0ffff0; + width: 100%; + margin-left: 10px; + margin-right: 10px; + padding-start: 10px; + padding-end: 10px; + height: 15px; +} + +#ifPropFalse { + flex-weight: 1; + background-color:#00ffff; + width: 100%; + margin-left: 10px; + margin-right: 10px; + padding-start: 10px; + padding-end: 10px; + height: 15px; +} + +#ifPropNone { + flex-weight: 1; + background-color:#00000d; + width: 100%; + margin-left: 10px; + margin-right: 10px; + padding-start: 10px; + padding-end: 10px; + height: 15px; +} + +#showPropTrue { + flex-weight: 1; + background-color:#e00000; + width: 100%; + margin-left: 10px; + margin-right: 10px; + padding-start: 10px; + padding-end: 10px; + height: 15px; +} + +#showPropFalse { + flex-weight: 1; + background-color:#0e0000; + width: 100%; + margin-left: 10px; + margin-right: 10px; + padding-start: 10px; + padding-end: 10px; + height: 15px; +} + +#showPropNone { + flex-weight: 1; + background-color:#c00000; + width: 100%; + margin-left: 10px; + margin-right: 10px; + padding-start: 10px; + padding-end: 10px; + height: 15px; +} + +.specific-container{ + flex-direction: column; + flex-weight: 1; +} + +#Type{ + flex-weight: 1; + background-color:#c00000; + width: 100%; + margin-left: 10px; + margin-right: 10px; + padding-start: 10px; + padding-end: 10px; + height: 15px; +} + +#TypeNone{ + flex-weight: 1; + background-color:red; + width: 100%; + margin-left: 10px; + margin-right: 10px; + padding-start: 10px; + padding-end: 10px; + height: 15px; +} + +#primaryFalse{ + flex-weight: 1; + background-color:#000000; + width: 100%; + margin-left: 10px; + margin-right: 10px; + padding-start: 10px; + padding-end: 10px; + height: 15px; +} + +#primaryTrue{ + flex-weight: 1; + background-color:#f1f1f1; + width: 100%; + margin-left: 10px; + margin-right: 10px; + padding-start: 10px; + padding-end: 10px; + height: 15px; +} + +#primaryNone{ + flex-weight: 1; + background-color:skyblue; + width: 100%; + margin-left: 10px; + margin-right: 10px; + padding-start: 10px; + padding-end: 10px; + height: 15px; +} + +#section{ + flex-weight: 1; + background-color:skyblue; + width: 100%; + margin-left: 10px; + margin-right: 10px; + padding-start: 10px; + padding-end: 10px; + height: 15px; +} + +#sectionNone{ + flex-weight: 1; + background-color:darkblue; + width: 100%; + margin-left: 10px; + margin-right: 10px; + padding-start: 10px; + padding-end: 10px; + height: 15px; +} + +#stickyNone{ + flex-weight: 1; + background-color:darkblue; + width: 100%; + margin-left: 10px; + margin-right: 10px; + padding-start: 10px; + padding-end: 10px; + height: 15px; +} + +#stickyNormal{ + flex-weight: 1; + background-color:saddlebrown; + width: 100%; + margin-left: 10px; + margin-right: 10px; + padding-start: 10px; + padding-end: 10px; + height: 15px; +} + +#stickyOpacity{ + flex-weight: 1; + background-color:cadetblue; + width: 100%; + margin-left: 10px; + margin-right: 10px; + padding-start: 10px; + padding-end: 10px; + height: 15px; +} + +#stickyNo{ + flex-weight: 1; + background-color:navajowhite; + width: 100%; + margin-left: 10px; + margin-right: 10px; + padding-start: 10px; + padding-end: 10px; + height: 15px; +} + +#clickeffectTrue{ + flex-weight: 1; + background-color:cadetblue; + width: 100%; + margin-left: 10px; + margin-right: 10px; + padding-start: 10px; + padding-end: 10px; + height: 15px; +} + +#clickeffectFalse{ + flex-weight: 1; + background-color:mediumaquamarine; + width: 100%; + margin-left: 10px; + margin-right: 10px; + padding-start: 10px; + padding-end: 10px; + height: 15px; +} + +#clickeffectNone{ + flex-weight: 1; + background-color:#00000e; + width: 100%; + margin-left: 10px; + margin-right: 10px; + padding-start: 10px; + padding-end: 10px; + height: 15px; +} \ No newline at end of file diff --git a/ace/ace_standard/src/main/js/default/pages/listItem/prop/index.hml b/ace/ace_standard/src/main/js/default/pages/listItem/prop/index.hml new file mode 100644 index 0000000000000000000000000000000000000000..7966ee86e5e0db4d3be14df0b49249dbbf105d4e --- /dev/null +++ b/ace/ace_standard/src/main/js/default/pages/listItem/prop/index.hml @@ -0,0 +1,199 @@ + + +
+
+ + list-item通用属性 + + + + 通用属性 -- id + + + + + + 通用属性 -- class + + + + + + + + + 通用属性 -- style + + + + + + 通用属性 -- ref + + + + + + + + 通用属性 -- disabled + + + + + + + + + + 通用属性 -- focusable + + + + + + + + + + 通用属性 -- data-* + + + + + + + + 通用属性 -- click-effect + + + + + + + + + + + + 通用属性 -- dir + + + + + + + + + + + + 渲染属性 -- for + + + + + + + + + + 渲染属性 -- if + + + + + + 渲染属性 -- show + + + + + + + +
+ +
+
+
+ + list-item特有属性 + + + + 特有属性 -- Type + + + + + + 特有属性 -- primary + + + + + + + 特有属性 -- section + + + + + + 特有属性 -- sticky + + + + + + + + 特有属性 -- clickeffectTrue + + + + +
+
diff --git a/ace/ace_standard/src/main/js/default/pages/listItem/prop/index.js b/ace/ace_standard/src/main/js/default/pages/listItem/prop/index.js new file mode 100644 index 0000000000000000000000000000000000000000..5625ecb4562dc3d76b761fc475d00851748b3bf1 --- /dev/null +++ b/ace/ace_standard/src/main/js/default/pages/listItem/prop/index.js @@ -0,0 +1,121 @@ +/** + * 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:{ + 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, + ifPropFalse : null, + ifPropNone : null, + showPropTrue : null, + showPropFalse : null, + showPropNone : 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 + } + }, + + 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() + }, +} diff --git a/ace/ace_standard/src/main/js/default/pages/listItem/index.css b/ace/ace_standard/src/main/js/default/pages/listItem/router/index.css similarity index 100% rename from ace/ace_standard/src/main/js/default/pages/listItem/index.css rename to ace/ace_standard/src/main/js/default/pages/listItem/router/index.css diff --git a/ace/ace_standard/src/main/js/default/pages/listItem/index.hml b/ace/ace_standard/src/main/js/default/pages/listItem/router/index.hml similarity index 100% rename from ace/ace_standard/src/main/js/default/pages/listItem/index.hml rename to ace/ace_standard/src/main/js/default/pages/listItem/router/index.hml diff --git a/ace/ace_standard/src/main/js/default/pages/listItem/index.js b/ace/ace_standard/src/main/js/default/pages/listItem/router/index.js similarity index 100% rename from ace/ace_standard/src/main/js/default/pages/listItem/index.js rename to ace/ace_standard/src/main/js/default/pages/listItem/router/index.js diff --git a/ace/ace_standard/src/main/js/default/pages/listItem/style/index.css b/ace/ace_standard/src/main/js/default/pages/listItem/style/index.css new file mode 100644 index 0000000000000000000000000000000000000000..2ec15c756d56485ef7913fb0c194d6355622c5f0 --- /dev/null +++ b/ace/ace_standard/src/main/js/default/pages/listItem/style/index.css @@ -0,0 +1,354 @@ +/** + * 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%; + padding: 1px; +} + +.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; +} + +.style-container{ + flex-direction: column; + width: 50%; +} + +#styleOne{ + width: 150px; + height: 20px; + padding-top: 1px; + padding-left: 2px; + padding-right: 3px; + padding-bottom: 0.5px; + margin-left: 1px; + margin-top: 2px; + margin-right: 3px; + margin-bottom: 0.5px; + border-left-style: solid; + border-right-style: dashed; + border-top-style: dotted; + border-bottom-style: solid; + border-left-width: 1px; + border-right-width: 1.5px; + border-top-width: 2px; + border-bottom-width: 0.5px; + border-left-color: #ff0000; + border-right-color: #00ff00; + border-top-color: #0000ff; + border-bottom-color: #fff000; + border-bottom-left-radius: 5px; + border-bottom-right-radius: 15px; + border-top-left-radius: 10px; + border-top-right-radius: 0px; + opacity: 0.5; + align-self:flex-end; +} + +#styleTwo{ + width: 150px; + height: 20px; + padding-start: 1px; + padding-end: 2px; + margin-start: 1px; + margin-end: 2px; + border-style: dotted; + border-width: 2px; + border-color:#0f00f0; + border-radius:5px; + opacity: 1.5; + align-self:flex-start; +} + +#styleThree{ + width: 50px; + height: 20px; + padding: 2px; + margin:1px; + border-left: 1px solid #ff0000; + border-right: 2px dashed #00ff00; + border-top: 1.5px dotted #0000ff; + border-bottom: 2.5px dotted #fff000; + opacity: 1; + align-self:baseline; +} + +#styleFour{ + width: 50px; + height: 20px; + align-self:center; + border: 2px solid #00ff00; +} + +#styleFive{ + width: 150px; + height: 40px; + border: 5px; + border-image-source: url('/common/images/image.png'); + border-image-slice: 5px 10px 10px 5px; + border-image-width: 10px 5px 5px 10px; + border-image-outset: 10px 5px 10px 5px; + border-image-repeat: repeat; +} + +#styleSix{ + width: 100%; + height: 2%; + background-color: #ff0000; + padding-top: 1%; + padding-left: 2%; + padding-right: 3%; + padding-bottom: 0.5%; + margin-left: 1%; + margin-top: 2%; + margin-right: 1.5%; + margin-bottom: 0.5%; +} + +#styleSeven{ + width: 70%; + height: 1%; + padding-start: 1%; + padding-end: 2%; + margin-start: 1%; + margin-end: 2%; + background-color: #00ff00; +} + +#styleEight{ + width: 60%; + height: 1%; + margin: 1%; + padding: 2%; + background-color: #0000ff; +} + +#styleNine{ + width: 100%; + height: 40px; + display:flex; +} + +#styleFive{ + width: 100%; + height: 40px; + border: 5px; + border-image-source: url('/common/images/image.png'); + border-image-slice: 5px 10px 10px 5px; + border-image-width: 10px 5px 5px 10px; + border-image-outset: 10px 5px 10px 5px; + border-image-repeat: repeat; +} + +#styleTen{ + width: 100%; + height: 400%; + display: none; + background-color: #ff0000; +} + +#styleEleven{ + height: 40%; + background-color: #00ff00; + flex:1 1 20px; + z-index:10; +} + +#styleTwelve{ + height: 50%; + background-color: #ff00ff; + flex-grow:2; + flex-shrink: 3; + flex-basis: 30px; + z-index:13; +} + +#styleThirteen{ + position: absolute; + left: 10px; + top: 20px; + width: 10px; + height: 10px; + background-color: #00ff00; + z-index:12; +} + +#styleFourteen{ + position: absolute; + right: 10px; + bottom: 20px; + width: 10px; + height: 10px; + background-color: #0000ff; + z-index:3; +} + +#styleFifteen{ + position: absolute; + left: 10%; + top: 20%; + width: 10px; + height: 10px; + background-color: #fff000; + z-index:5; +} + +#styleSixteen{ + position: absolute; + right: 10%; + bottom: 20%; + width: 10px; + height: 10px; + background-color: #00ffff; + z-index:15; +} + +#styleSeventeen{ + position: absolute; + start: 50px; + width: 10px; + height: 10px; + background-color: #ffff00; + z-index:7; +} + +#styleEighteen{ + position: absolute; + end: 20px; + width: 10px; + height: 10px; + background-color: #00ffff; + z-index:4; +} + +#styleNineteen{ + position: absolute; + start: 20%; + width: 10px; + height: 10px; + background-color: #ffff00; + z-index:1; +} + +#styleTwenty{ + position: absolute; + end: 20%; + width: 10px; + height: 10px; + background-color: #00ffff; + z-index:17; +} + +#styleTwentyOne{ + height: 20px; + box-shadow: 2px 4px; + flex-weight: 1; + margin:5px; +} + +#styleTwentyTwo{ + flex-weight: 1; + height: 20px; + box-shadow: 2px 4px 6px 8px; + margin:5px; +} + +#styleTwentyThree{ + flex-weight: 1; + height: 20px; + box-shadow: 1px 2px 3px 4px #ff0000; + margin:5px; +} + +#styleTwentyFour{ + width: 150px; + height: 20px; + background-color: #00ffff; + clip-path:inset(2 23); + visibility: visible; +} + +#styleTwentyFive{ + width: 150px; + height: 20px; + background-color: #00ffff; + visibility: hidden; +} + +#styleTwentySix{ + width: 150px; + height: 20px; + background-color: #999999; +} + +#styleTwentySeven{ + width: 150px; + height: 20px; + background: linear-gradient(pink,#fff000); +} + +#styleTwentyNine{ + width: 150px; + height: 20px; + background-image:url('common/images/image.png'); + background-size:contain; + background-repeat: repeat-x; + background-position: center; +} + +#styleThirty{ + width: 150px; + height: 20px; + background-image:url('common/images/image.png'); + background-size:50px 10px; + background-repeat: no-repeat; + background-position: 10px 10px; +} + +#styleThirtyOne{ + width: 150px; + height: 20px; + background-image:url('common/images/image.png'); + background-size:10% 20%; + background-repeat: repeat; + background-position: 30% 40%; +} + +#styleThirtyTwo{ + width: 150px; + height: 20px; + background: linear-gradient(pink,#fff000); + clip-path: margin-box; + image-fill: #000fff; + mask-image: url('common/images/icon.png'); + mask-size: cover; + mask-position: center; +} diff --git a/ace/ace_standard/src/main/js/default/pages/listItem/style/index.hml b/ace/ace_standard/src/main/js/default/pages/listItem/style/index.hml new file mode 100644 index 0000000000000000000000000000000000000000..01bab38493835a66f5c1a9cfb37475c18869dded --- /dev/null +++ b/ace/ace_standard/src/main/js/default/pages/listItem/style/index.hml @@ -0,0 +1,118 @@ + + +
+
+ + list-item通用样式 + + + + 通用样式 1-8 \n width height padding margin border opacity align-self + + + + + + + + + + + + + + + + + + + + 通用样式9-20 \n display flex z-index position + +
+ + + + + + + + + + + + + + + + + + + + + + +
+ + + 通用样式21-23 box-shadow + +
+ + + + + + +
+ + + 通用样式23-25 visibility clip-path + + + + + + + + 通用样式26-31 background + + + + + + + + + + + + + + 通用样式32 clip-path image-fill mask-image + + + +
+
+
+
+ + list-item特有样式 + +
+
+ diff --git a/ace/ace_standard/src/main/js/default/pages/listItem/style/index.js b/ace/ace_standard/src/main/js/default/pages/listItem/style/index.js new file mode 100644 index 0000000000000000000000000000000000000000..8179ff70cbe9fa27c38c5386a6f497949bf60f3a --- /dev/null +++ b/ace/ace_standard/src/main/js/default/pages/listItem/style/index.js @@ -0,0 +1,19 @@ +/** + * 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. + */ + +export default { + + +} diff --git a/ace/ace_standard/src/main/js/default/pages/listItemGroup/prop/index.css b/ace/ace_standard/src/main/js/default/pages/listItemGroup/prop/index.css new file mode 100644 index 0000000000000000000000000000000000000000..f84c37b3daecdd8d8a4ea6e6c7c8f74aaa83a9d1 --- /dev/null +++ b/ace/ace_standard/src/main/js/default/pages/listItemGroup/prop/index.css @@ -0,0 +1,367 @@ +/** + * 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; +} + +#Type{ + flex-weight: 1; + background-color:#c00000; + width: 100%; + margin-left: 10px; + margin-right: 10px; + padding-start: 10px; + padding-end: 10px; +} + +#TypeNone{ + flex-weight: 1; + background-color:red; + width: 100%; + margin-left: 10px; + margin-right: 10px; + padding-start: 10px; + padding-end: 10px; +} \ No newline at end of file diff --git a/ace/ace_standard/src/main/js/default/pages/listItemGroup/prop/index.hml b/ace/ace_standard/src/main/js/default/pages/listItemGroup/prop/index.hml new file mode 100644 index 0000000000000000000000000000000000000000..023d0d48bd4a96f12d76c4a9311d5701cd42f5a4 --- /dev/null +++ b/ace/ace_standard/src/main/js/default/pages/listItemGroup/prop/index.hml @@ -0,0 +1,171 @@ + + +
+
+ + list-item-group通用属性 + + + + 通用属性 -- id + + + + + + 通用属性 -- class + + + + + + + + + 通用属性 -- style + + + + + + 通用属性 -- ref + + + + + + + + 通用属性 -- disabled + + + + + + + + + + 通用属性 -- focusable + + + + + + + + + + 通用属性 -- data-* + + + + + + + + 通用属性 -- click-effect + + + + + + + + + + + + 通用属性 -- dir + + + + + + + + + + + + 渲染属性 -- for + + + + + + + + + + 渲染属性 -- if + + + + + + 渲染属性 -- show + + + + + + + +
+ +
+
+
+ + list-item-group特有属性 + + + + 特有属性 -- Type + + + +
+
diff --git a/ace/ace_standard/src/main/js/default/pages/listItemGroup/prop/index.js b/ace/ace_standard/src/main/js/default/pages/listItemGroup/prop/index.js new file mode 100644 index 0000000000000000000000000000000000000000..5625ecb4562dc3d76b761fc475d00851748b3bf1 --- /dev/null +++ b/ace/ace_standard/src/main/js/default/pages/listItemGroup/prop/index.js @@ -0,0 +1,121 @@ +/** + * 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:{ + 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, + ifPropFalse : null, + ifPropNone : null, + showPropTrue : null, + showPropFalse : null, + showPropNone : 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 + } + }, + + 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() + }, +} diff --git a/ace/ace_standard/src/main/js/default/pages/listItemGroup/index.css b/ace/ace_standard/src/main/js/default/pages/listItemGroup/router/index.css similarity index 100% rename from ace/ace_standard/src/main/js/default/pages/listItemGroup/index.css rename to ace/ace_standard/src/main/js/default/pages/listItemGroup/router/index.css diff --git a/ace/ace_standard/src/main/js/default/pages/listItemGroup/index.hml b/ace/ace_standard/src/main/js/default/pages/listItemGroup/router/index.hml similarity index 100% rename from ace/ace_standard/src/main/js/default/pages/listItemGroup/index.hml rename to ace/ace_standard/src/main/js/default/pages/listItemGroup/router/index.hml diff --git a/ace/ace_standard/src/main/js/default/pages/listItemGroup/index.js b/ace/ace_standard/src/main/js/default/pages/listItemGroup/router/index.js similarity index 100% rename from ace/ace_standard/src/main/js/default/pages/listItemGroup/index.js rename to ace/ace_standard/src/main/js/default/pages/listItemGroup/router/index.js diff --git a/ace/ace_standard/src/main/js/default/pages/listItemGroup/style/index.css b/ace/ace_standard/src/main/js/default/pages/listItemGroup/style/index.css new file mode 100644 index 0000000000000000000000000000000000000000..67c7224af99633de92b73b00d94f0e4696e71499 --- /dev/null +++ b/ace/ace_standard/src/main/js/default/pages/listItemGroup/style/index.css @@ -0,0 +1,376 @@ +/** + * 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%; + padding: 1px; +} + +.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; +} + +.style-container{ + flex-direction: column; + width: 50%; +} + +#styleOne{ + width: 150px; + height: 20px; + padding-top: 1px; + padding-left: 2px; + padding-right: 3px; + padding-bottom: 0.5px; + margin-left: 1px; + margin-top: 2px; + margin-right: 3px; + margin-bottom: 0.5px; + border-left-style: solid; + border-right-style: dashed; + border-top-style: dotted; + border-bottom-style: solid; + border-left-width: 1px; + border-right-width: 1.5px; + border-top-width: 2px; + border-bottom-width: 0.5px; + border-left-color: #ff0000; + border-right-color: #00ff00; + border-top-color: #0000ff; + border-bottom-color: #fff000; + border-bottom-left-radius: 5px; + border-bottom-right-radius: 15px; + border-top-left-radius: 10px; + border-top-right-radius: 0px; + opacity: 0.5; + align-self:flex-end; +} + +#styleTwo{ + width: 150px; + height: 20px; + padding-start: 1px; + padding-end: 2px; + margin-start: 1px; + margin-end: 2px; + border-style: dotted; + border-width: 2px; + border-color:#0f00f0; + border-radius:5px; + opacity: 1.5; + align-self:flex-start; +} + +#styleThree{ + width: 50px; + height: 20px; + padding: 2px; + margin:1px; + border-left: 1px solid #ff0000; + border-right: 2px dashed #00ff00; + border-top: 1.5px dotted #0000ff; + border-bottom: 2.5px dotted #fff000; + opacity: 1; + align-self:baseline; +} + +#styleFour{ + width: 50px; + height: 20px; + align-self:center; + border: 2px solid #00ff00; +} + +#styleFive{ + width: 150px; + height: 40px; + border: 5px; + border-image-source: url('/common/images/image.png'); + border-image-slice: 5px 10px 10px 5px; + border-image-width: 10px 5px 5px 10px; + border-image-outset: 10px 5px 10px 5px; + border-image-repeat: repeat; +} + +#styleSix{ + width: 100%; + height: 2%; + background-color: #ff0000; + padding-top: 1%; + padding-left: 2%; + padding-right: 3%; + padding-bottom: 0.5%; + margin-left: 1%; + margin-top: 2%; + margin-right: 1.5%; + margin-bottom: 0.5%; +} + +#styleSeven{ + width: 70%; + height: 1%; + padding-start: 1%; + padding-end: 2%; + margin-start: 1%; + margin-end: 2%; + background-color: #00ff00; +} + +#styleEight{ + width: 60%; + height: 1%; + margin: 1%; + padding: 2%; + background-color: #0000ff; +} + +#styleNine{ + width: 100%; + height: 40px; + display:flex; +} + +#styleFive{ + width: 100%; + height: 40px; + border: 5px; + border-image-source: url('/common/images/image.png'); + border-image-slice: 5px 10px 10px 5px; + border-image-width: 10px 5px 5px 10px; + border-image-outset: 10px 5px 10px 5px; + border-image-repeat: repeat; +} + +#styleTen{ + width: 100%; + height: 400%; + display: none; + background-color: #ff0000; +} + +#styleEleven{ + height: 40%; + background-color: #00ff00; + flex:1 1 20px; + z-index:10; +} + +#styleTwelve{ + height: 50%; + background-color: #ff00ff; + flex-grow:2; + flex-shrink: 3; + flex-basis: 30px; + z-index:13; +} + +#styleThirteen{ + position: absolute; + left: 10px; + top: 20px; + width: 10px; + height: 10px; + background-color: #00ff00; + z-index:12; +} + +#styleFourteen{ + position: absolute; + right: 10px; + bottom: 20px; + width: 10px; + height: 10px; + background-color: #0000ff; + z-index:3; +} + +#styleFifteen{ + position: absolute; + left: 10%; + top: 20%; + width: 10px; + height: 10px; + background-color: #fff000; + z-index:5; +} + +#styleSixteen{ + position: absolute; + right: 10%; + bottom: 20%; + width: 10px; + height: 10px; + background-color: #00ffff; + z-index:15; +} + +#styleSeventeen{ + position: absolute; + start: 50px; + width: 10px; + height: 10px; + background-color: #ffff00; + z-index:7; +} + +#styleEighteen{ + position: absolute; + end: 20px; + width: 10px; + height: 10px; + background-color: #00ffff; + z-index:4; +} + +#styleNineteen{ + position: absolute; + start: 20%; + width: 10px; + height: 10px; + background-color: #ffff00; + z-index:1; +} + +#styleTwenty{ + position: absolute; + end: 20%; + width: 10px; + height: 10px; + background-color: #00ffff; + z-index:17; +} + +#styleTwentyOne{ + height: 20px; + box-shadow: 2px 4px; + flex-weight: 1; + margin:5px; +} + +#styleTwentyTwo{ + flex-weight: 1; + height: 20px; + box-shadow: 2px 4px 6px 8px; + margin:5px; +} + +#styleTwentyThree{ + flex-weight: 1; + height: 20px; + box-shadow: 1px 2px 3px 4px #ff0000; + margin:5px; +} + +#styleTwentyFour{ + width: 150px; + height: 20px; + background-color: #00ffff; + clip-path:inset(2 23); + visibility: visible; +} + +#styleTwentyFive{ + width: 150px; + height: 20px; + background-color: #00ffff; + visibility: hidden; +} + +#styleTwentySix{ + width: 150px; + height: 20px; + background-color: #999999; +} + +#styleTwentySeven{ + width: 150px; + height: 20px; + background: linear-gradient(pink,#fff000); +} + +#styleTwentyNine{ + width: 150px; + height: 20px; + background-image:url('common/images/image.png'); + background-size:contain; + background-repeat: repeat-x; + background-position: center; +} + +#styleThirty{ + width: 150px; + height: 20px; + background-image:url('common/images/image.png'); + background-size:50px 10px; + background-repeat: no-repeat; + background-position: 10px 10px; +} + +#styleThirtyOne{ + width: 150px; + height: 20px; + background-image:url('common/images/image.png'); + background-size:10% 20%; + background-repeat: repeat; + background-position: 30% 40%; +} + +#styleThirtyTwo{ + width: 150px; + height: 20px; + background: linear-gradient(pink,#fff000); + clip-path: margin-box; + image-fill: #000fff; + mask-image: url('common/images/icon.png'); + mask-size: cover; + mask-position: center; +} + +.top-list-item { + width:100%; + background-color:#D4F2E7; +} +.item-div { + flex-direction:column; + align-items:center; + justify-content:space-around; + height:240px; +} +.item-child { + width:100%; + height:60px; + justify-content:space-around; + align-items:center; +} +.item-group-child { + justify-content: center; + align-items: center; + width:100%; +} diff --git a/ace/ace_standard/src/main/js/default/pages/listItemGroup/style/index.hml b/ace/ace_standard/src/main/js/default/pages/listItemGroup/style/index.hml new file mode 100644 index 0000000000000000000000000000000000000000..382a2e24c2f4d152dbc54d7312777e9806cebec6 --- /dev/null +++ b/ace/ace_standard/src/main/js/default/pages/listItemGroup/style/index.hml @@ -0,0 +1,119 @@ + + +
+
+ + list-item-group通用样式 + + + + 通用样式 1-8 \n width height padding margin border opacity align-self + + + + + + + + + + + + + + + + + + + + 通用样式9-20 \n display flex z-index position + +
+ + + + + + + + + + + + + + + + + + + + + + +
+ + + 通用样式21-23 box-shadow + +
+ + + + + + +
+ + + 通用样式23-25 visibility clip-path + + + + + + + + 通用样式26-31 background + + + + + + + + + + + + + + 通用样式32 clip-path image-fill mask-image + + + +
+
+
+
+ + list-item-group特有样式 + + +
+
+ diff --git a/ace/ace_standard/src/main/js/default/pages/listItemGroup/style/index.js b/ace/ace_standard/src/main/js/default/pages/listItemGroup/style/index.js new file mode 100644 index 0000000000000000000000000000000000000000..154e40b7a6936a1115bdb30451c56ce569b48d9b --- /dev/null +++ b/ace/ace_standard/src/main/js/default/pages/listItemGroup/style/index.js @@ -0,0 +1,58 @@ +/** + * 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: { + direction: 'column', + list: [] + }, + onInit() { + this.list = [] + this.listAdd = [] + for (var i = 1; i <= 7; i++) { + var dataItem = { + value: 'GROUP' + i, + }; + this.list.push(dataItem); + } + }, + collapseOne(e) { + this.$element('mylist').collapseGroup({ + groupid: 'GROUP1' + }) + }, + expandOne(e) { + this.$element('mylist').expandGroup({ + groupid: 'GROUP1' + }) + }, + collapseAll(e) { + this.$element('mylist').collapseGroup() + }, + expandAll(e) { + this.$element('mylist').expandGroup() + }, + collapse(e) { + prompt.showToast({ + message: 'Close ' + e.groupid + }) + }, + expand(e) { + prompt.showToast({ + message: 'Open ' + e.groupid + }) + } +} diff --git a/ace/ace_standard/src/main/js/default/pages/stepper/index.css b/ace/ace_standard/src/main/js/default/pages/stepper/index.css deleted file mode 100644 index b1acbec766da06062d421b9236ed313ca346f7d9..0000000000000000000000000000000000000000 --- a/ace/ace_standard/src/main/js/default/pages/stepper/index.css +++ /dev/null @@ -1,526 +0,0 @@ -/** - * 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. - */ - -/* xxx.css */ -.container { - flex-direction:row; - width:100%; - height:100%; - padding: 1px; -} - -.sub-container{ - flex-direction: column; - height: 100%; - flex-weight: 1; -} - -.style-container{ - flex-direction: column; - height: 75%; -} -.contain1{ - width: 100%; - height: 15%; - flex-direction: column; -} - -.event-container{ - flex-direction: column; - height: 35%; -} - -.prop-container{ - flex-direction: column; - height: 66%; - padding-left: 2px; -} - -.ani-container{ - flex-direction: column; - height: 25%; - flex-weight: 1; -} - -.gradient-container{ - flex-direction: column; - height: 40%; -} - -.function-container{ - flex-direction: column; - height: 35%; -} - -.access-container{ - flex-direction: column; - height: 20%; -} - -.atom-container{ - flex-direction: column; - height: 60%; -} - -.multimode-container{ - flex-direction: column; -} - -.text { - font-size: 10px; -} -.stepperItem { - font-size: 3px; - flex-direction: column; - align-items: center; -} -.stepperItemContent { - color: #0000ff; - font-size: 5px; - justify-content: center; -} -.button { - width: 100%; - font-size: 10px; - height: 10%; - margin-top: 2%; - justify-content: center; -} - -.title{ - width: 100%; - font-size: 18px; - margin: 2px; - padding: 2px; - font-weight: bold; - text-align: center; -} - -.sub-title{ - width: 100%; - font-size: 12px; - text-align: center; - padding: 1px; -} - -.style1{ - width: 100%; - height: 40%; - min-width: 25px; - min-height: 10px; - max-width: 300px; - max-height: 70px; - padding-left: 1px; - padding-top: 1px; - padding-right: 1px; - padding-bottom: 1px; - margin-left: 1px; - margin-top: 1px; - margin-right: 1px; - margin-bottom: 1px; - border-left-style: solid; - border-right-style: dashed; - border-top-style: dashed; - border-bottom-style: dotted; - border-left-width: 1px; - border-right-width: 2px; - border-top-width: 2px; - border-bottom-width: 1px; - border-left-color: #ff0000; - border-right-color: #00ff00; - border-top-color: #0000ff; - border-bottom-color: #fff000; - border-bottom-left-radius: 10px; - border-bottom-right-radius: 15px; - border-top-left-radius: 8px; - border-top-right-radius: 12px; - background: linear-gradient(pink,#fff000); - box-shadow: 2px 4px 6px 8px #888888; - opacity: 0.5; - display: flex; - visibility: visible; - align-self: center; - image-fill: #000fff; - clip-path: margin-box; -} - -.istyle1{ - width: 100%; - height: 100%; - min-width: 25px; - min-height: 5px; - max-width: 300px; - max-height: 20px; - padding-left: 1px; - padding-top: 1px; - padding-right: 1px; - padding-bottom: 1px; - margin-left: 1px; - margin-top: 1px; - margin-right: 1px; - margin-bottom: 1px; - border-left-style: solid; - border-right-style: dashed; - border-top-style: dashed; - border-bottom-style: dotted; - border-left-width: 1px; - border-right-width: 2px; - border-top-width: 2px; - border-bottom-width: 1px; - border-left-color: #ff0000; - border-right-color: #00ff00; - border-top-color: #0000ff; - border-bottom-color: #fff000; - border-bottom-left-radius: 10px; - border-bottom-right-radius: 15px; - border-top-left-radius: 8px; - border-top-right-radius: 12px; - background: linear-gradient(pink,#fff000); - box-shadow: 2px 4px 6px 8px #888888; - opacity: 0.5; - display: flex; - visibility: visible; - align-self: center; - image-fill: #000fff; - clip-path: margin-box; -} - -.style2{ - width: 100%; - height: 70px; - padding-start: 10px; - padding-end: 15px; - margin-start: 5px; - margin-end: 10px; - border-style: dotted; - border-width: 2px; - border-color:#000000; - border-radius:5px; - background-color:#ffaa00; - mask-image: url('common/images/icon.png'); - mask-size: cover; - mask-position: center; -} - -.istyle2{ - width: 100%; - height: 100%; - padding-start: 1px; - padding-end: 1px; - margin-start: 1px; - margin-end: 1px; - border-style: dotted; - border-width: 2px; - border-color:#000000; - border-radius:5px; - background-color:#ffaa00; - mask-image: url('common/images/icon.png'); - mask-size: cover; - mask-position: center; -} - -.style3{ - width: 100%; - padding: 10px; - margin: 5px; - border-left: 1px solid #000000; - border-right: 2px dashed #00ff00; - border-top: 1.5px dotted #0000ff; - border-bottom: 2.5px dotted #fff000; - background-image:url('common/images/image.png'); - background-size:cover; - background-repeat: repeat-x; - background-position: center; - flex:1; - flex-grow: 2; - flex-basis: 10px; - flex-shrink: 1; -} - -.istyle3{ - width: 100%; - padding: 1px; - margin: 1px; - border-left: 1px solid #000000; - border-right: 2px dashed #00ff00; - border-top: 1.5px dotted #0000ff; - border-bottom: 2.5px dotted #fff000; - background-image:url('common/images/image.png'); - background-size:cover; - background-repeat: repeat-x; - background-position: center; - flex:1; - flex-grow: 2; - flex-basis: 10px; - flex-shrink: 1; -} - -.style4{ - width: 100%; - height: 10%; - padding: 1px; - margin: 5px; - border: 2px solid #000000; -} - -.istyle4{ - width: 100%; - height: 100%; - padding: 1px; - margin: 5px; - border: 1px solid #000000; -} - -.stylePro{ - width: 100%; - height: 70px; - padding: 1px; - margin: 5px; - border: 2px solid #000000; -} - -.style5{ - width: 100%; - height: 70px; - background-color: yellow; - border-image-source: url('/common/images/image.png'); - border-image-slice: 1px 2px 3px 4px; - border-image-width: 2px 3px 4px 5px; - border-image-outset: 3px 4px 5px 6px; - border-image-repeat: repeat; -} - -.istyle5{ - width: 100%; - height: 100%; - background-color: yellow; - border-image-source: url('/common/images/image.png'); - border-image-slice: 1px 2px 3px 4px; - border-image-width: 2px 3px 4px 5px; - border-image-outset: 3px 4px 5px 6px; - border-image-repeat: repeat; -} - -.style6{ - width: 100%; - height: 70px; - position: absolute; - left: 10px; - top: 35px; - bottom: 5px; - right: 10px; - background-color: pink; - border-image: url('common/images/icon.png') 1px 2px 3px 4px 2px 3px 4px 5px 3px 4px 5px 6px round; -} - -.istyle6{ - width: 100%; - height: 100%; - position: absolute; - left: 10px; - top: 35px; - bottom: 5px; - right: 10px; - background-color: pink; - border-image: url('common/images/icon.png') 1px 2px 3px 4px 2px 3px 4px 5px 3px 4px 5px 6px round; -} - -.style7 { - width: 100%; - height: 70px; -} - -.istyle7 { - width: 100%; - height: 100%; - position: absolute; - left: 5px; - top: 1px; - color: green; -} - -#prop1 { - height: 70px; - color: #ad4e2a; - stroke-width: 10px; - line-cap: square; - margin: 5px; -} - -.prop2 { - color: #343524; - stroke-width: 15px; - line-cap: round; - margin: 5px; -} - -.prop4 { - color: #456345; - stroke-width: 25px; - line-cap: round; - margin: 5px; -} - -.prop5 { - color: #831834; - stroke-width: 40px; - line-cap: square; - margin: 5px; - height: 70px; -} - -.ani1{ - color: #72ac33; - stroke-width: 55px; - line-cap: square; - margin: 5px; - transform-origin: 0% 0%; - animation: ani1Go 3s infinite; -} - -@keyframes ani1Go -{ - from { - background-color: #f76160; - opacity:0.3; - width:50px; - height: 50px; - transform:translate(20px) rotate(10deg) scale(0.2) skew(40deg); - background-position:10% 10% - } - 30% { - background-color: #60f761; - opacity:0.5; - width:70px; - height: 70px; - background-position:12% 12%; - transform:translateX(10px) translateY(5px) rotateX(20deg) rotateY(25deg) scaleX(0.6) scaleY(0.5) skewX(25deg) skewY(15deg) - } - to { - background-color: #6160f7; - opacity:1; - width:90px; - height: 90px; - background-position:22% 22%; - transform:rotate(180deg) scale(2) - } -} - -.ani2{ - background-color: #ad4e2a; - width: 100%; - height: 75px; - margin: 5px; -} - -.gradient1{ - stroke-width: 30px; - line-cap: square; - margin: 5px; - background: linear-gradient(red, #00ff00); -} - -.gradient2{ - stroke-width: 30px; - line-cap: square; - margin: 5px; - background: linear-gradient(45deg, rgb(255,0,0),rgb(0, 255, 0)); -} - -.gradient3{ - stroke-width: 30px; - line-cap: square; - margin: 5px; - background: linear-gradient(to right, rgb(255,0,0) 90px, rgb(0, 255, 0) 60%); -} - -.gradient4{ - stroke-width: 30px; - line-cap: square; - margin: 5px; - background: repeating-linear-gradient(to right, rgba(255, 255, 0, 1) 30px,rgba(0, 0, 255, .5) 60px); -} - -.access1{ - color: #321124; - stroke-width: 30px; - line-cap: square; - margin: 5px; -} - -.multimode1{ - color: #978666; - stroke-width: 30px; - line-cap: square; - margin: 5px; -} - - -.function1{ - background-color: #ff0000; - width: 100%; - height: 70px; -} - -.function2{ - background-color: #00ff00; - width: 100%; - height: 70px; -} - -.function3{ - background-color: #0000ff; - width: 100%; - height: 30px; -} - -.function4 { - flex-direction: row; - width: 60%; - height: 60px; - overflow: scroll; -} - -.event1{ - width: 100%; - height: 70px; - background-color: salmon; -} - -.event2{ - width: 100%; - height: 70px; - background-color: darkorchid; -} - -.event3{ - width: 100%; - height: 70px; - background-color: #ad4e2a; -} - -.event4{ - flex-direction: row; - width: 100%; - height: 70px; - overflow:scroll; -} - -.event5{ - flex-direction: column; - width: 100%; - height: 90px; - overflow:scroll; -} \ No newline at end of file diff --git a/ace/ace_standard/src/main/js/default/pages/stepper/index.hml b/ace/ace_standard/src/main/js/default/pages/stepper/index.hml deleted file mode 100644 index 445aa7679a0bcc2c032f4cd4f012113a683e6abf..0000000000000000000000000000000000000000 --- a/ace/ace_standard/src/main/js/default/pages/stepper/index.hml +++ /dev/null @@ -1,998 +0,0 @@ - -
-
- -
- - 通用样式 - - - stepper通用样式1 - - - -
- First -
- -
- -
- Second -
- -
- -
- Third -
- -
-
- - - stepper通用样式2 - - - -
- First -
- -
- -
- Second -
- -
- -
- Third -
- -
-
- - - stepper通用样式3 - - - -
- First -
- -
- -
- Second -
- -
- -
- Third -
- -
-
- - - stepper通用样式4 - - - -
- First -
- -
- -
- Second -
- -
- -
- Third -
- -
-
- - stepper通用样式5 - -
- - -
- First -
- -
- -
- Second -
- -
- -
- Third -
- -
-
- - -
- First -
- -
- -
- Second -
- -
- -
- Third -
- -
-
-
- - stepper特有样式 - - - -
- First -
- -
- -
- Second -
- -
- -
- Third -
- -
-
-
- - - -
- - 动画样式 - - - stepper动画样式1 - - - -
- First -
- -
- -
- Second -
- -
- -
- Third -
- -
-
- - - stepper动画样式2 - - - -
- First -
- -
- -
- Second -
- -
- -
- Third -
- -
-
- -
-
-
-
- -
- -
- - 通用属性 - - - stepper通用属性1 - - - -
- First -
- -
- -
- Second -
- -
- -
- Third -
- -
-
- - - stepper通用属性2 - - - -
- First -
- -
- -
- Second -
- -
- -
- Third -
- -
-
- - - stepper通用属性3 - - - -
- First -
- -
- -
- Second -
- -
- -
- Third -
- -
-
- - - stepper特有属性4 - - - -
- First -
- -
- -
- Second -
- -
- -
- Third -
- -
-
-
-
-
- -
- - 通用事件 - - - stepper通用事件1 - - - -
- First -
- -
- -
- Second -
- -
- -
- Third -
- -
-
- - - stepper通用事件2 - - - -
- First -
- -
- -
- Second -
- -
- -
- Third -
- -
-
- -
-
-
- -
- - 通用方法 - - - stepper通用方法1 - - - -
- First -
- -
- -
- Second -
- -
- -
- Third -
- -
-
- - - stepper通用方法2 - - - -
- First -
- -
- -
- Second -
- -
- -
- Third -
- -
-
-
-
- -
-
- -
- -
- - 渐变样式 - - - stepper渐变样式1 - - - -
- First -
- -
- -
- Second -
- -
- -
- Third -
- -
-
- - - stepper渐变样式2 - - - -
- First -
- -
- -
- Second -
- -
- -
- Third -
- -
-
- - - stepper渐变样式3 - - - -
- First -
- -
- -
- Second -
- -
- -
- Third -
- -
-
- - - stepper渐变样式4 - - - -
- First -
- -
- -
- Second -
- -
- -
- Third -
- -
-
- -
-
-
- -
- - 无障碍 - - - stepper无障碍1 - - - -
- First -
- -
- -
- Second -
- -
- -
- Third -
- -
-
- -
-
-
- -
- - 原子布局 - - - stepper原子布局1 - -
- - -
- First -
- -
- -
- Second -
- -
- -
- Third -
- -
-
- - -
- First -
- -
- -
- Second -
- -
- -
- Third -
- -
-
- - -
- First -
- -
- -
- Second -
- -
- -
- Third -
- -
-
- -
- - stepper原子布局2 - -
- - -
- First -
- -
- -
- Second -
- -
- -
- Third -
- -
-
- - -
- First -
- -
- -
- Second -
- -
- -
- Third -
- -
-
- - -
- First -
- -
- -
- Second -
- -
- -
- Third -
- -
-
-
- - stepper原子布局3 - -
- - -
- First -
- -
- -
- Second -
- -
- -
- Third -
- -
-
- - -
- First -
- -
- -
- Second -
- -
- -
- Third -
- -
-
- - -
- First -
- -
- -
- Second -
- -
- -
- Third -
- -
-
-
-
-
-
- - 多模输入 - - - stepper多模输入1 - - - -
- First -
- -
- -
- Second -
- -
- -
- Third -
- -
-
- -
-
-
-
diff --git a/ace/ace_standard/src/main/js/default/pages/stepper/prop/index.css b/ace/ace_standard/src/main/js/default/pages/stepper/prop/index.css new file mode 100644 index 0000000000000000000000000000000000000000..affed3a44ba99ef36d5b25bdf3bab216be2bdaa1 --- /dev/null +++ b/ace/ace_standard/src/main/js/default/pages/stepper/prop/index.css @@ -0,0 +1,357 @@ +/** + * 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; +} + +#indexProp{ + height: 30px; + background-color:#0e0000; + width: 100%; + margin-left: 10px; + margin-right: 10px; + padding-start: 10px; + padding-end: 10px; +} + +.specific-container{ + flex-direction: column; + flex-weight: 1; +} \ No newline at end of file diff --git a/ace/ace_standard/src/main/js/default/pages/stepper/prop/index.hml b/ace/ace_standard/src/main/js/default/pages/stepper/prop/index.hml new file mode 100644 index 0000000000000000000000000000000000000000..2a8b35df5dbe2ef86a2ddb98814564b3ff422364 --- /dev/null +++ b/ace/ace_standard/src/main/js/default/pages/stepper/prop/index.hml @@ -0,0 +1,172 @@ + + +
+
+ + stepper通用属性 + + + + 通用属性 -- id + + + + + + 通用属性 -- class + + + + + + + + + 通用属性 -- style + + + + + + 通用属性 -- ref + + + + + + + + 通用属性 -- disabled + + + + + + + + + + 通用属性 -- focusable + + + + + + + + + + 通用属性 -- data-* + + + + + + + + 通用属性 -- click-effect + + + + + + + + + + + + 通用属性 -- dir + + + + + + + + + + + + 渲染属性 -- for + + + + + + + + + + 渲染属性 -- if + + + + + + 渲染属性 -- show + + + + + + + +
+ +
+
+
+ + stepper特有属性 + + + + 显示子组件属性 -- index + + + +
+
diff --git a/ace/ace_standard/src/main/js/default/pages/stepper/prop/index.js b/ace/ace_standard/src/main/js/default/pages/stepper/prop/index.js new file mode 100644 index 0000000000000000000000000000000000000000..5e5ace79c55f23c0e8fddd078f2a2fbbf5c5238d --- /dev/null +++ b/ace/ace_standard/src/main/js/default/pages/stepper/prop/index.js @@ -0,0 +1,125 @@ +/** + * 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:{ + listOne:[{}], + listThree:[{},{},{}], + labelObj: { prevLabel: '', nextLabel: 'next', status: '' }, + 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, + ifPropFalse : null, + ifPropNone : null, + showPropTrue : null, + showPropFalse : null, + showPropNone : null, + indexProp: 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, + indexProp : this.indexProp + } + }, + + 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.indexProp = this.$element("indexProp").getInspector() + }, +} diff --git a/ace/ace_standard/src/main/js/default/pages/stepper/router/index.css b/ace/ace_standard/src/main/js/default/pages/stepper/router/index.css new file mode 100644 index 0000000000000000000000000000000000000000..a3ac7f1cf344f1b1238faec55f4eba2fbb881c36 --- /dev/null +++ b/ace/ace_standard/src/main/js/default/pages/stepper/router/index.css @@ -0,0 +1,503 @@ +/** + * 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%; + padding: 1px; +} + +.sub-container{ + flex-direction: column; + height: 100%; + flex-weight: 1; +} + +.style-container{ + flex-direction: column; + height: 70%; +} + +.title{ + width: 100%; + font-size: 18px; + margin: 2px; + padding: 2px; + font-weight: bold; + text-align: center; +} + +.sub-title{ + width: 100%; + font-size: 12px; + text-align: left; + margin: 2px; + padding: 2px; +} + +.style1{ + width: 100%; + height: 100%; + min-width: 25px; + min-height: 10px; + max-width: 300px; + max-height: 50px; + padding-left: 10px; + padding-top: 20px; + padding-right: 15px; + padding-bottom: 5px; + margin-left: 10px; + margin-top: 20px; + margin-right: 15px; + margin-bottom: 5px; + border-left-style: solid; + border-right-style: dashed; + border-top-style: dashed; + border-bottom-style: dotted; + border-left-width: 1px; + border-right-width: 2px; + border-top-width: 2px; + border-bottom-width: 1px; + border-left-color: #ff0000; + border-right-color: #00ff00; + border-top-color: #0000ff; + border-bottom-color: #fff000; + border-bottom-left-radius: 10px; + border-bottom-right-radius: 15px; + border-top-left-radius: 8px; + border-top-right-radius: 12px; + background: linear-gradient(pink,#fff000); + box-shadow: 2px 4px 6px 8px #888888; + opacity: 0.5; + display: flex; + visibility: visible; + align-self: center; + image-fill: #000fff; + clip-path: margin-box; +} + +.style2{ + width: 50px; + height: 20px; + padding-start: 10px; + padding-end: 15px; + margin-start: 5px; + margin-end: 10px; + border-style: dotted; + border-width: 2px; + border-color:#000000; + border-radius:5px; + background-color:#ffaa00; + mask-image: url('common/images/icon.png'); + mask-size: cover; + mask-position: center; +} + +.style3{ + width: 100%; + padding: 10px; + margin: 5px; + border-left: 1px solid #000000; + border-right: 2px dashed #00ff00; + border-top: 1.5px dotted #0000ff; + border-bottom: 2.5px dotted #fff000; + background-image:url('common/images/image.png'); + background-size:cover; + background-repeat: repeat-x; + background-position: center; + flex:1; + flex-grow: 2; + flex-basis: 10px; + flex-shrink: 1; +} + +.style4{ + width: 60%; + height: 5%; + padding: 10px; + margin: 5px; + border: 2px solid #000000; +} + +.contain1{ + width: 100%; + height: 70px; + flex-direction: column; +} + +.style5{ + width: 50%; + height: 30px; + background-color: yellow; + border-image-source: url('/common/images/image.png'); + border-image-slice: 1px 2px 3px 4px; + border-image-width: 2px 3px 4px 5px; + border-image-outset: 3px 4px 5px 6px; + border-image-repeat: repeat; +} + +.style6{ + width: 70px; + height: 30px; + position: absolute; + left: 10px; + top: 35px; + bottom: 5px; + right: 10px; + background-color: pink; + border-image: url('common/images/icon.png') 1px 2px 3px 4px 2px 3px 4px 5px 3px 4px 5px 6px round; +} + +.style7 { + flex-direction: column; + flex-wrap:wrap; + justify-content:flex-start; + align-items: flex-end; + align-content:space-around; + display: flex; + height: 40px; +} + +.flex-item { + width: 20px; + height: 20px; + border-radius: 16px; +} + +.style8{ + flex-direction: row; + flex-wrap:nowrap; + scrollbar-color: yellow; + scrollbar-width: 10px; + overscroll-effect:spring; + height: 20px; + overflow:scroll; +} + +.style9{ + display: grid; + height: 20px; + grid-template-columns: 20% 20%; + grid-columns-gap: 14px; + grid-rows-gap: 4px; + grid-template-rows: 15% 15%; +} + +.color-primary { + background-color: mediumpurple; +} + +.color-warning { + background-color: pink; +} + +.color-success { + background-color: cornflowerblue; +} + +.grid-child { + width: 100%; + border-radius: 2px; +} + +.grid-left-top { + width: 20px; + height: 20px; + border-radius: 10px; + border: 1px solid plum; + background: linear-gradient(pink, purple); + box-shadow: 0px 0px 1px 1px pink; + grid-row-start: 0; + grid-column-start: 0; + grid-row-end: 0; + grid-column-end: 0; +} + +.grid-left-bottom { + width: 20px; + height: 20px; + border-radius: 5px; + border: 1px solid plum; + background: linear-gradient(pink, #00aaee); + box-shadow: 0px 0px 1px 1px pink; + grid-row-start: 1; + grid-column-start: 0; + grid-row-end: 1; + grid-column-end: 0; +} + +.grid-right-top { + width: 20px; + height: 20px; + border-radius: 3px; + border: 1px dotted plum; + background: linear-gradient(mediumpurple, #00aaee); + box-shadow: 0px 0px 1px 1px pink; + grid-row-start: 0; + grid-column-start: 1; + grid-row-end: 0; + grid-column-end: 1; +} + +.grid-right-bottom { + width: 20px; + height: 20px; + border-radius: 5px; + border: 1px dotted plum; + background: linear-gradient(pink, mediumpurple); + box-shadow: 0px 0px 2px 2px pink; + grid-row-start: 1; + grid-column-start: 1; + grid-row-end: 1; + grid-column-end: 1; +} + +.event-container{ + flex-direction: column; + flex-weight: 1; +} + +.event1{ + width: 60%; + flex-weight: 1; + background-color: yellow; +} + +.event2{ + width: 70%; + flex-weight: 1; + background-color: red; +} + +.event3{ + width: 80%; + flex-weight: 1; + background-color: #ad4e2a; +} + +.event4{ + height: 20px; + width: 40px; + background-color: red; + margin-top: 2px; +} + +.event5{ + flex-direction: column; + width: 100%; + height: 90px; + overflow:scroll; +} + +.prop-container{ + flex-direction: column; +} + +#prop1 { + height: 30px; + background-color: mediumslateblue; + width: 100%; + margin: 5px; +} + +.prop2 { + height: 30px; + background-color: pink; + width: 100%; + margin: 5px; +} + +.prop3 { + height: 30px; + background-color: darkseagreen; + width: 100%; + margin: 5px; +} + +.ani-container{ + flex-direction: column; + height: 100%; + flex-weight: 1; +} + +.ani1{ + background-color: #72ac33; + width: 55px; + height: 55px; + margin: 5px; + transform-origin: 0% 0%; + animation: ani1Go 3s infinite; +} + +@keyframes ani1Go +{ + from { + background-color: #f76160; + opacity:0.3; + width:50px; + height: 50px; + transform:translate(20px) rotate(10deg) scale(0.2); + background-position:10% 10% + } + 30% { + background-color: #60f761; + opacity:0.5; + width:70px; + height: 70px; + background-position:12% 12%; + transform:translateX(10px) translateY(5px) rotateX(20deg) rotateY(25deg) scaleX(0.6) scaleY(0.5) + } + to { + background-color: #6160f7; + opacity:1; + width:90px; + height: 90px; + background-position:22% 22%; + transform:rotate(180deg) scale(2) + } +} + +.ani2{ + background-color: #ad4e2a; + width: 55px; + height: 55px; + margin: 5px; +} + +.gradient-container{ + flex-direction: column; +} + +.gradient1{ + width: 100%; + height: 20px; + margin: 5px; + background: linear-gradient(red, #00ff00); +} + +.gradient2{ + width: 100%; + height: 20px; + margin: 5px; + background: linear-gradient(45deg, rgb(255,0,0),rgb(0, 255, 0)); +} + +.gradient3{ + width: 100%; + height: 20px; + margin: 5px; + background: linear-gradient(to right, rgb(255,0,0) 90px, rgb(0, 255, 0) 60%); +} + +.gradient4{ + width: 100%; + height: 20px; + margin: 5px; + background: repeating-linear-gradient(to right, rgba(255, 255, 0, 1) 30px,rgba(0, 0, 255, .5) 60px); +} + +.access-container{ + flex-direction: column; +} + +.access1{ + background-color: #321124; + margin: 5px; + width: 90%; + height: 30px; +} + +.atom-container{ + flex-direction: column; +} + +.multiMode-container{ + flex-direction: column; +} + +.multiMode1{ + background-color: #978666; + width: 100%; + height: 30px; + margin: 5px; +} + +.function-container{ + flex-direction: column; +} + +.function1{ + background-color: #ff0000; + width: 60%; + height: 20px; +} + +.function2{ + background-color: #00ff00; + width: 60%; + height: 20px; +} + +.function3{ + background-color: #0000ff; + width: 100%; + height: 20px; +} + +.function4{ + flex-direction: row; + width: 60%; + height: 20px; + overflow:scroll; +} + +.stepperItem { + font-size: 3px; + flex-direction: column; + align-items: center; +} +.stepperItemContent { + color: #0000ff; + font-size: 5px; + justify-content: center; +} +.text { + font-size: 10px; +} +.stepperItem { + font-size: 3px; + flex-direction: column; + align-items: center; +} +.stepperItemContent { + color: #0000ff; + font-size: 5px; + justify-content: center; +} +.stylePro{ + width: 100%; + height: 70px; + padding: 1px; + margin: 5px; + border: 2px solid #000000; +} +.button { + width: 100%; + font-size: 10px; + height: 20%; + margin-top: 2%; + justify-content: center; +} \ No newline at end of file diff --git a/ace/ace_standard/src/main/js/default/pages/stepper/router/index.hml b/ace/ace_standard/src/main/js/default/pages/stepper/router/index.hml new file mode 100644 index 0000000000000000000000000000000000000000..0ff25d78663b5283092f7d295ed02434b7c66496 --- /dev/null +++ b/ace/ace_standard/src/main/js/default/pages/stepper/router/index.hml @@ -0,0 +1,362 @@ + + +
+
+
+ + 通用样式 + + + stepper通用样式1 + + + + + stepper通用样式2 + + + + + stepper通用样式3 + + + + + stepper通用样式4 + + + + + stepper通用样式5 + +
+ + + + +
+
+ + +
+ + 动画样式 + + + stepper动画样式1 + + + +
+ First +
+ +
+ +
+ Second +
+ +
+ +
+ Third +
+ +
+ +
+ + stepper动画样式2 + + + +
+ First +
+ +
+ +
+ Second +
+ +
+ +
+ Third +
+ +
+ +
+
+
+ +
+
+ +
+
+ + 通用属性 + + + stepper通用属性1 + + + + + + stepper通用属性2 + + + + + stepper通用属性3 + + + + + + stepper特有属性4 + + + +
+ First +
+
+ +
+ Second +
+
+ +
+ Third +
+
+
+
+
+
+
+ + 通用事件 + + + stepper通用事件1 + + + + + stepper通用事件2 + + + + + stepper通用事件3 + + + + + stepper特有事件4 + + + +
+ First +
+
+ +
+ Second +
+
+ +
+ Third +
+
+
+
+
+
+
+ + 通用方法 + + + stepper通用方法1 + + + + + stepper通用方法2 + + + + + stepper通用方法3 + + + +
+
+ +
+
+ +
+
+ + 渐变样式 + + + stepper渐变样式1 + + + + + stepper渐变样式2 + + + + + stepper渐变样式3 + + + + + stepper渐变样式4 + + + +
+
+
+
+ + 无障碍 + + + stepper无障碍1 + + + +
+
+
+
+ + 原子布局 + + + stepper原子布局1 + +
+ + + + + + + + + + + + +
+ + stepper原子布局2 + +
+ + + + + + + + + + + + +
+ + stepper原子布局3 + +
+ + + + + + + + + + + + +
+
+
+
+ + 多模输入 + + + stepper多模输入1 + + + +
+
+
+
diff --git a/ace/ace_standard/src/main/js/default/pages/stepper/index.js b/ace/ace_standard/src/main/js/default/pages/stepper/router/index.js similarity index 97% rename from ace/ace_standard/src/main/js/default/pages/stepper/index.js rename to ace/ace_standard/src/main/js/default/pages/stepper/router/index.js index 58095131b767d33d087606729d22f908b14dc51d..0564aba2d0d24da118c711d4f158f10565687f28 100644 --- a/ace/ace_standard/src/main/js/default/pages/stepper/index.js +++ b/ace/ace_standard/src/main/js/default/pages/stepper/router/index.js @@ -104,6 +104,41 @@ export default { status: 'normal' }, }, + + onShow(){ + // 通用属性 + var prop1 = this.$element('prop1'); + var name1 = prop1.dataSet.name + var prop2 = this.$refs.prop2; + var name2 = prop2.dataSet.name + prompt.showToast({ + message: 'prop1--' + name1 + '\nprop2--' + name2 + }); + + }, + + touchStart(event){ + var globalX = event.touches[0].globalX + var globalY = event.touches[0].globalY + var localX = event.touches[0].localX + var localY = event.touches[0].localY + var size = event.touches[0].size + var force = event.touches[0].force + var changeGlobalX = event.changedTouches[0].globalX + var changeGlobalY = event.changedTouches[0].globalY + var changeLocalX = event.changedTouches[0].localX + var changeLocalY = event.changedTouches[0].localY + var changeSize = event.changedTouches[0].size + var changeForce = event.changedTouches[0].force + var message = 'globalX--' + globalX + ',globalY--' + globalY + + ',localX--' + localX + ',localY--' + localY + ',size--' + size + ',force--' + force + + ',changeGlobalX--' + changeGlobalX + ',changeGlobalY--' + changeGlobalY + + ',changeLocalX--' + changeLocalX + ',changeLocalY--' + changeLocalY + + ',changeSize--' + changeSize + ',changeForce--' + changeForce; + prompt.showToast({ + message: 'touchstart:\n' + message + }); + }, setRightButton(e) { this.$element('mystepper').setNextButtonStatus({status: 'skip', label: 'SKIP'}); this.$element('style1').setNextButtonStatus({status: 'skip', label: 'SKIP'}); @@ -140,52 +175,6 @@ export default { this.$element('atomA3').setNextButtonStatus({status: 'skip', label: 'SKIP'}); this.$element('mul1').setNextButtonStatus({status: 'skip', label: 'SKIP'}); }, - next(e) { - var index = { - pendingIndex: e.pendingIndex - } - return index; - }, - back(e) { - var index = { - pendingIndex: e.pendingIndex - } - return index; - }, - - onShow(){ - // 通用属性 - var prop1 = this.$element('prop1'); - var name1 = prop1.dataSet.name - var prop2 = this.$refs.prop2; - var name2 = prop2.dataSet.name - prompt.showToast({ - message: 'prop1--' + name1 + '\nprop2--' + name2 - }); - }, - - touchStart(event){ - var globalX = event.touches[0].globalX - var globalY = event.touches[0].globalY - var localX = event.touches[0].localX - var localY = event.touches[0].localY - var size = event.touches[0].size - var force = event.touches[0].force - var changeGlobalX = event.changedTouches[0].globalX - var changeGlobalY = event.changedTouches[0].globalY - var changeLocalX = event.changedTouches[0].localX - var changeLocalY = event.changedTouches[0].localY - var changeSize = event.changedTouches[0].size - var changeForce = event.changedTouches[0].force - var message = 'globalX--' + globalX + ',globalY--' + globalY + - ',localX--' + localX + ',localY--' + localY + ',size--' + size + ',force--' + force + - ',changeGlobalX--' + changeGlobalX + ',changeGlobalY--' + changeGlobalY + - ',changeLocalX--' + changeLocalX + ',changeLocalY--' + changeLocalY + - ',changeSize--' + changeSize + ',changeForce--' + changeForce; - prompt.showToast({ - message: 'touchstart:\n' + message - }); - }, touchMove(event){ var globalX = event.touches[0].globalX @@ -256,34 +245,6 @@ export default { }); }, - appearTest(){ - prompt.showToast({ - message: 'appear' - }); - }, - disappearTest(){ - prompt.showToast({ - message: 'disappear' - }); - }, - finishTest(){ - prompt.showToast({ - message: 'finish' - }); - }, - - skipTest(){ - prompt.showToast({ - message: 'skip' - }); - }, - - changeTest(){ - prompt.showToast({ - message: 'change' - }); - }, - click(){ prompt.showToast({ message: 'click' @@ -507,6 +468,7 @@ export default { functionTest3(event){ var function3 = this.$element('function3'); + var animation = function3.animate(frames, options); animation.play() animation.onfinish = function(){ @@ -558,17 +520,35 @@ export default { function4.scrollBy(scrollParam) }, - reachStart(){ + finishTest(){ + prompt.showToast({ + message: 'finish' + }); + }, + + skipTest(){ prompt.showToast({ - message: 'reachStart' + message: 'skip' }); }, - reachEnd(){ + changeTest(){ prompt.showToast({ - message: 'reachEnd' + message: 'change' }); }, + next(e) { + var index = { + pendingIndex: e.pendingIndex + } + return index; + }, + back(e) { + var index = { + pendingIndex: e.pendingIndex + } + return index; + }, reachTop(){ prompt.showToast({ @@ -581,5 +561,4 @@ export default { message: 'reachBottom' }); } - -} \ No newline at end of file +} diff --git a/ace/ace_standard/src/main/js/default/pages/stepperItem/prop/index.css b/ace/ace_standard/src/main/js/default/pages/stepperItem/prop/index.css new file mode 100644 index 0000000000000000000000000000000000000000..a727f3d6f2ec4994757ade026723a39948816fc8 --- /dev/null +++ b/ace/ace_standard/src/main/js/default/pages/stepperItem/prop/index.css @@ -0,0 +1,364 @@ +/** + * 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%; +} + +.stepper-style{ + flex-weight: 1; + width: 90%; + margin-left: 5%; + border: 1px solid #000; +} + +.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; +} + +#indexProp{ + height: 30px; + background-color:#0e0000; + width: 100%; + margin-left: 10px; + margin-right: 10px; + padding-start: 10px; + padding-end: 10px; +} + +.specific-container{ + flex-direction: column; + flex-weight: 1; +} \ No newline at end of file diff --git a/ace/ace_standard/src/main/js/default/pages/stepperItem/prop/index.hml b/ace/ace_standard/src/main/js/default/pages/stepperItem/prop/index.hml new file mode 100644 index 0000000000000000000000000000000000000000..c6a1e15eeeeffe39419171c1ddf0e7570f98a1f9 --- /dev/null +++ b/ace/ace_standard/src/main/js/default/pages/stepperItem/prop/index.hml @@ -0,0 +1,236 @@ + + +
+
+ + stepper通用属性 + + + + 通用属性 -- id + + + + + + + + 通用属性 -- class + + + + + + + + + + + + 通用属性 -- style + + + + + + + + 通用属性 -- ref + + + + + + + + + + + + 通用属性 -- disabled + + + + + + + + + + + + + + + + 通用属性 -- focusable + + + + + + + + + + + + + + + + 通用属性 -- data-* + + + + + + + + + + +
+ +
+
+ +
+ + 通用属性 -- click-effect + + + + + + + + + + + + + + + + + + + + 通用属性 -- dir + + + + + + + + + + + + + + + + + + + + 渲染属性 -- for + + + + + + + + + + + + + + + + 渲染属性 -- if + + + + + + + + 渲染属性 -- show + + + + + + + + + + + + + + +
+
+ + + stepper特有属性 + + + + 底部按钮属性 -- label + + + + + +
+
diff --git a/ace/ace_standard/src/main/js/default/pages/stepperItem/prop/index.js b/ace/ace_standard/src/main/js/default/pages/stepperItem/prop/index.js new file mode 100644 index 0000000000000000000000000000000000000000..e8104b9165d30e9a19ba2921141f5c57eb7077e0 --- /dev/null +++ b/ace/ace_standard/src/main/js/default/pages/stepperItem/prop/index.js @@ -0,0 +1,127 @@ +/** + * 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:{ + listOne:[{}], + listThree:[{},{},{}], + labelObj: { prevLabel: '', nextLabel: 'next', status: '' }, + 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, + ifPropFalse : null, + ifPropNone : null, + showPropTrue : null, + showPropFalse : null, + showPropNone : null, + labelProp: null + }, + + onShow(){ + let str = this.$element('labelProp').attr.label; + console.log(str); + 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, + labelProp : this.labelProp + } + }, + + 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.labelProp = this.$element("labelProp").getInspector() + }, +} diff --git a/ace/ace_standard/src/main/js/default/pages/stepperItem/router/index.css b/ace/ace_standard/src/main/js/default/pages/stepperItem/router/index.css new file mode 100644 index 0000000000000000000000000000000000000000..fa2460bf4611259614dac9a19bdc6b70122bece3 --- /dev/null +++ b/ace/ace_standard/src/main/js/default/pages/stepperItem/router/index.css @@ -0,0 +1,479 @@ +/** + * 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. + */ + +/* xxx.css */ +.container { + flex-direction:row; + width:100%; + height:100%; + padding: 1px; +} + +.sub-container{ + flex-direction: column; + height: 100%; + flex-weight: 1; +} + +.style-container{ + flex-direction: column; + height: 70%; +} + +.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; +} + +.style1{ + width: 100%; + height: 100%; + min-width: 25px; + min-height: 10px; + max-width: 300px; + max-height: 50px; + padding-left: 10px; + padding-top: 20px; + padding-right: 15px; + padding-bottom: 5px; + margin-left: 10px; + margin-top: 20px; + margin-right: 15px; + margin-bottom: 5px; + border-left-style: solid; + border-right-style: dashed; + border-top-style: dashed; + border-bottom-style: dotted; + border-left-width: 1px; + border-right-width: 2px; + border-top-width: 2px; + border-bottom-width: 1px; + border-left-color: #ff0000; + border-right-color: #00ff00; + border-top-color: #0000ff; + border-bottom-color: #fff000; + border-bottom-left-radius: 10px; + border-bottom-right-radius: 15px; + border-top-left-radius: 8px; + border-top-right-radius: 12px; + background: linear-gradient(pink,#fff000); + box-shadow: 2px 4px 6px 8px #888888; + opacity: 0.5; + display: flex; + visibility: visible; + align-self: center; + image-fill: #000fff; + clip-path: margin-box; +} + +.style2{ + width: 50px; + height: 20px; + padding-start: 10px; + padding-end: 15px; + margin-start: 5px; + margin-end: 10px; + border-style: dotted; + border-width: 2px; + border-color:#000000; + border-radius:5px; + background-color:#ffaa00; + mask-image: url('common/images/icon.png'); + mask-size: cover; + mask-position: center; +} + +.style3{ + width: 100%; + padding: 10px; + margin: 5px; + border-left: 1px solid #000000; + border-right: 2px dashed #00ff00; + border-top: 1.5px dotted #0000ff; + border-bottom: 2.5px dotted #fff000; + background-image:url('common/images/image.png'); + background-size:cover; + background-repeat: repeat-x; + background-position: center; + flex:1; + flex-grow: 2; + flex-basis: 10px; + flex-shrink: 1; +} + +.style4{ + width: 60%; + height: 5%; + padding: 10px; + margin: 5px; + border: 2px solid #000000; +} + +.contain1{ + width: 100%; + height: 70px; + flex-direction: column; +} + +.style5{ + width: 50%; + height: 30px; + background-color: yellow; + border-image-source: url('/common/images/image.png'); + border-image-slice: 1px 2px 3px 4px; + border-image-width: 2px 3px 4px 5px; + border-image-outset: 3px 4px 5px 6px; + border-image-repeat: repeat; +} + +.style6{ + width: 70px; + height: 30px; + position: absolute; + left: 10px; + top: 35px; + bottom: 5px; + right: 10px; + background-color: pink; + border-image: url('common/images/icon.png') 1px 2px 3px 4px 2px 3px 4px 5px 3px 4px 5px 6px round; +} + +.style7 { + flex-direction: column; + flex-wrap:wrap; + justify-content:flex-start; + align-items: flex-end; + align-content:space-around; + display: flex; + height: 40px; + width: 100%; +} + +.flex-item { + width:100%; + height: 40px; + color: #fff; +} +.stepper-container{ + width: 100%; + height: 100%; +} +.style8{ + flex-direction: row; + flex-wrap:nowrap; + scrollbar-color: yellow; + scrollbar-width: 10px; + overscroll-effect:spring; + height: 20px; + overflow:scroll; +} + +.style9{ + display: grid; + height: 20px; + grid-template-columns: 20% 20%; + grid-columns-gap: 14px; + grid-rows-gap: 4px; + grid-template-rows: 15% 15%; +} + +.color-primary { + background-color: mediumpurple; +} + +.color-warning { + background-color: pink; +} + +.color-success { + background-color: cornflowerblue; +} + +.grid-child { + width: 100%; + border-radius: 2px; +} + +.grid-left-top { + width: 20px; + height: 20px; + border-radius: 10px; + border: 1px solid plum; + background: linear-gradient(pink, purple); + box-shadow: 0px 0px 1px 1px pink; + grid-row-start: 0; + grid-column-start: 0; + grid-row-end: 0; + grid-column-end: 0; +} + +.grid-left-bottom { + width: 20px; + height: 20px; + border-radius: 5px; + border: 1px solid plum; + background: linear-gradient(pink, #00aaee); + box-shadow: 0px 0px 1px 1px pink; + grid-row-start: 1; + grid-column-start: 0; + grid-row-end: 1; + grid-column-end: 0; +} + +.grid-right-top { + width: 20px; + height: 20px; + border-radius: 3px; + border: 1px dotted plum; + background: linear-gradient(mediumpurple, #00aaee); + box-shadow: 0px 0px 1px 1px pink; + grid-row-start: 0; + grid-column-start: 1; + grid-row-end: 0; + grid-column-end: 1; +} + +.grid-right-bottom { + width: 20px; + height: 20px; + border-radius: 5px; + border: 1px dotted plum; + background: linear-gradient(pink, mediumpurple); + box-shadow: 0px 0px 2px 2px pink; + grid-row-start: 1; + grid-column-start: 1; + grid-row-end: 1; + grid-column-end: 1; +} + +.event-container{ + flex-direction: column; + flex-weight: 1; +} + +.event1{ + width: 60%; + height: 30px; + flex-weight: 1; + background-color: yellow; +} + +.event2{ + width: 70%; + height: 30px; + flex-weight: 1; + background-color: red; +} + +.event3{ + height: 30px; + width: 80%; + flex-weight: 1; + background-color: #ad4e2a; +} + +.event4{ + flex-direction: row; + width: 90%; + height: 120px; +} + +.event5{ + flex-direction: column; + width: 100%; + height: 90px; + overflow:scroll; +} + +.prop-container{ + flex-direction: column; +} + +#prop1 { + color: #ad4e2a; + height: 30px; + background-color: mediumslateblue; + width: 100%; + margin: 5px; +} + +.prop2 { + color: #343524; + height: 30px; + background-color: pink; + width: 100%; + margin: 5px; +} + +.prop3 { + color: #456345; + height: 30px; + background-color: darkseagreen; + width: 100%; + margin: 5px; +} + +.prop5 { + color: #831834; + margin: 5px; + height: 70px; +} + +.ani-container{ + flex-direction: column; + height: 100%; + flex-weight: 1; +} + +.ani1{ + color: #72ac33; + margin: 5px; + transform-origin: 0% 0%; + animation: ani1Go 3s infinite; +} + +@keyframes ani1Go +{ + from { + background-color: #f76160; + opacity:0.3; + width:50px; + height: 50px; + transform:translate(20px) rotate(10deg) scale(0.2); + background-position:10% 10% + } + 30% { + background-color: #60f761; + opacity:0.5; + width:70px; + height: 70px; + background-position:12% 12%; + transform:translateX(10px) translateY(5px) rotateX(20deg) rotateY(25deg) scaleX(0.6) scaleY(0.5) + } + to { + background-color: #6160f7; + opacity:1; + width:90px; + height: 90px; + background-position:22% 22%; + transform:rotate(180deg) scale(2) + } +} + +.ani2{ + color: #ad4e2a; + width: 55px; + height: 55px; + margin: 5px; +} + +.gradient-container{ + flex-direction: column; +} + +.gradient1{ + width: 100%; + height: 20px; + margin: 5px; + background: linear-gradient(red, #00ff00); +} + +.gradient2{ + width: 100%; + height: 20px; + margin: 5px; + background: linear-gradient(45deg, rgb(255,0,0),rgb(0, 255, 0)); +} + +.gradient3{ + width: 100%; + height: 20px; + margin: 5px; + background: linear-gradient(to right, rgb(255,0,0) 90px, rgb(0, 255, 0) 60%); +} + +.gradient4{ + width: 100%; + height: 20px; + margin: 5px; + background: repeating-linear-gradient(to right, rgba(255, 255, 0, 1) 30px,rgba(0, 0, 255, .5) 60px); +} + +.accessibility-container{ + flex-direction: column; +} + +.accessibility1{ + background-color: #321124; + margin: 5px; + width: 90%; + height: 30px; +} + +.atom-container{ + flex-direction: column; +} + +.multiMode-container{ + flex-direction: column; +} + +.multiMode1{ + background-color: #978666; + width: 100%; + height: 30px; + margin: 5px; +} + +.function-container{ + flex-direction: column; +} + +.function1{ + background-color: #ff0000; + width: 60%; + height: 20px; +} + +.function2{ + background-color: #00ff00; + width: 60%; + height: 20px; +} + +.function3{ + background-color: #0000ff; + width: 100%; + height: 20px; +} + +.function4{ + flex-direction: row; + width: 60%; + height: 20px; + overflow:scroll; +} \ No newline at end of file diff --git a/ace/ace_standard/src/main/js/default/pages/stepperItem/router/index.hml b/ace/ace_standard/src/main/js/default/pages/stepperItem/router/index.hml new file mode 100644 index 0000000000000000000000000000000000000000..cec9b137f1d9bc05b3256b2875940f8a0639619a --- /dev/null +++ b/ace/ace_standard/src/main/js/default/pages/stepperItem/router/index.hml @@ -0,0 +1,285 @@ + + +
+
+
+ + 通用样式 + + + 通用样式1 + + + + + 通用样式2 + + + + + 通用样式3 + + + + + 通用样式4 + + + + + 通用样式5 + +
+ + + + +
+ + 特有样式 + +
+ + + + 步骤 + + + + +
+
+ + +
+ + 动画样式 + + + 动画样式1 + + + + + 动画样式2 + + + +
+
+ +
+
+ +
+
+ + 通用属性 + + + 通用属性1 + + + + + 通用属性2 + + + + + + + + 通用属性3 + + + + + + + + + +
+
+
+
+ + 通用事件 + + + 通用事件1 + + + + + 通用事件2 + + + + + 通用事件3 + + + + + 特有事件1 + + + + + + + +
+
+
+
+ +
+
+ +
+
+ +
+
+ + 渐变样式 + + + 渐变样式1 + + + + + 渐变样式2 + + + + + 渐变样式3 + + + + + 渐变样式4 + + + +
+
+
+
+ + 无障碍 + + + 无障碍1 + + + +
+
+
+
+ + 原子布局 + + + 原子布局1 + +
+ + + + + + + + + + + + +
+ + 原子布局2 + +
+ + + + + + + + + + + + +
+ + 原子布局3 + +
+ + + + + + + + + + + + +
+
+
+
+ + 多模输入 + + + 多模输入1 + + + +
+
+
+
diff --git a/ace/ace_standard/src/main/js/default/pages/stepperItem/router/index.js b/ace/ace_standard/src/main/js/default/pages/stepperItem/router/index.js new file mode 100644 index 0000000000000000000000000000000000000000..94e59bff23d4ffa5550414721c89620e11531767 --- /dev/null +++ b/ace/ace_standard/src/main/js/default/pages/stepperItem/router/index.js @@ -0,0 +1,502 @@ +import prompt from '@system.prompt'; + +export default { + + data: { + label_1: + { + prevLabel: 'BACK', + nextLabel: 'NEXT', + status: 'normal' + }, + label_2: + { + prevLabel: 'BACK', + nextLabel: 'NEXT', + status: 'normal' + }, + label_3: + { + prevLabel: 'BACK', + nextLabel: 'NEXT', + status: 'normal' + }, + }, + + appear(){ + console.log("显示") + }, + disappear(){ + console.log("消失") + }, + + onShow(){ + + // 通用属性 + var prop1 = this.$element('prop1'); + var name1 = prop1.dataSet.name + var prop2 = this.$refs.prop2; + var name2 = prop2.dataSet.name + prompt.showToast({ + message: 'prop1--' + name1 + '\nprop2--' + name2 + }); + }, + + touchStart(event){ + var globalX = event.touches[0].globalX + var globalY = event.touches[0].globalY + var localX = event.touches[0].localX + var localY = event.touches[0].localY + var size = event.touches[0].size + var force = event.touches[0].force + var changeGlobalX = event.changedTouches[0].globalX + var changeGlobalY = event.changedTouches[0].globalY + var changeLocalX = event.changedTouches[0].localX + var changeLocalY = event.changedTouches[0].localY + var changeSize = event.changedTouches[0].size + var changeForce = event.changedTouches[0].force + var message = 'globalX--' + globalX + ',globalY--' + globalY + + ',localX--' + localX + ',localY--' + localY + ',size--' + size + ',force--' + force + + ',changeGlobalX--' + changeGlobalX + ',changeGlobalY--' + changeGlobalY + + ',changeLocalX--' + changeLocalX + ',changeLocalY--' + changeLocalY + + ',changeSize--' + changeSize + ',changeForce--' + changeForce; + prompt.showToast({ + message: 'touchstart:\n' + message + }); + }, + + touchMove(event){ + var globalX = event.touches[0].globalX + var globalY = event.touches[0].globalY + var localX = event.touches[0].localX + var localY = event.touches[0].localY + var size = event.touches[0].size + var force = event.touches[0].force + var changeGlobalX = event.changedTouches[0].globalX + var changeGlobalY = event.changedTouches[0].globalY + var changeLocalX = event.changedTouches[0].localX + var changeLocalY = event.changedTouches[0].localY + var changeSize = event.changedTouches[0].size + var changeForce = event.changedTouches[0].force + var message = 'globalX--' + globalX + ',globalY--' + globalY + + ',localX--' + localX + ',localY--' + localY + ',size--' + size + ',force--' + force + + ',changeGlobalX--' + changeGlobalX + ',changeGlobalY--' + changeGlobalY + + ',changeLocalX--' + changeLocalX + ',changeLocalY--' + changeLocalY + + ',changeSize--' + changeSize + ',changeForce--' + changeForce; + prompt.showToast({ + message: 'touchMove:\n' +message + }); + }, + + touchEnd(event){ + var globalX = event.touches[0].globalX + var globalY = event.touches[0].globalY + var localX = event.touches[0].localX + var localY = event.touches[0].localY + var size = event.touches[0].size + var force = event.touches[0].force + var changeGlobalX = event.changedTouches[0].globalX + var changeGlobalY = event.changedTouches[0].globalY + var changeLocalX = event.changedTouches[0].localX + var changeLocalY = event.changedTouches[0].localY + var changeSize = event.changedTouches[0].size + var changeForce = event.changedTouches[0].force + var message = 'globalX--' + globalX + ',globalY--' + globalY + + ',localX--' + localX + ',localY--' + localY + ',size--' + size + ',force--' + force + + ',changeGlobalX--' + changeGlobalX + ',changeGlobalY--' + changeGlobalY + + ',changeLocalX--' + changeLocalX + ',changeLocalY--' + changeLocalY + + ',changeSize--' + changeSize + ',changeForce--' + changeForce; + prompt.showToast({ + message: 'touchEnd:\n' +message + }); + }, + + touchCancel(event){ + var globalX = event.touches[0].globalX + var globalY = event.touches[0].globalY + var localX = event.touches[0].localX + var localY = event.touches[0].localY + var size = event.touches[0].size + var force = event.touches[0].force + var changeGlobalX = event.changedTouches[0].globalX + var changeGlobalY = event.changedTouches[0].globalY + var changeLocalX = event.changedTouches[0].localX + var changeLocalY = event.changedTouches[0].localY + var changeSize = event.changedTouches[0].size + var changeForce = event.changedTouches[0].force + var message = 'globalX--' + globalX + ',globalY--' + globalY + + ',localX--' + localX + ',localY--' + localY + ',size--' + size + ',force--' + force + + ',changeGlobalX--' + changeGlobalX + ',changeGlobalY--' + changeGlobalY + + ',changeLocalX--' + changeLocalX + ',changeLocalY--' + changeLocalY + + ',changeSize--' + changeSize + ',changeForce--' + changeForce; + prompt.showToast({ + message: 'touchCancel:\n' +message + }); + }, + + click(){ + prompt.showToast({ + message: 'click' + }); + }, + + doubleClick(){ + prompt.showToast({ + message: 'doubleClick' + }); + }, + + longPress(){ + prompt.showToast({ + message: 'longPress' + }); + }, + + focus(){ + prompt.showToast({ + message: 'focus' + }); + }, + + blur(){ + prompt.showToast({ + message: 'blur' + }); + }, + + key(event){ + var code = event.code; + var action = event.action; + var repeatCount = event.repeatCount; + var timestampStart = event.timestampStart; + var message = 'code--' + code + ',action--' + action + + ',repeatCount--' + repeatCount + ',timestampStart--' + timestampStart; + prompt.showToast({ + message: 'key:\n' + message + }); + }, + + swipe(event){ + var direction = event.direction; + var distance = event.distance; + var message = 'direction--' + direction + ',distance--' + distance; + prompt.showToast({ + message: 'swipe:\n' + message + }); + }, + + attached(){ + prompt.showToast({ + message: 'attached' + }); + }, + + detached(){ + prompt.showToast({ + message: 'detached' + }); + }, + + pinchStart(event){ + var scale = event.scale + var pinchCenterX = event.pinchCenterX + var pinchCenterY = event.pinchCenterY + var message = 'scale--' + scale + ',pinchCenterX--' + pinchCenterX + + ',pinchCenterY--' + pinchCenterY; + prompt.showToast({ + message: 'pinchStart:\n' + message + }); + }, + + pinchUpdate(event){ + var scale = event.scale + var pinchCenterX = event.pinchCenterX + var pinchCenterY = event.pinchCenterY + var message = 'scale--' + scale + ',pinchCenterX--' + pinchCenterX + + ',pinchCenterY--' + pinchCenterY; + prompt.showToast({ + message: 'pinchUpdate:\n' + message + }); + }, + + pinchEnd(event){ + var scale = event.scale + var pinchCenterX = event.pinchCenterX + var pinchCenterY = event.pinchCenterY + var message = 'scale--' + scale + ',pinchCenterX--' + pinchCenterX + + ',pinchCenterY--' + pinchCenterY; + prompt.showToast({ + message: 'pinchUpdate:\n' + message + }); + }, + + pinchCancel(event){ + var scale = event.scale + var pinchCenterX = event.pinchCenterX + var pinchCenterY = event.pinchCenterY + var message = 'scale--' + scale + ',pinchCenterX--' + pinchCenterX + + ',pinchCenterY--' + pinchCenterY; + prompt.showToast({ + message: 'pinchCancel:\n' + message + }); + }, + + dragStart(event){ + var type = event.type + var globalX = event.globalX + var globalY = event.globalY + var timestamp = event.timestamp + var message = 'type--' + type + ',globalX--' + globalX + + ',globalY--' + globalY + ',timestamp--' + timestamp; + prompt.showToast({ + message: 'dragStart:\n' + message + }); + }, + + drag(event){ + var type = event.type + var globalX = event.globalX + var globalY = event.globalY + var timestamp = event.timestamp + var message = 'type--' + type + ',globalX--' + globalX + + ',globalY--' + globalY + ',timestamp--' + timestamp; + prompt.showToast({ + message: 'drag:\n' + message + }); + }, + + dragEnd(event){ + var type = event.type + var globalX = event.globalX + var globalY = event.globalY + var timestamp = event.timestamp + var message = 'type--' + type + ',globalX--' + globalX + + ',globalY--' + globalY + ',timestamp--' + timestamp; + prompt.showToast({ + message: 'dragEnd:\n' + message + }); + }, + + dragEnter(event){ + var type = event.type + var globalX = event.globalX + var globalY = event.globalY + var timestamp = event.timestamp + var message = 'type--' + type + ',globalX--' + globalX + + ',globalY--' + globalY + ',timestamp--' + timestamp; + prompt.showToast({ + message: 'dragEnter:\n' + message + }); + }, + + dragOver(event){ + var type = event.type + var globalX = event.globalX + var globalY = event.globalY + var timestamp = event.timestamp + var message = 'type--' + type + ',globalX--' + globalX + + ',globalY--' + globalY + ',timestamp--' + timestamp; + prompt.showToast({ + message: 'dragOver:\n' + message + }); + }, + + dragLeave(event){ + var type = event.type + var globalX = event.globalX + var globalY = event.globalY + var timestamp = event.timestamp + var message = 'type--' + type + ',globalX--' + globalX + + ',globalY--' + globalY + ',timestamp--' + timestamp; + prompt.showToast({ + message: 'dragLeave:\n' + message + }); + }, + + drop(event){ + var type = event.type + var globalX = event.globalX + var globalY = event.globalY + var timestamp = event.timestamp + var message = 'type--' + type + ',globalX--' + globalX + + ',globalY--' + globalY + ',timestamp--' + timestamp; + prompt.showToast({ + message: 'drop:\n' + message + }); + }, + + functionTest1(event){ + var function1 = this.$element('function1'); + function1.focus(true) + var rect = function1.getBoundingClientRect(); + var width = rect.width; + var height = rect.height; + var left = rect.left; + var top = rect.top; + var message = 'width--' + width + ',height--' + height + + ',left--' + left + ',top--' + top; + prompt.showToast({ + message: 'function1 rect:\n' + message + }); + }, + + functionTest2(event){ + var function2 = this.$element('function2'); + let observer = function2.createIntersectionObserver({ + ratios: [0.2, 0], // number + }); + observer.observe((isVisible, ratio)=> { + console.info('this element is ' + isVisible + 'ratio is ' + ratio) + prompt.showToast({ + message: 'function2 observer:\n' + 'isVisible--' + isVisible + ',ratio--' + ratio + }); + }) + + observer.unobserve() + }, + + functionTest3(event){ + var function3 = this.$element('function3'); + var options = { + duration: 1500, + easing: 'friction', + delay: 100, + fill: 'forwards', + iterations: 2, + direction: 'normal', + }; + var frames = [ + { + transform: { + translate: '-120px', + rotate:'10deg', + scale:0.2, + skew:'40deg' + }, + opacity: 0.1, + offset: 0.0, + width: '40%', + height:'20px', + backgroundColor:'#ff0000', + backgroundPosition:'10px 20px', + transformOrigin:'left top' + }, + { + transform: { + translateX: '0px', + translateY: '5px', + rotateX:'10deg', + rotateY:'10deg', + scaleX:0.5, + scaleY:0.7, + skewX:'22deg', + skewY:'30deg' + }, + opacity: 0.6, + offset: 2.0, + width: '60%', + height:'30px', + backgroundColor:'#ff00ff', + backgroundPosition:'15px 25px', + transformOrigin:'center top' + }, + { + transform: { + translateX: '100px', + translateY: '0px', + translateZ: '20px', + rotateX:'0deg', + rotateY:'0deg', + rotateZ:'30deg', + scaleX:1, + scaleY:1, + scaleZ:2, + skewX:'0', + skewY:'0', + skewZ:'30deg' + }, + opacity: 1, + offset: 0.0, + width: '100%', + height:'30px', + backgroundColor:'#ffff00', + backgroundPosition:'0px', + transformOrigin:'center center' + }, + ]; + + var animation = function3.animate(frames, options); + animation.play() + animation.onfinish = function(){ + prompt.showToast({ + message: 'The animation is finished.' + }); + }; + + animation.oncancel = function(){ + prompt.showToast({ + message: 'The animation is canceled.' + }); + }; + + animation.onrepeat = function(){ + prompt.showToast({ + message: 'The animation is repeated.' + }); + }; + + setTimeout(() => { + animation.reverse() + }, 500) + + setTimeout(() => { + animation.pause() + }, 1000) + + setTimeout(() => { + animation.cancel() + }, 1500) + }, + + functionTest4(event){ + var function4 = this.$element('function4'); + var scrollOffset = function4.getScrollOffset(); + var x = scrollOffset.x; + var y = scrollOffset.y; + var message = 'x--' + x + ',y--' + y; + prompt.showToast({ + message: 'functionTest4 scrollOffset:\n' + message + }); + + var scrollParam = { + dx:60, + dy:0, + smooth:true + } + function4.scrollBy(scrollParam) + }, + + reachStart(){ + prompt.showToast({ + message: 'reachStart' + }); + }, + + reachEnd(){ + prompt.showToast({ + message: 'reachEnd' + }); + }, + + reachTop(){ + prompt.showToast({ + message: 'reachTop' + }); + }, + + reachBottom(){ + prompt.showToast({ + message: 'reachBottom' + }); + } +} diff --git a/ace/ace_standard/src/main/js/default/test/List.test.js b/ace/ace_standard/src/main/js/default/test/List.test.js index a7201e56d3c2d2c6a3d9a2b2c3841c35fb81a1f7..3cb60726ed388de080c45656e30b2f2478e74797 100755 --- a/ace/ace_standard/src/main/js/default/test/List.test.js +++ b/ace/ace_standard/src/main/js/default/test/List.test.js @@ -39,3 +39,11 @@ require('./refreshProps.test.js') require('./swiperProps.test.js') require('./textProps.test.js') require('./popupProps.test.js') +require('./badgeProps.test.js') +require('./dialogProps.test.js') +require('./formProps.test.js') +require('./listProps.test.js') +require('./lsitItemProps.test.js') +require('./listItemGroupProps.test.js') +require('./stepperProps.test.js') +require('./stepperItemProps.test.js') diff --git a/ace/ace_standard/src/main/js/default/test/badgeProps.test.js b/ace/ace_standard/src/main/js/default/test/badgeProps.test.js new file mode 100644 index 0000000000000000000000000000000000000000..3d6b89151a6fe6dcc964a0b38d8aa2a2be7d71e3 --- /dev/null +++ b/ace/ace_standard/src/main/js/default/test/badgeProps.test.js @@ -0,0 +1,907 @@ +/** + * 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 router from '@system.router'; +import {describe, beforeAll,afterAll, it, expect} from 'deccjsunit/index'; + + +describe('badgePropsJsTest', function () { + + async function sleep(time) { + return new Promise((resolve, reject) => { + setTimeout(() => { + resolve() + }, time) + }).then(() => { + console.info(`sleep ${time} over...`) + }) + } + + async function backToIndex() { + let backToIndexPromise = new Promise((resolve, reject) => { + setTimeout(() => { + router.back({ + uri: 'pages/index/index' + }) + resolve() + }, 500) + }) + let clearPromise = new Promise((resolve, reject) => { + setTimeout(() => { + router.clear() + resolve() + }, 500); + }) + await backToIndexPromise.then(() => { + return clearPromise + }) + } + + /** + * run before testcase + */ + beforeAll(async function (done) { + console.info('[badgePropsJsTest] before each called') + + let result; + let options = { + uri: 'pages/badge/prop/index' + } + try { + result = router.push(options) + console.info("push badgeProps page success " + JSON.stringify(result)); + } catch (err) { + console.error("push badgeProps page error " + JSON.stringify(result)); + } + await sleep(4000) + done() + }) + + /** + * run after testcase + */ + afterAll(async function () { + console.info('[badgePropsJsTest] after each called') + await backToIndex(); + await sleep(1000) + }) + + // 通用属性 + + /** + * @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100 + * @tc.name testbadgeIdProp + * @tc.desc ACE + */ + it('testbadgeIdProp', 0, async function (done) { + console.info('testbadgeIdProp START'); + console.info("[badgeProps] get globalThis.value is: " + JSON.stringify(globalThis.value)); + + let obj = JSON.parse(globalThis.value.idProp); + console.info("[badgeProps] get inspector value is: " + JSON.stringify(obj)); + console.info("[badgeProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); + + expect(obj.$type).assertEqual('badge') + expect(obj.$attrs.id).assertEqual('idProp') + done(); + }) + + /** + * @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100 + * @tc.name testbadgeClassProp + * @tc.desc ACE + */ + it('testbadgeClassProp', 0, async function (done) { + console.info('testbadgeClassProp START'); + console.info("[badgeProps] get globalThis.value is: " + JSON.stringify(globalThis.value)); + + let obj = JSON.parse(globalThis.value.classProp); + console.info("[badgeProps] get inspector value is: " + JSON.stringify(obj)); + console.info("[badgeProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); + + expect(obj.$type).assertEqual('badge') + expect(obj.$attrs.id).assertEqual('classProp') + expect(obj.$attrs.className).assertEqual('classProp') + done(); + }) + + /** + * @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100 + * @tc.name testbadgeClassPropNone + * @tc.desc ACE + */ + it('testbadgeClassPropNone', 0, async function (done) { + console.info('testbadgeClassPropNone START'); + console.info("[badgeProps] get globalThis.value is: " + JSON.stringify(globalThis.value)); + + let obj = JSON.parse(globalThis.value.classPropNone); + console.info("[badgeProps] get inspector value is: " + JSON.stringify(obj)); + console.info("[badgeProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); + + expect(obj.$type).assertEqual('badge') + expect(obj.$attrs.id).assertEqual('classPropNone') + expect(obj.$attrs.className).assertEqual(undefined) + console.info("[badgeProps] get className value is: " + JSON.stringify(obj.$attrs.className)); + done(); + }) + + /** + * @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100 + * @tc.name testbadgeRefProp + * @tc.desc ACE + */ + it('testbadgeRefProp', 0, async function (done) { + console.info('testbadgeRefProp START'); + console.info("[badgeProps] get globalThis.value is: " + JSON.stringify(globalThis.value)); + + let obj = JSON.parse(globalThis.value.refProp); + console.info("[badgeProps] get inspector value is: " + JSON.stringify(obj)); + console.info("[badgeProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); + + expect(obj.$type).assertEqual('badge') + expect(obj.$attrs.id).assertEqual('refProp') + expect(obj.$attrs.ref).assertEqual('refProp') + done(); + }); + + /** + * @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100 + * @tc.name testbadgeRefPropNone + * @tc.desc ACE + */ + it('testbadgeRefPropNone', 0, async function (done) { + console.info('testbadgeRefPropNone START'); + console.info("[badgeProps] get globalThis.value is: " + JSON.stringify(globalThis.value)); + + let obj = JSON.parse(globalThis.value.refPropNone); + console.info("[badgeProps] get inspector value is: " + JSON.stringify(obj)); + console.info("[badgeProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); + + expect(obj.$type).assertEqual('badge') + expect(obj.$attrs.id).assertEqual('refPropNone') + expect(obj.$attrs.ref).assertEqual(undefined) + console.info("[badgeProps] get ref value is: " + JSON.stringify(obj.$attrs.ref)); + done(); + }); + + /** + * @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100 + * @tc.name testbadgeDisabledPropTrue + * @tc.desc ACE + */ + it('testbadgeDisabledPropTrue', 0, async function (done) { + console.info('testbadgeDisabledPropTrue START'); + console.info("[badgeProps] get globalThis.value is: " + JSON.stringify(globalThis.value)); + + let obj = JSON.parse(globalThis.value.disabledPropTrue); + console.info("[badgeProps] get inspector value is: " + JSON.stringify(obj)); + console.info("[badgeProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); + + expect(obj.$type).assertEqual('badge') + expect(obj.$attrs.id).assertEqual('disabledPropTrue') + expect(obj.$attrs.disabled).assertEqual('true') + done(); + }); + + /** + * @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100 + * @tc.name testbadgeDisabledPropFalse + * @tc.desc ACE + */ + it('testbadgeDisabledPropFalse', 0, async function (done) { + console.info('testbadgeDisabledPropFalse START'); + console.info("[badgeProps] get globalThis.value is: " + JSON.stringify(globalThis.value)); + + let obj = JSON.parse(globalThis.value.disabledPropFalse); + console.info("[badgeProps] get inspector value is: " + JSON.stringify(obj)); + console.info("[badgeProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); + + expect(obj.$type).assertEqual('badge') + expect(obj.$attrs.id).assertEqual('disabledPropFalse') + expect(obj.$attrs.disabled).assertEqual('false') + done(); + }); + + /** + * @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100 + * @tc.name testbadgeDisabledPropNone + * @tc.desc ACE + */ + it('testbadgeDisabledPropNone', 0, async function (done) { + console.info('testbadgeDisabledPropNone START'); + console.info("[badgeProps] get globalThis.value is: " + JSON.stringify(globalThis.value)); + + let obj = JSON.parse(globalThis.value.disabledPropNone); + console.info("[badgeProps] get inspector value is: " + JSON.stringify(obj)); + console.info("[badgeProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); + + expect(obj.$type).assertEqual('badge') + expect(obj.$attrs.id).assertEqual('disabledPropNone') + expect(obj.$attrs.disabled).assertEqual('false') + done(); + }); + + /** + * @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100 + * @tc.name testbadgeFocusablePropTrue + * @tc.desc ACE + */ + it('testbadgeFocusablePropTrue', 0, async function (done) { + console.info('testbadgeFocusablePropTrue START'); + console.info("[badgeProps] get globalThis.value is: " + JSON.stringify(globalThis.value)); + + let obj = JSON.parse(globalThis.value.focusablePropTrue); + console.info("[badgeProps] get inspector value is: " + JSON.stringify(obj)); + console.info("[badgeProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); + + expect(obj.$type).assertEqual('badge') + expect(obj.$attrs.id).assertEqual('focusablePropTrue') + expect(obj.$attrs.focusable).assertEqual('true') + done(); + }); + + /** + * @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100 + * @tc.name testbadgeFocusablePropFalse + * @tc.desc ACE + */ + it('testbadgeFocusablePropFalse', 0, async function (done) { + console.info('testbadgeFocusablePropFalse START'); + console.info("[badgeProps] get globalThis.value is: " + JSON.stringify(globalThis.value)); + + let obj = JSON.parse(globalThis.value.focusablePropFalse); + console.info("[badgeProps] get inspector value is: " + JSON.stringify(obj)); + console.info("[badgeProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); + + expect(obj.$type).assertEqual('badge') + expect(obj.$attrs.id).assertEqual('focusablePropFalse') + expect(obj.$attrs.focusable).assertEqual('false') + done(); + }); + + /** + * @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100 + * @tc.name testbadgeFocusablePropNone + * @tc.desc ACE + */ + it('testbadgeFocusablePropNone', 0, async function (done) { + console.info('testbadgeFocusablePropNone START'); + console.info("[badgeProps] get globalThis.value is: " + JSON.stringify(globalThis.value)); + + let obj = JSON.parse(globalThis.value.focusablePropNone); + console.info("[badgeProps] get inspector value is: " + JSON.stringify(obj)); + console.info("[badgeProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); + + expect(obj.$type).assertEqual('badge') + expect(obj.$attrs.id).assertEqual('focusablePropNone') + expect(obj.$attrs.focusable).assertEqual('false') + done(); + }); + + /** + * @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100 + * @tc.name testbadgeDataProp + * @tc.desc ACE + */ + it('testbadgeDataProp', 0, async function (done) { + console.info('testbadgeDataProp START'); + console.info("[badgeProps] get globalThis.value is: " + JSON.stringify(globalThis.value)); + + let obj = JSON.parse(globalThis.value.dataProp); + console.info("[badgeProps] get inspector value is: " + JSON.stringify(obj)); + console.info("[badgeProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); + + expect(obj.$type).assertEqual('badge') + expect(obj.$attrs.id).assertEqual('dataProp') + expect(obj.$attrs.databadge).assertEqual(undefined); + console.info("[badgeProps] get databadge value is: " + JSON.stringify(obj.$attrs.databadge)); + done(); + }); + + /** + * @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100 + * @tc.name testbadgeDataPropNone + * @tc.desc ACE + */ + it('testbadgeDataPropNone', 0, async function (done) { + console.info('testbadgeDataPropNone START'); + console.info("[badgeProps] get globalThis.value is: " + JSON.stringify(globalThis.value)); + + let obj = JSON.parse(globalThis.value.dataPropNone); + console.info("[badgeProps] get inspector value is: " + JSON.stringify(obj)); + console.info("[badgeProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); + + expect(obj.$type).assertEqual('badge') + expect(obj.$attrs.id).assertEqual('dataPropNone') + expect(obj.$attrs.databadge).assertEqual(undefined) + console.info("[badgeProps] get databadge value is: " + JSON.stringify(obj.$attrs.databadge)); + done(); + }); + + /** + * @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100 + * @tc.name testbadgeClickEffectPropSmall + * @tc.desc ACE + */ + it('testbadgeClickEffectPropSmall', 0, async function (done) { + console.info('testbadgeClickEffectPropSmall START'); + console.info("[badgeProps] get globalThis.value is: " + JSON.stringify(globalThis.value)); + + let obj = JSON.parse(globalThis.value.clickEffectPropSmall); + console.info("[badgeProps] get inspector value is: " + JSON.stringify(obj)); + console.info("[badgeProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); + + expect(obj.$type).assertEqual('badge') + expect(obj.$attrs.id).assertEqual('clickEffectPropSmall') + expect(obj.$attrs.clickEffect).assertEqual('spring-small') + done(); + }); + + /** + * @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100 + * @tc.name testbadgeClickEffectPropMedium + * @tc.desc ACE + */ + it('testbadgeClickEffectPropMedium', 0, async function (done) { + console.info('testbadgeClickEffectPropMedium START'); + console.info("[badgeProps] get globalThis.value is: " + JSON.stringify(globalThis.value)); + + let obj = JSON.parse(globalThis.value.clickEffectPropMedium); + console.info("[badgeProps] get inspector value is: " + JSON.stringify(obj)); + console.info("[badgeProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); + + expect(obj.$type).assertEqual('badge') + expect(obj.$attrs.id).assertEqual('clickEffectPropMedium') + expect(obj.$attrs.clickEffect).assertEqual('spring-medium') + done(); + }); + + /** + * @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100 + * @tc.name testbadgeClickEffectPropLarge + * @tc.desc ACE + */ + it('testbadgeClickEffectPropLarge', 0, async function (done) { + console.info('testbadgeClickEffectPropLarge START'); + console.info("[badgeProps] get globalThis.value is: " + JSON.stringify(globalThis.value)); + + let obj = JSON.parse(globalThis.value.clickEffectPropLarge); + console.info("[badgeProps] get inspector value is: " + JSON.stringify(obj)); + console.info("[badgeProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); + + expect(obj.$type).assertEqual('badge') + expect(obj.$attrs.id).assertEqual('clickEffectPropLarge') + expect(obj.$attrs.clickEffect).assertEqual('spring-large') + done(); + }); + + /** + * @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100 + * @tc.name testbadgeClickEffectPropNone + * @tc.desc ACE + */ + it('testbadgeClickEffectPropNone', 0, async function (done) { + console.info('testbadgeClickEffectPropNone START'); + console.info("[badgeProps] get globalThis.value is: " + JSON.stringify(globalThis.value)); + + let obj = JSON.parse(globalThis.value.clickEffectPropNone); + console.info("[badgeProps] get inspector value is: " + JSON.stringify(obj)); + console.info("[badgeProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); + + expect(obj.$type).assertEqual('badge') + expect(obj.$attrs.id).assertEqual('clickEffectPropNone') + expect(obj.$attrs.clickEffect).assertEqual(undefined) + console.info("[badgeProps] get clickEffect value is: " + JSON.stringify(obj.$attrs.clickEffect)); + done(); + }); + + /** + * @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100 + * @tc.name testbadgeDirPropRtl + * @tc.desc ACE + */ + it('testbadgeDirPropRtl', 0, async function (done) { + console.info('testbadgeDirPropRtl START'); + console.info("[badgeProps] get globalThis.value is: " + JSON.stringify(globalThis.value)); + + let obj = JSON.parse(globalThis.value.dirPropRtl); + console.info("[badgeProps] get inspector value is: " + JSON.stringify(obj)); + console.info("[badgeProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); + + expect(obj.$type).assertEqual('badge') + expect(obj.$attrs.id).assertEqual('dirPropRtl') + expect(obj.$attrs.dir).assertEqual('rtl') + done(); + }); + + /** + * @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100 + * @tc.name testbadgeDirPropLtr + * @tc.desc ACE + */ + it('testbadgeDirPropLtr', 0, async function (done) { + console.info('testbadgeDirPropLtr START'); + console.info("[badgeProps] get globalThis.value is: " + JSON.stringify(globalThis.value)); + + let obj = JSON.parse(globalThis.value.dirPropLtr); + console.info("[badgeProps] get inspector value is: " + JSON.stringify(obj)); + console.info("[badgeProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); + + expect(obj.$type).assertEqual('badge') + expect(obj.$attrs.id).assertEqual('dirPropLtr') + expect(obj.$attrs.dir).assertEqual('ltr') + done(); + }); + + /** + * @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100 + * @tc.name testbadgeDirPropAuto + * @tc.desc ACE + */ + it('testbadgeDirPropAuto', 0, async function (done) { + console.info('testbadgeDirPropAuto START'); + console.info("[badgeProps] get globalThis.value is: " + JSON.stringify(globalThis.value)); + + let obj = JSON.parse(globalThis.value.dirPropAuto); + console.info("[badgeProps] get inspector value is: " + JSON.stringify(obj)); + console.info("[badgeProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); + + expect(obj.$type).assertEqual('badge') + expect(obj.$attrs.id).assertEqual('dirPropAuto') + expect(obj.$attrs.dir).assertEqual('auto') + done(); + }); + + /** + * @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100 + * @tc.name testbadgeDirPropNone + * @tc.desc ACE + */ + it('testbadgeDirPropNone', 0, async function (done) { + console.info('testbadgeDirPropNone START'); + console.info("[badgeProps] get globalThis.value is: " + JSON.stringify(globalThis.value)); + + let obj = JSON.parse(globalThis.value.dirPropNone); + console.info("[badgeProps] get inspector value is: " + JSON.stringify(obj)); + console.info("[badgeProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); + + expect(obj.$type).assertEqual('badge') + expect(obj.$attrs.id).assertEqual('dirPropNone') + expect(obj.$attrs.dir).assertEqual('auto') + done(); + }); + + /** + * @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100 + * @tc.name testbadgeForPropNull + * @tc.desc ACE + */ + it('testbadgeForPropNull', 0, async function (done) { + console.info('testbadgeForPropNull START'); + console.info("[badgeProps] get globalThis.value is: " + JSON.stringify(globalThis.value)); + + let obj = JSON.parse(globalThis.value.forPropNull); + console.info("[badgeProps] get inspector value is: " + JSON.stringify(obj)); + console.info("[badgeProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); + + expect(obj.$type).assertEqual('badge') + expect(obj.$attrs.id).assertEqual('forPropNull') + expect(obj.$attrs.for).assertEqual(undefined) + console.info("[badgeProps] get for value is: " + JSON.stringify(obj.$attrs.for)); + done(); + }); + + /** + * @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100 + * @tc.name testbadgeForPropOne + * @tc.desc ACE + */ + it('testbadgeForPropOne', 0, async function (done) { + console.info('testbadgeForPropOne START'); + console.info("[badgeProps] get globalThis.value is: " + JSON.stringify(globalThis.value)); + + let obj = JSON.parse(globalThis.value.forPropOne); + console.info("[badgeProps] get inspector value is: " + JSON.stringify(obj)); + console.info("[badgeProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); + + expect(obj.$type).assertEqual('badge') + expect(obj.$attrs.id).assertEqual('forPropOne') + expect(obj.$attrs.for).assertEqual(undefined) + console.info("[badgeProps] get for value is: " + JSON.stringify(obj.$attrs.for)); + done(); + }); + + /** + * @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100 + * @tc.name testbadgeForPropThree + * @tc.desc ACE + */ + it('testbadgeForPropThree', 0, async function (done) { + console.info('testbadgeForPropThree START'); + console.info("[badgeProps] get globalThis.value is: " + JSON.stringify(globalThis.value)); + + let obj = JSON.parse(globalThis.value.forPropThree); + console.info("[badgeProps] get inspector value is: " + JSON.stringify(obj)); + console.info("[badgeProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); + + expect(obj.$type).assertEqual('badge') + expect(obj.$attrs.id).assertEqual('forPropThree') + expect(obj.$attrs.for).assertEqual(undefined) + console.info("[badgeProps] get for value is: " + JSON.stringify(obj.$attrs.for)); + done(); + }); + + /** + * @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100 + * @tc.name testbadgeIfPropTrue + * @tc.desc ACE + */ + it('testbadgeIfPropTrue', 0, async function (done) { + console.info('testbadgeIfPropTrue START'); + console.info("[badgeProps] get globalThis.value is: " + JSON.stringify(globalThis.value)); + + let obj = JSON.parse(globalThis.value.ifPropTrue); + console.info("[badgeProps] get inspector value is: " + JSON.stringify(obj)); + console.info("[badgeProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); + + expect(obj.$type).assertEqual('badge') + expect(obj.$attrs.id).assertEqual('ifPropTrue') + expect(obj.$attrs.if).assertEqual(undefined) + console.info("[badgeProps] get for value is: " + JSON.stringify(obj.$attrs.if)); + done(); + }); + + /** + * @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100 + * @tc.name testbadgeShowPropTrue + * @tc.desc ACE + */ + it('testbadgeShowPropTrue', 0, async function (done) { + console.info('testbadgeShowPropTrue START'); + console.info("[badgeProps] get globalThis.value is: " + JSON.stringify(globalThis.value)); + + let obj = JSON.parse(globalThis.value.showPropTrue); + console.info("[badgeProps] get inspector value is: " + JSON.stringify(obj)); + console.info("[badgeProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); + + expect(obj.$type).assertEqual('badge') + expect(obj.$attrs.id).assertEqual('showPropTrue') + expect(obj.$attrs.show).assertEqual('true') + console.info("[badgeProps] get show value is: " + JSON.stringify(obj.$attrs.show)); + done(); + }); + + /** + * @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100 + * @tc.name testbadgeShowPropFalse + * @tc.desc ACE + */ + it('testbadgeShowPropFalse', 0, async function (done) { + console.info('testbadgeShowPropFalse START'); + console.info("[badgeProps] get globalThis.value is: " + JSON.stringify(globalThis.value)); + + let obj = JSON.parse(globalThis.value.showPropFalse); + console.info("[badgeProps] get inspector value is: " + JSON.stringify(obj)); + console.info("[badgeProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); + + expect(obj.$type).assertEqual('badge') + expect(obj.$attrs.id).assertEqual('showPropFalse') + expect(obj.$attrs.show).assertEqual('false') + console.info("[badgeProps] get show value is: " + JSON.stringify(obj.$attrs.show)); + done(); + }); + + /** + * @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100 + * @tc.name testbadgeShowPropNone + * @tc.desc ACE + */ + it('testbadgeShowPropNone', 0, async function (done) { + console.info('testbadgeShowPropNone START'); + console.info("[badgeProps] get globalThis.value is: " + JSON.stringify(globalThis.value)); + + let obj = JSON.parse(globalThis.value.showPropNone); + console.info("[badgeProps] get inspector value is: " + JSON.stringify(obj)); + console.info("[badgeProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); + + expect(obj.$type).assertEqual('badge') + expect(obj.$attrs.id).assertEqual('showPropNone') + expect(obj.$attrs.show).assertEqual('true') + console.info("[badgeProps] get show value is: " + JSON.stringify(obj.$attrs.show)); + done(); + }); + + // 特有属性 + + /** + * @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100 + * @tc.name testbadgeplacementRight + * @tc.desc ACE + */ + it('testbadgeplacementRight', 0, async function (done) { + console.info('testbadgeplacementRight START'); + console.info("[badgeProps] get globalThis.value is: " + JSON.stringify(globalThis.value)); + + let obj = JSON.parse(globalThis.value.placementRight); + console.info("[badgeProps] get inspector value is: " + JSON.stringify(obj)); + console.info("[badgeProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); + + expect(obj.$type).assertEqual('badge') + expect(obj.$attrs.id).assertEqual('placementRight') + expect(obj.$attrs.placement).assertEqual('right') + console.info("[badgeProps] get placement value is: " + JSON.stringify(obj.$attrs.placement)); + done(); + }); + + /** + * @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100 + * @tc.name testbadgeplacementRightTop + * @tc.desc ACE + */ + it('testbadgeplacementRightTop', 0, async function (done) { + console.info('testbadgeplacementRightTop START'); + console.info("[badgeProps] get globalThis.value is: " + JSON.stringify(globalThis.value)); + + let obj = JSON.parse(globalThis.value.placementRightTop); + console.info("[badgeProps] get inspector value is: " + JSON.stringify(obj)); + console.info("[badgeProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); + + expect(obj.$type).assertEqual('badge') + expect(obj.$attrs.id).assertEqual('placementRightTop') + expect(obj.$attrs.placement).assertEqual('rightTop') + console.info("[badgeProps] get placement value is: " + JSON.stringify(obj.$attrs.placement)); + done(); + }); + + /** + * @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100 + * @tc.name testbadgeplacementLeft + * @tc.desc ACE + */ + it('testbadgeplacementLeft', 0, async function (done) { + console.info('testbadgeplacementLeft START'); + console.info("[badgeProps] get globalThis.value is: " + JSON.stringify(globalThis.value)); + + let obj = JSON.parse(globalThis.value.placementLeft); + console.info("[badgeProps] get inspector value is: " + JSON.stringify(obj)); + console.info("[badgeProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); + + expect(obj.$type).assertEqual('badge') + expect(obj.$attrs.id).assertEqual('placementLeft') + expect(obj.$attrs.placement).assertEqual('Left') + console.info("[badgeProps] get placement value is: " + JSON.stringify(obj.$attrs.placement)); + done(); + }); + + /** + * @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100 + * @tc.name testbadgeplacementNone + * @tc.desc ACE + */ + it('testbadgeplacementNone', 0, async function (done) { + console.info('testbadgeplacementNone START'); + console.info("[badgeProps] get globalThis.value is: " + JSON.stringify(globalThis.value)); + + let obj = JSON.parse(globalThis.value.placementNone); + console.info("[badgeProps] get inspector value is: " + JSON.stringify(obj)); + console.info("[badgeProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); + + expect(obj.$type).assertEqual('badge') + expect(obj.$attrs.id).assertEqual('placementNone') + expect(obj.$attrs.placement).assertEqual(undefined) + console.info("[badgeProps] get placement value is: " + JSON.stringify(obj.$attrs.placement)); + done(); + }); + + /** + * @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100 + * @tc.name testbadgecount + * @tc.desc ACE + */ + it('testbadgecount', 0, async function (done) { + console.info('testbadgecount START'); + console.info("[badgeProps] get globalThis.value is: " + JSON.stringify(globalThis.value)); + + let obj = JSON.parse(globalThis.value.count); + console.info("[badgeProps] get inspector value is: " + JSON.stringify(obj)); + console.info("[badgeProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); + + expect(obj.$type).assertEqual('badge') + expect(obj.$attrs.id).assertEqual('count') + expect(obj.$attrs.count).assertEqual('10') + console.info("[badgeProps] get count value is: " + JSON.stringify(obj.$attrs.count)); + done(); + }); + + /** + * @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100 + * @tc.name testvisibleTrue + * @tc.desc ACE + */ + it('testvisibleTrue', 0, async function (done) { + console.info('testvisibleTrue START'); + console.info("[badgeProps] get globalThis.value is: " + JSON.stringify(globalThis.value)); + + let obj = JSON.parse(globalThis.value.visibleTrue); + console.info("[badgeProps] get inspector value is: " + JSON.stringify(obj)); + console.info("[badgeProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); + + expect(obj.$type).assertEqual('badge') + expect(obj.$attrs.id).assertEqual('visibleTrue') + expect(obj.$attrs.visible).assertEqual('true') + console.info("[badgeProps] get visible value is: " + JSON.stringify(obj.$attrs.visible)); + done(); + }); + + /** + * @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100 + * @tc.name testvisibleFalse + * @tc.desc ACE + */ + it('testvisibleFalse', 0, async function (done) { + console.info('testvisibleFalse START'); + console.info("[badgeProps] get globalThis.value is: " + JSON.stringify(globalThis.value)); + + let obj = JSON.parse(globalThis.value.visibleFalse); + console.info("[badgeProps] get inspector value is: " + JSON.stringify(obj)); + console.info("[badgeProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); + + expect(obj.$type).assertEqual('badge') + expect(obj.$attrs.id).assertEqual('visibleFalse') + expect(obj.$attrs.visible).assertEqual('false') + console.info("[badgeProps] get visible value is: " + JSON.stringify(obj.$attrs.visible)); + done(); + }); + + /** + * @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100 + * @tc.name testvisibleNone + * @tc.desc ACE + */ + it('testvisibleNone', 0, async function (done) { + console.info('testvisibleNone START'); + console.info("[badgeProps] get globalThis.value is: " + JSON.stringify(globalThis.value)); + + let obj = JSON.parse(globalThis.value.visibleNone); + console.info("[badgeProps] get inspector value is: " + JSON.stringify(obj)); + console.info("[badgeProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); + + expect(obj.$type).assertEqual('badge') + expect(obj.$attrs.id).assertEqual('visibleNone') + expect(obj.$attrs.visible).assertEqual(undefined) + console.info("[badgeProps] get visible value is: " + JSON.stringify(obj.$attrs.visible)); + done(); + }); + + /** + * @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100 + * @tc.name testmaxcount + * @tc.desc ACE + */ + it('testmaxcount', 0, async function (done) { + console.info('testmaxcount START'); + console.info("[badgeProps] get globalThis.value is: " + JSON.stringify(globalThis.value)); + + let obj = JSON.parse(globalThis.value.maxcount); + console.info("[badgeProps] get inspector value is: " + JSON.stringify(obj)); + console.info("[badgeProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); + + expect(obj.$type).assertEqual('badge') + expect(obj.$attrs.id).assertEqual('maxcount') + expect(obj.$attrs.maxcount).assertEqual('100') + console.info("[badgeProps] get maxcount value is: " + JSON.stringify(obj.$attrs.maxcount)); + done(); + }); + + /** + * @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100 + * @tc.name testmaxcountNone + * @tc.desc ACE + */ + it('testmaxcountNone', 0, async function (done) { + console.info('testmaxcountNone START'); + console.info("[badgeProps] get globalThis.value is: " + JSON.stringify(globalThis.value)); + + let obj = JSON.parse(globalThis.value.maxcountNone); + console.info("[badgeProps] get inspector value is: " + JSON.stringify(obj)); + console.info("[badgeProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); + + expect(obj.$type).assertEqual('badge') + expect(obj.$attrs.id).assertEqual('maxcountNone') + expect(obj.$attrs.maxcount).assertEqual(undefined) + console.info("[badgeProps] get maxcount value is: " + JSON.stringify(obj.$attrs.maxcount)); + done(); + }); + + /** + * @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100 + * @tc.name testconfig + * @tc.desc ACE + */ + it('testconfig', 0, async function (done) { + console.info('testconfig START'); + console.info("[badgeProps] get globalThis.value is: " + JSON.stringify(globalThis.value)); + + let obj = JSON.parse(globalThis.value.config); + console.info("[badgeProps] get inspector value is: " + JSON.stringify(obj)); + console.info("[badgeProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); + + expect(obj.$type).assertEqual('badge') + expect(obj.$attrs.id).assertEqual('config') + expect(obj.$attrs.config).assertEqual('{{badgeconfig}}') + console.info("[badgeProps] get config value is: " + JSON.stringify(obj.$attrs.config)); + done(); + }); + + /** + * @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100 + * @tc.name testconfigNone + * @tc.desc ACE + */ + it('testconfigNone', 0, async function (done) { + console.info('testconfigNone START'); + console.info("[badgeProps] get globalThis.value is: " + JSON.stringify(globalThis.value)); + + let obj = JSON.parse(globalThis.value.configNone); + console.info("[badgeProps] get inspector value is: " + JSON.stringify(obj)); + console.info("[badgeProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); + + expect(obj.$type).assertEqual('badge') + expect(obj.$attrs.id).assertEqual('configNone') + expect(obj.$attrs.config).assertEqual(undefined) + console.info("[badgeProps] get config value is: " + JSON.stringify(obj.$attrs.config)); + done(); + }); + + /** + * @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100 + * @tc.name testlabel + * @tc.desc ACE + */ + it('testlabel', 0, async function (done) { + console.info('testlabel START'); + console.info("[badgeProps] get globalThis.value is: " + JSON.stringify(globalThis.value)); + + let obj = JSON.parse(globalThis.value.label); + console.info("[badgeProps] get inspector value is: " + JSON.stringify(obj)); + console.info("[badgeProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); + + expect(obj.$type).assertEqual('badge') + expect(obj.$attrs.id).assertEqual('label') + expect(obj.$attrs.label).assertEqual('提示') + console.info("[badgeProps] get label value is: " + JSON.stringify(obj.$attrs.label)); + done(); + }); + + /** + * @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100 + * @tc.name testlabelNone + * @tc.desc ACE + */ + it('testlabelNone', 0, async function (done) { + console.info('testlabelNone START'); + console.info("[badgeProps] get globalThis.value is: " + JSON.stringify(globalThis.value)); + + let obj = JSON.parse(globalThis.value.labelNone); + console.info("[badgeProps] get inspector value is: " + JSON.stringify(obj)); + console.info("[badgeProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); + + expect(obj.$type).assertEqual('badge') + expect(obj.$attrs.id).assertEqual('labelNone') + expect(obj.$attrs.label).assertEqual(undefined) + console.info("[badgeProps] get label value is: " + JSON.stringify(obj.$attrs.label)); + done(); + }); +}); diff --git a/ace/ace_standard/src/main/js/default/test/dialogProps.test.js b/ace/ace_standard/src/main/js/default/test/dialogProps.test.js new file mode 100644 index 0000000000000000000000000000000000000000..20c3dacbcb7315e2f98414952a195c42b4f3c05d --- /dev/null +++ b/ace/ace_standard/src/main/js/default/test/dialogProps.test.js @@ -0,0 +1,688 @@ +/** + * 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 router from '@system.router'; + import {describe, beforeAll,afterAll, it, expect} from 'deccjsunit/index'; + + + describe('dialogPropsJsTest', function () { + + async function sleep(time) { + return new Promise((resolve, reject) => { + setTimeout(() => { + resolve() + }, time) + }).then(() => { + console.info(`sleep ${time} over...`) + }) + } + + async function backToIndex() { + let backToIndexPromise = new Promise((resolve, reject) => { + setTimeout(() => { + router.back({ + uri: 'pages/index/index' + }) + resolve() + }, 500) + }) + let clearPromise = new Promise((resolve, reject) => { + setTimeout(() => { + router.clear() + resolve() + }, 500); + }) + await backToIndexPromise.then(() => { + return clearPromise + }) + } + + /** + * run before testcase + */ + beforeAll(async function (done) { + console.info('[dialogPropsJsTest] before each called') + + let result; + let options = { + uri: 'pages/dialog/prop/index' + } + try { + result = router.push(options) + console.info("push dialogProps page success " + JSON.stringify(result)); + } catch (err) { + console.error("push dialogProps page error " + JSON.stringify(result)); + } + await sleep(4000) + done() + }) + + /** + * run after testcase + */ + afterAll(async function () { + console.info('[dialogPropsJsTest] after each called') + await backToIndex(); + await sleep(1000) + }) + + // 通用属性 + + /** + * @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100 + * @tc.name testdialogIdProp + * @tc.desc ACE + */ + it('testdialogIdProp', 0, async function (done) { + console.info('testdialogIdProp START'); + console.info("[dialogProps] get globalThis.value is: " + JSON.stringify(globalThis.value)); + + let obj = JSON.parse(globalThis.value.idProp); + console.info("[dialogProps] get inspector value is: " + JSON.stringify(obj)); + console.info("[dialogProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); + + expect(obj.$type).assertEqual('dialog') + expect(obj.$attrs.id).assertEqual('idProp') + done(); + }) + + /** + * @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100 + * @tc.name testdialogClassProp + * @tc.desc ACE + */ + it('testdialogClassProp', 0, async function (done) { + console.info('testdialogClassProp START'); + console.info("[dialogProps] get globalThis.value is: " + JSON.stringify(globalThis.value)); + + let obj = JSON.parse(globalThis.value.classProp); + console.info("[dialogProps] get inspector value is: " + JSON.stringify(obj)); + console.info("[dialogProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); + + expect(obj.$type).assertEqual('dialog') + expect(obj.$attrs.id).assertEqual('classProp') + expect(obj.$attrs.className).assertEqual('classProp') + done(); + }) + + /** + * @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100 + * @tc.name testdialogClassPropNone + * @tc.desc ACE + */ + it('testdialogClassPropNone', 0, async function (done) { + console.info('testdialogClassPropNone START'); + console.info("[dialogProps] get globalThis.value is: " + JSON.stringify(globalThis.value)); + + let obj = JSON.parse(globalThis.value.classPropNone); + console.info("[dialogProps] get inspector value is: " + JSON.stringify(obj)); + console.info("[dialogProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); + + expect(obj.$type).assertEqual('dialog') + expect(obj.$attrs.id).assertEqual('classPropNone') + expect(obj.$attrs.className).assertEqual(undefined) + console.info("[dialogProps] get className value is: " + JSON.stringify(obj.$attrs.className)); + done(); + }) + + /** + * @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100 + * @tc.name testdialogRefProp + * @tc.desc ACE + */ + it('testdialogRefProp', 0, async function (done) { + console.info('testdialogRefProp START'); + console.info("[dialogProps] get globalThis.value is: " + JSON.stringify(globalThis.value)); + + let obj = JSON.parse(globalThis.value.refProp); + console.info("[dialogProps] get inspector value is: " + JSON.stringify(obj)); + console.info("[dialogProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); + + expect(obj.$type).assertEqual('dialog') + expect(obj.$attrs.id).assertEqual('refProp') + expect(obj.$attrs.ref).assertEqual('refProp') + done(); + }); + + /** + * @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100 + * @tc.name testdialogRefPropNone + * @tc.desc ACE + */ + it('testdialogRefPropNone', 0, async function (done) { + console.info('testdialogRefPropNone START'); + console.info("[dialogProps] get globalThis.value is: " + JSON.stringify(globalThis.value)); + + let obj = JSON.parse(globalThis.value.refPropNone); + console.info("[dialogProps] get inspector value is: " + JSON.stringify(obj)); + console.info("[dialogProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); + + expect(obj.$type).assertEqual('dialog') + expect(obj.$attrs.id).assertEqual('refPropNone') + expect(obj.$attrs.ref).assertEqual(undefined) + console.info("[dialogProps] get ref value is: " + JSON.stringify(obj.$attrs.ref)); + done(); + }); + + /** + * @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100 + * @tc.name testdialogDisabledPropTrue + * @tc.desc ACE + */ + it('testdialogDisabledPropTrue', 0, async function (done) { + console.info('testdialogDisabledPropTrue START'); + console.info("[dialogProps] get globalThis.value is: " + JSON.stringify(globalThis.value)); + + let obj = JSON.parse(globalThis.value.disabledPropTrue); + console.info("[dialogProps] get inspector value is: " + JSON.stringify(obj)); + console.info("[dialogProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); + + expect(obj.$type).assertEqual('dialog') + expect(obj.$attrs.id).assertEqual('disabledPropTrue') + expect(obj.$attrs.disabled).assertEqual('true') + done(); + }); + + /** + * @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100 + * @tc.name testdialogDisabledPropFalse + * @tc.desc ACE + */ + it('testdialogDisabledPropFalse', 0, async function (done) { + console.info('testdialogDisabledPropFalse START'); + console.info("[dialogProps] get globalThis.value is: " + JSON.stringify(globalThis.value)); + + let obj = JSON.parse(globalThis.value.disabledPropFalse); + console.info("[dialogProps] get inspector value is: " + JSON.stringify(obj)); + console.info("[dialogProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); + + expect(obj.$type).assertEqual('dialog') + expect(obj.$attrs.id).assertEqual('disabledPropFalse') + expect(obj.$attrs.disabled).assertEqual('false') + done(); + }); + + /** + * @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100 + * @tc.name testdialogDisabledPropNone + * @tc.desc ACE + */ + it('testdialogDisabledPropNone', 0, async function (done) { + console.info('testdialogDisabledPropNone START'); + console.info("[dialogProps] get globalThis.value is: " + JSON.stringify(globalThis.value)); + + let obj = JSON.parse(globalThis.value.disabledPropNone); + console.info("[dialogProps] get inspector value is: " + JSON.stringify(obj)); + console.info("[dialogProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); + + expect(obj.$type).assertEqual('dialog') + expect(obj.$attrs.id).assertEqual('disabledPropNone') + expect(obj.$attrs.disabled).assertEqual('false') + done(); + }); + + /** + * @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100 + * @tc.name testdialogFocusablePropTrue + * @tc.desc ACE + */ + it('testdialogFocusablePropTrue', 0, async function (done) { + console.info('testdialogFocusablePropTrue START'); + console.info("[dialogProps] get globalThis.value is: " + JSON.stringify(globalThis.value)); + + let obj = JSON.parse(globalThis.value.focusablePropTrue); + console.info("[dialogProps] get inspector value is: " + JSON.stringify(obj)); + console.info("[dialogProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); + + expect(obj.$type).assertEqual('dialog') + expect(obj.$attrs.id).assertEqual('focusablePropTrue') + expect(obj.$attrs.focusable).assertEqual('true') + done(); + }); + + /** + * @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100 + * @tc.name testdialogFocusablePropFalse + * @tc.desc ACE + */ + it('testdialogFocusablePropFalse', 0, async function (done) { + console.info('testdialogFocusablePropFalse START'); + console.info("[dialogProps] get globalThis.value is: " + JSON.stringify(globalThis.value)); + + let obj = JSON.parse(globalThis.value.focusablePropFalse); + console.info("[dialogProps] get inspector value is: " + JSON.stringify(obj)); + console.info("[dialogProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); + + expect(obj.$type).assertEqual('dialog') + expect(obj.$attrs.id).assertEqual('focusablePropFalse') + expect(obj.$attrs.focusable).assertEqual('false') + done(); + }); + + /** + * @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100 + * @tc.name testdialogFocusablePropNone + * @tc.desc ACE + */ + it('testdialogFocusablePropNone', 0, async function (done) { + console.info('testdialogFocusablePropNone START'); + console.info("[dialogProps] get globalThis.value is: " + JSON.stringify(globalThis.value)); + + let obj = JSON.parse(globalThis.value.focusablePropNone); + console.info("[dialogProps] get inspector value is: " + JSON.stringify(obj)); + console.info("[dialogProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); + + expect(obj.$type).assertEqual('dialog') + expect(obj.$attrs.id).assertEqual('focusablePropNone') + expect(obj.$attrs.focusable).assertEqual('false') + done(); + }); + + /** + * @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100 + * @tc.name testdialogDataProp + * @tc.desc ACE + */ + it('testdialogDataProp', 0, async function (done) { + console.info('testdialogDataProp START'); + console.info("[dialogProps] get globalThis.value is: " + JSON.stringify(globalThis.value)); + + let obj = JSON.parse(globalThis.value.dataProp); + console.info("[dialogProps] get inspector value is: " + JSON.stringify(obj)); + console.info("[dialogProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); + + expect(obj.$type).assertEqual('dialog') + expect(obj.$attrs.id).assertEqual('dataProp') + expect(obj.$attrs.datadialog).assertEqual(undefined); + console.info("[dialogProps] get datadialog value is: " + JSON.stringify(obj.$attrs.datadialog)); + done(); + }); + + /** + * @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100 + * @tc.name testdialogDataPropNone + * @tc.desc ACE + */ + it('testdialogDataPropNone', 0, async function (done) { + console.info('testdialogDataPropNone START'); + console.info("[dialogProps] get globalThis.value is: " + JSON.stringify(globalThis.value)); + + let obj = JSON.parse(globalThis.value.dataPropNone); + console.info("[dialogProps] get inspector value is: " + JSON.stringify(obj)); + console.info("[dialogProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); + + expect(obj.$type).assertEqual('dialog') + expect(obj.$attrs.id).assertEqual('dataPropNone') + expect(obj.$attrs.datadialog).assertEqual(undefined) + console.info("[dialogProps] get datadialog value is: " + JSON.stringify(obj.$attrs.datadialog)); + done(); + }); + + /** + * @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100 + * @tc.name testdialogClickEffectPropSmall + * @tc.desc ACE + */ + it('testdialogClickEffectPropSmall', 0, async function (done) { + console.info('testdialogClickEffectPropSmall START'); + console.info("[dialogProps] get globalThis.value is: " + JSON.stringify(globalThis.value)); + + let obj = JSON.parse(globalThis.value.clickEffectPropSmall); + console.info("[dialogProps] get inspector value is: " + JSON.stringify(obj)); + console.info("[dialogProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); + + expect(obj.$type).assertEqual('dialog') + expect(obj.$attrs.id).assertEqual('clickEffectPropSmall') + expect(obj.$attrs.clickEffect).assertEqual('spring-small') + done(); + }); + + /** + * @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100 + * @tc.name testdialogClickEffectPropMedium + * @tc.desc ACE + */ + it('testdialogClickEffectPropMedium', 0, async function (done) { + console.info('testdialogClickEffectPropMedium START'); + console.info("[dialogProps] get globalThis.value is: " + JSON.stringify(globalThis.value)); + + let obj = JSON.parse(globalThis.value.clickEffectPropMedium); + console.info("[dialogProps] get inspector value is: " + JSON.stringify(obj)); + console.info("[dialogProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); + + expect(obj.$type).assertEqual('dialog') + expect(obj.$attrs.id).assertEqual('clickEffectPropMedium') + expect(obj.$attrs.clickEffect).assertEqual('spring-medium') + done(); + }); + + /** + * @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100 + * @tc.name testdialogClickEffectPropLarge + * @tc.desc ACE + */ + it('testdialogClickEffectPropLarge', 0, async function (done) { + console.info('testdialogClickEffectPropLarge START'); + console.info("[dialogProps] get globalThis.value is: " + JSON.stringify(globalThis.value)); + + let obj = JSON.parse(globalThis.value.clickEffectPropLarge); + console.info("[dialogProps] get inspector value is: " + JSON.stringify(obj)); + console.info("[dialogProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); + + expect(obj.$type).assertEqual('dialog') + expect(obj.$attrs.id).assertEqual('clickEffectPropLarge') + expect(obj.$attrs.clickEffect).assertEqual('spring-large') + done(); + }); + + /** + * @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100 + * @tc.name testdialogClickEffectPropNone + * @tc.desc ACE + */ + it('testdialogClickEffectPropNone', 0, async function (done) { + console.info('testdialogClickEffectPropNone START'); + console.info("[dialogProps] get globalThis.value is: " + JSON.stringify(globalThis.value)); + + let obj = JSON.parse(globalThis.value.clickEffectPropNone); + console.info("[dialogProps] get inspector value is: " + JSON.stringify(obj)); + console.info("[dialogProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); + + expect(obj.$type).assertEqual('dialog') + expect(obj.$attrs.id).assertEqual('clickEffectPropNone') + expect(obj.$attrs.clickEffect).assertEqual(undefined) + console.info("[dialogProps] get clickEffect value is: " + JSON.stringify(obj.$attrs.clickEffect)); + done(); + }); + + /** + * @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100 + * @tc.name testdialogDirPropRtl + * @tc.desc ACE + */ + it('testdialogDirPropRtl', 0, async function (done) { + console.info('testdialogDirPropRtl START'); + console.info("[dialogProps] get globalThis.value is: " + JSON.stringify(globalThis.value)); + + let obj = JSON.parse(globalThis.value.dirPropRtl); + console.info("[dialogProps] get inspector value is: " + JSON.stringify(obj)); + console.info("[dialogProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); + + expect(obj.$type).assertEqual('dialog') + expect(obj.$attrs.id).assertEqual('dirPropRtl') + expect(obj.$attrs.dir).assertEqual('rtl') + done(); + }); + + /** + * @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100 + * @tc.name testdialogDirPropLtr + * @tc.desc ACE + */ + it('testdialogDirPropLtr', 0, async function (done) { + console.info('testdialogDirPropLtr START'); + console.info("[dialogProps] get globalThis.value is: " + JSON.stringify(globalThis.value)); + + let obj = JSON.parse(globalThis.value.dirPropLtr); + console.info("[dialogProps] get inspector value is: " + JSON.stringify(obj)); + console.info("[dialogProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); + + expect(obj.$type).assertEqual('dialog') + expect(obj.$attrs.id).assertEqual('dirPropLtr') + expect(obj.$attrs.dir).assertEqual('ltr') + done(); + }); + + /** + * @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100 + * @tc.name testdialogDirPropAuto + * @tc.desc ACE + */ + it('testdialogDirPropAuto', 0, async function (done) { + console.info('testdialogDirPropAuto START'); + console.info("[dialogProps] get globalThis.value is: " + JSON.stringify(globalThis.value)); + + let obj = JSON.parse(globalThis.value.dirPropAuto); + console.info("[dialogProps] get inspector value is: " + JSON.stringify(obj)); + console.info("[dialogProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); + + expect(obj.$type).assertEqual('dialog') + expect(obj.$attrs.id).assertEqual('dirPropAuto') + expect(obj.$attrs.dir).assertEqual('auto') + done(); + }); + + /** + * @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100 + * @tc.name testdialogDirPropNone + * @tc.desc ACE + */ + it('testdialogDirPropNone', 0, async function (done) { + console.info('testdialogDirPropNone START'); + console.info("[dialogProps] get globalThis.value is: " + JSON.stringify(globalThis.value)); + + let obj = JSON.parse(globalThis.value.dirPropNone); + console.info("[dialogProps] get inspector value is: " + JSON.stringify(obj)); + console.info("[dialogProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); + + expect(obj.$type).assertEqual('dialog') + expect(obj.$attrs.id).assertEqual('dirPropNone') + expect(obj.$attrs.dir).assertEqual('auto') + done(); + }); + + /** + * @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100 + * @tc.name testdialogForPropNull + * @tc.desc ACE + */ + it('testdialogForPropNull', 0, async function (done) { + console.info('testdialogForPropNull START'); + console.info("[dialogProps] get globalThis.value is: " + JSON.stringify(globalThis.value)); + + let obj = JSON.parse(globalThis.value.forPropNull); + console.info("[dialogProps] get inspector value is: " + JSON.stringify(obj)); + console.info("[dialogProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); + + expect(obj.$type).assertEqual('dialog') + expect(obj.$attrs.id).assertEqual('forPropNull') + expect(obj.$attrs.for).assertEqual(undefined) + console.info("[dialogProps] get for value is: " + JSON.stringify(obj.$attrs.for)); + done(); + }); + + /** + * @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100 + * @tc.name testdialogForPropOne + * @tc.desc ACE + */ + it('testdialogForPropOne', 0, async function (done) { + console.info('testdialogForPropOne START'); + console.info("[dialogProps] get globalThis.value is: " + JSON.stringify(globalThis.value)); + + let obj = JSON.parse(globalThis.value.forPropOne); + console.info("[dialogProps] get inspector value is: " + JSON.stringify(obj)); + console.info("[dialogProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); + + expect(obj.$type).assertEqual('dialog') + expect(obj.$attrs.id).assertEqual('forPropOne') + expect(obj.$attrs.for).assertEqual(undefined) + console.info("[dialogProps] get for value is: " + JSON.stringify(obj.$attrs.for)); + done(); + }); + + /** + * @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100 + * @tc.name testdialogForPropThree + * @tc.desc ACE + */ + it('testdialogForPropThree', 0, async function (done) { + console.info('testdialogForPropThree START'); + console.info("[dialogProps] get globalThis.value is: " + JSON.stringify(globalThis.value)); + + let obj = JSON.parse(globalThis.value.forPropThree); + console.info("[dialogProps] get inspector value is: " + JSON.stringify(obj)); + console.info("[dialogProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); + + expect(obj.$type).assertEqual('dialog') + expect(obj.$attrs.id).assertEqual('forPropThree') + expect(obj.$attrs.for).assertEqual(undefined) + console.info("[dialogProps] get for value is: " + JSON.stringify(obj.$attrs.for)); + done(); + }); + + /** + * @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100 + * @tc.name testdialogIfPropTrue + * @tc.desc ACE + */ + it('testdialogIfPropTrue', 0, async function (done) { + console.info('testdialogIfPropTrue START'); + console.info("[dialogProps] get globalThis.value is: " + JSON.stringify(globalThis.value)); + + let obj = JSON.parse(globalThis.value.ifPropTrue); + console.info("[dialogProps] get inspector value is: " + JSON.stringify(obj)); + console.info("[dialogProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); + + expect(obj.$type).assertEqual('dialog') + expect(obj.$attrs.id).assertEqual('ifPropTrue') + expect(obj.$attrs.if).assertEqual(undefined) + console.info("[dialogProps] get for value is: " + JSON.stringify(obj.$attrs.if)); + done(); + }); + + /** + * @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100 + * @tc.name testdialogShowPropTrue + * @tc.desc ACE + */ + it('testdialogShowPropTrue', 0, async function (done) { + console.info('testdialogShowPropTrue START'); + console.info("[dialogProps] get globalThis.value is: " + JSON.stringify(globalThis.value)); + + let obj = JSON.parse(globalThis.value.showPropTrue); + console.info("[dialogProps] get inspector value is: " + JSON.stringify(obj)); + console.info("[dialogProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); + + expect(obj.$type).assertEqual('dialog') + expect(obj.$attrs.id).assertEqual('showPropTrue') + expect(obj.$attrs.show).assertEqual('true') + console.info("[dialogProps] get show value is: " + JSON.stringify(obj.$attrs.show)); + done(); + }); + + /** + * @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100 + * @tc.name testdialogShowPropFalse + * @tc.desc ACE + */ + it('testdialogShowPropFalse', 0, async function (done) { + console.info('testdialogShowPropFalse START'); + console.info("[dialogProps] get globalThis.value is: " + JSON.stringify(globalThis.value)); + + let obj = JSON.parse(globalThis.value.showPropFalse); + console.info("[dialogProps] get inspector value is: " + JSON.stringify(obj)); + console.info("[dialogProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); + + expect(obj.$type).assertEqual('dialog') + expect(obj.$attrs.id).assertEqual('showPropFalse') + expect(obj.$attrs.show).assertEqual('false') + console.info("[dialogProps] get show value is: " + JSON.stringify(obj.$attrs.show)); + done(); + }); + + /** + * @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100 + * @tc.name testdialogShowPropNone + * @tc.desc ACE + */ + it('testdialogShowPropNone', 0, async function (done) { + console.info('testdialogShowPropNone START'); + console.info("[dialogProps] get globalThis.value is: " + JSON.stringify(globalThis.value)); + + let obj = JSON.parse(globalThis.value.showPropNone); + console.info("[dialogProps] get inspector value is: " + JSON.stringify(obj)); + console.info("[dialogProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); + + expect(obj.$type).assertEqual('dialog') + expect(obj.$attrs.id).assertEqual('showPropNone') + expect(obj.$attrs.show).assertEqual('true') + console.info("[dialogProps] get show value is: " + JSON.stringify(obj.$attrs.show)); + done(); + }); + + // 特有属性 + + /** + * @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100 + * @tc.name testdialogdragableNone + * @tc.desc ACE + */ + it('testdialogdragableNone', 0, async function (done) { + console.info('testdialogdragableNone START'); + console.info("[dialogProps] get globalThis.value is: " + JSON.stringify(globalThis.value)); + + let obj = JSON.parse(globalThis.value.dragableNone); + console.info("[dialogProps] get inspector value is: " + JSON.stringify(obj)); + console.info("[dialogProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); + + expect(obj.$type).assertEqual('dialog') + expect(obj.$attrs.id).assertEqual('dragableNone') + expect(obj.$attrs.dragable).assertEqual(undefined) + console.info("[dialogProps] get dragable value is: " + JSON.stringify(obj.$attrs.dragable)); + done(); + }); + + /** + * @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100 + * @tc.name testdialogdragableTrue + * @tc.desc ACE + */ + it('testdialogdragableTrue', 0, async function (done) { + console.info('testdialogdragableTrue START'); + console.info("[dialogProps] get globalThis.value is: " + JSON.stringify(globalThis.value)); + + let obj = JSON.parse(globalThis.value.dragableTrue); + console.info("[dialogProps] get inspector value is: " + JSON.stringify(obj)); + console.info("[dialogProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); + + expect(obj.$type).assertEqual('dialog') + expect(obj.$attrs.id).assertEqual('dragableTrue') + expect(obj.$attrs.dragable).assertEqual('true') + console.info("[dialogProps] get dragable value is: " + JSON.stringify(obj.$attrs.dragable)); + done(); + }); + + /** + * @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100 + * @tc.name testdialogdragableFalse + * @tc.desc ACE + */ + it('testdialogdragableFalse', 0, async function (done) { + console.info('testdialogdragableFalse START'); + console.info("[dialogProps] get globalThis.value is: " + JSON.stringify(globalThis.value)); + + let obj = JSON.parse(globalThis.value.dragableFalse); + console.info("[dialogProps] get inspector value is: " + JSON.stringify(obj)); + console.info("[dialogProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); + + expect(obj.$type).assertEqual('dialog') + expect(obj.$attrs.id).assertEqual('dragableFalse') + expect(obj.$attrs.dragable).assertEqual('false') + console.info("[dialogProps] get dragable value is: " + JSON.stringify(obj.$attrs.dragable)); + done(); + }); + }); + \ No newline at end of file diff --git a/ace/ace_standard/src/main/js/default/test/formProps.test.js b/ace/ace_standard/src/main/js/default/test/formProps.test.js new file mode 100644 index 0000000000000000000000000000000000000000..0507e769eda5f446b0dc5e6c5edf599724890727 --- /dev/null +++ b/ace/ace_standard/src/main/js/default/test/formProps.test.js @@ -0,0 +1,627 @@ +/** + * 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 router from '@system.router'; +import {describe, beforeAll,afterAll, it, expect} from 'deccjsunit/index'; + + +describe('formPropsJsTest', function () { + + async function sleep(time) { + return new Promise((resolve, reject) => { + setTimeout(() => { + resolve() + }, time) + }).then(() => { + console.info(`sleep ${time} over...`) + }) + } + + async function backToIndex() { + let backToIndexPromise = new Promise((resolve, reject) => { + setTimeout(() => { + router.back({ + uri: 'pages/index/index' + }) + resolve() + }, 500) + }) + let clearPromise = new Promise((resolve, reject) => { + setTimeout(() => { + router.clear() + resolve() + }, 500); + }) + await backToIndexPromise.then(() => { + return clearPromise + }) + } + + /** + * run before testcase + */ + beforeAll(async function (done) { + console.info('[formPropsJsTest] before each called') + + let result; + let options = { + uri: 'pages/form/prop/index' + } + try { + result = router.push(options) + console.info("push formProps page success " + JSON.stringify(result)); + } catch (err) { + console.error("push formProps page error " + JSON.stringify(result)); + } + await sleep(4000) + done() + }) + + /** + * run after testcase + */ + afterAll(async function () { + console.info('[formPropsJsTest] after each called') + await backToIndex(); + await sleep(1000) + }) + + // 通用属性 + + /** + * @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100 + * @tc.name testformIdProp + * @tc.desc ACE + */ + it('testformIdProp', 0, async function (done) { + console.info('testformIdProp START'); + console.info("[formProps] get globalThis.value is: " + JSON.stringify(globalThis.value)); + + let obj = JSON.parse(globalThis.value.idProp); + console.info("[formProps] get inspector value is: " + JSON.stringify(obj)); + console.info("[formProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); + + expect(obj.$type).assertEqual('form') + expect(obj.$attrs.id).assertEqual('idProp') + done(); + }) + + /** + * @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100 + * @tc.name testformClassProp + * @tc.desc ACE + */ + it('testformClassProp', 0, async function (done) { + console.info('testformClassProp START'); + console.info("[formProps] get globalThis.value is: " + JSON.stringify(globalThis.value)); + + let obj = JSON.parse(globalThis.value.classProp); + console.info("[formProps] get inspector value is: " + JSON.stringify(obj)); + console.info("[formProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); + + expect(obj.$type).assertEqual('form') + expect(obj.$attrs.id).assertEqual('classProp') + expect(obj.$attrs.className).assertEqual('classProp') + done(); + }) + + /** + * @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100 + * @tc.name testformClassPropNone + * @tc.desc ACE + */ + it('testformClassPropNone', 0, async function (done) { + console.info('testformClassPropNone START'); + console.info("[formProps] get globalThis.value is: " + JSON.stringify(globalThis.value)); + + let obj = JSON.parse(globalThis.value.classPropNone); + console.info("[formProps] get inspector value is: " + JSON.stringify(obj)); + console.info("[formProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); + + expect(obj.$type).assertEqual('form') + expect(obj.$attrs.id).assertEqual('classPropNone') + expect(obj.$attrs.className).assertEqual(undefined) + console.info("[formProps] get className value is: " + JSON.stringify(obj.$attrs.className)); + done(); + }) + + /** + * @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100 + * @tc.name testformRefProp + * @tc.desc ACE + */ + it('testformRefProp', 0, async function (done) { + console.info('testformRefProp START'); + console.info("[formProps] get globalThis.value is: " + JSON.stringify(globalThis.value)); + + let obj = JSON.parse(globalThis.value.refProp); + console.info("[formProps] get inspector value is: " + JSON.stringify(obj)); + console.info("[formProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); + + expect(obj.$type).assertEqual('form') + expect(obj.$attrs.id).assertEqual('refProp') + expect(obj.$attrs.ref).assertEqual('refProp') + done(); + }); + + /** + * @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100 + * @tc.name testformRefPropNone + * @tc.desc ACE + */ + it('testformRefPropNone', 0, async function (done) { + console.info('testformRefPropNone START'); + console.info("[formProps] get globalThis.value is: " + JSON.stringify(globalThis.value)); + + let obj = JSON.parse(globalThis.value.refPropNone); + console.info("[formProps] get inspector value is: " + JSON.stringify(obj)); + console.info("[formProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); + + expect(obj.$type).assertEqual('form') + expect(obj.$attrs.id).assertEqual('refPropNone') + expect(obj.$attrs.ref).assertEqual(undefined) + console.info("[formProps] get ref value is: " + JSON.stringify(obj.$attrs.ref)); + done(); + }); + + /** + * @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100 + * @tc.name testformDisabledPropTrue + * @tc.desc ACE + */ + it('testformDisabledPropTrue', 0, async function (done) { + console.info('testformDisabledPropTrue START'); + console.info("[formProps] get globalThis.value is: " + JSON.stringify(globalThis.value)); + + let obj = JSON.parse(globalThis.value.disabledPropTrue); + console.info("[formProps] get inspector value is: " + JSON.stringify(obj)); + console.info("[formProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); + + expect(obj.$type).assertEqual('form') + expect(obj.$attrs.id).assertEqual('disabledPropTrue') + expect(obj.$attrs.disabled).assertEqual('true') + done(); + }); + + /** + * @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100 + * @tc.name testformDisabledPropFalse + * @tc.desc ACE + */ + it('testformDisabledPropFalse', 0, async function (done) { + console.info('testformDisabledPropFalse START'); + console.info("[formProps] get globalThis.value is: " + JSON.stringify(globalThis.value)); + + let obj = JSON.parse(globalThis.value.disabledPropFalse); + console.info("[formProps] get inspector value is: " + JSON.stringify(obj)); + console.info("[formProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); + + expect(obj.$type).assertEqual('form') + expect(obj.$attrs.id).assertEqual('disabledPropFalse') + expect(obj.$attrs.disabled).assertEqual('false') + done(); + }); + + /** + * @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100 + * @tc.name testformDisabledPropNone + * @tc.desc ACE + */ + it('testformDisabledPropNone', 0, async function (done) { + console.info('testformDisabledPropNone START'); + console.info("[formProps] get globalThis.value is: " + JSON.stringify(globalThis.value)); + + let obj = JSON.parse(globalThis.value.disabledPropNone); + console.info("[formProps] get inspector value is: " + JSON.stringify(obj)); + console.info("[formProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); + + expect(obj.$type).assertEqual('form') + expect(obj.$attrs.id).assertEqual('disabledPropNone') + expect(obj.$attrs.disabled).assertEqual('false') + done(); + }); + + /** + * @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100 + * @tc.name testformFocusablePropTrue + * @tc.desc ACE + */ + it('testformFocusablePropTrue', 0, async function (done) { + console.info('testformFocusablePropTrue START'); + console.info("[formProps] get globalThis.value is: " + JSON.stringify(globalThis.value)); + + let obj = JSON.parse(globalThis.value.focusablePropTrue); + console.info("[formProps] get inspector value is: " + JSON.stringify(obj)); + console.info("[formProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); + + expect(obj.$type).assertEqual('form') + expect(obj.$attrs.id).assertEqual('focusablePropTrue') + expect(obj.$attrs.focusable).assertEqual('true') + done(); + }); + + /** + * @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100 + * @tc.name testformFocusablePropFalse + * @tc.desc ACE + */ + it('testformFocusablePropFalse', 0, async function (done) { + console.info('testformFocusablePropFalse START'); + console.info("[formProps] get globalThis.value is: " + JSON.stringify(globalThis.value)); + + let obj = JSON.parse(globalThis.value.focusablePropFalse); + console.info("[formProps] get inspector value is: " + JSON.stringify(obj)); + console.info("[formProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); + + expect(obj.$type).assertEqual('form') + expect(obj.$attrs.id).assertEqual('focusablePropFalse') + expect(obj.$attrs.focusable).assertEqual('false') + done(); + }); + + /** + * @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100 + * @tc.name testformFocusablePropNone + * @tc.desc ACE + */ + it('testformFocusablePropNone', 0, async function (done) { + console.info('testformFocusablePropNone START'); + console.info("[formProps] get globalThis.value is: " + JSON.stringify(globalThis.value)); + + let obj = JSON.parse(globalThis.value.focusablePropNone); + console.info("[formProps] get inspector value is: " + JSON.stringify(obj)); + console.info("[formProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); + + expect(obj.$type).assertEqual('form') + expect(obj.$attrs.id).assertEqual('focusablePropNone') + expect(obj.$attrs.focusable).assertEqual('false') + done(); + }); + + /** + * @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100 + * @tc.name testformDataProp + * @tc.desc ACE + */ + it('testformDataProp', 0, async function (done) { + console.info('testformDataProp START'); + console.info("[formProps] get globalThis.value is: " + JSON.stringify(globalThis.value)); + + let obj = JSON.parse(globalThis.value.dataProp); + console.info("[formProps] get inspector value is: " + JSON.stringify(obj)); + console.info("[formProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); + + expect(obj.$type).assertEqual('form') + expect(obj.$attrs.id).assertEqual('dataProp') + expect(obj.$attrs.dataform).assertEqual(undefined); + console.info("[formProps] get dataform value is: " + JSON.stringify(obj.$attrs.dataform)); + done(); + }); + + /** + * @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100 + * @tc.name testformDataPropNone + * @tc.desc ACE + */ + it('testformDataPropNone', 0, async function (done) { + console.info('testformDataPropNone START'); + console.info("[formProps] get globalThis.value is: " + JSON.stringify(globalThis.value)); + + let obj = JSON.parse(globalThis.value.dataPropNone); + console.info("[formProps] get inspector value is: " + JSON.stringify(obj)); + console.info("[formProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); + + expect(obj.$type).assertEqual('form') + expect(obj.$attrs.id).assertEqual('dataPropNone') + expect(obj.$attrs.dataform).assertEqual(undefined) + console.info("[formProps] get dataform value is: " + JSON.stringify(obj.$attrs.dataform)); + done(); + }); + + /** + * @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100 + * @tc.name testformClickEffectPropSmall + * @tc.desc ACE + */ + it('testformClickEffectPropSmall', 0, async function (done) { + console.info('testformClickEffectPropSmall START'); + console.info("[formProps] get globalThis.value is: " + JSON.stringify(globalThis.value)); + + let obj = JSON.parse(globalThis.value.clickEffectPropSmall); + console.info("[formProps] get inspector value is: " + JSON.stringify(obj)); + console.info("[formProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); + + expect(obj.$type).assertEqual('form') + expect(obj.$attrs.id).assertEqual('clickEffectPropSmall') + expect(obj.$attrs.clickEffect).assertEqual('spring-small') + done(); + }); + + /** + * @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100 + * @tc.name testformClickEffectPropMedium + * @tc.desc ACE + */ + it('testformClickEffectPropMedium', 0, async function (done) { + console.info('testformClickEffectPropMedium START'); + console.info("[formProps] get globalThis.value is: " + JSON.stringify(globalThis.value)); + + let obj = JSON.parse(globalThis.value.clickEffectPropMedium); + console.info("[formProps] get inspector value is: " + JSON.stringify(obj)); + console.info("[formProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); + + expect(obj.$type).assertEqual('form') + expect(obj.$attrs.id).assertEqual('clickEffectPropMedium') + expect(obj.$attrs.clickEffect).assertEqual('spring-medium') + done(); + }); + + /** + * @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100 + * @tc.name testformClickEffectPropLarge + * @tc.desc ACE + */ + it('testformClickEffectPropLarge', 0, async function (done) { + console.info('testformClickEffectPropLarge START'); + console.info("[formProps] get globalThis.value is: " + JSON.stringify(globalThis.value)); + + let obj = JSON.parse(globalThis.value.clickEffectPropLarge); + console.info("[formProps] get inspector value is: " + JSON.stringify(obj)); + console.info("[formProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); + + expect(obj.$type).assertEqual('form') + expect(obj.$attrs.id).assertEqual('clickEffectPropLarge') + expect(obj.$attrs.clickEffect).assertEqual('spring-large') + done(); + }); + + /** + * @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100 + * @tc.name testformClickEffectPropNone + * @tc.desc ACE + */ + it('testformClickEffectPropNone', 0, async function (done) { + console.info('testformClickEffectPropNone START'); + console.info("[formProps] get globalThis.value is: " + JSON.stringify(globalThis.value)); + + let obj = JSON.parse(globalThis.value.clickEffectPropNone); + console.info("[formProps] get inspector value is: " + JSON.stringify(obj)); + console.info("[formProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); + + expect(obj.$type).assertEqual('form') + expect(obj.$attrs.id).assertEqual('clickEffectPropNone') + expect(obj.$attrs.clickEffect).assertEqual(undefined) + console.info("[formProps] get clickEffect value is: " + JSON.stringify(obj.$attrs.clickEffect)); + done(); + }); + + /** + * @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100 + * @tc.name testformDirPropRtl + * @tc.desc ACE + */ + it('testformDirPropRtl', 0, async function (done) { + console.info('testformDirPropRtl START'); + console.info("[formProps] get globalThis.value is: " + JSON.stringify(globalThis.value)); + + let obj = JSON.parse(globalThis.value.dirPropRtl); + console.info("[formProps] get inspector value is: " + JSON.stringify(obj)); + console.info("[formProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); + + expect(obj.$type).assertEqual('form') + expect(obj.$attrs.id).assertEqual('dirPropRtl') + expect(obj.$attrs.dir).assertEqual('rtl') + done(); + }); + + /** + * @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100 + * @tc.name testformDirPropLtr + * @tc.desc ACE + */ + it('testformDirPropLtr', 0, async function (done) { + console.info('testformDirPropLtr START'); + console.info("[formProps] get globalThis.value is: " + JSON.stringify(globalThis.value)); + + let obj = JSON.parse(globalThis.value.dirPropLtr); + console.info("[formProps] get inspector value is: " + JSON.stringify(obj)); + console.info("[formProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); + + expect(obj.$type).assertEqual('form') + expect(obj.$attrs.id).assertEqual('dirPropLtr') + expect(obj.$attrs.dir).assertEqual('ltr') + done(); + }); + + /** + * @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100 + * @tc.name testformDirPropAuto + * @tc.desc ACE + */ + it('testformDirPropAuto', 0, async function (done) { + console.info('testformDirPropAuto START'); + console.info("[formProps] get globalThis.value is: " + JSON.stringify(globalThis.value)); + + let obj = JSON.parse(globalThis.value.dirPropAuto); + console.info("[formProps] get inspector value is: " + JSON.stringify(obj)); + console.info("[formProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); + + expect(obj.$type).assertEqual('form') + expect(obj.$attrs.id).assertEqual('dirPropAuto') + expect(obj.$attrs.dir).assertEqual('auto') + done(); + }); + + /** + * @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100 + * @tc.name testformDirPropNone + * @tc.desc ACE + */ + it('testformDirPropNone', 0, async function (done) { + console.info('testformDirPropNone START'); + console.info("[formProps] get globalThis.value is: " + JSON.stringify(globalThis.value)); + + let obj = JSON.parse(globalThis.value.dirPropNone); + console.info("[formProps] get inspector value is: " + JSON.stringify(obj)); + console.info("[formProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); + + expect(obj.$type).assertEqual('form') + expect(obj.$attrs.id).assertEqual('dirPropNone') + expect(obj.$attrs.dir).assertEqual('auto') + done(); + }); + + /** + * @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100 + * @tc.name testformForPropNull + * @tc.desc ACE + */ + it('testformForPropNull', 0, async function (done) { + console.info('testformForPropNull START'); + console.info("[formProps] get globalThis.value is: " + JSON.stringify(globalThis.value)); + + let obj = JSON.parse(globalThis.value.forPropNull); + console.info("[formProps] get inspector value is: " + JSON.stringify(obj)); + console.info("[formProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); + + expect(obj.$type).assertEqual('form') + expect(obj.$attrs.id).assertEqual('forPropNull') + expect(obj.$attrs.for).assertEqual(undefined) + console.info("[formProps] get for value is: " + JSON.stringify(obj.$attrs.for)); + done(); + }); + + /** + * @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100 + * @tc.name testformForPropOne + * @tc.desc ACE + */ + it('testformForPropOne', 0, async function (done) { + console.info('testformForPropOne START'); + console.info("[formProps] get globalThis.value is: " + JSON.stringify(globalThis.value)); + + let obj = JSON.parse(globalThis.value.forPropOne); + console.info("[formProps] get inspector value is: " + JSON.stringify(obj)); + console.info("[formProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); + + expect(obj.$type).assertEqual('form') + expect(obj.$attrs.id).assertEqual('forPropOne') + expect(obj.$attrs.for).assertEqual(undefined) + console.info("[formProps] get for value is: " + JSON.stringify(obj.$attrs.for)); + done(); + }); + + /** + * @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100 + * @tc.name testformForPropThree + * @tc.desc ACE + */ + it('testformForPropThree', 0, async function (done) { + console.info('testformForPropThree START'); + console.info("[formProps] get globalThis.value is: " + JSON.stringify(globalThis.value)); + + let obj = JSON.parse(globalThis.value.forPropThree); + console.info("[formProps] get inspector value is: " + JSON.stringify(obj)); + console.info("[formProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); + + expect(obj.$type).assertEqual('form') + expect(obj.$attrs.id).assertEqual('forPropThree') + expect(obj.$attrs.for).assertEqual(undefined) + console.info("[formProps] get for value is: " + JSON.stringify(obj.$attrs.for)); + done(); + }); + + /** + * @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100 + * @tc.name testformIfPropTrue + * @tc.desc ACE + */ + it('testformIfPropTrue', 0, async function (done) { + console.info('testformIfPropTrue START'); + console.info("[formProps] get globalThis.value is: " + JSON.stringify(globalThis.value)); + + let obj = JSON.parse(globalThis.value.ifPropTrue); + console.info("[formProps] get inspector value is: " + JSON.stringify(obj)); + console.info("[formProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); + + expect(obj.$type).assertEqual('form') + expect(obj.$attrs.id).assertEqual('ifPropTrue') + expect(obj.$attrs.if).assertEqual(undefined) + console.info("[formProps] get for value is: " + JSON.stringify(obj.$attrs.if)); + done(); + }); + + /** + * @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100 + * @tc.name testformShowPropTrue + * @tc.desc ACE + */ + it('testformShowPropTrue', 0, async function (done) { + console.info('testformShowPropTrue START'); + console.info("[formProps] get globalThis.value is: " + JSON.stringify(globalThis.value)); + + let obj = JSON.parse(globalThis.value.showPropTrue); + console.info("[formProps] get inspector value is: " + JSON.stringify(obj)); + console.info("[formProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); + + expect(obj.$type).assertEqual('form') + expect(obj.$attrs.id).assertEqual('showPropTrue') + expect(obj.$attrs.show).assertEqual('true') + console.info("[formProps] get show value is: " + JSON.stringify(obj.$attrs.show)); + done(); + }); + + /** + * @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100 + * @tc.name testformShowPropFalse + * @tc.desc ACE + */ + it('testformShowPropFalse', 0, async function (done) { + console.info('testformShowPropFalse START'); + console.info("[formProps] get globalThis.value is: " + JSON.stringify(globalThis.value)); + + let obj = JSON.parse(globalThis.value.showPropFalse); + console.info("[formProps] get inspector value is: " + JSON.stringify(obj)); + console.info("[formProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); + + expect(obj.$type).assertEqual('form') + expect(obj.$attrs.id).assertEqual('showPropFalse') + expect(obj.$attrs.show).assertEqual('false') + console.info("[formProps] get show value is: " + JSON.stringify(obj.$attrs.show)); + done(); + }); + + /** + * @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100 + * @tc.name testformShowPropNone + * @tc.desc ACE + */ + it('testformShowPropNone', 0, async function (done) { + console.info('testformShowPropNone START'); + console.info("[formProps] get globalThis.value is: " + JSON.stringify(globalThis.value)); + + let obj = JSON.parse(globalThis.value.showPropNone); + console.info("[formProps] get inspector value is: " + JSON.stringify(obj)); + console.info("[formProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); + + expect(obj.$type).assertEqual('form') + expect(obj.$attrs.id).assertEqual('showPropNone') + expect(obj.$attrs.show).assertEqual('true') + console.info("[formProps] get show value is: " + JSON.stringify(obj.$attrs.show)); + done(); + }); + + // 特有属性 +}); diff --git a/ace/ace_standard/src/main/js/default/test/listItemGroupProps.test.js b/ace/ace_standard/src/main/js/default/test/listItemGroupProps.test.js new file mode 100644 index 0000000000000000000000000000000000000000..40e8fb079baf10a296433f56abcf6362f12c4ee8 --- /dev/null +++ b/ace/ace_standard/src/main/js/default/test/listItemGroupProps.test.js @@ -0,0 +1,668 @@ +/** + * 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 router from '@system.router'; + import {describe, beforeAll,afterAll, it, expect} from 'deccjsunit/index'; + + + describe('listItemGroupPropsJsTest', function () { + + async function sleep(time) { + return new Promise((resolve, reject) => { + setTimeout(() => { + resolve() + }, time) + }).then(() => { + console.info(`sleep ${time} over...`) + }) + } + + async function backToIndex() { + let backToIndexPromise = new Promise((resolve, reject) => { + setTimeout(() => { + router.back({ + uri: 'pages/index/index' + }) + resolve() + }, 500) + }) + let clearPromise = new Promise((resolve, reject) => { + setTimeout(() => { + router.clear() + resolve() + }, 500); + }) + await backToIndexPromise.then(() => { + return clearPromise + }) + } + + /** + * run before testcase + */ + beforeAll(async function (done) { + console.info('[listItemGroupPropsJsTest] before each called') + + let result; + let options = { + uri: 'pages/listItemGroup/prop/index' + } + try { + result = router.push(options) + console.info("push listItemGroupProps page success " + JSON.stringify(result)); + } catch (err) { + console.error("push listItemGroupProps page error " + JSON.stringify(result)); + } + await sleep(4000) + done() + }) + + /** + * run after testcase + */ + afterAll(async function () { + console.info('[listItemGroupPropsJsTest] after each called') + await backToIndex(); + await sleep(1000) + }) + + // 通用属性 + + /** + * @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100 + * @tc.name testlistItemGroupIdProp + * @tc.desc ACE + */ + it('testlistItemGroupIdProp', 0, async function (done) { + console.info('testlistItemGroupIdProp START'); + console.info("[listItemGroupProps] get globalThis.value is: " + JSON.stringify(globalThis.value)); + + let obj = JSON.parse(globalThis.value.idProp); + console.info("[listItemGroupProps] get inspector value is: " + JSON.stringify(obj)); + console.info("[listItemGroupProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); + + expect(obj.$type).assertEqual('listItemGroup') + expect(obj.$attrs.id).assertEqual('idProp') + done(); + }) + + /** + * @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100 + * @tc.name testlistItemGroupClassProp + * @tc.desc ACE + */ + it('testlistItemGroupClassProp', 0, async function (done) { + console.info('testlistItemGroupClassProp START'); + console.info("[listItemGroupProps] get globalThis.value is: " + JSON.stringify(globalThis.value)); + + let obj = JSON.parse(globalThis.value.classProp); + console.info("[listItemGroupProps] get inspector value is: " + JSON.stringify(obj)); + console.info("[listItemGroupProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); + + expect(obj.$type).assertEqual('listItemGroup') + expect(obj.$attrs.id).assertEqual('classProp') + expect(obj.$attrs.className).assertEqual('classProp') + done(); + }) + + /** + * @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100 + * @tc.name testlistItemGroupClassPropNone + * @tc.desc ACE + */ + it('testlistItemGroupClassPropNone', 0, async function (done) { + console.info('testlistItemGroupClassPropNone START'); + console.info("[listItemGroupProps] get globalThis.value is: " + JSON.stringify(globalThis.value)); + + let obj = JSON.parse(globalThis.value.classPropNone); + console.info("[listItemGroupProps] get inspector value is: " + JSON.stringify(obj)); + console.info("[listItemGroupProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); + + expect(obj.$type).assertEqual('listItemGroup') + expect(obj.$attrs.id).assertEqual('classPropNone') + expect(obj.$attrs.className).assertEqual(undefined) + console.info("[listItemGroupProps] get className value is: " + JSON.stringify(obj.$attrs.className)); + done(); + }) + + /** + * @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100 + * @tc.name testlistItemGroupRefProp + * @tc.desc ACE + */ + it('testlistItemGroupRefProp', 0, async function (done) { + console.info('testlistItemGroupRefProp START'); + console.info("[listItemGroupProps] get globalThis.value is: " + JSON.stringify(globalThis.value)); + + let obj = JSON.parse(globalThis.value.refProp); + console.info("[listItemGroupProps] get inspector value is: " + JSON.stringify(obj)); + console.info("[listItemGroupProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); + + expect(obj.$type).assertEqual('listItemGroup') + expect(obj.$attrs.id).assertEqual('refProp') + expect(obj.$attrs.ref).assertEqual('refProp') + done(); + }); + + /** + * @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100 + * @tc.name testlistItemGroupRefPropNone + * @tc.desc ACE + */ + it('testlistItemGroupRefPropNone', 0, async function (done) { + console.info('testlistItemGroupRefPropNone START'); + console.info("[listItemGroupProps] get globalThis.value is: " + JSON.stringify(globalThis.value)); + + let obj = JSON.parse(globalThis.value.refPropNone); + console.info("[listItemGroupProps] get inspector value is: " + JSON.stringify(obj)); + console.info("[listItemGroupProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); + + expect(obj.$type).assertEqual('listItemGroup') + expect(obj.$attrs.id).assertEqual('refPropNone') + expect(obj.$attrs.ref).assertEqual(undefined) + console.info("[listItemGroupProps] get ref value is: " + JSON.stringify(obj.$attrs.ref)); + done(); + }); + + /** + * @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100 + * @tc.name testlistItemGroupDisabledPropTrue + * @tc.desc ACE + */ + it('testlistItemGroupDisabledPropTrue', 0, async function (done) { + console.info('testlistItemGroupDisabledPropTrue START'); + console.info("[listItemGroupProps] get globalThis.value is: " + JSON.stringify(globalThis.value)); + + let obj = JSON.parse(globalThis.value.disabledPropTrue); + console.info("[listItemGroupProps] get inspector value is: " + JSON.stringify(obj)); + console.info("[listItemGroupProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); + + expect(obj.$type).assertEqual('listItemGroup') + expect(obj.$attrs.id).assertEqual('disabledPropTrue') + expect(obj.$attrs.disabled).assertEqual('true') + done(); + }); + + /** + * @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100 + * @tc.name testlistItemGroupDisabledPropFalse + * @tc.desc ACE + */ + it('testlistItemGroupDisabledPropFalse', 0, async function (done) { + console.info('testlistItemGroupDisabledPropFalse START'); + console.info("[listItemGroupProps] get globalThis.value is: " + JSON.stringify(globalThis.value)); + + let obj = JSON.parse(globalThis.value.disabledPropFalse); + console.info("[listItemGroupProps] get inspector value is: " + JSON.stringify(obj)); + console.info("[listItemGroupProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); + + expect(obj.$type).assertEqual('listItemGroup') + expect(obj.$attrs.id).assertEqual('disabledPropFalse') + expect(obj.$attrs.disabled).assertEqual('false') + done(); + }); + + /** + * @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100 + * @tc.name testlistItemGroupDisabledPropNone + * @tc.desc ACE + */ + it('testlistItemGroupDisabledPropNone', 0, async function (done) { + console.info('testlistItemGroupDisabledPropNone START'); + console.info("[listItemGroupProps] get globalThis.value is: " + JSON.stringify(globalThis.value)); + + let obj = JSON.parse(globalThis.value.disabledPropNone); + console.info("[listItemGroupProps] get inspector value is: " + JSON.stringify(obj)); + console.info("[listItemGroupProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); + + expect(obj.$type).assertEqual('listItemGroup') + expect(obj.$attrs.id).assertEqual('disabledPropNone') + expect(obj.$attrs.disabled).assertEqual('false') + done(); + }); + + /** + * @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100 + * @tc.name testlistItemGroupFocusablePropTrue + * @tc.desc ACE + */ + it('testlistItemGroupFocusablePropTrue', 0, async function (done) { + console.info('testlistItemGroupFocusablePropTrue START'); + console.info("[listItemGroupProps] get globalThis.value is: " + JSON.stringify(globalThis.value)); + + let obj = JSON.parse(globalThis.value.focusablePropTrue); + console.info("[listItemGroupProps] get inspector value is: " + JSON.stringify(obj)); + console.info("[listItemGroupProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); + + expect(obj.$type).assertEqual('listItemGroup') + expect(obj.$attrs.id).assertEqual('focusablePropTrue') + expect(obj.$attrs.focusable).assertEqual('true') + done(); + }); + + /** + * @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100 + * @tc.name testlistItemGroupFocusablePropFalse + * @tc.desc ACE + */ + it('testlistItemGroupFocusablePropFalse', 0, async function (done) { + console.info('testlistItemGroupFocusablePropFalse START'); + console.info("[listItemGroupProps] get globalThis.value is: " + JSON.stringify(globalThis.value)); + + let obj = JSON.parse(globalThis.value.focusablePropFalse); + console.info("[listItemGroupProps] get inspector value is: " + JSON.stringify(obj)); + console.info("[listItemGroupProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); + + expect(obj.$type).assertEqual('listItemGroup') + expect(obj.$attrs.id).assertEqual('focusablePropFalse') + expect(obj.$attrs.focusable).assertEqual('false') + done(); + }); + + /** + * @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100 + * @tc.name testlistItemGroupFocusablePropNone + * @tc.desc ACE + */ + it('testlistItemGroupFocusablePropNone', 0, async function (done) { + console.info('testlistItemGroupFocusablePropNone START'); + console.info("[listItemGroupProps] get globalThis.value is: " + JSON.stringify(globalThis.value)); + + let obj = JSON.parse(globalThis.value.focusablePropNone); + console.info("[listItemGroupProps] get inspector value is: " + JSON.stringify(obj)); + console.info("[listItemGroupProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); + + expect(obj.$type).assertEqual('listItemGroup') + expect(obj.$attrs.id).assertEqual('focusablePropNone') + expect(obj.$attrs.focusable).assertEqual('false') + done(); + }); + + /** + * @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100 + * @tc.name testlistItemGroupDataProp + * @tc.desc ACE + */ + it('testlistItemGroupDataProp', 0, async function (done) { + console.info('testlistItemGroupDataProp START'); + console.info("[listItemGroupProps] get globalThis.value is: " + JSON.stringify(globalThis.value)); + + let obj = JSON.parse(globalThis.value.dataProp); + console.info("[listItemGroupProps] get inspector value is: " + JSON.stringify(obj)); + console.info("[listItemGroupProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); + + expect(obj.$type).assertEqual('listItemGroup') + expect(obj.$attrs.id).assertEqual('dataProp') + expect(obj.$attrs.datalistItemGroup).assertEqual(undefined); + console.info("[listItemGroupProps] get datalistItemGroup value is: " + JSON.stringify(obj.$attrs.datalistItemGroup)); + done(); + }); + + /** + * @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100 + * @tc.name testlistItemGroupDataPropNone + * @tc.desc ACE + */ + it('testlistItemGroupDataPropNone', 0, async function (done) { + console.info('testlistItemGroupDataPropNone START'); + console.info("[listItemGroupProps] get globalThis.value is: " + JSON.stringify(globalThis.value)); + + let obj = JSON.parse(globalThis.value.dataPropNone); + console.info("[listItemGroupProps] get inspector value is: " + JSON.stringify(obj)); + console.info("[listItemGroupProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); + + expect(obj.$type).assertEqual('listItemGroup') + expect(obj.$attrs.id).assertEqual('dataPropNone') + expect(obj.$attrs.datalistItemGroup).assertEqual(undefined) + console.info("[listItemGroupProps] get datalistItemGroup value is: " + JSON.stringify(obj.$attrs.datalistItemGroup)); + done(); + }); + + /** + * @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100 + * @tc.name testlistItemGroupClickEffectPropSmall + * @tc.desc ACE + */ + it('testlistItemGroupClickEffectPropSmall', 0, async function (done) { + console.info('testlistItemGroupClickEffectPropSmall START'); + console.info("[listItemGroupProps] get globalThis.value is: " + JSON.stringify(globalThis.value)); + + let obj = JSON.parse(globalThis.value.clickEffectPropSmall); + console.info("[listItemGroupProps] get inspector value is: " + JSON.stringify(obj)); + console.info("[listItemGroupProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); + + expect(obj.$type).assertEqual('listItemGroup') + expect(obj.$attrs.id).assertEqual('clickEffectPropSmall') + expect(obj.$attrs.clickEffect).assertEqual('spring-small') + done(); + }); + + /** + * @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100 + * @tc.name testlistItemGroupClickEffectPropMedium + * @tc.desc ACE + */ + it('testlistItemGroupClickEffectPropMedium', 0, async function (done) { + console.info('testlistItemGroupClickEffectPropMedium START'); + console.info("[listItemGroupProps] get globalThis.value is: " + JSON.stringify(globalThis.value)); + + let obj = JSON.parse(globalThis.value.clickEffectPropMedium); + console.info("[listItemGroupProps] get inspector value is: " + JSON.stringify(obj)); + console.info("[listItemGroupProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); + + expect(obj.$type).assertEqual('listItemGroup') + expect(obj.$attrs.id).assertEqual('clickEffectPropMedium') + expect(obj.$attrs.clickEffect).assertEqual('spring-medium') + done(); + }); + + /** + * @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100 + * @tc.name testlistItemGroupClickEffectPropLarge + * @tc.desc ACE + */ + it('testlistItemGroupClickEffectPropLarge', 0, async function (done) { + console.info('testlistItemGroupClickEffectPropLarge START'); + console.info("[listItemGroupProps] get globalThis.value is: " + JSON.stringify(globalThis.value)); + + let obj = JSON.parse(globalThis.value.clickEffectPropLarge); + console.info("[listItemGroupProps] get inspector value is: " + JSON.stringify(obj)); + console.info("[listItemGroupProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); + + expect(obj.$type).assertEqual('listItemGroup') + expect(obj.$attrs.id).assertEqual('clickEffectPropLarge') + expect(obj.$attrs.clickEffect).assertEqual('spring-large') + done(); + }); + + /** + * @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100 + * @tc.name testlistItemGroupClickEffectPropNone + * @tc.desc ACE + */ + it('testlistItemGroupClickEffectPropNone', 0, async function (done) { + console.info('testlistItemGroupClickEffectPropNone START'); + console.info("[listItemGroupProps] get globalThis.value is: " + JSON.stringify(globalThis.value)); + + let obj = JSON.parse(globalThis.value.clickEffectPropNone); + console.info("[listItemGroupProps] get inspector value is: " + JSON.stringify(obj)); + console.info("[listItemGroupProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); + + expect(obj.$type).assertEqual('listItemGroup') + expect(obj.$attrs.id).assertEqual('clickEffectPropNone') + expect(obj.$attrs.clickEffect).assertEqual(undefined) + console.info("[listItemGroupProps] get clickEffect value is: " + JSON.stringify(obj.$attrs.clickEffect)); + done(); + }); + + /** + * @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100 + * @tc.name testlistItemGroupDirPropRtl + * @tc.desc ACE + */ + it('testlistItemGroupDirPropRtl', 0, async function (done) { + console.info('testlistItemGroupDirPropRtl START'); + console.info("[listItemGroupProps] get globalThis.value is: " + JSON.stringify(globalThis.value)); + + let obj = JSON.parse(globalThis.value.dirPropRtl); + console.info("[listItemGroupProps] get inspector value is: " + JSON.stringify(obj)); + console.info("[listItemGroupProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); + + expect(obj.$type).assertEqual('listItemGroup') + expect(obj.$attrs.id).assertEqual('dirPropRtl') + expect(obj.$attrs.dir).assertEqual('rtl') + done(); + }); + + /** + * @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100 + * @tc.name testlistItemGroupDirPropLtr + * @tc.desc ACE + */ + it('testlistItemGroupDirPropLtr', 0, async function (done) { + console.info('testlistItemGroupDirPropLtr START'); + console.info("[listItemGroupProps] get globalThis.value is: " + JSON.stringify(globalThis.value)); + + let obj = JSON.parse(globalThis.value.dirPropLtr); + console.info("[listItemGroupProps] get inspector value is: " + JSON.stringify(obj)); + console.info("[listItemGroupProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); + + expect(obj.$type).assertEqual('listItemGroup') + expect(obj.$attrs.id).assertEqual('dirPropLtr') + expect(obj.$attrs.dir).assertEqual('ltr') + done(); + }); + + /** + * @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100 + * @tc.name testlistItemGroupDirPropAuto + * @tc.desc ACE + */ + it('testlistItemGroupDirPropAuto', 0, async function (done) { + console.info('testlistItemGroupDirPropAuto START'); + console.info("[listItemGroupProps] get globalThis.value is: " + JSON.stringify(globalThis.value)); + + let obj = JSON.parse(globalThis.value.dirPropAuto); + console.info("[listItemGroupProps] get inspector value is: " + JSON.stringify(obj)); + console.info("[listItemGroupProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); + + expect(obj.$type).assertEqual('listItemGroup') + expect(obj.$attrs.id).assertEqual('dirPropAuto') + expect(obj.$attrs.dir).assertEqual('auto') + done(); + }); + + /** + * @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100 + * @tc.name testlistItemGroupDirPropNone + * @tc.desc ACE + */ + it('testlistItemGroupDirPropNone', 0, async function (done) { + console.info('testlistItemGroupDirPropNone START'); + console.info("[listItemGroupProps] get globalThis.value is: " + JSON.stringify(globalThis.value)); + + let obj = JSON.parse(globalThis.value.dirPropNone); + console.info("[listItemGroupProps] get inspector value is: " + JSON.stringify(obj)); + console.info("[listItemGroupProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); + + expect(obj.$type).assertEqual('listItemGroup') + expect(obj.$attrs.id).assertEqual('dirPropNone') + expect(obj.$attrs.dir).assertEqual('auto') + done(); + }); + + /** + * @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100 + * @tc.name testlistItemGroupForPropNull + * @tc.desc ACE + */ + it('testlistItemGroupForPropNull', 0, async function (done) { + console.info('testlistItemGroupForPropNull START'); + console.info("[listItemGroupProps] get globalThis.value is: " + JSON.stringify(globalThis.value)); + + let obj = JSON.parse(globalThis.value.forPropNull); + console.info("[listItemGroupProps] get inspector value is: " + JSON.stringify(obj)); + console.info("[listItemGroupProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); + + expect(obj.$type).assertEqual('listItemGroup') + expect(obj.$attrs.id).assertEqual('forPropNull') + expect(obj.$attrs.for).assertEqual(undefined) + console.info("[listItemGroupProps] get for value is: " + JSON.stringify(obj.$attrs.for)); + done(); + }); + + /** + * @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100 + * @tc.name testlistItemGroupForPropOne + * @tc.desc ACE + */ + it('testlistItemGroupForPropOne', 0, async function (done) { + console.info('testlistItemGroupForPropOne START'); + console.info("[listItemGroupProps] get globalThis.value is: " + JSON.stringify(globalThis.value)); + + let obj = JSON.parse(globalThis.value.forPropOne); + console.info("[listItemGroupProps] get inspector value is: " + JSON.stringify(obj)); + console.info("[listItemGroupProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); + + expect(obj.$type).assertEqual('listItemGroup') + expect(obj.$attrs.id).assertEqual('forPropOne') + expect(obj.$attrs.for).assertEqual(undefined) + console.info("[listItemGroupProps] get for value is: " + JSON.stringify(obj.$attrs.for)); + done(); + }); + + /** + * @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100 + * @tc.name testlistItemGroupForPropThree + * @tc.desc ACE + */ + it('testlistItemGroupForPropThree', 0, async function (done) { + console.info('testlistItemGroupForPropThree START'); + console.info("[listItemGroupProps] get globalThis.value is: " + JSON.stringify(globalThis.value)); + + let obj = JSON.parse(globalThis.value.forPropThree); + console.info("[listItemGroupProps] get inspector value is: " + JSON.stringify(obj)); + console.info("[listItemGroupProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); + + expect(obj.$type).assertEqual('listItemGroup') + expect(obj.$attrs.id).assertEqual('forPropThree') + expect(obj.$attrs.for).assertEqual(undefined) + console.info("[listItemGroupProps] get for value is: " + JSON.stringify(obj.$attrs.for)); + done(); + }); + + /** + * @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100 + * @tc.name testlistItemGroupIfPropTrue + * @tc.desc ACE + */ + it('testlistItemGroupIfPropTrue', 0, async function (done) { + console.info('testlistItemGroupIfPropTrue START'); + console.info("[listItemGroupProps] get globalThis.value is: " + JSON.stringify(globalThis.value)); + + let obj = JSON.parse(globalThis.value.ifPropTrue); + console.info("[listItemGroupProps] get inspector value is: " + JSON.stringify(obj)); + console.info("[listItemGroupProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); + + expect(obj.$type).assertEqual('listItemGroup') + expect(obj.$attrs.id).assertEqual('ifPropTrue') + expect(obj.$attrs.if).assertEqual(undefined) + console.info("[listItemGroupProps] get for value is: " + JSON.stringify(obj.$attrs.if)); + done(); + }); + + /** + * @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100 + * @tc.name testlistItemGroupShowPropTrue + * @tc.desc ACE + */ + it('testlistItemGroupShowPropTrue', 0, async function (done) { + console.info('testlistItemGroupShowPropTrue START'); + console.info("[listItemGroupProps] get globalThis.value is: " + JSON.stringify(globalThis.value)); + + let obj = JSON.parse(globalThis.value.showPropTrue); + console.info("[listItemGroupProps] get inspector value is: " + JSON.stringify(obj)); + console.info("[listItemGroupProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); + + expect(obj.$type).assertEqual('listItemGroup') + expect(obj.$attrs.id).assertEqual('showPropTrue') + expect(obj.$attrs.show).assertEqual('true') + console.info("[listItemGroupProps] get show value is: " + JSON.stringify(obj.$attrs.show)); + done(); + }); + + /** + * @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100 + * @tc.name testlistItemGroupShowPropFalse + * @tc.desc ACE + */ + it('testlistItemGroupShowPropFalse', 0, async function (done) { + console.info('testlistItemGroupShowPropFalse START'); + console.info("[listItemGroupProps] get globalThis.value is: " + JSON.stringify(globalThis.value)); + + let obj = JSON.parse(globalThis.value.showPropFalse); + console.info("[listItemGroupProps] get inspector value is: " + JSON.stringify(obj)); + console.info("[listItemGroupProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); + + expect(obj.$type).assertEqual('listItemGroup') + expect(obj.$attrs.id).assertEqual('showPropFalse') + expect(obj.$attrs.show).assertEqual('false') + console.info("[listItemGroupProps] get show value is: " + JSON.stringify(obj.$attrs.show)); + done(); + }); + + /** + * @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100 + * @tc.name testlistItemGroupShowPropNone + * @tc.desc ACE + */ + it('testlistItemGroupShowPropNone', 0, async function (done) { + console.info('testlistItemGroupShowPropNone START'); + console.info("[listItemGroupProps] get globalThis.value is: " + JSON.stringify(globalThis.value)); + + let obj = JSON.parse(globalThis.value.showPropNone); + console.info("[listItemGroupProps] get inspector value is: " + JSON.stringify(obj)); + console.info("[listItemGroupProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); + + expect(obj.$type).assertEqual('listItemGroup') + expect(obj.$attrs.id).assertEqual('showPropNone') + expect(obj.$attrs.show).assertEqual('true') + console.info("[listItemGroupProps] get show value is: " + JSON.stringify(obj.$attrs.show)); + done(); + }); + + // 特有属性 + + /** + * @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100 + * @tc.name testlistLitemGruopType + * @tc.desc ACE + */ + it('testlistLitemGruopType', 0, async function (done) { + console.info('testlistLitemGruopType START'); + console.info("[listLitemGruopProps] get globalThis.value is: " + JSON.stringify(globalThis.value)); + + let obj = JSON.parse(globalThis.value.Type); + console.info("[listLitemGruopProps] get inspector value is: " + JSON.stringify(obj)); + console.info("[listLitemGruopProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); + + expect(obj.$type).assertEqual('listLitemGruop') + expect(obj.$attrs.id).assertEqual('Type') + expect(obj.$attrs.type).assertEqual('default') + console.info("[listLitemGruopProps] get type value is: " + JSON.stringify(obj.$attrs.type)); + done(); + }); + + /** + * @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100 + * @tc.name testlistLitemGruopTypeNone + * @tc.desc ACE + */ + it('testlistLitemGruopTypeNone', 0, async function (done) { + console.info('testlistLitemGruopTypeNone START'); + console.info("[listLitemGruopProps] get globalThis.value is: " + JSON.stringify(globalThis.value)); + + let obj = JSON.parse(globalThis.value.TypeNone); + console.info("[listLitemGruopProps] get inspector value is: " + JSON.stringify(obj)); + console.info("[listLitemGruopProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); + + expect(obj.$type).assertEqual('listLitemGruop') + expect(obj.$attrs.id).assertEqual('TypeNone') + expect(obj.$attrs.type).assertEqual(undefined) + console.info("[listLitemGruopProps] get type value is: " + JSON.stringify(obj.$attrs.type)); + done(); + }); + }); + \ No newline at end of file diff --git a/ace/ace_standard/src/main/js/default/test/listItemProps.test.js b/ace/ace_standard/src/main/js/default/test/listItemProps.test.js new file mode 100644 index 0000000000000000000000000000000000000000..fdff0dfc59c85799b5e204fd01e357b18c290d7e --- /dev/null +++ b/ace/ace_standard/src/main/js/default/test/listItemProps.test.js @@ -0,0 +1,908 @@ +/** + * 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 router from '@system.router'; + import {describe, beforeAll,afterAll, it, expect} from 'deccjsunit/index'; + + + describe('listItemPropsJsTest', function () { + + async function sleep(time) { + return new Promise((resolve, reject) => { + setTimeout(() => { + resolve() + }, time) + }).then(() => { + console.info(`sleep ${time} over...`) + }) + } + + async function backToIndex() { + let backToIndexPromise = new Promise((resolve, reject) => { + setTimeout(() => { + router.back({ + uri: 'pages/index/index' + }) + resolve() + }, 500) + }) + let clearPromise = new Promise((resolve, reject) => { + setTimeout(() => { + router.clear() + resolve() + }, 500); + }) + await backToIndexPromise.then(() => { + return clearPromise + }) + } + + /** + * run before testcase + */ + beforeAll(async function (done) { + console.info('[listItemPropsJsTest] before each called') + + let result; + let options = { + uri: 'pages/listItem/prop/index' + } + try { + result = router.push(options) + console.info("push listItemProps page success " + JSON.stringify(result)); + } catch (err) { + console.error("push listItemProps page error " + JSON.stringify(result)); + } + await sleep(4000) + done() + }) + + /** + * run after testcase + */ + afterAll(async function () { + console.info('[listItemPropsJsTest] after each called') + await backToIndex(); + await sleep(1000) + }) + + // 通用属性 + + /** + * @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100 + * @tc.name testlistItemIdProp + * @tc.desc ACE + */ + it('testlistItemIdProp', 0, async function (done) { + console.info('testlistItemIdProp START'); + console.info("[listItemProps] get globalThis.value is: " + JSON.stringify(globalThis.value)); + + let obj = JSON.parse(globalThis.value.idProp); + console.info("[listItemProps] get inspector value is: " + JSON.stringify(obj)); + console.info("[listItemProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); + + expect(obj.$type).assertEqual('listItem') + expect(obj.$attrs.id).assertEqual('idProp') + done(); + }) + + /** + * @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100 + * @tc.name testlistItemClassProp + * @tc.desc ACE + */ + it('testlistItemClassProp', 0, async function (done) { + console.info('testlistItemClassProp START'); + console.info("[listItemProps] get globalThis.value is: " + JSON.stringify(globalThis.value)); + + let obj = JSON.parse(globalThis.value.classProp); + console.info("[listItemProps] get inspector value is: " + JSON.stringify(obj)); + console.info("[listItemProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); + + expect(obj.$type).assertEqual('listItem') + expect(obj.$attrs.id).assertEqual('classProp') + expect(obj.$attrs.className).assertEqual('classProp') + done(); + }) + + /** + * @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100 + * @tc.name testlistItemClassPropNone + * @tc.desc ACE + */ + it('testlistItemClassPropNone', 0, async function (done) { + console.info('testlistItemClassPropNone START'); + console.info("[listItemProps] get globalThis.value is: " + JSON.stringify(globalThis.value)); + + let obj = JSON.parse(globalThis.value.classPropNone); + console.info("[listItemProps] get inspector value is: " + JSON.stringify(obj)); + console.info("[listItemProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); + + expect(obj.$type).assertEqual('listItem') + expect(obj.$attrs.id).assertEqual('classPropNone') + expect(obj.$attrs.className).assertEqual(undefined) + console.info("[listItemProps] get className value is: " + JSON.stringify(obj.$attrs.className)); + done(); + }) + + /** + * @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100 + * @tc.name testlistItemRefProp + * @tc.desc ACE + */ + it('testlistItemRefProp', 0, async function (done) { + console.info('testlistItemRefProp START'); + console.info("[listItemProps] get globalThis.value is: " + JSON.stringify(globalThis.value)); + + let obj = JSON.parse(globalThis.value.refProp); + console.info("[listItemProps] get inspector value is: " + JSON.stringify(obj)); + console.info("[listItemProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); + + expect(obj.$type).assertEqual('listItem') + expect(obj.$attrs.id).assertEqual('refProp') + expect(obj.$attrs.ref).assertEqual('refProp') + done(); + }); + + /** + * @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100 + * @tc.name testlistItemRefPropNone + * @tc.desc ACE + */ + it('testlistItemRefPropNone', 0, async function (done) { + console.info('testlistItemRefPropNone START'); + console.info("[listItemProps] get globalThis.value is: " + JSON.stringify(globalThis.value)); + + let obj = JSON.parse(globalThis.value.refPropNone); + console.info("[listItemProps] get inspector value is: " + JSON.stringify(obj)); + console.info("[listItemProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); + + expect(obj.$type).assertEqual('listItem') + expect(obj.$attrs.id).assertEqual('refPropNone') + expect(obj.$attrs.ref).assertEqual(undefined) + console.info("[listItemProps] get ref value is: " + JSON.stringify(obj.$attrs.ref)); + done(); + }); + + /** + * @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100 + * @tc.name testlistItemDisabledPropTrue + * @tc.desc ACE + */ + it('testlistItemDisabledPropTrue', 0, async function (done) { + console.info('testlistItemDisabledPropTrue START'); + console.info("[listItemProps] get globalThis.value is: " + JSON.stringify(globalThis.value)); + + let obj = JSON.parse(globalThis.value.disabledPropTrue); + console.info("[listItemProps] get inspector value is: " + JSON.stringify(obj)); + console.info("[listItemProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); + + expect(obj.$type).assertEqual('listItem') + expect(obj.$attrs.id).assertEqual('disabledPropTrue') + expect(obj.$attrs.disabled).assertEqual('true') + done(); + }); + + /** + * @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100 + * @tc.name testlistItemDisabledPropFalse + * @tc.desc ACE + */ + it('testlistItemDisabledPropFalse', 0, async function (done) { + console.info('testlistItemDisabledPropFalse START'); + console.info("[listItemProps] get globalThis.value is: " + JSON.stringify(globalThis.value)); + + let obj = JSON.parse(globalThis.value.disabledPropFalse); + console.info("[listItemProps] get inspector value is: " + JSON.stringify(obj)); + console.info("[listItemProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); + + expect(obj.$type).assertEqual('listItem') + expect(obj.$attrs.id).assertEqual('disabledPropFalse') + expect(obj.$attrs.disabled).assertEqual('false') + done(); + }); + + /** + * @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100 + * @tc.name testlistItemDisabledPropNone + * @tc.desc ACE + */ + it('testlistItemDisabledPropNone', 0, async function (done) { + console.info('testlistItemDisabledPropNone START'); + console.info("[listItemProps] get globalThis.value is: " + JSON.stringify(globalThis.value)); + + let obj = JSON.parse(globalThis.value.disabledPropNone); + console.info("[listItemProps] get inspector value is: " + JSON.stringify(obj)); + console.info("[listItemProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); + + expect(obj.$type).assertEqual('listItem') + expect(obj.$attrs.id).assertEqual('disabledPropNone') + expect(obj.$attrs.disabled).assertEqual('false') + done(); + }); + + /** + * @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100 + * @tc.name testlistItemFocusablePropTrue + * @tc.desc ACE + */ + it('testlistItemFocusablePropTrue', 0, async function (done) { + console.info('testlistItemFocusablePropTrue START'); + console.info("[listItemProps] get globalThis.value is: " + JSON.stringify(globalThis.value)); + + let obj = JSON.parse(globalThis.value.focusablePropTrue); + console.info("[listItemProps] get inspector value is: " + JSON.stringify(obj)); + console.info("[listItemProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); + + expect(obj.$type).assertEqual('listItem') + expect(obj.$attrs.id).assertEqual('focusablePropTrue') + expect(obj.$attrs.focusable).assertEqual('true') + done(); + }); + + /** + * @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100 + * @tc.name testlistItemFocusablePropFalse + * @tc.desc ACE + */ + it('testlistItemFocusablePropFalse', 0, async function (done) { + console.info('testlistItemFocusablePropFalse START'); + console.info("[listItemProps] get globalThis.value is: " + JSON.stringify(globalThis.value)); + + let obj = JSON.parse(globalThis.value.focusablePropFalse); + console.info("[listItemProps] get inspector value is: " + JSON.stringify(obj)); + console.info("[listItemProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); + + expect(obj.$type).assertEqual('listItem') + expect(obj.$attrs.id).assertEqual('focusablePropFalse') + expect(obj.$attrs.focusable).assertEqual('false') + done(); + }); + + /** + * @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100 + * @tc.name testlistItemFocusablePropNone + * @tc.desc ACE + */ + it('testlistItemFocusablePropNone', 0, async function (done) { + console.info('testlistItemFocusablePropNone START'); + console.info("[listItemProps] get globalThis.value is: " + JSON.stringify(globalThis.value)); + + let obj = JSON.parse(globalThis.value.focusablePropNone); + console.info("[listItemProps] get inspector value is: " + JSON.stringify(obj)); + console.info("[listItemProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); + + expect(obj.$type).assertEqual('listItem') + expect(obj.$attrs.id).assertEqual('focusablePropNone') + expect(obj.$attrs.focusable).assertEqual('false') + done(); + }); + + /** + * @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100 + * @tc.name testlistItemDataProp + * @tc.desc ACE + */ + it('testlistItemDataProp', 0, async function (done) { + console.info('testlistItemDataProp START'); + console.info("[listItemProps] get globalThis.value is: " + JSON.stringify(globalThis.value)); + + let obj = JSON.parse(globalThis.value.dataProp); + console.info("[listItemProps] get inspector value is: " + JSON.stringify(obj)); + console.info("[listItemProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); + + expect(obj.$type).assertEqual('listItem') + expect(obj.$attrs.id).assertEqual('dataProp') + expect(obj.$attrs.datalistItem).assertEqual(undefined); + console.info("[listItemProps] get datalistItem value is: " + JSON.stringify(obj.$attrs.datalistItem)); + done(); + }); + + /** + * @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100 + * @tc.name testlistItemDataPropNone + * @tc.desc ACE + */ + it('testlistItemDataPropNone', 0, async function (done) { + console.info('testlistItemDataPropNone START'); + console.info("[listItemProps] get globalThis.value is: " + JSON.stringify(globalThis.value)); + + let obj = JSON.parse(globalThis.value.dataPropNone); + console.info("[listItemProps] get inspector value is: " + JSON.stringify(obj)); + console.info("[listItemProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); + + expect(obj.$type).assertEqual('listItem') + expect(obj.$attrs.id).assertEqual('dataPropNone') + expect(obj.$attrs.datalistItem).assertEqual(undefined) + console.info("[listItemProps] get datalistItem value is: " + JSON.stringify(obj.$attrs.datalistItem)); + done(); + }); + + /** + * @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100 + * @tc.name testlistItemClickEffectPropSmall + * @tc.desc ACE + */ + it('testlistItemClickEffectPropSmall', 0, async function (done) { + console.info('testlistItemClickEffectPropSmall START'); + console.info("[listItemProps] get globalThis.value is: " + JSON.stringify(globalThis.value)); + + let obj = JSON.parse(globalThis.value.clickEffectPropSmall); + console.info("[listItemProps] get inspector value is: " + JSON.stringify(obj)); + console.info("[listItemProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); + + expect(obj.$type).assertEqual('listItem') + expect(obj.$attrs.id).assertEqual('clickEffectPropSmall') + expect(obj.$attrs.clickEffect).assertEqual('spring-small') + done(); + }); + + /** + * @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100 + * @tc.name testlistItemClickEffectPropMedium + * @tc.desc ACE + */ + it('testlistItemClickEffectPropMedium', 0, async function (done) { + console.info('testlistItemClickEffectPropMedium START'); + console.info("[listItemProps] get globalThis.value is: " + JSON.stringify(globalThis.value)); + + let obj = JSON.parse(globalThis.value.clickEffectPropMedium); + console.info("[listItemProps] get inspector value is: " + JSON.stringify(obj)); + console.info("[listItemProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); + + expect(obj.$type).assertEqual('listItem') + expect(obj.$attrs.id).assertEqual('clickEffectPropMedium') + expect(obj.$attrs.clickEffect).assertEqual('spring-medium') + done(); + }); + + /** + * @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100 + * @tc.name testlistItemClickEffectPropLarge + * @tc.desc ACE + */ + it('testlistItemClickEffectPropLarge', 0, async function (done) { + console.info('testlistItemClickEffectPropLarge START'); + console.info("[listItemProps] get globalThis.value is: " + JSON.stringify(globalThis.value)); + + let obj = JSON.parse(globalThis.value.clickEffectPropLarge); + console.info("[listItemProps] get inspector value is: " + JSON.stringify(obj)); + console.info("[listItemProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); + + expect(obj.$type).assertEqual('listItem') + expect(obj.$attrs.id).assertEqual('clickEffectPropLarge') + expect(obj.$attrs.clickEffect).assertEqual('spring-large') + done(); + }); + + /** + * @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100 + * @tc.name testlistItemClickEffectPropNone + * @tc.desc ACE + */ + it('testlistItemClickEffectPropNone', 0, async function (done) { + console.info('testlistItemClickEffectPropNone START'); + console.info("[listItemProps] get globalThis.value is: " + JSON.stringify(globalThis.value)); + + let obj = JSON.parse(globalThis.value.clickEffectPropNone); + console.info("[listItemProps] get inspector value is: " + JSON.stringify(obj)); + console.info("[listItemProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); + + expect(obj.$type).assertEqual('listItem') + expect(obj.$attrs.id).assertEqual('clickEffectPropNone') + expect(obj.$attrs.clickEffect).assertEqual(undefined) + console.info("[listItemProps] get clickEffect value is: " + JSON.stringify(obj.$attrs.clickEffect)); + done(); + }); + + /** + * @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100 + * @tc.name testlistItemDirPropRtl + * @tc.desc ACE + */ + it('testlistItemDirPropRtl', 0, async function (done) { + console.info('testlistItemDirPropRtl START'); + console.info("[listItemProps] get globalThis.value is: " + JSON.stringify(globalThis.value)); + + let obj = JSON.parse(globalThis.value.dirPropRtl); + console.info("[listItemProps] get inspector value is: " + JSON.stringify(obj)); + console.info("[listItemProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); + + expect(obj.$type).assertEqual('listItem') + expect(obj.$attrs.id).assertEqual('dirPropRtl') + expect(obj.$attrs.dir).assertEqual('rtl') + done(); + }); + + /** + * @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100 + * @tc.name testlistItemDirPropLtr + * @tc.desc ACE + */ + it('testlistItemDirPropLtr', 0, async function (done) { + console.info('testlistItemDirPropLtr START'); + console.info("[listItemProps] get globalThis.value is: " + JSON.stringify(globalThis.value)); + + let obj = JSON.parse(globalThis.value.dirPropLtr); + console.info("[listItemProps] get inspector value is: " + JSON.stringify(obj)); + console.info("[listItemProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); + + expect(obj.$type).assertEqual('listItem') + expect(obj.$attrs.id).assertEqual('dirPropLtr') + expect(obj.$attrs.dir).assertEqual('ltr') + done(); + }); + + /** + * @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100 + * @tc.name testlistItemDirPropAuto + * @tc.desc ACE + */ + it('testlistItemDirPropAuto', 0, async function (done) { + console.info('testlistItemDirPropAuto START'); + console.info("[listItemProps] get globalThis.value is: " + JSON.stringify(globalThis.value)); + + let obj = JSON.parse(globalThis.value.dirPropAuto); + console.info("[listItemProps] get inspector value is: " + JSON.stringify(obj)); + console.info("[listItemProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); + + expect(obj.$type).assertEqual('listItem') + expect(obj.$attrs.id).assertEqual('dirPropAuto') + expect(obj.$attrs.dir).assertEqual('auto') + done(); + }); + + /** + * @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100 + * @tc.name testlistItemDirPropNone + * @tc.desc ACE + */ + it('testlistItemDirPropNone', 0, async function (done) { + console.info('testlistItemDirPropNone START'); + console.info("[listItemProps] get globalThis.value is: " + JSON.stringify(globalThis.value)); + + let obj = JSON.parse(globalThis.value.dirPropNone); + console.info("[listItemProps] get inspector value is: " + JSON.stringify(obj)); + console.info("[listItemProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); + + expect(obj.$type).assertEqual('listItem') + expect(obj.$attrs.id).assertEqual('dirPropNone') + expect(obj.$attrs.dir).assertEqual('auto') + done(); + }); + + /** + * @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100 + * @tc.name testlistItemForPropNull + * @tc.desc ACE + */ + it('testlistItemForPropNull', 0, async function (done) { + console.info('testlistItemForPropNull START'); + console.info("[listItemProps] get globalThis.value is: " + JSON.stringify(globalThis.value)); + + let obj = JSON.parse(globalThis.value.forPropNull); + console.info("[listItemProps] get inspector value is: " + JSON.stringify(obj)); + console.info("[listItemProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); + + expect(obj.$type).assertEqual('listItem') + expect(obj.$attrs.id).assertEqual('forPropNull') + expect(obj.$attrs.for).assertEqual(undefined) + console.info("[listItemProps] get for value is: " + JSON.stringify(obj.$attrs.for)); + done(); + }); + + /** + * @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100 + * @tc.name testlistItemForPropOne + * @tc.desc ACE + */ + it('testlistItemForPropOne', 0, async function (done) { + console.info('testlistItemForPropOne START'); + console.info("[listItemProps] get globalThis.value is: " + JSON.stringify(globalThis.value)); + + let obj = JSON.parse(globalThis.value.forPropOne); + console.info("[listItemProps] get inspector value is: " + JSON.stringify(obj)); + console.info("[listItemProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); + + expect(obj.$type).assertEqual('listItem') + expect(obj.$attrs.id).assertEqual('forPropOne') + expect(obj.$attrs.for).assertEqual(undefined) + console.info("[listItemProps] get for value is: " + JSON.stringify(obj.$attrs.for)); + done(); + }); + + /** + * @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100 + * @tc.name testlistItemForPropThree + * @tc.desc ACE + */ + it('testlistItemForPropThree', 0, async function (done) { + console.info('testlistItemForPropThree START'); + console.info("[listItemProps] get globalThis.value is: " + JSON.stringify(globalThis.value)); + + let obj = JSON.parse(globalThis.value.forPropThree); + console.info("[listItemProps] get inspector value is: " + JSON.stringify(obj)); + console.info("[listItemProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); + + expect(obj.$type).assertEqual('listItem') + expect(obj.$attrs.id).assertEqual('forPropThree') + expect(obj.$attrs.for).assertEqual(undefined) + console.info("[listItemProps] get for value is: " + JSON.stringify(obj.$attrs.for)); + done(); + }); + + /** + * @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100 + * @tc.name testlistItemIfPropTrue + * @tc.desc ACE + */ + it('testlistItemIfPropTrue', 0, async function (done) { + console.info('testlistItemIfPropTrue START'); + console.info("[listItemProps] get globalThis.value is: " + JSON.stringify(globalThis.value)); + + let obj = JSON.parse(globalThis.value.ifPropTrue); + console.info("[listItemProps] get inspector value is: " + JSON.stringify(obj)); + console.info("[listItemProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); + + expect(obj.$type).assertEqual('listItem') + expect(obj.$attrs.id).assertEqual('ifPropTrue') + expect(obj.$attrs.if).assertEqual(undefined) + console.info("[listItemProps] get for value is: " + JSON.stringify(obj.$attrs.if)); + done(); + }); + + /** + * @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100 + * @tc.name testlistItemShowPropTrue + * @tc.desc ACE + */ + it('testlistItemShowPropTrue', 0, async function (done) { + console.info('testlistItemShowPropTrue START'); + console.info("[listItemProps] get globalThis.value is: " + JSON.stringify(globalThis.value)); + + let obj = JSON.parse(globalThis.value.showPropTrue); + console.info("[listItemProps] get inspector value is: " + JSON.stringify(obj)); + console.info("[listItemProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); + + expect(obj.$type).assertEqual('listItem') + expect(obj.$attrs.id).assertEqual('showPropTrue') + expect(obj.$attrs.show).assertEqual('true') + console.info("[listItemProps] get show value is: " + JSON.stringify(obj.$attrs.show)); + done(); + }); + + /** + * @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100 + * @tc.name testlistItemShowPropFalse + * @tc.desc ACE + */ + it('testlistItemShowPropFalse', 0, async function (done) { + console.info('testlistItemShowPropFalse START'); + console.info("[listItemProps] get globalThis.value is: " + JSON.stringify(globalThis.value)); + + let obj = JSON.parse(globalThis.value.showPropFalse); + console.info("[listItemProps] get inspector value is: " + JSON.stringify(obj)); + console.info("[listItemProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); + + expect(obj.$type).assertEqual('listItem') + expect(obj.$attrs.id).assertEqual('showPropFalse') + expect(obj.$attrs.show).assertEqual('false') + console.info("[listItemProps] get show value is: " + JSON.stringify(obj.$attrs.show)); + done(); + }); + + /** + * @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100 + * @tc.name testlistItemShowPropNone + * @tc.desc ACE + */ + it('testlistItemShowPropNone', 0, async function (done) { + console.info('testlistItemShowPropNone START'); + console.info("[listItemProps] get globalThis.value is: " + JSON.stringify(globalThis.value)); + + let obj = JSON.parse(globalThis.value.showPropNone); + console.info("[listItemProps] get inspector value is: " + JSON.stringify(obj)); + console.info("[listItemProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); + + expect(obj.$type).assertEqual('listItem') + expect(obj.$attrs.id).assertEqual('showPropNone') + expect(obj.$attrs.show).assertEqual('true') + console.info("[listItemProps] get show value is: " + JSON.stringify(obj.$attrs.show)); + done(); + }); + + // 特有属性 + + /** + * @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100 + * @tc.name testlistItemType + * @tc.desc ACE + */ + it('testlistItemType', 0, async function (done) { + console.info('testlistItemType START'); + console.info("[listItemProps] get globalThis.value is: " + JSON.stringify(globalThis.value)); + + let obj = JSON.parse(globalThis.value.Type); + console.info("[listItemProps] get inspector value is: " + JSON.stringify(obj)); + console.info("[listItemProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); + + expect(obj.$type).assertEqual('listItem') + expect(obj.$attrs.id).assertEqual('Type') + expect(obj.$attrs.type).assertEqual('default') + console.info("[listItemProps] get type value is: " + JSON.stringify(obj.$attrs.type)); + done(); + }); + + /** + * @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100 + * @tc.name testlistItemTypeNone + * @tc.desc ACE + */ + it('testlistItemTypeNone', 0, async function (done) { + console.info('testlistItemTypeNone START'); + console.info("[listItemProps] get globalThis.value is: " + JSON.stringify(globalThis.value)); + + let obj = JSON.parse(globalThis.value.TypeNone); + console.info("[listItemProps] get inspector value is: " + JSON.stringify(obj)); + console.info("[listItemProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); + + expect(obj.$type).assertEqual('listItem') + expect(obj.$attrs.id).assertEqual('TypeNone') + expect(obj.$attrs.type).assertEqual(undefined) + console.info("[listItemProps] get type value is: " + JSON.stringify(obj.$attrs.type)); + done(); + }); + + /** + * @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100 + * @tc.name testlistItemprimaryFalse + * @tc.desc ACE + */ + it('testlistItemprimaryFalse', 0, async function (done) { + console.info('testlistItemprimaryFalse START'); + console.info("[listItemProps] get globalThis.value is: " + JSON.stringify(globalThis.value)); + + let obj = JSON.parse(globalThis.value.primaryFalse); + console.info("[listItemProps] get inspector value is: " + JSON.stringify(obj)); + console.info("[listItemProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); + + expect(obj.$type).assertEqual('listItem') + expect(obj.$attrs.id).assertEqual('primaryFalse') + expect(obj.$attrs.primary).assertEqual('false') + console.info("[listItemProps] get primary value is: " + JSON.stringify(obj.$attrs.primary)); + done(); + }); + + /** + * @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100 + * @tc.name testlistItemprimaryTrue + * @tc.desc ACE + */ + it('testlistItemprimaryTrue', 0, async function (done) { + console.info('testlistItemprimaryTrue START'); + console.info("[listItemProps] get globalThis.value is: " + JSON.stringify(globalThis.value)); + + let obj = JSON.parse(globalThis.value.primaryTrue); + console.info("[listItemProps] get inspector value is: " + JSON.stringify(obj)); + console.info("[listItemProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); + + expect(obj.$type).assertEqual('listItem') + expect(obj.$attrs.id).assertEqual('primaryTrue') + expect(obj.$attrs.primary).assertEqual('true') + console.info("[listItemProps] get primary value is: " + JSON.stringify(obj.$attrs.primary)); + done(); + }); + + /** + * @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100 + * @tc.name testlistItemprimaryNone + * @tc.desc ACE + */ + it('testlistItemprimaryNone', 0, async function (done) { + console.info('testlistItemprimaryNone START'); + console.info("[listItemProps] get globalThis.value is: " + JSON.stringify(globalThis.value)); + + let obj = JSON.parse(globalThis.value.primaryNone); + console.info("[listItemProps] get inspector value is: " + JSON.stringify(obj)); + console.info("[listItemProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); + + expect(obj.$type).assertEqual('listItem') + expect(obj.$attrs.id).assertEqual('primaryNone') + expect(obj.$attrs.primary).assertEqual(undefined) + console.info("[listItemProps] get primary value is: " + JSON.stringify(obj.$attrs.primary)); + done(); + }); + + /** + * @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100 + * @tc.name testlistItemsection + * @tc.desc ACE + */ + it('testlistItemsection', 0, async function (done) { + console.info('testlistItemsection START'); + console.info("[listItemProps] get globalThis.value is: " + JSON.stringify(globalThis.value)); + + let obj = JSON.parse(globalThis.value.section); + console.info("[listItemProps] get inspector value is: " + JSON.stringify(obj)); + console.info("[listItemProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); + + expect(obj.$type).assertEqual('listItem') + expect(obj.$attrs.id).assertEqual('section') + expect(obj.$attrs.section).assertEqual('1') + console.info("[listItemProps] get section value is: " + JSON.stringify(obj.$attrs.section)); + done(); + }); + + /** + * @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100 + * @tc.name testlistItemsectionNone + * @tc.desc ACE + */ + it('testlistItemsectionNone', 0, async function (done) { + console.info('testlistItemsectionNone START'); + console.info("[listItemProps] get globalThis.value is: " + JSON.stringify(globalThis.value)); + + let obj = JSON.parse(globalThis.value.sectionNone); + console.info("[listItemProps] get inspector value is: " + JSON.stringify(obj)); + console.info("[listItemProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); + + expect(obj.$type).assertEqual('listItem') + expect(obj.$attrs.id).assertEqual('sectionNone') + expect(obj.$attrs.section).assertEqual(undefined) + console.info("[listItemProps] get section value is: " + JSON.stringify(obj.$attrs.section)); + done(); + }); + + /** + * @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100 + * @tc.name testlistItemstickyNone + * @tc.desc ACE + */ + it('testlistItemstickyNone', 0, async function (done) { + console.info('testlistItemstickyNone START'); + console.info("[listItemProps] get globalThis.value is: " + JSON.stringify(globalThis.value)); + + let obj = JSON.parse(globalThis.value.stickyNone); + console.info("[listItemProps] get inspector value is: " + JSON.stringify(obj)); + console.info("[listItemProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); + + expect(obj.$type).assertEqual('listItem') + expect(obj.$attrs.id).assertEqual('stickyNone') + expect(obj.$attrs.sticky).assertEqual('none') + console.info("[listItemProps] get sticky value is: " + JSON.stringify(obj.$attrs.sticky)); + done(); + }); + + /** + * @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100 + * @tc.name testlistItemstickyNormal + * @tc.desc ACE + */ + it('testlistItemstickyNormal', 0, async function (done) { + console.info('testlistItemstickyNormal START'); + console.info("[listItemProps] get globalThis.value is: " + JSON.stringify(globalThis.value)); + + let obj = JSON.parse(globalThis.value.stickyNormal); + console.info("[listItemProps] get inspector value is: " + JSON.stringify(obj)); + console.info("[listItemProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); + + expect(obj.$type).assertEqual('listItem') + expect(obj.$attrs.id).assertEqual('stickyNormal') + expect(obj.$attrs.sticky).assertEqual('normal') + console.info("[listItemProps] get sticky value is: " + JSON.stringify(obj.$attrs.sticky)); + done(); + }); + + /** + * @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100 + * @tc.name testlistItemstickyOpacity + * @tc.desc ACE + */ + it('testlistItemstickyOpacity', 0, async function (done) { + console.info('testlistItemstickyOpacity START'); + console.info("[listItemProps] get globalThis.value is: " + JSON.stringify(globalThis.value)); + + let obj = JSON.parse(globalThis.value.stickyOpacity); + console.info("[listItemProps] get inspector value is: " + JSON.stringify(obj)); + console.info("[listItemProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); + + expect(obj.$type).assertEqual('listItem') + expect(obj.$attrs.id).assertEqual('stickyOpacity') + expect(obj.$attrs.sticky).assertEqual('opacity') + console.info("[listItemProps] get sticky value is: " + JSON.stringify(obj.$attrs.sticky)); + done(); + }); + + /** + * @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100 + * @tc.name testlistItemstickyNo + * @tc.desc ACE + */ + it('testlistItemstickyNo', 0, async function (done) { + console.info('testlistItemstickyNo START'); + console.info("[listItemProps] get globalThis.value is: " + JSON.stringify(globalThis.value)); + + let obj = JSON.parse(globalThis.value.stickyNo); + console.info("[listItemProps] get inspector value is: " + JSON.stringify(obj)); + console.info("[listItemProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); + + expect(obj.$type).assertEqual('listItem') + expect(obj.$attrs.id).assertEqual('stickyNo') + expect(obj.$attrs.sticky).assertEqual(undefined) + console.info("[listItemProps] get sticky value is: " + JSON.stringify(obj.$attrs.sticky)); + done(); + }); + + /** + * @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100 + * @tc.name testlistItemclickeffectTrue + * @tc.desc ACE + */ + it('testlistItemclickeffectTrue', 0, async function (done) { + console.info('testlistItemclickeffectTrue START'); + console.info("[listItemProps] get globalThis.value is: " + JSON.stringify(globalThis.value)); + + let obj = JSON.parse(globalThis.value.clickeffectTrue); + console.info("[listItemProps] get inspector value is: " + JSON.stringify(obj)); + console.info("[listItemProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); + + expect(obj.$type).assertEqual('listItem') + expect(obj.$attrs.id).assertEqual('clickeffectTrue') + expect(obj.$attrs.clickeffect).assertEqual('true') + console.info("[listItemProps] get clickeffect value is: " + JSON.stringify(obj.$attrs.clickeffect)); + done(); + }); + + /** + * @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100 + * @tc.name testlistItemclickeffectFalse + * @tc.desc ACE + */ + it('testlistItemclickeffectFalse', 0, async function (done) { + console.info('testlistItemclickeffectFalse START'); + console.info("[listItemProps] get globalThis.value is: " + JSON.stringify(globalThis.value)); + + let obj = JSON.parse(globalThis.value.clickeffectFalse); + console.info("[listItemProps] get inspector value is: " + JSON.stringify(obj)); + console.info("[listItemProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); + + expect(obj.$type).assertEqual('listItem') + expect(obj.$attrs.id).assertEqual('clickeffectFalse') + expect(obj.$attrs.clickeffect).assertEqual('false') + console.info("[listItemProps] get clickeffect value is: " + JSON.stringify(obj.$attrs.clickeffect)); + done(); + }); + + /** + * @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100 + * @tc.name testlistItemclickeffectNone + * @tc.desc ACE + */ + it('testlistItemclickeffectNone', 0, async function (done) { + console.info('testlistItemclickeffectNone START'); + console.info("[listItemProps] get globalThis.value is: " + JSON.stringify(globalThis.value)); + + let obj = JSON.parse(globalThis.value.clickeffectNone); + console.info("[listItemProps] get inspector value is: " + JSON.stringify(obj)); + console.info("[listItemProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); + + expect(obj.$type).assertEqual('listItem') + expect(obj.$attrs.id).assertEqual('clickeffectNone') + expect(obj.$attrs.clickeffect).assertEqual(undefined) + console.info("[listItemProps] get clickeffect value is: " + JSON.stringify(obj.$attrs.clickeffect)); + done(); + }); + }); + \ No newline at end of file diff --git a/ace/ace_standard/src/main/js/default/test/listProps.test.js b/ace/ace_standard/src/main/js/default/test/listProps.test.js new file mode 100644 index 0000000000000000000000000000000000000000..5da8c086c1220adf0f259a621764c63c8e68470b --- /dev/null +++ b/ace/ace_standard/src/main/js/default/test/listProps.test.js @@ -0,0 +1,1469 @@ +/** + * 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 router from '@system.router'; + import {describe, beforeAll,afterAll, it, expect} from 'deccjsunit/index'; + + + describe('listPropsJsTest', function () { + + async function sleep(time) { + return new Promise((resolve, reject) => { + setTimeout(() => { + resolve() + }, time) + }).then(() => { + console.info(`sleep ${time} over...`) + }) + } + + async function backToIndex() { + let backToIndexPromise = new Promise((resolve, reject) => { + setTimeout(() => { + router.back({ + uri: 'pages/index/index' + }) + resolve() + }, 500) + }) + let clearPromise = new Promise((resolve, reject) => { + setTimeout(() => { + router.clear() + resolve() + }, 500); + }) + await backToIndexPromise.then(() => { + return clearPromise + }) + } + + /** + * run before testcase + */ + beforeAll(async function (done) { + console.info('[listPropsJsTest] before each called') + + let result; + let options = { + uri: 'pages/list/prop/index' + } + try { + result = router.push(options) + console.info("push listProps page success " + JSON.stringify(result)); + } catch (err) { + console.error("push listProps page error " + JSON.stringify(result)); + } + await sleep(4000) + done() + }) + + /** + * run after testcase + */ + afterAll(async function () { + console.info('[listPropsJsTest] after each called') + await backToIndex(); + await sleep(1000) + }) + + // 通用属性 + + /** + * @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100 + * @tc.name testlistIdProp + * @tc.desc ACE + */ + it('testlistIdProp', 0, async function (done) { + console.info('testlistIdProp START'); + console.info("[listProps] get globalThis.value is: " + JSON.stringify(globalThis.value)); + + let obj = JSON.parse(globalThis.value.idProp); + console.info("[listProps] get inspector value is: " + JSON.stringify(obj)); + console.info("[listProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); + + expect(obj.$type).assertEqual('list') + expect(obj.$attrs.id).assertEqual('idProp') + done(); + }) + + /** + * @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100 + * @tc.name testlistClassProp + * @tc.desc ACE + */ + it('testlistClassProp', 0, async function (done) { + console.info('testlistClassProp START'); + console.info("[listProps] get globalThis.value is: " + JSON.stringify(globalThis.value)); + + let obj = JSON.parse(globalThis.value.classProp); + console.info("[listProps] get inspector value is: " + JSON.stringify(obj)); + console.info("[listProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); + + expect(obj.$type).assertEqual('list') + expect(obj.$attrs.id).assertEqual('classProp') + expect(obj.$attrs.className).assertEqual('classProp') + done(); + }) + + /** + * @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100 + * @tc.name testlistClassPropNone + * @tc.desc ACE + */ + it('testlistClassPropNone', 0, async function (done) { + console.info('testlistClassPropNone START'); + console.info("[listProps] get globalThis.value is: " + JSON.stringify(globalThis.value)); + + let obj = JSON.parse(globalThis.value.classPropNone); + console.info("[listProps] get inspector value is: " + JSON.stringify(obj)); + console.info("[listProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); + + expect(obj.$type).assertEqual('list') + expect(obj.$attrs.id).assertEqual('classPropNone') + expect(obj.$attrs.className).assertEqual(undefined) + console.info("[listProps] get className value is: " + JSON.stringify(obj.$attrs.className)); + done(); + }) + + /** + * @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100 + * @tc.name testlistRefProp + * @tc.desc ACE + */ + it('testlistRefProp', 0, async function (done) { + console.info('testlistRefProp START'); + console.info("[listProps] get globalThis.value is: " + JSON.stringify(globalThis.value)); + + let obj = JSON.parse(globalThis.value.refProp); + console.info("[listProps] get inspector value is: " + JSON.stringify(obj)); + console.info("[listProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); + + expect(obj.$type).assertEqual('list') + expect(obj.$attrs.id).assertEqual('refProp') + expect(obj.$attrs.ref).assertEqual('refProp') + done(); + }); + + /** + * @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100 + * @tc.name testlistRefPropNone + * @tc.desc ACE + */ + it('testlistRefPropNone', 0, async function (done) { + console.info('testlistRefPropNone START'); + console.info("[listProps] get globalThis.value is: " + JSON.stringify(globalThis.value)); + + let obj = JSON.parse(globalThis.value.refPropNone); + console.info("[listProps] get inspector value is: " + JSON.stringify(obj)); + console.info("[listProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); + + expect(obj.$type).assertEqual('list') + expect(obj.$attrs.id).assertEqual('refPropNone') + expect(obj.$attrs.ref).assertEqual(undefined) + console.info("[listProps] get ref value is: " + JSON.stringify(obj.$attrs.ref)); + done(); + }); + + /** + * @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100 + * @tc.name testlistDisabledPropTrue + * @tc.desc ACE + */ + it('testlistDisabledPropTrue', 0, async function (done) { + console.info('testlistDisabledPropTrue START'); + console.info("[listProps] get globalThis.value is: " + JSON.stringify(globalThis.value)); + + let obj = JSON.parse(globalThis.value.disabledPropTrue); + console.info("[listProps] get inspector value is: " + JSON.stringify(obj)); + console.info("[listProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); + + expect(obj.$type).assertEqual('list') + expect(obj.$attrs.id).assertEqual('disabledPropTrue') + expect(obj.$attrs.disabled).assertEqual('true') + done(); + }); + + /** + * @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100 + * @tc.name testlistDisabledPropFalse + * @tc.desc ACE + */ + it('testlistDisabledPropFalse', 0, async function (done) { + console.info('testlistDisabledPropFalse START'); + console.info("[listProps] get globalThis.value is: " + JSON.stringify(globalThis.value)); + + let obj = JSON.parse(globalThis.value.disabledPropFalse); + console.info("[listProps] get inspector value is: " + JSON.stringify(obj)); + console.info("[listProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); + + expect(obj.$type).assertEqual('list') + expect(obj.$attrs.id).assertEqual('disabledPropFalse') + expect(obj.$attrs.disabled).assertEqual('false') + done(); + }); + + /** + * @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100 + * @tc.name testlistDisabledPropNone + * @tc.desc ACE + */ + it('testlistDisabledPropNone', 0, async function (done) { + console.info('testlistDisabledPropNone START'); + console.info("[listProps] get globalThis.value is: " + JSON.stringify(globalThis.value)); + + let obj = JSON.parse(globalThis.value.disabledPropNone); + console.info("[listProps] get inspector value is: " + JSON.stringify(obj)); + console.info("[listProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); + + expect(obj.$type).assertEqual('list') + expect(obj.$attrs.id).assertEqual('disabledPropNone') + expect(obj.$attrs.disabled).assertEqual('false') + done(); + }); + + /** + * @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100 + * @tc.name testlistFocusablePropTrue + * @tc.desc ACE + */ + it('testlistFocusablePropTrue', 0, async function (done) { + console.info('testlistFocusablePropTrue START'); + console.info("[listProps] get globalThis.value is: " + JSON.stringify(globalThis.value)); + + let obj = JSON.parse(globalThis.value.focusablePropTrue); + console.info("[listProps] get inspector value is: " + JSON.stringify(obj)); + console.info("[listProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); + + expect(obj.$type).assertEqual('list') + expect(obj.$attrs.id).assertEqual('focusablePropTrue') + expect(obj.$attrs.focusable).assertEqual('true') + done(); + }); + + /** + * @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100 + * @tc.name testlistFocusablePropFalse + * @tc.desc ACE + */ + it('testlistFocusablePropFalse', 0, async function (done) { + console.info('testlistFocusablePropFalse START'); + console.info("[listProps] get globalThis.value is: " + JSON.stringify(globalThis.value)); + + let obj = JSON.parse(globalThis.value.focusablePropFalse); + console.info("[listProps] get inspector value is: " + JSON.stringify(obj)); + console.info("[listProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); + + expect(obj.$type).assertEqual('list') + expect(obj.$attrs.id).assertEqual('focusablePropFalse') + expect(obj.$attrs.focusable).assertEqual('false') + done(); + }); + + /** + * @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100 + * @tc.name testlistFocusablePropNone + * @tc.desc ACE + */ + it('testlistFocusablePropNone', 0, async function (done) { + console.info('testlistFocusablePropNone START'); + console.info("[listProps] get globalThis.value is: " + JSON.stringify(globalThis.value)); + + let obj = JSON.parse(globalThis.value.focusablePropNone); + console.info("[listProps] get inspector value is: " + JSON.stringify(obj)); + console.info("[listProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); + + expect(obj.$type).assertEqual('list') + expect(obj.$attrs.id).assertEqual('focusablePropNone') + expect(obj.$attrs.focusable).assertEqual('false') + done(); + }); + + /** + * @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100 + * @tc.name testlistDataProp + * @tc.desc ACE + */ + it('testlistDataProp', 0, async function (done) { + console.info('testlistDataProp START'); + console.info("[listProps] get globalThis.value is: " + JSON.stringify(globalThis.value)); + + let obj = JSON.parse(globalThis.value.dataProp); + console.info("[listProps] get inspector value is: " + JSON.stringify(obj)); + console.info("[listProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); + + expect(obj.$type).assertEqual('list') + expect(obj.$attrs.id).assertEqual('dataProp') + expect(obj.$attrs.datalist).assertEqual(undefined); + console.info("[listProps] get datalist value is: " + JSON.stringify(obj.$attrs.datalist)); + done(); + }); + + /** + * @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100 + * @tc.name testlistDataPropNone + * @tc.desc ACE + */ + it('testlistDataPropNone', 0, async function (done) { + console.info('testlistDataPropNone START'); + console.info("[listProps] get globalThis.value is: " + JSON.stringify(globalThis.value)); + + let obj = JSON.parse(globalThis.value.dataPropNone); + console.info("[listProps] get inspector value is: " + JSON.stringify(obj)); + console.info("[listProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); + + expect(obj.$type).assertEqual('list') + expect(obj.$attrs.id).assertEqual('dataPropNone') + expect(obj.$attrs.datalist).assertEqual(undefined) + console.info("[listProps] get datalist value is: " + JSON.stringify(obj.$attrs.datalist)); + done(); + }); + + /** + * @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100 + * @tc.name testlistClickEffectPropSmall + * @tc.desc ACE + */ + it('testlistClickEffectPropSmall', 0, async function (done) { + console.info('testlistClickEffectPropSmall START'); + console.info("[listProps] get globalThis.value is: " + JSON.stringify(globalThis.value)); + + let obj = JSON.parse(globalThis.value.clickEffectPropSmall); + console.info("[listProps] get inspector value is: " + JSON.stringify(obj)); + console.info("[listProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); + + expect(obj.$type).assertEqual('list') + expect(obj.$attrs.id).assertEqual('clickEffectPropSmall') + expect(obj.$attrs.clickEffect).assertEqual('spring-small') + done(); + }); + + /** + * @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100 + * @tc.name testlistClickEffectPropMedium + * @tc.desc ACE + */ + it('testlistClickEffectPropMedium', 0, async function (done) { + console.info('testlistClickEffectPropMedium START'); + console.info("[listProps] get globalThis.value is: " + JSON.stringify(globalThis.value)); + + let obj = JSON.parse(globalThis.value.clickEffectPropMedium); + console.info("[listProps] get inspector value is: " + JSON.stringify(obj)); + console.info("[listProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); + + expect(obj.$type).assertEqual('list') + expect(obj.$attrs.id).assertEqual('clickEffectPropMedium') + expect(obj.$attrs.clickEffect).assertEqual('spring-medium') + done(); + }); + + /** + * @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100 + * @tc.name testlistClickEffectPropLarge + * @tc.desc ACE + */ + it('testlistClickEffectPropLarge', 0, async function (done) { + console.info('testlistClickEffectPropLarge START'); + console.info("[listProps] get globalThis.value is: " + JSON.stringify(globalThis.value)); + + let obj = JSON.parse(globalThis.value.clickEffectPropLarge); + console.info("[listProps] get inspector value is: " + JSON.stringify(obj)); + console.info("[listProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); + + expect(obj.$type).assertEqual('list') + expect(obj.$attrs.id).assertEqual('clickEffectPropLarge') + expect(obj.$attrs.clickEffect).assertEqual('spring-large') + done(); + }); + + /** + * @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100 + * @tc.name testlistClickEffectPropNone + * @tc.desc ACE + */ + it('testlistClickEffectPropNone', 0, async function (done) { + console.info('testlistClickEffectPropNone START'); + console.info("[listProps] get globalThis.value is: " + JSON.stringify(globalThis.value)); + + let obj = JSON.parse(globalThis.value.clickEffectPropNone); + console.info("[listProps] get inspector value is: " + JSON.stringify(obj)); + console.info("[listProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); + + expect(obj.$type).assertEqual('list') + expect(obj.$attrs.id).assertEqual('clickEffectPropNone') + expect(obj.$attrs.clickEffect).assertEqual(undefined) + console.info("[listProps] get clickEffect value is: " + JSON.stringify(obj.$attrs.clickEffect)); + done(); + }); + + /** + * @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100 + * @tc.name testlistDirPropRtl + * @tc.desc ACE + */ + it('testlistDirPropRtl', 0, async function (done) { + console.info('testlistDirPropRtl START'); + console.info("[listProps] get globalThis.value is: " + JSON.stringify(globalThis.value)); + + let obj = JSON.parse(globalThis.value.dirPropRtl); + console.info("[listProps] get inspector value is: " + JSON.stringify(obj)); + console.info("[listProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); + + expect(obj.$type).assertEqual('list') + expect(obj.$attrs.id).assertEqual('dirPropRtl') + expect(obj.$attrs.dir).assertEqual('rtl') + done(); + }); + + /** + * @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100 + * @tc.name testlistDirPropLtr + * @tc.desc ACE + */ + it('testlistDirPropLtr', 0, async function (done) { + console.info('testlistDirPropLtr START'); + console.info("[listProps] get globalThis.value is: " + JSON.stringify(globalThis.value)); + + let obj = JSON.parse(globalThis.value.dirPropLtr); + console.info("[listProps] get inspector value is: " + JSON.stringify(obj)); + console.info("[listProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); + + expect(obj.$type).assertEqual('list') + expect(obj.$attrs.id).assertEqual('dirPropLtr') + expect(obj.$attrs.dir).assertEqual('ltr') + done(); + }); + + /** + * @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100 + * @tc.name testlistDirPropAuto + * @tc.desc ACE + */ + it('testlistDirPropAuto', 0, async function (done) { + console.info('testlistDirPropAuto START'); + console.info("[listProps] get globalThis.value is: " + JSON.stringify(globalThis.value)); + + let obj = JSON.parse(globalThis.value.dirPropAuto); + console.info("[listProps] get inspector value is: " + JSON.stringify(obj)); + console.info("[listProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); + + expect(obj.$type).assertEqual('list') + expect(obj.$attrs.id).assertEqual('dirPropAuto') + expect(obj.$attrs.dir).assertEqual('auto') + done(); + }); + + /** + * @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100 + * @tc.name testlistDirPropNone + * @tc.desc ACE + */ + it('testlistDirPropNone', 0, async function (done) { + console.info('testlistDirPropNone START'); + console.info("[listProps] get globalThis.value is: " + JSON.stringify(globalThis.value)); + + let obj = JSON.parse(globalThis.value.dirPropNone); + console.info("[listProps] get inspector value is: " + JSON.stringify(obj)); + console.info("[listProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); + + expect(obj.$type).assertEqual('list') + expect(obj.$attrs.id).assertEqual('dirPropNone') + expect(obj.$attrs.dir).assertEqual('auto') + done(); + }); + + /** + * @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100 + * @tc.name testlistForPropNull + * @tc.desc ACE + */ + it('testlistForPropNull', 0, async function (done) { + console.info('testlistForPropNull START'); + console.info("[listProps] get globalThis.value is: " + JSON.stringify(globalThis.value)); + + let obj = JSON.parse(globalThis.value.forPropNull); + console.info("[listProps] get inspector value is: " + JSON.stringify(obj)); + console.info("[listProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); + + expect(obj.$type).assertEqual('list') + expect(obj.$attrs.id).assertEqual('forPropNull') + expect(obj.$attrs.for).assertEqual(undefined) + console.info("[listProps] get for value is: " + JSON.stringify(obj.$attrs.for)); + done(); + }); + + /** + * @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100 + * @tc.name testlistForPropOne + * @tc.desc ACE + */ + it('testlistForPropOne', 0, async function (done) { + console.info('testlistForPropOne START'); + console.info("[listProps] get globalThis.value is: " + JSON.stringify(globalThis.value)); + + let obj = JSON.parse(globalThis.value.forPropOne); + console.info("[listProps] get inspector value is: " + JSON.stringify(obj)); + console.info("[listProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); + + expect(obj.$type).assertEqual('list') + expect(obj.$attrs.id).assertEqual('forPropOne') + expect(obj.$attrs.for).assertEqual(undefined) + console.info("[listProps] get for value is: " + JSON.stringify(obj.$attrs.for)); + done(); + }); + + /** + * @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100 + * @tc.name testlistForPropThree + * @tc.desc ACE + */ + it('testlistForPropThree', 0, async function (done) { + console.info('testlistForPropThree START'); + console.info("[listProps] get globalThis.value is: " + JSON.stringify(globalThis.value)); + + let obj = JSON.parse(globalThis.value.forPropThree); + console.info("[listProps] get inspector value is: " + JSON.stringify(obj)); + console.info("[listProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); + + expect(obj.$type).assertEqual('list') + expect(obj.$attrs.id).assertEqual('forPropThree') + expect(obj.$attrs.for).assertEqual(undefined) + console.info("[listProps] get for value is: " + JSON.stringify(obj.$attrs.for)); + done(); + }); + + /** + * @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100 + * @tc.name testlistIfPropTrue + * @tc.desc ACE + */ + it('testlistIfPropTrue', 0, async function (done) { + console.info('testlistIfPropTrue START'); + console.info("[listProps] get globalThis.value is: " + JSON.stringify(globalThis.value)); + + let obj = JSON.parse(globalThis.value.ifPropTrue); + console.info("[listProps] get inspector value is: " + JSON.stringify(obj)); + console.info("[listProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); + + expect(obj.$type).assertEqual('list') + expect(obj.$attrs.id).assertEqual('ifPropTrue') + expect(obj.$attrs.if).assertEqual(undefined) + console.info("[listProps] get for value is: " + JSON.stringify(obj.$attrs.if)); + done(); + }); + + /** + * @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100 + * @tc.name testlistShowPropTrue + * @tc.desc ACE + */ + it('testlistShowPropTrue', 0, async function (done) { + console.info('testlistShowPropTrue START'); + console.info("[listProps] get globalThis.value is: " + JSON.stringify(globalThis.value)); + + let obj = JSON.parse(globalThis.value.showPropTrue); + console.info("[listProps] get inspector value is: " + JSON.stringify(obj)); + console.info("[listProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); + + expect(obj.$type).assertEqual('list') + expect(obj.$attrs.id).assertEqual('showPropTrue') + expect(obj.$attrs.show).assertEqual('true') + console.info("[listProps] get show value is: " + JSON.stringify(obj.$attrs.show)); + done(); + }); + + /** + * @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100 + * @tc.name testlistShowPropFalse + * @tc.desc ACE + */ + it('testlistShowPropFalse', 0, async function (done) { + console.info('testlistShowPropFalse START'); + console.info("[listProps] get globalThis.value is: " + JSON.stringify(globalThis.value)); + + let obj = JSON.parse(globalThis.value.showPropFalse); + console.info("[listProps] get inspector value is: " + JSON.stringify(obj)); + console.info("[listProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); + + expect(obj.$type).assertEqual('list') + expect(obj.$attrs.id).assertEqual('showPropFalse') + expect(obj.$attrs.show).assertEqual('false') + console.info("[listProps] get show value is: " + JSON.stringify(obj.$attrs.show)); + done(); + }); + + /** + * @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100 + * @tc.name testlistShowPropNone + * @tc.desc ACE + */ + it('testlistShowPropNone', 0, async function (done) { + console.info('testlistShowPropNone START'); + console.info("[listProps] get globalThis.value is: " + JSON.stringify(globalThis.value)); + + let obj = JSON.parse(globalThis.value.showPropNone); + console.info("[listProps] get inspector value is: " + JSON.stringify(obj)); + console.info("[listProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); + + expect(obj.$type).assertEqual('list') + expect(obj.$attrs.id).assertEqual('showPropNone') + expect(obj.$attrs.show).assertEqual('true') + console.info("[listProps] get show value is: " + JSON.stringify(obj.$attrs.show)); + done(); + }); + + // 特有属性 + + /** + * @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100 + * @tc.name testlistscrollPageTrue + * @tc.desc ACE + */ + it('testlistscrollPageTrue', 0, async function (done) { + console.info('testlistscrollPageTrue START'); + console.info("[listProps] get globalThis.value is: " + JSON.stringify(globalThis.value)); + + let obj = JSON.parse(globalThis.value.scrollPageTrue); + console.info("[listProps] get inspector value is: " + JSON.stringify(obj)); + console.info("[listProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); + + expect(obj.$type).assertEqual('list') + expect(obj.$attrs.id).assertEqual('scrollPageTrue') + expect(obj.$attrs.scrollpage).assertEqual('true') + console.info("[listProps] get scrollpage value is: " + JSON.stringify(obj.$attrs.scrollpage)); + done(); + }); + + /** + * @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100 + * @tc.name testlistscrollPageFalse + * @tc.desc ACE + */ + it('testlistscrollPageFalse', 0, async function (done) { + console.info('testlistscrollPageFalse START'); + console.info("[listProps] get globalThis.value is: " + JSON.stringify(globalThis.value)); + + let obj = JSON.parse(globalThis.value.scrollPageFalse); + console.info("[listProps] get inspector value is: " + JSON.stringify(obj)); + console.info("[listProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); + + expect(obj.$type).assertEqual('list') + expect(obj.$attrs.id).assertEqual('scrollPageFalse') + expect(obj.$attrs.scrollpage).assertEqual('false') + console.info("[listProps] get scrollpage value is: " + JSON.stringify(obj.$attrs.scrollpage)); + done(); + }); + + /** + * @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100 + * @tc.name testlistscrollPageNone + * @tc.desc ACE + */ + it('testlistscrollPageNone', 0, async function (done) { + console.info('testlistscrollPageNone START'); + console.info("[listProps] get globalThis.value is: " + JSON.stringify(globalThis.value)); + + let obj = JSON.parse(globalThis.value.scrollPageNone); + console.info("[listProps] get inspector value is: " + JSON.stringify(obj)); + console.info("[listProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); + + expect(obj.$type).assertEqual('list') + expect(obj.$attrs.id).assertEqual('scrollPageNone') + expect(obj.$attrs.scrollpage).assertEqual(undefined) + console.info("[listProps] get scrollpage value is: " + JSON.stringify(obj.$attrs.scrollpage)); + done(); + }); + + /** + * @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100 + * @tc.name testlistcachedcount + * @tc.desc ACE + */ + it('testlistcachedcount', 0, async function (done) { + console.info('testlistcachedcount START'); + console.info("[listProps] get globalThis.value is: " + JSON.stringify(globalThis.value)); + + let obj = JSON.parse(globalThis.value.cachedcount); + console.info("[listProps] get inspector value is: " + JSON.stringify(obj)); + console.info("[listProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); + + expect(obj.$type).assertEqual('list') + expect(obj.$attrs.id).assertEqual('cachedcount') + expect(obj.$attrs.cachedcount).assertEqual('1') + console.info("[listProps] get cachedcount value is: " + JSON.stringify(obj.$attrs.cachedcount)); + done(); + }); + + /** + * @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100 + * @tc.name testlistscrollbarOff + * @tc.desc ACE + */ + it('testlistscrollbarOff', 0, async function (done) { + console.info('testlistscrollbarOff START'); + console.info("[listProps] get globalThis.value is: " + JSON.stringify(globalThis.value)); + + let obj = JSON.parse(globalThis.value.scrollbarOff); + console.info("[listProps] get inspector value is: " + JSON.stringify(obj)); + console.info("[listProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); + + expect(obj.$type).assertEqual('list') + expect(obj.$attrs.id).assertEqual('scrollbarOff') + expect(obj.$attrs.scrollbar).assertEqual('off') + console.info("[listProps] get scrollbar value is: " + JSON.stringify(obj.$attrs.scrollbar)); + done(); + }); + + /** + * @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100 + * @tc.name testlistscrollbarAuto + * @tc.desc ACE + */ + it('testlistscrollbarAuto', 0, async function (done) { + console.info('testlistscrollbarAuto START'); + console.info("[listProps] get globalThis.value is: " + JSON.stringify(globalThis.value)); + + let obj = JSON.parse(globalThis.value.scrollbarAuto); + console.info("[listProps] get inspector value is: " + JSON.stringify(obj)); + console.info("[listProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); + + expect(obj.$type).assertEqual('list') + expect(obj.$attrs.id).assertEqual('scrollbarAuto') + expect(obj.$attrs.scrollbar).assertEqual('auto') + console.info("[listProps] get scrollbar value is: " + JSON.stringify(obj.$attrs.scrollbar)); + done(); + }); + + /** + * @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100 + * @tc.name testlistscrollbarOn + * @tc.desc ACE + */ + it('testlistscrollbarOn', 0, async function (done) { + console.info('testlistscrollbarOn START'); + console.info("[listProps] get globalThis.value is: " + JSON.stringify(globalThis.value)); + + let obj = JSON.parse(globalThis.value.scrollbarOn); + console.info("[listProps] get inspector value is: " + JSON.stringify(obj)); + console.info("[listProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); + + expect(obj.$type).assertEqual('list') + expect(obj.$attrs.id).assertEqual('scrollbarOn') + expect(obj.$attrs.scrollbar).assertEqual('on') + console.info("[listProps] get scrollbar value is: " + JSON.stringify(obj.$attrs.scrollbar)); + done(); + }); + + + /** + * @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100 + * @tc.name testlistscrollbarNone + * @tc.desc ACE + */ + it('testlistscrollbarNone', 0, async function (done) { + console.info('testlistscrollbarNone START'); + console.info("[listProps] get globalThis.value is: " + JSON.stringify(globalThis.value)); + + let obj = JSON.parse(globalThis.value.scrollbarNone); + console.info("[listProps] get inspector value is: " + JSON.stringify(obj)); + console.info("[listProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); + + expect(obj.$type).assertEqual('list') + expect(obj.$attrs.id).assertEqual('scrollbarNone') + expect(obj.$attrs.scrollbar).assertEqual('on') + console.info("[listProps] get scrollbar value is: " + JSON.stringify(obj.$attrs.scrollbar)); + done(); + }); + + /** + * @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100 + * @tc.name testlistscrolleffectSpring + * @tc.desc ACE + */ + it('testlistscrolleffectSpring', 0, async function (done) { + console.info('testlistscrolleffectSpring START'); + console.info("[listProps] get globalThis.value is: " + JSON.stringify(globalThis.value)); + + let obj = JSON.parse(globalThis.value.scrolleffectSpring); + console.info("[listProps] get inspector value is: " + JSON.stringify(obj)); + console.info("[listProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); + + expect(obj.$type).assertEqual('list') + expect(obj.$attrs.id).assertEqual('scrolleffectSpring') + expect(obj.$attrs.scrolleffect).assertEqual('spring') + console.info("[listProps] get scrolleffect value is: " + JSON.stringify(obj.$attrs.scrolleffect)); + done(); + }); + + /** + * @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100 + * @tc.name testlistscrolleffectFade + * @tc.desc ACE + */ + it('testlistscrolleffectFade', 0, async function (done) { + console.info('testlistscrolleffectFade START'); + console.info("[listProps] get globalThis.value is: " + JSON.stringify(globalThis.value)); + + let obj = JSON.parse(globalThis.value.scrolleffectFade); + console.info("[listProps] get inspector value is: " + JSON.stringify(obj)); + console.info("[listProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); + + expect(obj.$type).assertEqual('list') + expect(obj.$attrs.id).assertEqual('scrolleffectFade') + expect(obj.$attrs.scrolleffect).assertEqual('fade') + console.info("[listProps] get scrolleffect value is: " + JSON.stringify(obj.$attrs.scrolleffect)); + done(); + }); + + /** + * @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100 + * @tc.name testlistscrolleffectNo + * @tc.desc ACE + */ + it('testlistscrolleffectNo', 0, async function (done) { + console.info('testlistscrolleffectNo START'); + console.info("[listProps] get globalThis.value is: " + JSON.stringify(globalThis.value)); + + let obj = JSON.parse(globalThis.value.scrolleffectNo); + console.info("[listProps] get inspector value is: " + JSON.stringify(obj)); + console.info("[listProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); + + expect(obj.$type).assertEqual('list') + expect(obj.$attrs.id).assertEqual('scrolleffectNo') + expect(obj.$attrs.scrolleffect).assertEqual('no') + console.info("[listProps] get scrolleffect value is: " + JSON.stringify(obj.$attrs.scrolleffect)); + done(); + }); + + /** + * @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100 + * @tc.name testlistscrolleffectNone + * @tc.desc ACE + */ + it('testlistscrolleffectNone', 0, async function (done) { + console.info('testlistscrolleffectNone START'); + console.info("[listProps] get globalThis.value is: " + JSON.stringify(globalThis.value)); + + let obj = JSON.parse(globalThis.value.scrolleffectNone); + console.info("[listProps] get inspector value is: " + JSON.stringify(obj)); + console.info("[listProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); + + expect(obj.$type).assertEqual('list') + expect(obj.$attrs.id).assertEqual('scrolleffectNone') + expect(obj.$attrs.scrolleffect).assertEqual(undefined) + console.info("[listProps] get scrolleffect value is: " + JSON.stringify(obj.$attrs.scrolleffect)); + done(); + }); + + /** + * @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100 + * @tc.name testlistindexerTrue + * @tc.desc ACE + */ + it('testlistindexerTrue', 0, async function (done) { + console.info('testlistindexerTrue START'); + console.info("[listProps] get globalThis.value is: " + JSON.stringify(globalThis.value)); + + let obj = JSON.parse(globalThis.value.indexerTrue); + console.info("[listProps] get inspector value is: " + JSON.stringify(obj)); + console.info("[listProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); + + expect(obj.$type).assertEqual('list') + expect(obj.$attrs.id).assertEqual('indexerTrue') + expect(obj.$attrs.indexer).assertEqual('true') + console.info("[listProps] get indexer value is: " + JSON.stringify(obj.$attrs.indexer)); + done(); + }); + + /** + * @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100 + * @tc.name testlistindexerFalse + * @tc.desc ACE + */ + it('testlistindexerFalse', 0, async function (done) { + console.info('testlistindexerFalse START'); + console.info("[listProps] get globalThis.value is: " + JSON.stringify(globalThis.value)); + + let obj = JSON.parse(globalThis.value.indexerFalse); + console.info("[listProps] get inspector value is: " + JSON.stringify(obj)); + console.info("[listProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); + + expect(obj.$type).assertEqual('list') + expect(obj.$attrs.id).assertEqual('indexerFalse') + expect(obj.$attrs.indexer).assertEqual('false') + console.info("[listProps] get indexer value is: " + JSON.stringify(obj.$attrs.indexer)); + done(); + }); + + /** + * @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100 + * @tc.name testlistindexerArray + * @tc.desc ACE + */ + it('testlistindexerArray', 0, async function (done) { + console.info('testlistindexerArray START'); + console.info("[listProps] get globalThis.value is: " + JSON.stringify(globalThis.value)); + + let obj = JSON.parse(globalThis.value.indexerArray); + console.info("[listProps] get inspector value is: " + JSON.stringify(obj)); + console.info("[listProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); + + expect(obj.$type).assertEqual('list') + expect(obj.$attrs.id).assertEqual('indexerArray') + expect(obj.$attrs.indexer).assertEqual('{{array}}') + console.info("[listProps] get indexer value is: " + JSON.stringify(obj.$attrs.indexer)); + done(); + }); + + /** + * @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100 + * @tc.name testlistindexerNone + * @tc.desc ACE + */ + it('testlistindexerNone', 0, async function (done) { + console.info('testlistindexerNone START'); + console.info("[listProps] get globalThis.value is: " + JSON.stringify(globalThis.value)); + + let obj = JSON.parse(globalThis.value.indexerNone); + console.info("[listProps] get inspector value is: " + JSON.stringify(obj)); + console.info("[listProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); + + expect(obj.$type).assertEqual('list') + expect(obj.$attrs.id).assertEqual('indexerNone') + expect(obj.$attrs.indexer).assertEqual(undefined) + console.info("[listProps] get indexer value is: " + JSON.stringify(obj.$attrs.indexer)); + done(); + }); + + /** + * @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100 + * @tc.name testlistindexercircleTrue + * @tc.desc ACE + */ + it('testlistindexercircleTrue', 0, async function (done) { + console.info('testlistindexercircleTrue START'); + console.info("[listProps] get globalThis.value is: " + JSON.stringify(globalThis.value)); + + let obj = JSON.parse(globalThis.value.indexercircleTrue); + console.info("[listProps] get inspector value is: " + JSON.stringify(obj)); + console.info("[listProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); + + expect(obj.$type).assertEqual('list') + expect(obj.$attrs.id).assertEqual('indexercircleTrue') + expect(obj.$attrs.indexercircle).assertEqual('true') + console.info("[listProps] get indexercircle value is: " + JSON.stringify(obj.$attrs.indexercircle)); + done(); + }); + + /** + * @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100 + * @tc.name testlistindexercircleFalse + * @tc.desc ACE + */ + it('testlistindexercircleFalse', 0, async function (done) { + console.info('testlistindexercircleFalse START'); + console.info("[listProps] get globalThis.value is: " + JSON.stringify(globalThis.value)); + + let obj = JSON.parse(globalThis.value.indexercircleFalse); + console.info("[listProps] get inspector value is: " + JSON.stringify(obj)); + console.info("[listProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); + + expect(obj.$type).assertEqual('list') + expect(obj.$attrs.id).assertEqual('indexercircleFalse') + expect(obj.$attrs.indexercircle).assertEqual('false') + console.info("[listProps] get indexercircle value is: " + JSON.stringify(obj.$attrs.indexercircle)); + done(); + }); + + /** + * @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100 + * @tc.name testlistindexercircleNone + * @tc.desc ACE + */ + it('testlistindexercircleNone', 0, async function (done) { + console.info('testlistindexercircleNone START'); + console.info("[listProps] get globalThis.value is: " + JSON.stringify(globalThis.value)); + + let obj = JSON.parse(globalThis.value.indexercircleNone); + console.info("[listProps] get inspector value is: " + JSON.stringify(obj)); + console.info("[listProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); + + expect(obj.$type).assertEqual('list') + expect(obj.$attrs.id).assertEqual('indexercircleNone') + expect(obj.$attrs.indexercircle).assertEqual(undefined) + console.info("[listProps] get indexercircle value is: " + JSON.stringify(obj.$attrs.indexercircle)); + done(); + }); + + /** + * @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100 + * @tc.name testlistindexermultiTrue + * @tc.desc ACE + */ + it('testlistindexermultiTrue', 0, async function (done) { + console.info('testlistindexermultiTrue START'); + console.info("[listProps] get globalThis.value is: " + JSON.stringify(globalThis.value)); + + let obj = JSON.parse(globalThis.value.indexermultiTrue); + console.info("[listProps] get inspector value is: " + JSON.stringify(obj)); + console.info("[listProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); + + expect(obj.$type).assertEqual('list') + expect(obj.$attrs.id).assertEqual('indexermultiTrue') + expect(obj.$attrs.indexermulti).assertEqual('true') + console.info("[listProps] get indexermulti value is: " + JSON.stringify(obj.$attrs.indexermulti)); + done(); + }); + + /** + * @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100 + * @tc.name testlistindexermultiFalse + * @tc.desc ACE + */ + it('testlistindexermultiFalse', 0, async function (done) { + console.info('testlistindexermultiFalse START'); + console.info("[listProps] get globalThis.value is: " + JSON.stringify(globalThis.value)); + + let obj = JSON.parse(globalThis.value.indexermultiFalse); + console.info("[listProps] get inspector value is: " + JSON.stringify(obj)); + console.info("[listProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); + + expect(obj.$type).assertEqual('list') + expect(obj.$attrs.id).assertEqual('indexermultiFalse') + expect(obj.$attrs.indexermulti).assertEqual('false') + console.info("[listProps] get indexermulti value is: " + JSON.stringify(obj.$attrs.indexermulti)); + done(); + }); + + /** + * @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100 + * @tc.name testlistindexermultiNone + * @tc.desc ACE + */ + it('testlistindexermultiNone', 0, async function (done) { + console.info('testlistindexermultiNone START'); + console.info("[listProps] get globalThis.value is: " + JSON.stringify(globalThis.value)); + + let obj = JSON.parse(globalThis.value.indexermultiNone); + console.info("[listProps] get inspector value is: " + JSON.stringify(obj)); + console.info("[listProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); + + expect(obj.$type).assertEqual('list') + expect(obj.$attrs.id).assertEqual('indexermultiNone') + expect(obj.$attrs.indexermulti).assertEqual(undefined) + console.info("[listProps] get indexermulti value is: " + JSON.stringify(obj.$attrs.indexermulti)); + done(); + }); + + /** + * @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100 + * @tc.name testlistindexerbubbleTrue + * @tc.desc ACE + */ + it('testlistindexerbubbleTrue', 0, async function (done) { + console.info('testlistindexerbubbleTrue START'); + console.info("[listProps] get globalThis.value is: " + JSON.stringify(globalThis.value)); + + let obj = JSON.parse(globalThis.value.indexerbubbleTrue); + console.info("[listProps] get inspector value is: " + JSON.stringify(obj)); + console.info("[listProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); + + expect(obj.$type).assertEqual('list') + expect(obj.$attrs.id).assertEqual('indexerbubbleTrue') + expect(obj.$attrs.indexerbubble).assertEqual('true') + console.info("[listProps] get indexerbubble value is: " + JSON.stringify(obj.$attrs.indexerbubble)); + done(); + }); + + /** + * @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100 + * @tc.name testlistindexerbubbleFalse + * @tc.desc ACE + */ + it('testlistindexerbubbleFalse', 0, async function (done) { + console.info('testlistindexerbubbleFalse START'); + console.info("[listProps] get globalThis.value is: " + JSON.stringify(globalThis.value)); + + let obj = JSON.parse(globalThis.value.indexerbubbleFalse); + console.info("[listProps] get inspector value is: " + JSON.stringify(obj)); + console.info("[listProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); + + expect(obj.$type).assertEqual('list') + expect(obj.$attrs.id).assertEqual('indexerbubbleFalse') + expect(obj.$attrs.indexerbubble).assertEqual('false') + console.info("[listProps] get indexerbubble value is: " + JSON.stringify(obj.$attrs.indexerbubble)); + done(); + }); + + /** + * @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100 + * @tc.name testlistindexerbubbleNone + * @tc.desc ACE + */ + it('testlistindexerbubbleNone', 0, async function (done) { + console.info('testlistindexerbubbleNone START'); + console.info("[listProps] get globalThis.value is: " + JSON.stringify(globalThis.value)); + + let obj = JSON.parse(globalThis.value.indexerbubbleNone); + console.info("[listProps] get inspector value is: " + JSON.stringify(obj)); + console.info("[listProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); + + expect(obj.$type).assertEqual('list') + expect(obj.$attrs.id).assertEqual('indexerbubbleNone') + expect(obj.$attrs.indexerbubble).assertEqual(undefined) + console.info("[listProps] get indexerbubble value is: " + JSON.stringify(obj.$attrs.indexerbubble)); + done(); + }); + + /** + * @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100 + * @tc.name testlistdividerTrue + * @tc.desc ACE + */ + it('testlistdividerTrue', 0, async function (done) { + console.info('testlistdividerTrue START'); + console.info("[listProps] get globalThis.value is: " + JSON.stringify(globalThis.value)); + + let obj = JSON.parse(globalThis.value.dividerTrue); + console.info("[listProps] get inspector value is: " + JSON.stringify(obj)); + console.info("[listProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); + + expect(obj.$type).assertEqual('list') + expect(obj.$attrs.id).assertEqual('dividerTrue') + expect(obj.$attrs.divider).assertEqual('true') + console.info("[listProps] get divider value is: " + JSON.stringify(obj.$attrs.divider)); + done(); + }); + + /** + * @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100 + * @tc.name testlistdividerFalse + * @tc.desc ACE + */ + it('testlistdividerFalse', 0, async function (done) { + console.info('testlistdividerFalse START'); + console.info("[listProps] get globalThis.value is: " + JSON.stringify(globalThis.value)); + + let obj = JSON.parse(globalThis.value.dividerFalse); + console.info("[listProps] get inspector value is: " + JSON.stringify(obj)); + console.info("[listProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); + + expect(obj.$type).assertEqual('list') + expect(obj.$attrs.id).assertEqual('dividerFalse') + expect(obj.$attrs.divider).assertEqual('false') + console.info("[listProps] get divider value is: " + JSON.stringify(obj.$attrs.divider)); + done(); + }); + + /** + * @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100 + * @tc.name testlistdividerNone + * @tc.desc ACE + */ + it('testlistdividerNone', 0, async function (done) { + console.info('testlistdividerNone START'); + console.info("[listProps] get globalThis.value is: " + JSON.stringify(globalThis.value)); + + let obj = JSON.parse(globalThis.value.dividerNone); + console.info("[listProps] get inspector value is: " + JSON.stringify(obj)); + console.info("[listProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); + + expect(obj.$type).assertEqual('list') + expect(obj.$attrs.id).assertEqual('dividerNone') + expect(obj.$attrs.divider).assertEqual(undefined) + console.info("[listProps] get divider value is: " + JSON.stringify(obj.$attrs.divider)); + done(); + }); + + /** + * @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100 + * @tc.name testlistshapemodeDefault + * @tc.desc ACE + */ + it('testlistshapemodeDefault', 0, async function (done) { + console.info('testlistshapemodeDefault START'); + console.info("[listProps] get globalThis.value is: " + JSON.stringify(globalThis.value)); + + let obj = JSON.parse(globalThis.value.shapemodeDefault); + console.info("[listProps] get inspector value is: " + JSON.stringify(obj)); + console.info("[listProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); + + expect(obj.$type).assertEqual('list') + expect(obj.$attrs.id).assertEqual('shapemodeDefault') + expect(obj.$attrs.shapemode).assertEqual('default') + console.info("[listProps] get shapemode value is: " + JSON.stringify(obj.$attrs.shapemode)); + done(); + }); + + /** + * @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100 + * @tc.name testlistshapemodeRect + * @tc.desc ACE + */ + it('testlistshapemodeRect', 0, async function (done) { + console.info('testlistshapemodeRect START'); + console.info("[listProps] get globalThis.value is: " + JSON.stringify(globalThis.value)); + + let obj = JSON.parse(globalThis.value.shapemodeRect); + console.info("[listProps] get inspector value is: " + JSON.stringify(obj)); + console.info("[listProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); + + expect(obj.$type).assertEqual('list') + expect(obj.$attrs.id).assertEqual('shapemodeRect') + expect(obj.$attrs.shapemode).assertEqual('rect') + console.info("[listProps] get shapemode value is: " + JSON.stringify(obj.$attrs.shapemode)); + done(); + }); + + /** + * @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100 + * @tc.name testlistshapemodeRound + * @tc.desc ACE + */ + it('testlistshapemodeRound', 0, async function (done) { + console.info('testlistshapemodeRound START'); + console.info("[listProps] get globalThis.value is: " + JSON.stringify(globalThis.value)); + + let obj = JSON.parse(globalThis.value.shapemodeRound); + console.info("[listProps] get inspector value is: " + JSON.stringify(obj)); + console.info("[listProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); + + expect(obj.$type).assertEqual('list') + expect(obj.$attrs.id).assertEqual('shapemodeRound') + expect(obj.$attrs.shapemode).assertEqual('round') + console.info("[listProps] get shapemode value is: " + JSON.stringify(obj.$attrs.shapemode)); + done(); + }); + + /** + * @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100 + * @tc.name testlistshapemodeNone + * @tc.desc ACE + */ + it('testlistshapemodeNone', 0, async function (done) { + console.info('testlistshapemodeNone START'); + console.info("[listProps] get globalThis.value is: " + JSON.stringify(globalThis.value)); + + let obj = JSON.parse(globalThis.value.shapemodeNone); + console.info("[listProps] get inspector value is: " + JSON.stringify(obj)); + console.info("[listProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); + + expect(obj.$type).assertEqual('list') + expect(obj.$attrs.id).assertEqual('shapemodeNone') + expect(obj.$attrs.shapemode).assertEqual(undefined) + console.info("[listProps] get shapemode value is: " + JSON.stringify(obj.$attrs.shapemode)); + done(); + }); + + /** + * @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100 + * @tc.name testlistchainanimationTrue + * @tc.desc ACE + */ + it('testlistchainanimationTrue', 0, async function (done) { + console.info('testlistchainanimationTrue START'); + console.info("[listProps] get globalThis.value is: " + JSON.stringify(globalThis.value)); + + let obj = JSON.parse(globalThis.value.chainanimationTrue); + console.info("[listProps] get inspector value is: " + JSON.stringify(obj)); + console.info("[listProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); + + expect(obj.$type).assertEqual('list') + expect(obj.$attrs.id).assertEqual('chainanimationTrue') + expect(obj.$attrs.chainanimation).assertEqual('true') + console.info("[listProps] get chainanimation value is: " + JSON.stringify(obj.$attrs.chainanimation)); + done(); + }); + + /** + * @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100 + * @tc.name testlistchainanimationFalse + * @tc.desc ACE + */ + it('testlistchainanimationFalse', 0, async function (done) { + console.info('testlistchainanimationFalse START'); + console.info("[listProps] get globalThis.value is: " + JSON.stringify(globalThis.value)); + + let obj = JSON.parse(globalThis.value.chainanimationFalse); + console.info("[listProps] get inspector value is: " + JSON.stringify(obj)); + console.info("[listProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); + + expect(obj.$type).assertEqual('list') + expect(obj.$attrs.id).assertEqual('chainanimationFalse') + expect(obj.$attrs.chainanimation).assertEqual('false') + console.info("[listProps] get chainanimation value is: " + JSON.stringify(obj.$attrs.chainanimation)); + done(); + }); + + /** + * @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100 + * @tc.name testlistchainanimationNone + * @tc.desc ACE + */ + it('testlistchainanimationNone', 0, async function (done) { + console.info('testlistchainanimationNone START'); + console.info("[listProps] get globalThis.value is: " + JSON.stringify(globalThis.value)); + + let obj = JSON.parse(globalThis.value.chainanimationNone); + console.info("[listProps] get inspector value is: " + JSON.stringify(obj)); + console.info("[listProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); + + expect(obj.$type).assertEqual('list') + expect(obj.$attrs.id).assertEqual('chainanimationNone') + expect(obj.$attrs.chainanimation).assertEqual(undefined) + console.info("[listProps] get chainanimation value is: " + JSON.stringify(obj.$attrs.chainanimation)); + done(); + }); + + /** + * @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100 + * @tc.name testlistupdateeffectTrue + * @tc.desc ACE + */ + it('testlistupdateeffectTrue', 0, async function (done) { + console.info('testlistupdateeffectTrue START'); + console.info("[listProps] get globalThis.value is: " + JSON.stringify(globalThis.value)); + + let obj = JSON.parse(globalThis.value.updateeffectTrue); + console.info("[listProps] get inspector value is: " + JSON.stringify(obj)); + console.info("[listProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); + + expect(obj.$type).assertEqual('list') + expect(obj.$attrs.id).assertEqual('updateeffectTrue') + expect(obj.$attrs.updateeffect).assertEqual('true') + console.info("[listProps] get updateeffect value is: " + JSON.stringify(obj.$attrs.updateeffect)); + done(); + }); + + /** + * @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100 + * @tc.name testlistupdateeffectFalse + * @tc.desc ACE + */ + it('testlistupdateeffectFalse', 0, async function (done) { + console.info('testlistupdateeffectFalse START'); + console.info("[listProps] get globalThis.value is: " + JSON.stringify(globalThis.value)); + + let obj = JSON.parse(globalThis.value.updateeffectFalse); + console.info("[listProps] get inspector value is: " + JSON.stringify(obj)); + console.info("[listProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); + + expect(obj.$type).assertEqual('list') + expect(obj.$attrs.id).assertEqual('updateeffectFalse') + expect(obj.$attrs.updateeffect).assertEqual('false') + console.info("[listProps] get updateeffect value is: " + JSON.stringify(obj.$attrs.updateeffect)); + done(); + }); + + /** + * @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100 + * @tc.name testlistupdateeffectNone + * @tc.desc ACE + */ + it('testlistupdateeffectNone', 0, async function (done) { + console.info('testlistupdateeffectNone START'); + console.info("[listProps] get globalThis.value is: " + JSON.stringify(globalThis.value)); + + let obj = JSON.parse(globalThis.value.updateeffectNone); + console.info("[listProps] get inspector value is: " + JSON.stringify(obj)); + console.info("[listProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); + + expect(obj.$type).assertEqual('list') + expect(obj.$attrs.id).assertEqual('updateeffectNone') + expect(obj.$attrs.updateeffect).assertEqual(undefined) + console.info("[listProps] get updateeffect value is: " + JSON.stringify(obj.$attrs.updateeffect)); + done(); + }); + + /** + * @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100 + * @tc.name testlistinitialindex + * @tc.desc ACE + */ + it('testlistinitialindex', 0, async function (done) { + console.info('testlistinitialindex START'); + console.info("[listProps] get globalThis.value is: " + JSON.stringify(globalThis.value)); + + let obj = JSON.parse(globalThis.value.initialindex); + console.info("[listProps] get inspector value is: " + JSON.stringify(obj)); + console.info("[listProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); + + expect(obj.$type).assertEqual('list') + expect(obj.$attrs.id).assertEqual('initialindex') + expect(obj.$attrs.initialindex).assertEqual('0') + console.info("[listProps] get initialindex value is: " + JSON.stringify(obj.$attrs.initialindex)); + done(); + }); + + /** + * @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100 + * @tc.name testlistinitialoffset + * @tc.desc ACE + */ + it('testlistinitialoffset', 0, async function (done) { + console.info('testlistinitialoffset START'); + console.info("[listProps] get globalThis.value is: " + JSON.stringify(globalThis.value)); + + let obj = JSON.parse(globalThis.value.initialoffset); + console.info("[listProps] get inspector value is: " + JSON.stringify(obj)); + console.info("[listProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); + + expect(obj.$type).assertEqual('list') + expect(obj.$attrs.id).assertEqual('initialoffset') + expect(obj.$attrs.initialoffset).assertEqual('0') + console.info("[listProps] get initialoffset value is: " + JSON.stringify(obj.$attrs.initialoffset)); + done(); + }); + + /** + * @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100 + * @tc.name testlistselected + * @tc.desc ACE + */ + it('testlistselected', 0, async function (done) { + console.info('testlistselected START'); + console.info("[listProps] get globalThis.value is: " + JSON.stringify(globalThis.value)); + + let obj = JSON.parse(globalThis.value.selected); + console.info("[listProps] get inspector value is: " + JSON.stringify(obj)); + console.info("[listProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); + + expect(obj.$type).assertEqual('list') + expect(obj.$attrs.id).assertEqual('selected') + expect(obj.$attrs.selected).assertEqual('0') + console.info("[listProps] get selected value is: " + JSON.stringify(obj.$attrs.selected)); + done(); + }); + + /** + * @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100 + * @tc.name testlistselected + * @tc.desc ACE + */ + it('testlistselectedNone', 0, async function (done) { + console.info('testlistselectedNone START'); + console.info("[listProps] get globalThis.value is: " + JSON.stringify(globalThis.value)); + + let obj = JSON.parse(globalThis.value.selectedNone); + console.info("[listProps] get inspector value is: " + JSON.stringify(obj)); + console.info("[listProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); + + expect(obj.$type).assertEqual('list') + expect(obj.$attrs.id).assertEqual('selectedNone') + expect(obj.$attrs.selected).assertEqual(undefined) + console.info("[listProps] get selected value is: " + JSON.stringify(obj.$attrs.selected)); + done(); + }); + }); + \ No newline at end of file diff --git a/ace/ace_standard/src/main/js/default/test/stepperItemProps.test.js b/ace/ace_standard/src/main/js/default/test/stepperItemProps.test.js new file mode 100644 index 0000000000000000000000000000000000000000..1301d0dd19ac011e18d784eec516ae82bf9a0b93 --- /dev/null +++ b/ace/ace_standard/src/main/js/default/test/stepperItemProps.test.js @@ -0,0 +1,707 @@ +/* + * Copyright (C) 2021 Huawei Device 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 router from '@system.router'; +import {describe, beforeAll,afterAll, it, expect} from 'deccjsunit/index'; + + +describe('stepperItemPropsJsTest', function () { + + async function sleep(time) { + return new Promise((resolve, reject) => { + setTimeout(() => { + resolve() + }, time) + }).then(() => { + console.info(`sleep ${time} over...`) + }) + }; + + async function backToIndex() { + let backToIndexPromise = new Promise((resolve, reject) => { + setTimeout(() => { + router.back({ + uri: 'pages/index/index' + }); + resolve(); + }, 500); + }); + let clearPromise = new Promise((resolve, reject) => { + setTimeout(() => { + router.clear(); + resolve(); + }, 500); + }); + await backToIndexPromise.then(() => { + return clearPromise; + }); + } + + /** + * run before testcase + */ + beforeAll(async function (done) { + console.info('[stepperItemPropsJsTest] before each called') + + let result; + let options = { + uri: 'pages/stepperItem/prop/index' + } + try { + result = router.push(options) + console.info("push stepperItemProps page success " + JSON.stringify(result)); + } catch (err) { + console.error("push stepperItemProps page error " + JSON.stringify(result)); + } + await sleep(4000) + done() + }); + + /** + * run after testcase + */ + afterAll(async function () { + console.info('[stepperItemPropsJsTest] after each called') + await backToIndex() + await sleep(1000) + }); + + /** + * @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100 + * @tc.name testStepperItemIdProp + * @tc.desc ACE + */ + it('testStepperItemIdProp', 0, async function (done) { + console.info('testStepperItemIdProp START'); + console.info("[stepperItemProps] get globalThis.value is: " + JSON.stringify(globalThis.value)); + + let obj = JSON.parse(globalThis.value.idProp); + console.info("[stepperItemProps] get inspector value is: " + JSON.stringify(obj)); + console.info("[stepperItemProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); + + expect(obj.$type).assertEqual('stepper-item') + expect(obj.$attrs.id).assertEqual('idProp') + done(); + }); + + /** + * @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100 + * @tc.name testStepperItemClassProp + * @tc.desc ACE + */ + it('testStepperItemClassProp', 0, async function (done) { + console.info('testStepperItemClassProp START'); + console.info("[stepperItemProps] get globalThis.value is: " + JSON.stringify(globalThis.value)); + + let obj = JSON.parse(globalThis.value.classProp); + console.info("[stepperItemProps] get inspector value is: " + JSON.stringify(obj)); + console.info("[stepperItemProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); + + expect(obj.$type).assertEqual('stepper-item') + expect(obj.$attrs.id).assertEqual('classProp') + expect(obj.$attrs.className).assertEqual('classProp') + done(); + }); + + /** + * @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100 + * @tc.name testStepperItemClassPropNone + * @tc.desc ACE + */ + it('testStepperItemClassPropNone', 0, async function (done) { + console.info('testStepperItemClassPropNone START'); + console.info("[stepperItemProps] get globalThis.value is: " + JSON.stringify(globalThis.value)); + + let obj = JSON.parse(globalThis.value.classPropNone); + console.info("[stepperItemProps] get inspector value is: " + JSON.stringify(obj)); + console.info("[stepperItemProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); + + expect(obj.$type).assertEqual('stepper-item') + expect(obj.$attrs.id).assertEqual('classPropNone') + expect(obj.$attrs.className).assertEqual(undefined) + console.info("[stepperItemProps] get className value is: " + JSON.stringify(obj.$attrs.className)); + done(); + }); + + /** + * @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100 + * @tc.name testStepperStyleProp + * @tc.desc ACEs + */ +// it('testDivStyleProp', 0, async function (done) { +// console.info('testDivStyleProp START'); +// console.info("[divProps] get globalThis.value is: " + JSON.stringify(globalThis.value)); +// +// let obj = JSON.parse(globalThis.value.styleProp); +// console.info("[divProps] get inspector value is: " + JSON.stringify(obj)); +// console.info("[divProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); +// +// expect(obj.$type).assertEqual('div') +// expect(obj.$attrs.id).assertEqual('styleProp') +// expect(obj.$attrs.style).assertEqual(undefined) +// console.info("[divProps] get style value is: " + JSON.stringify(obj.$attrs.style)); +// +// expect(obj.$styles.width).assertEqual(undefined); +// console.info("[divProps] get style width value is: " + JSON.stringify(obj.$styles.width)); +// expect(obj.$styles.height).assertEqual(undefined); +// console.info("[divProps] get style height value is: " + JSON.stringify(obj.$styles.height)); +// expect(obj.$styles.get('background-color')).assertEqual(undefined); +// done(); +// }); + + /** + * @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100 + * @tc.name testStepperItemRefProp + * @tc.desc ACE + */ + it('testStepperItemRefProp', 0, async function (done) { + console.info('testStepperItemRefProp START'); + console.info("[stepperItemProps] get globalThis.value is: " + JSON.stringify(globalThis.value)); + + let obj = JSON.parse(globalThis.value.refProp); + console.info("[stepperItemProps] get inspector value is: " + JSON.stringify(obj)); + console.info("[stepperItemProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); + + expect(obj.$type).assertEqual('stepper-item') + expect(obj.$attrs.id).assertEqual('refProp') + expect(obj.$attrs.ref).assertEqual('refProp') + done(); + }); + + /** + * @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100 + * @tc.name testStepperItemRefPropNone + * @tc.desc ACE + */ + it('testStepperItemRefPropNone', 0, async function (done) { + console.info('testStepperItemRefPropNone START'); + console.info("[stepperItemProps] get globalThis.value is: " + JSON.stringify(globalThis.value)); + + let obj = JSON.parse(globalThis.value.refPropNone); + console.info("[stepperItemProps] get inspector value is: " + JSON.stringify(obj)); + console.info("[stepperItemProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); + + expect(obj.$type).assertEqual('stepper-item') + expect(obj.$attrs.id).assertEqual('refPropNone') + expect(obj.$attrs.ref).assertEqual(undefined) + console.info("[stepperItemProps] get ref value is: " + JSON.stringify(obj.$attrs.ref)); + done(); + }); + + /** + * @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100 + * @tc.name testStepperItemDisabledPropTrue + * @tc.desc ACE + */ + it('testStepperItemDisabledPropTrue', 0, async function (done) { + console.info('testStepperItemDisabledPropTrue START'); + console.info("[stepperItemProps] get globalThis.value is: " + JSON.stringify(globalThis.value)); + + let obj = JSON.parse(globalThis.value.disabledPropTrue); + console.info("[stepperItemProps] get inspector value is: " + JSON.stringify(obj)); + console.info("[stepperItemProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); + + expect(obj.$type).assertEqual('stepper-item') + expect(obj.$attrs.id).assertEqual('disabledPropTrue') + expect(obj.$attrs.disabled).assertEqual('true') + done(); + }); + + /** + * @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100 + * @tc.name testStepperItemDisabledPropFalse + * @tc.desc ACE + */ + it('testStepperItemDisabledPropFalse', 0, async function (done) { + console.info('testStepperItemDisabledPropFalse START'); + console.info("[stepperItemProps] get globalThis.value is: " + JSON.stringify(globalThis.value)); + + let obj = JSON.parse(globalThis.value.disabledPropFalse); + console.info("[stepperItemProps] get inspector value is: " + JSON.stringify(obj)); + console.info("[stepperItemProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); + + expect(obj.$type).assertEqual('stepper-item') + expect(obj.$attrs.id).assertEqual('disabledPropFalse') + expect(obj.$attrs.disabled).assertEqual('false') + done(); + }); + + /** + * @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100 + * @tc.name testStepperItemDisabledPropNone + * @tc.desc ACE + */ + it('testStepperItemDisabledPropNone', 0, async function (done) { + console.info('testStepperItemDisabledPropNone START'); + console.info("[stepperItemProps] get globalThis.value is: " + JSON.stringify(globalThis.value)); + + let obj = JSON.parse(globalThis.value.disabledPropNone); + console.info("[stepperItemProps] get inspector value is: " + JSON.stringify(obj)); + console.info("[stepperItemProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); + + expect(obj.$type).assertEqual('stepper-item') + expect(obj.$attrs.id).assertEqual('disabledPropNone') + expect(obj.$attrs.disabled).assertEqual('false') + done(); + }); + + /** + * @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100 + * @tc.name testStepperItemFocusablePropTrue + * @tc.desc ACE + */ + it('testStepperItemFocusablePropTrue', 0, async function (done) { + console.info('testStepperItemFocusablePropTrue START'); + console.info("[stepperItemProps] get globalThis.value is: " + JSON.stringify(globalThis.value)); + + let obj = JSON.parse(globalThis.value.focusablePropTrue); + console.info("[stepperItemProps] get inspector value is: " + JSON.stringify(obj)); + console.info("[stepperItemProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); + + expect(obj.$type).assertEqual('stepper-item') + expect(obj.$attrs.id).assertEqual('focusablePropTrue') + expect(obj.$attrs.focusable).assertEqual('true') + done(); + }); + + /** + * @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100 + * @tc.name testStepperItemFocusablePropFalse + * @tc.desc ACE + */ + it('testStepperItemFocusablePropFalse', 0, async function (done) { + console.info('testStepperItemFocusablePropFalse START'); + console.info("[stepperItemProps] get globalThis.value is: " + JSON.stringify(globalThis.value)); + + let obj = JSON.parse(globalThis.value.focusablePropFalse); + console.info("[stepperItemProps] get inspector value is: " + JSON.stringify(obj)); + console.info("[stepperItemProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); + + expect(obj.$type).assertEqual('stepper-item') + expect(obj.$attrs.id).assertEqual('focusablePropFalse') + expect(obj.$attrs.focusable).assertEqual('false') + done(); + }); + + /** + * @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100 + * @tc.name testStepperItemFocusablePropNone + * @tc.desc ACE + */ + it('testStepperItemFocusablePropNone', 0, async function (done) { + console.info('testStepperItemFocusablePropNone START'); + console.info("[stepperItemProps] get globalThis.value is: " + JSON.stringify(globalThis.value)); + + let obj = JSON.parse(globalThis.value.focusablePropNone); + console.info("[stepperItemProps] get inspector value is: " + JSON.stringify(obj)); + console.info("[stepperItemProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); + + expect(obj.$type).assertEqual('stepper-item') + expect(obj.$attrs.id).assertEqual('focusablePropNone') + expect(obj.$attrs.focusable).assertEqual('false') + done(); + }); + + /** + * @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100 + * @tc.name testStepperItemDataProp + * @tc.desc ACE + */ + it('testStepperItemDataProp', 0, async function (done) { + console.info('testStepperItemDataProp START'); + console.info("[stepperItemProps] get globalThis.value is: " + JSON.stringify(globalThis.value)); + + let obj = JSON.parse(globalThis.value.dataProp); + console.info("[stepperItemProps] get inspector value is: " + JSON.stringify(obj)); + console.info("[stepperItemProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); + + expect(obj.$type).assertEqual('stepper-item') + expect(obj.$attrs.id).assertEqual('dataProp') + expect(obj.$attrs.dataDiv).assertEqual(undefined); + console.info("[stepperItemProps] get dataDiv value is: " + JSON.stringify(obj.$attrs.dataDiv)); + done(); + }); + + /** + * @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100 + * @tc.name testStepperItemDataPropNone + * @tc.desc ACE + */ + it('testStepperItemDataPropNone', 0, async function (done) { + console.info('testStepperItemDataPropNone START'); + console.info("[stepperItemProps] get globalThis.value is: " + JSON.stringify(globalThis.value)); + + let obj = JSON.parse(globalThis.value.dataPropNone); + console.info("[stepperItemProps] get inspector value is: " + JSON.stringify(obj)); + console.info("[stepperItemProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); + + expect(obj.$type).assertEqual('stepper-item') + expect(obj.$attrs.id).assertEqual('dataPropNone') + expect(obj.$attrs.dataDiv).assertEqual(undefined) + console.info("[stepperItemProps] get dataDiv value is: " + JSON.stringify(obj.$attrs.dataDiv)); + done(); + }); + + /** + * @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100 + * @tc.name testStepperItemClickEffectPropSmall + * @tc.desc ACE + */ + it('testStepperItemClickEffectPropSmall', 0, async function (done) { + console.info('testStepperItemClickEffectPropSmall START'); + console.info("[stepperItemProps] get globalThis.value is: " + JSON.stringify(globalThis.value)); + + let obj = JSON.parse(globalThis.value.clickEffectPropSmall); + console.info("[stepperItemProps] get inspector value is: " + JSON.stringify(obj)); + console.info("[stepperItemProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); + + expect(obj.$type).assertEqual('stepper-item') + expect(obj.$attrs.id).assertEqual('clickEffectPropSmall') + expect(obj.$attrs.clickEffect).assertEqual('spring-small') + done(); + }); + + /** + * @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100 + * @tc.name testStepperItemClickEffectPropMedium + * @tc.desc ACE + */ + it('testStepperItemClickEffectPropMedium', 0, async function (done) { + console.info('testStepperItemClickEffectPropMedium START'); + console.info("[stepperItemProps] get globalThis.value is: " + JSON.stringify(globalThis.value)); + + let obj = JSON.parse(globalThis.value.clickEffectPropMedium); + console.info("[stepperItemProps] get inspector value is: " + JSON.stringify(obj)); + console.info("[stepperItemProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); + + expect(obj.$type).assertEqual('stepper-item') + expect(obj.$attrs.id).assertEqual('clickEffectPropMedium') + expect(obj.$attrs.clickEffect).assertEqual('spring-medium') + done(); + }); + + /** + * @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100 + * @tc.name testStepperItemClickEffectPropLarge + * @tc.desc ACE + */ + it('testStepperItemClickEffectPropLarge', 0, async function (done) { + console.info('testStepperItemClickEffectPropLarge START'); + console.info("[stepperItemProps] get globalThis.value is: " + JSON.stringify(globalThis.value)); + + let obj = JSON.parse(globalThis.value.clickEffectPropLarge); + console.info("[stepperItemProps] get inspector value is: " + JSON.stringify(obj)); + console.info("[stepperItemProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); + + expect(obj.$type).assertEqual('stepper-item') + expect(obj.$attrs.id).assertEqual('clickEffectPropLarge') + expect(obj.$attrs.clickEffect).assertEqual('spring-large') + done(); + }); + + /** + * @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100 + * @tc.name testStepperItemClickEffectPropNone + * @tc.desc ACE + */ + it('testStepperItemClickEffectPropNone', 0, async function (done) { + console.info('testStepperItemClickEffectPropNone START'); + console.info("[stepperItemProps] get globalThis.value is: " + JSON.stringify(globalThis.value)); + + let obj = JSON.parse(globalThis.value.clickEffectPropNone); + console.info("[stepperItemProps] get inspector value is: " + JSON.stringify(obj)); + console.info("[stepperItemProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); + + expect(obj.$type).assertEqual('stepper-item') + expect(obj.$attrs.id).assertEqual('clickEffectPropNone') + expect(obj.$attrs.clickEffect).assertEqual(undefined) + console.info("[stepperItemProps] get clickEffect value is: " + JSON.stringify(obj.$attrs.clickEffect)); + done(); + }); + + /** + * @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100 + * @tc.name testStepperItemDirPropRtl + * @tc.desc ACE + */ + it('testStepperItemDirPropRtl', 0, async function (done) { + console.info('testStepperItemDirPropRtl START'); + console.info("[stepperItemProps] get globalThis.value is: " + JSON.stringify(globalThis.value)); + + let obj = JSON.parse(globalThis.value.dirPropRtl); + console.info("[stepperItemProps] get inspector value is: " + JSON.stringify(obj)); + console.info("[stepperItemProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); + + expect(obj.$type).assertEqual('stepper-item') + expect(obj.$attrs.id).assertEqual('dirPropRtl') + expect(obj.$attrs.dir).assertEqual('rtl') + done(); + }); + + /** + * @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100 + * @tc.name testStepperItemDirPropLtr + * @tc.desc ACE + */ + it('testStepperItemDirPropLtr', 0, async function (done) { + console.info('testStepperItemDirPropLtr START'); + console.info("[stepperItemProps] get globalThis.value is: " + JSON.stringify(globalThis.value)); + + let obj = JSON.parse(globalThis.value.dirPropLtr); + console.info("[stepperItemProps] get inspector value is: " + JSON.stringify(obj)); + console.info("[stepperItemProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); + + expect(obj.$type).assertEqual('stepper-item') + expect(obj.$attrs.id).assertEqual('dirPropLtr') + expect(obj.$attrs.dir).assertEqual('ltr') + done(); + }); + + /** + * @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100 + * @tc.name testStepperItemDirPropAuto + * @tc.desc ACE + */ + it('testStepperItemDirPropAuto', 0, async function (done) { + console.info('testStepperItemDirPropAuto START'); + console.info("[stepperItemProps] get globalThis.value is: " + JSON.stringify(globalThis.value)); + + let obj = JSON.parse(globalThis.value.dirPropAuto); + console.info("[stepperItemProps] get inspector value is: " + JSON.stringify(obj)); + console.info("[stepperItemProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); + + expect(obj.$type).assertEqual('stepper-item') + expect(obj.$attrs.id).assertEqual('dirPropAuto') + expect(obj.$attrs.dir).assertEqual('auto') + done(); + }); + + /** + * @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100 + * @tc.name testStepperItemDirPropNone + * @tc.desc ACE + */ + it('testStepperItemDirPropNone', 0, async function (done) { + console.info('testStepperItemDirPropNone START'); + console.info("[stepperItemProps] get globalThis.value is: " + JSON.stringify(globalThis.value)); + + let obj = JSON.parse(globalThis.value.dirPropNone); + console.info("[stepperItemProps] get inspector value is: " + JSON.stringify(obj)); + console.info("[stepperItemProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); + + expect(obj.$type).assertEqual('stepper-item') + expect(obj.$attrs.id).assertEqual('dirPropNone') + expect(obj.$attrs.dir).assertEqual('auto') + done(); + }); + + /** + * @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100 + * @tc.name testStepperItemForPropNull + * @tc.desc ACE + */ + it('testStepperItemForPropNull', 0, async function (done) { + console.info('testStepperItemForPropNull START'); + console.info("[stepperItemProps] get globalThis.value is: " + JSON.stringify(globalThis.value)); + + let obj = JSON.parse(globalThis.value.forPropNull); + console.info("[stepperItemProps] get inspector value is: " + JSON.stringify(obj)); + console.info("[stepperItemProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); + + expect(obj.$type).assertEqual('stepper-item') + expect(obj.$attrs.id).assertEqual('forPropNull') + expect(obj.$attrs.for).assertEqual(undefined) + console.info("[stepperItemProps] get for value is: " + JSON.stringify(obj.$attrs.for)); + done(); + }); + + /** + * @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100 + * @tc.name testStepperForPropOne + * @tc.desc ACE + */ + it('testStepperItemForPropOne', 0, async function (done) { + console.info('testStepperItemForPropOne START'); + console.info("[stepperItemProps] get globalThis.value is: " + JSON.stringify(globalThis.value)); + + let obj = JSON.parse(globalThis.value.forPropOne); + console.info("[stepperItemProps] get inspector value is: " + JSON.stringify(obj)); + console.info("[stepperItemProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); + + expect(obj.$type).assertEqual('stepper-item') + expect(obj.$attrs.id).assertEqual('forPropOne') + expect(obj.$attrs.for).assertEqual(undefined) + console.info("[stepperItemProps] get for value is: " + JSON.stringify(obj.$attrs.for)); + done(); + }); + + /** + * @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100 + * @tc.name testStepperForPropThree + * @tc.desc ACE + */ + it('testStepperItemForPropThree', 0, async function (done) { + console.info('testStepperItemForPropThree START'); + console.info("[stepperItemProps] get globalThis.value is: " + JSON.stringify(globalThis.value)); + + let obj = JSON.parse(globalThis.value.forPropThree); + console.info("[stepperItemProps] get inspector value is: " + JSON.stringify(obj)); + console.info("[stepperItemProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); + + expect(obj.$type).assertEqual('stepper-item') + expect(obj.$attrs.id).assertEqual('forPropThree') + expect(obj.$attrs.for).assertEqual(undefined) + console.info("[stepperItemProps] get for value is: " + JSON.stringify(obj.$attrs.for)); + done(); + }); + + /** + * @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100 + * @tc.name testStepperItemIfPropTrue + * @tc.desc ACE + */ + it('testStepperItemIfPropTrue', 0, async function (done) { + console.info('testStepperItemIfPropTrue START'); + console.info("[stepperItemProps] get globalThis.value is: " + JSON.stringify(globalThis.value)); + + let obj = JSON.parse(globalThis.value.ifPropTrue); + console.info("[stepperItemProps] get inspector value is: " + JSON.stringify(obj)); + console.info("[stepperItemProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); + + expect(obj.$type).assertEqual('stepper-item') + expect(obj.$attrs.id).assertEqual('ifPropTrue') + expect(obj.$attrs.if).assertEqual(undefined) + console.info("[stepperItemProps] get for value is: " + JSON.stringify(obj.$attrs.if)); + done(); + }); + + /** + * @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100 + * @tc.name testStepperIfPropFalse + * @tc.desc ACE + */ + // it('testDivIfPropFalse', 0, async function (done) { + // console.info('testDivIfPropFalse START'); + // console.info("[divProps] get globalThis.value is: " + JSON.stringify(globalThis.value)); + // + // let obj = JSON.parse(globalThis.value.ifPropFalse); + // console.info("[divProps] get inspector value is: " + JSON.stringify(obj)); + // console.info("[divProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); + // + // expect(obj.$type).assertEqual('div') + // expect(obj.$attrs.id).assertEqual('ifPropFalse') + // expect(obj.$attrs.if).assertEqual(false) + // done(); + // }); + + /** + * @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100 + * @tc.name testDivIfPropNone + * @tc.desc ACE + */ + // it('testDivIfPropNone', 0, async function (done) { + // console.info('testDivIfPropNone START'); + // console.info("[divProps] get globalThis.value is: " + JSON.stringify(globalThis.value)); + // + // let obj = JSON.parse(globalThis.value.ifPropNone); + // console.info("[divProps] get inspector value is: " + JSON.stringify(obj)); + // console.info("[divProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); + // + // expect(obj.$type).assertEqual('div') + // expect(obj.$attrs.id).assertEqual('ifPropNone') + // expect(obj.$attrs.if).assertEqual(false) + // done(); + // }); + + /** + * @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100 + * @tc.name testStepperItemShowPropTrue + * @tc.desc ACE + */ + it('testStepperItemShowPropTrue', 0, async function (done) { + console.info('testStepperItemShowPropTrue START'); + console.info("[stepperItemProps] get globalThis.value is: " + JSON.stringify(globalThis.value)); + + let obj = JSON.parse(globalThis.value.showPropTrue); + console.info("[stepperItemProps] get inspector value is: " + JSON.stringify(obj)); + console.info("[stepperItemProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); + + expect(obj.$type).assertEqual('stepper-item') + expect(obj.$attrs.id).assertEqual('showPropTrue') + expect(obj.$attrs.show).assertEqual('true') + console.info("[stepperItemProps] get show value is: " + JSON.stringify(obj.$attrs.show)); + done(); + }); + + /** + * @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100 + * @tc.name testStepperItemShowPropFalse + * @tc.desc ACE + */ + it('testStepperItemShowPropFalse', 0, async function (done) { + console.info('testStepperItemShowPropFalse START'); + console.info("[stepperItemProps] get globalThis.value is: " + JSON.stringify(globalThis.value)); + + let obj = JSON.parse(globalThis.value.showPropFalse); + console.info("[stepperItemProps] get inspector value is: " + JSON.stringify(obj)); + console.info("[stepperItemProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); + + expect(obj.$type).assertEqual('stepper-item') + expect(obj.$attrs.id).assertEqual('showPropFalse') + expect(obj.$attrs.show).assertEqual('false') + console.info("[stepperItemProps] get show value is: " + JSON.stringify(obj.$attrs.show)); + done(); + }); + + /** + * @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100 + * @tc.name testStepperItemShowPropNone + * @tc.desc ACE + */ + it('testStepperItemShowPropNone', 0, async function (done) { + console.info('testStepperItemShowPropNone START'); + console.info("[stepperItemProps] get globalThis.value is: " + JSON.stringify(globalThis.value)); + + let obj = JSON.parse(globalThis.value.showPropNone); + console.info("[stepperItemProps] get inspector value is: " + JSON.stringify(obj)); + console.info("[stepperItemProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); + + expect(obj.$type).assertEqual('stepper-item') + expect(obj.$attrs.id).assertEqual('showPropNone') + expect(obj.$attrs.show).assertEqual('true') + console.info("[stepperItemProps] get show value is: " + JSON.stringify(obj.$attrs.show)); + done(); + }); + + /** + * @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100 + * @tc.name testStepperItemLabelProp + * @tc.desc ACE + */ + it('testStepperItemLabelProp', 0, async function (done) { + console.info('testStepperItemLabelProp START'); + console.info("[stepperItemProps] get globalThis.value is: " + JSON.stringify(globalThis.value)); + + let obj = JSON.parse(globalThis.value.indexProp); + console.info("[stepperItemProps] get inspector value is: " + JSON.stringify(obj)); + console.info("[stepperItemProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); + + expect(obj.$type).assertEqual('stepper-item') + expect(obj.$attrs.id).assertEqual('labelProp') + expect(obj.$attrs.label).assertEqual(undefined) + console.info("[stepperItemProps] get label value is: " + JSON.stringify(obj.$attrs.label)); + done(); + }); +}); diff --git a/ace/ace_standard/src/main/js/default/test/stepperProps.test.js b/ace/ace_standard/src/main/js/default/test/stepperProps.test.js new file mode 100644 index 0000000000000000000000000000000000000000..a4bd1e22b22aabd29dea5593c0491d10a522e28b --- /dev/null +++ b/ace/ace_standard/src/main/js/default/test/stepperProps.test.js @@ -0,0 +1,707 @@ +/* + * Copyright (C) 2021 Huawei Device 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 router from '@system.router'; +import {describe, beforeAll,afterAll, it, expect} from 'deccjsunit/index'; + + +describe('stepperPropsJsTest', function () { + + async function sleep(time) { + return new Promise((resolve, reject) => { + setTimeout(() => { + resolve() + }, time) + }).then(() => { + console.info(`sleep ${time} over...`) + }) + }; + + async function backToIndex() { + let backToIndexPromise = new Promise((resolve, reject) => { + setTimeout(() => { + router.back({ + uri: 'pages/index/index' + }); + resolve(); + }, 500); + }); + let clearPromise = new Promise((resolve, reject) => { + setTimeout(() => { + router.clear(); + resolve(); + }, 500); + }); + await backToIndexPromise.then(() => { + return clearPromise; + }); + } + + /** + * run before testcase + */ + beforeAll(async function (done) { + console.info('[stepperPropsJsTest] before each called') + + let result; + let options = { + uri: 'pages/stepper/prop/index' + } + try { + result = router.push(options) + console.info("push stepperProps page success " + JSON.stringify(result)); + } catch (err) { + console.error("push stepperProps page error " + JSON.stringify(result)); + } + await sleep(4000) + done() + }); + + /** + * run after testcase + */ + afterAll(async function () { + console.info('[stepperPropsJsTest] after each called') + await backToIndex() + await sleep(1000) + }); + + /** + * @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100 + * @tc.name testStepperIdProp + * @tc.desc ACE + */ + it('testStepperIdProp', 0, async function (done) { + console.info('testStepperIdProp START'); + console.info("[stepperProps] get globalThis.value is: " + JSON.stringify(globalThis.value)); + + let obj = JSON.parse(globalThis.value.idProp); + console.info("[stepperProps] get inspector value is: " + JSON.stringify(obj)); + console.info("[stepperProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); + + expect(obj.$type).assertEqual('stepper') + expect(obj.$attrs.id).assertEqual('idProp') + done(); + }); + + /** + * @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100 + * @tc.name testStepperClassProp + * @tc.desc ACE + */ + it('testStepperClassProp', 0, async function (done) { + console.info('testStepperClassProp START'); + console.info("[stepperProps] get globalThis.value is: " + JSON.stringify(globalThis.value)); + + let obj = JSON.parse(globalThis.value.classProp); + console.info("[stepperProps] get inspector value is: " + JSON.stringify(obj)); + console.info("[stepperProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); + + expect(obj.$type).assertEqual('stepper') + expect(obj.$attrs.id).assertEqual('classProp') + expect(obj.$attrs.className).assertEqual('classProp') + done(); + }); + + /** + * @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100 + * @tc.name testStepperClassPropNone + * @tc.desc ACE + */ + it('testStepperClassPropNone', 0, async function (done) { + console.info('testStepperClassPropNone START'); + console.info("[stepperProps] get globalThis.value is: " + JSON.stringify(globalThis.value)); + + let obj = JSON.parse(globalThis.value.classPropNone); + console.info("[stepperProps] get inspector value is: " + JSON.stringify(obj)); + console.info("[stepperProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); + + expect(obj.$type).assertEqual('stepper') + expect(obj.$attrs.id).assertEqual('classPropNone') + expect(obj.$attrs.className).assertEqual(undefined) + console.info("[stepperProps] get className value is: " + JSON.stringify(obj.$attrs.className)); + done(); + }); + + /** + * @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100 + * @tc.name testStepperStyleProp + * @tc.desc ACEs + */ +// it('testDivStyleProp', 0, async function (done) { +// console.info('testDivStyleProp START'); +// console.info("[divProps] get globalThis.value is: " + JSON.stringify(globalThis.value)); +// +// let obj = JSON.parse(globalThis.value.styleProp); +// console.info("[divProps] get inspector value is: " + JSON.stringify(obj)); +// console.info("[divProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); +// +// expect(obj.$type).assertEqual('div') +// expect(obj.$attrs.id).assertEqual('styleProp') +// expect(obj.$attrs.style).assertEqual(undefined) +// console.info("[divProps] get style value is: " + JSON.stringify(obj.$attrs.style)); +// +// expect(obj.$styles.width).assertEqual(undefined); +// console.info("[divProps] get style width value is: " + JSON.stringify(obj.$styles.width)); +// expect(obj.$styles.height).assertEqual(undefined); +// console.info("[divProps] get style height value is: " + JSON.stringify(obj.$styles.height)); +// expect(obj.$styles.get('background-color')).assertEqual(undefined); +// done(); +// }); + + /** + * @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100 + * @tc.name testStepperRefProp + * @tc.desc ACE + */ + it('testStepperRefProp', 0, async function (done) { + console.info('testStepperRefProp START'); + console.info("[stepperProps] get globalThis.value is: " + JSON.stringify(globalThis.value)); + + let obj = JSON.parse(globalThis.value.refProp); + console.info("[stepperProps] get inspector value is: " + JSON.stringify(obj)); + console.info("[stepperProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); + + expect(obj.$type).assertEqual('stepper') + expect(obj.$attrs.id).assertEqual('refProp') + expect(obj.$attrs.ref).assertEqual('refProp') + done(); + }); + + /** + * @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100 + * @tc.name testStepperRefPropNone + * @tc.desc ACE + */ + it('testStepperRefPropNone', 0, async function (done) { + console.info('testStepperRefPropNone START'); + console.info("[stepperProps] get globalThis.value is: " + JSON.stringify(globalThis.value)); + + let obj = JSON.parse(globalThis.value.refPropNone); + console.info("[stepperProps] get inspector value is: " + JSON.stringify(obj)); + console.info("[stepperProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); + + expect(obj.$type).assertEqual('stepper') + expect(obj.$attrs.id).assertEqual('refPropNone') + expect(obj.$attrs.ref).assertEqual(undefined) + console.info("[stepperProps] get ref value is: " + JSON.stringify(obj.$attrs.ref)); + done(); + }); + + /** + * @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100 + * @tc.name testStepperDisabledPropTrue + * @tc.desc ACE + */ + it('testStepperDisabledPropTrue', 0, async function (done) { + console.info('testStepperDisabledPropTrue START'); + console.info("[stepperProps] get globalThis.value is: " + JSON.stringify(globalThis.value)); + + let obj = JSON.parse(globalThis.value.disabledPropTrue); + console.info("[stepperProps] get inspector value is: " + JSON.stringify(obj)); + console.info("[stepperProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); + + expect(obj.$type).assertEqual('stepper') + expect(obj.$attrs.id).assertEqual('disabledPropTrue') + expect(obj.$attrs.disabled).assertEqual('true') + done(); + }); + + /** + * @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100 + * @tc.name testStepperDisabledPropFalse + * @tc.desc ACE + */ + it('testStepperDisabledPropFalse', 0, async function (done) { + console.info('testStepperDisabledPropFalse START'); + console.info("[stepperProps] get globalThis.value is: " + JSON.stringify(globalThis.value)); + + let obj = JSON.parse(globalThis.value.disabledPropFalse); + console.info("[stepperProps] get inspector value is: " + JSON.stringify(obj)); + console.info("[stepperProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); + + expect(obj.$type).assertEqual('stepper') + expect(obj.$attrs.id).assertEqual('disabledPropFalse') + expect(obj.$attrs.disabled).assertEqual('false') + done(); + }); + + /** + * @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100 + * @tc.name testStepperDisabledPropNone + * @tc.desc ACE + */ + it('testStepperDisabledPropNone', 0, async function (done) { + console.info('testStepperDisabledPropNone START'); + console.info("[stepperProps] get globalThis.value is: " + JSON.stringify(globalThis.value)); + + let obj = JSON.parse(globalThis.value.disabledPropNone); + console.info("[stepperProps] get inspector value is: " + JSON.stringify(obj)); + console.info("[stepperProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); + + expect(obj.$type).assertEqual('stepper') + expect(obj.$attrs.id).assertEqual('disabledPropNone') + expect(obj.$attrs.disabled).assertEqual('false') + done(); + }); + + /** + * @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100 + * @tc.name testStepperFocusablePropTrue + * @tc.desc ACE + */ + it('testStepperFocusablePropTrue', 0, async function (done) { + console.info('testStepperFocusablePropTrue START'); + console.info("[stepperProps] get globalThis.value is: " + JSON.stringify(globalThis.value)); + + let obj = JSON.parse(globalThis.value.focusablePropTrue); + console.info("[stepperProps] get inspector value is: " + JSON.stringify(obj)); + console.info("[stepperProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); + + expect(obj.$type).assertEqual('stepper') + expect(obj.$attrs.id).assertEqual('focusablePropTrue') + expect(obj.$attrs.focusable).assertEqual('true') + done(); + }); + + /** + * @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100 + * @tc.name testStepperFocusablePropFalse + * @tc.desc ACE + */ + it('testStepperFocusablePropFalse', 0, async function (done) { + console.info('testStepperFocusablePropFalse START'); + console.info("[stepperProps] get globalThis.value is: " + JSON.stringify(globalThis.value)); + + let obj = JSON.parse(globalThis.value.focusablePropFalse); + console.info("[stepperProps] get inspector value is: " + JSON.stringify(obj)); + console.info("[stepperProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); + + expect(obj.$type).assertEqual('stepper') + expect(obj.$attrs.id).assertEqual('focusablePropFalse') + expect(obj.$attrs.focusable).assertEqual('false') + done(); + }); + + /** + * @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100 + * @tc.name testStepperFocusablePropNone + * @tc.desc ACE + */ + it('testStepperFocusablePropNone', 0, async function (done) { + console.info('testStepperFocusablePropNone START'); + console.info("[stepperProps] get globalThis.value is: " + JSON.stringify(globalThis.value)); + + let obj = JSON.parse(globalThis.value.focusablePropNone); + console.info("[stepperProps] get inspector value is: " + JSON.stringify(obj)); + console.info("[stepperProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); + + expect(obj.$type).assertEqual('stepper') + expect(obj.$attrs.id).assertEqual('focusablePropNone') + expect(obj.$attrs.focusable).assertEqual('false') + done(); + }); + + /** + * @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100 + * @tc.name testStepperDataProp + * @tc.desc ACE + */ + it('testStepperDataProp', 0, async function (done) { + console.info('testStepperDataProp START'); + console.info("[stepperProps] get globalThis.value is: " + JSON.stringify(globalThis.value)); + + let obj = JSON.parse(globalThis.value.dataProp); + console.info("[stepperProps] get inspector value is: " + JSON.stringify(obj)); + console.info("[stepperProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); + + expect(obj.$type).assertEqual('stepper') + expect(obj.$attrs.id).assertEqual('dataProp') + expect(obj.$attrs.dataDiv).assertEqual(undefined); + console.info("[stepperProps] get dataDiv value is: " + JSON.stringify(obj.$attrs.dataDiv)); + done(); + }); + + /** + * @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100 + * @tc.name testStepperDataPropNone + * @tc.desc ACE + */ + it('testStepperDataPropNone', 0, async function (done) { + console.info('testStepperDataPropNone START'); + console.info("[stepperProps] get globalThis.value is: " + JSON.stringify(globalThis.value)); + + let obj = JSON.parse(globalThis.value.dataPropNone); + console.info("[stepperProps] get inspector value is: " + JSON.stringify(obj)); + console.info("[stepperProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); + + expect(obj.$type).assertEqual('stepper') + expect(obj.$attrs.id).assertEqual('dataPropNone') + expect(obj.$attrs.dataDiv).assertEqual(undefined) + console.info("[stepperProps] get dataDiv value is: " + JSON.stringify(obj.$attrs.dataDiv)); + done(); + }); + + /** + * @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100 + * @tc.name testStepperClickEffectPropSmall + * @tc.desc ACE + */ + it('testStepperClickEffectPropSmall', 0, async function (done) { + console.info('testStepperClickEffectPropSmall START'); + console.info("[stepperProps] get globalThis.value is: " + JSON.stringify(globalThis.value)); + + let obj = JSON.parse(globalThis.value.clickEffectPropSmall); + console.info("[stepperProps] get inspector value is: " + JSON.stringify(obj)); + console.info("[stepperProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); + + expect(obj.$type).assertEqual('stepper') + expect(obj.$attrs.id).assertEqual('clickEffectPropSmall') + expect(obj.$attrs.clickEffect).assertEqual('spring-small') + done(); + }); + + /** + * @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100 + * @tc.name testStepperClickEffectPropMedium + * @tc.desc ACE + */ + it('testStepperClickEffectPropMedium', 0, async function (done) { + console.info('testStepperClickEffectPropMedium START'); + console.info("[stepperProps] get globalThis.value is: " + JSON.stringify(globalThis.value)); + + let obj = JSON.parse(globalThis.value.clickEffectPropMedium); + console.info("[stepperProps] get inspector value is: " + JSON.stringify(obj)); + console.info("[stepperProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); + + expect(obj.$type).assertEqual('stepper') + expect(obj.$attrs.id).assertEqual('clickEffectPropMedium') + expect(obj.$attrs.clickEffect).assertEqual('spring-medium') + done(); + }); + + /** + * @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100 + * @tc.name testStepperClickEffectPropLarge + * @tc.desc ACE + */ + it('testStepperClickEffectPropLarge', 0, async function (done) { + console.info('testStepperClickEffectPropLarge START'); + console.info("[stepperProps] get globalThis.value is: " + JSON.stringify(globalThis.value)); + + let obj = JSON.parse(globalThis.value.clickEffectPropLarge); + console.info("[stepperProps] get inspector value is: " + JSON.stringify(obj)); + console.info("[stepperProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); + + expect(obj.$type).assertEqual('stepper') + expect(obj.$attrs.id).assertEqual('clickEffectPropLarge') + expect(obj.$attrs.clickEffect).assertEqual('spring-large') + done(); + }); + + /** + * @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100 + * @tc.name testStepperClickEffectPropNone + * @tc.desc ACE + */ + it('testStepperClickEffectPropNone', 0, async function (done) { + console.info('testStepperClickEffectPropNone START'); + console.info("[stepperProps] get globalThis.value is: " + JSON.stringify(globalThis.value)); + + let obj = JSON.parse(globalThis.value.clickEffectPropNone); + console.info("[stepperProps] get inspector value is: " + JSON.stringify(obj)); + console.info("[stepperProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); + + expect(obj.$type).assertEqual('stepper') + expect(obj.$attrs.id).assertEqual('clickEffectPropNone') + expect(obj.$attrs.clickEffect).assertEqual(undefined) + console.info("[stepperProps] get clickEffect value is: " + JSON.stringify(obj.$attrs.clickEffect)); + done(); + }); + + /** + * @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100 + * @tc.name testStepperDirPropRtl + * @tc.desc ACE + */ + it('testStepperDirPropRtl', 0, async function (done) { + console.info('testStepperDirPropRtl START'); + console.info("[stepperProps] get globalThis.value is: " + JSON.stringify(globalThis.value)); + + let obj = JSON.parse(globalThis.value.dirPropRtl); + console.info("[stepperProps] get inspector value is: " + JSON.stringify(obj)); + console.info("[stepperProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); + + expect(obj.$type).assertEqual('stepper') + expect(obj.$attrs.id).assertEqual('dirPropRtl') + expect(obj.$attrs.dir).assertEqual('rtl') + done(); + }); + + /** + * @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100 + * @tc.name testStepperDirPropLtr + * @tc.desc ACE + */ + it('testStepperDirPropLtr', 0, async function (done) { + console.info('testStepperDirPropLtr START'); + console.info("[stepperProps] get globalThis.value is: " + JSON.stringify(globalThis.value)); + + let obj = JSON.parse(globalThis.value.dirPropLtr); + console.info("[stepperProps] get inspector value is: " + JSON.stringify(obj)); + console.info("[stepperProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); + + expect(obj.$type).assertEqual('stepper') + expect(obj.$attrs.id).assertEqual('dirPropLtr') + expect(obj.$attrs.dir).assertEqual('ltr') + done(); + }); + + /** + * @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100 + * @tc.name testStepperDirPropAuto + * @tc.desc ACE + */ + it('testStepperDirPropAuto', 0, async function (done) { + console.info('testStepperDirPropAuto START'); + console.info("[stepperProps] get globalThis.value is: " + JSON.stringify(globalThis.value)); + + let obj = JSON.parse(globalThis.value.dirPropAuto); + console.info("[stepperProps] get inspector value is: " + JSON.stringify(obj)); + console.info("[stepperProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); + + expect(obj.$type).assertEqual('stepper') + expect(obj.$attrs.id).assertEqual('dirPropAuto') + expect(obj.$attrs.dir).assertEqual('auto') + done(); + }); + + /** + * @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100 + * @tc.name testStepperDirPropNone + * @tc.desc ACE + */ + it('testStepperDirPropNone', 0, async function (done) { + console.info('testStepperDirPropNone START'); + console.info("[stepperProps] get globalThis.value is: " + JSON.stringify(globalThis.value)); + + let obj = JSON.parse(globalThis.value.dirPropNone); + console.info("[stepperProps] get inspector value is: " + JSON.stringify(obj)); + console.info("[stepperProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); + + expect(obj.$type).assertEqual('stepper') + expect(obj.$attrs.id).assertEqual('dirPropNone') + expect(obj.$attrs.dir).assertEqual('auto') + done(); + }); + + /** + * @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100 + * @tc.name testStepperForPropNull + * @tc.desc ACE + */ + it('testStepperForPropNull', 0, async function (done) { + console.info('testStepperForPropNull START'); + console.info("[stepperProps] get globalThis.value is: " + JSON.stringify(globalThis.value)); + + let obj = JSON.parse(globalThis.value.forPropNull); + console.info("[stepperProps] get inspector value is: " + JSON.stringify(obj)); + console.info("[stepperProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); + + expect(obj.$type).assertEqual('stepper') + expect(obj.$attrs.id).assertEqual('forPropNull') + expect(obj.$attrs.for).assertEqual(undefined) + console.info("[stepperProps] get for value is: " + JSON.stringify(obj.$attrs.for)); + done(); + }); + + /** + * @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100 + * @tc.name testStepperForPropOne + * @tc.desc ACE + */ + it('testStepperForPropOne', 0, async function (done) { + console.info('testStepperForPropOne START'); + console.info("[stepperProps] get globalThis.value is: " + JSON.stringify(globalThis.value)); + + let obj = JSON.parse(globalThis.value.forPropOne); + console.info("[stepperProps] get inspector value is: " + JSON.stringify(obj)); + console.info("[stepperProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); + + expect(obj.$type).assertEqual('stepper') + expect(obj.$attrs.id).assertEqual('forPropOne') + expect(obj.$attrs.for).assertEqual(undefined) + console.info("[stepperProps] get for value is: " + JSON.stringify(obj.$attrs.for)); + done(); + }); + + /** + * @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100 + * @tc.name testStepperForPropThree + * @tc.desc ACE + */ + it('testStepperForPropThree', 0, async function (done) { + console.info('testStepperForPropThree START'); + console.info("[stepperProps] get globalThis.value is: " + JSON.stringify(globalThis.value)); + + let obj = JSON.parse(globalThis.value.forPropThree); + console.info("[stepperProps] get inspector value is: " + JSON.stringify(obj)); + console.info("[stepperProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); + + expect(obj.$type).assertEqual('stepper') + expect(obj.$attrs.id).assertEqual('forPropThree') + expect(obj.$attrs.for).assertEqual(undefined) + console.info("[stepperProps] get for value is: " + JSON.stringify(obj.$attrs.for)); + done(); + }); + + /** + * @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100 + * @tc.name testStepperIfPropTrue + * @tc.desc ACE + */ + it('testStepperIfPropTrue', 0, async function (done) { + console.info('testStepperIfPropTrue START'); + console.info("[stepperProps] get globalThis.value is: " + JSON.stringify(globalThis.value)); + + let obj = JSON.parse(globalThis.value.ifPropTrue); + console.info("[stepperProps] get inspector value is: " + JSON.stringify(obj)); + console.info("[stepperProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); + + expect(obj.$type).assertEqual('stepper') + expect(obj.$attrs.id).assertEqual('ifPropTrue') + expect(obj.$attrs.if).assertEqual(undefined) + console.info("[stepperProps] get for value is: " + JSON.stringify(obj.$attrs.if)); + done(); + }); + + /** + * @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100 + * @tc.name testStepperIfPropFalse + * @tc.desc ACE + */ + // it('testDivIfPropFalse', 0, async function (done) { + // console.info('testDivIfPropFalse START'); + // console.info("[divProps] get globalThis.value is: " + JSON.stringify(globalThis.value)); + // + // let obj = JSON.parse(globalThis.value.ifPropFalse); + // console.info("[divProps] get inspector value is: " + JSON.stringify(obj)); + // console.info("[divProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); + // + // expect(obj.$type).assertEqual('div') + // expect(obj.$attrs.id).assertEqual('ifPropFalse') + // expect(obj.$attrs.if).assertEqual(false) + // done(); + // }); + + /** + * @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100 + * @tc.name testDivIfPropNone + * @tc.desc ACE + */ + // it('testDivIfPropNone', 0, async function (done) { + // console.info('testDivIfPropNone START'); + // console.info("[divProps] get globalThis.value is: " + JSON.stringify(globalThis.value)); + // + // let obj = JSON.parse(globalThis.value.ifPropNone); + // console.info("[divProps] get inspector value is: " + JSON.stringify(obj)); + // console.info("[divProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); + // + // expect(obj.$type).assertEqual('div') + // expect(obj.$attrs.id).assertEqual('ifPropNone') + // expect(obj.$attrs.if).assertEqual(false) + // done(); + // }); + + /** + * @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100 + * @tc.name testStepperShowPropTrue + * @tc.desc ACE + */ + it('testStepperShowPropTrue', 0, async function (done) { + console.info('testStepperShowPropTrue START'); + console.info("[stepperProps] get globalThis.value is: " + JSON.stringify(globalThis.value)); + + let obj = JSON.parse(globalThis.value.showPropTrue); + console.info("[stepperProps] get inspector value is: " + JSON.stringify(obj)); + console.info("[stepperProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); + + expect(obj.$type).assertEqual('stepper') + expect(obj.$attrs.id).assertEqual('showPropTrue') + expect(obj.$attrs.show).assertEqual('true') + console.info("[stepperProps] get show value is: " + JSON.stringify(obj.$attrs.show)); + done(); + }); + + /** + * @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100 + * @tc.name testStepperShowPropFalse + * @tc.desc ACE + */ + it('testStepperShowPropFalse', 0, async function (done) { + console.info('testStepperShowPropFalse START'); + console.info("[stepperProps] get globalThis.value is: " + JSON.stringify(globalThis.value)); + + let obj = JSON.parse(globalThis.value.showPropFalse); + console.info("[stepperProps] get inspector value is: " + JSON.stringify(obj)); + console.info("[stepperProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); + + expect(obj.$type).assertEqual('stepper') + expect(obj.$attrs.id).assertEqual('showPropFalse') + expect(obj.$attrs.show).assertEqual('false') + console.info("[stepperProps] get show value is: " + JSON.stringify(obj.$attrs.show)); + done(); + }); + + /** + * @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100 + * @tc.name testStepperShowPropNone + * @tc.desc ACE + */ + it('testStepperShowPropNone', 0, async function (done) { + console.info('testStepperShowPropNone START'); + console.info("[stepperProps] get globalThis.value is: " + JSON.stringify(globalThis.value)); + + let obj = JSON.parse(globalThis.value.showPropNone); + console.info("[stepperProps] get inspector value is: " + JSON.stringify(obj)); + console.info("[stepperProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); + + expect(obj.$type).assertEqual('stepper') + expect(obj.$attrs.id).assertEqual('showPropNone') + expect(obj.$attrs.show).assertEqual('true') + console.info("[stepperProps] get show value is: " + JSON.stringify(obj.$attrs.show)); + done(); + }); + + /** + * @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100 + * @tc.name testStepperIndexProp + * @tc.desc ACE + */ + it('testStepperIndexProp', 0, async function (done) { + console.info('testStepperIndexProp START'); + console.info("[stepperProps] get globalThis.value is: " + JSON.stringify(globalThis.value)); + + let obj = JSON.parse(globalThis.value.indexProp); + console.info("[stepperProps] get inspector value is: " + JSON.stringify(obj)); + console.info("[stepperProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); + + expect(obj.$type).assertEqual('stepper') + expect(obj.$attrs.id).assertEqual('indexProp') + expect(obj.$attrs.index).assertEqual('1') + console.info("[stepperProps] get index value is: " + JSON.stringify(obj.$attrs.index)); + done(); + }); +});