diff --git a/ace/ace_standard/src/main/config.json b/ace/ace_standard/src/main/config.json index 6a5cbafe78c55268afe083708f18cfecd1c7068d..f22db2a0e3bf9f2bd11ecdc59e8cb6955c65dee0 100755 --- a/ace/ace_standard/src/main/config.json +++ b/ace/ace_standard/src/main/config.json @@ -57,7 +57,8 @@ "pages/chart/router/index", "pages/input/index", "pages/slider/index", - "pages/text/index", + "pages/text/router/index", + "pages/text/prop/index", "pages/divider/router/index", "pages/image/router/index", "pages/label/router/index", @@ -93,12 +94,15 @@ "pages/imageAnimator/index", "pages/panel/router/index", "pages/panel/prop/index", - "pages/popup/index", - "pages/refresh/index", + "pages/popup/router/index", + "pages/popup/prop/index", + "pages/refresh/router/index", + "pages/refresh/prop/index", "pages/stack/router/index", "pages/stack/prop/index", "pages/stepper/index", - "pages/swiper/index", + "pages/swiper/router/index", + "pages/swiper/prop/index", "pages/tabs/router/index", "pages/tabs/prop/index", "pages/tab-bar/router/index", diff --git a/ace/ace_standard/src/main/js/default/pages/popup/prop/index.css b/ace/ace_standard/src/main/js/default/pages/popup/prop/index.css new file mode 100644 index 0000000000000000000000000000000000000000..e815b366974cb2a04e98ed2dd5b2ba57913ff8c2 --- /dev/null +++ b/ace/ace_standard/src/main/js/default/pages/popup/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/popup/prop/index.hml b/ace/ace_standard/src/main/js/default/pages/popup/prop/index.hml new file mode 100644 index 0000000000000000000000000000000000000000..bb16a840c1762f7ead83c8e33db5cdd2c92b5f41 --- /dev/null +++ b/ace/ace_standard/src/main/js/default/pages/popup/prop/index.hml @@ -0,0 +1,177 @@ +
+
+ + popup通用属性 + + +
+ + + 通用属性 -- id + + + + + + 通用属性 -- class + + + + + + + + + 通用属性 -- style + + + + + + 通用属性 -- ref + + + + + + + + 通用属性 -- disabled + + + + + + + + + + 通用属性 -- data-* + + + + + + + + 通用属性 -- click-effect + + + + + + + + + + + + 通用属性 -- dir + + + + + + + + + + + + 渲染属性 -- for + + + + + + + + + + 渲染属性 -- if + + + + + + 渲染属性 -- show + + + + + + + +
+ +
+
+
+ + popup特有属性 + + + + 特有属性 -- target + + + + + + 特有属性 -- placement + + + + + + + + + + 特有属性 -- keepalive + + + + + + + + 特有属性 -- clickable + + + + + + + + 特有属性 -- arrowoffset + + + +
+
diff --git a/ace/ace_standard/src/main/js/default/pages/popup/prop/index.js b/ace/ace_standard/src/main/js/default/pages/popup/prop/index.js new file mode 100644 index 0000000000000000000000000000000000000000..e07a6a12da8938451ecc470d6b647f67b119e580 --- /dev/null +++ b/ace/ace_standard/src/main/js/default/pages/popup/prop/index.js @@ -0,0 +1,140 @@ +/** + * 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, + dataProp : null, + dataPropNone : null, + clickEffectPropSmall : null, + clickEffectPropMedium : null, + clickEffectPropLarge : null, + clickEffectPropNone : null, + dirPropRtl : null, + dirPropAuto : null, + dirPropLtr : null, + dirPropNone : null, + forPropNull : null, + forPropOne : null, + forPropThree : null, + ifPropTrue : null, + showPropTrue : null, + showPropFalse : null, + showPropNone : null, + + targetProp : null, + placementPropLeft : null, + placementPropRight : null, + placementPropTop : null, + keepAlivePropTrue : null, + keepAlivePropFalse : null, + clickablePropTrue : null, + clickablePropFalse : null, + arrowOffsetProp : 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, + 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, + + targetProp : this.targetProp, + placementPropLeft : this.placementPropLeft, + placementPropRight : this.placementPropRight, + placementPropTop :this.placementPropTop, + keepAlivePropTrue: this.keepAlivePropTrue, + keepAlivePropFalse: this.keepAlivePropFalse, + clickablePropTrue : this.clickablePropTrue, + clickablePropFalse : this.clickablePropFalse, + arrowOffsetProp : this.arrowOffsetProp + } + }, + + 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.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.targetProp = this.$element("targetProp").getInspector() + this.placementPropLeft = this.$element("placementPropLeft").getInspector() + this.placementPropRight = this.$element("placementPropRight").getInspector() + this.placementPropTop = this.$element("placementPropTop").getInspector() + this.keepAlivePropTrue = this.$element("keepAlivePropTrue").getInspector() + this.keepAlivePropFalse = this.$element("keepAlivePropFalse").getInspector() + this.clickablePropTrue = this.$element("clickablePropTrue").getInspector() + this.clickablePropFalse = this.$element("clickablePropFalse").getInspector() + this.arrowOffsetProp = this.$element("arrowOffsetProp").getInspector() + }, +} diff --git a/ace/ace_standard/src/main/js/default/pages/popup/index.css b/ace/ace_standard/src/main/js/default/pages/popup/router/index.css similarity index 99% rename from ace/ace_standard/src/main/js/default/pages/popup/index.css rename to ace/ace_standard/src/main/js/default/pages/popup/router/index.css index 894cd60e92e73bfb1b1027b355415450b2a4cf5c..12f491b7b1ba55d615face7acc8b48fc879a1aae 100644 --- a/ace/ace_standard/src/main/js/default/pages/popup/index.css +++ b/ace/ace_standard/src/main/js/default/pages/popup/router/index.css @@ -230,7 +230,7 @@ overflow:scroll; } -#prop1 { +.prop1 { color: #ad4e2a; stroke-width: 10px; line-cap: square; diff --git a/ace/ace_standard/src/main/js/default/pages/popup/index.hml b/ace/ace_standard/src/main/js/default/pages/popup/router/index.hml similarity index 99% rename from ace/ace_standard/src/main/js/default/pages/popup/index.hml rename to ace/ace_standard/src/main/js/default/pages/popup/router/index.hml index 89769fbc243f3a6282ce576494250dce19793cbd..503f0d7a66dbb46a406506a1da20f6604684ba4d 100644 --- a/ace/ace_standard/src/main/js/default/pages/popup/index.hml +++ b/ace/ace_standard/src/main/js/default/pages/popup/router/index.hml @@ -86,6 +86,7 @@ + +
+
+ + 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 + +
+
+
+
+
+
+ + div特有样式 + + + + 特有样式 flex-direction flex-wrap justify-content align-items align-content + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ +
+
+
+
+
+
+
+
+ + 文本 + +
+
+
+
+ + + + + 特有样式 overflow scrollbar-color scrollbar-width overscroll-effect + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + 特有样式 grid + +
+
+
+
+ + + + + + + + + + + + + + + + + + + + + +
+
+ diff --git a/ace/ace_standard/src/main/js/default/pages/text/index.js b/ace/ace_standard/src/main/js/default/pages/popup/style/index.js similarity index 95% rename from ace/ace_standard/src/main/js/default/pages/text/index.js rename to ace/ace_standard/src/main/js/default/pages/popup/style/index.js index 3dd2cc61bbf0fa3c02744d3763f3066233950c27..8179ff70cbe9fa27c38c5386a6f497949bf60f3a 100644 --- a/ace/ace_standard/src/main/js/default/pages/text/index.js +++ b/ace/ace_standard/src/main/js/default/pages/popup/style/index.js @@ -14,7 +14,6 @@ */ export default { - data: { - title: '' - } -} \ No newline at end of file + + +} diff --git a/ace/ace_standard/src/main/js/default/pages/refresh/prop/index.css b/ace/ace_standard/src/main/js/default/pages/refresh/prop/index.css new file mode 100644 index 0000000000000000000000000000000000000000..30c94674b10517a2a9e5e79fc9aaae18558a6cd8 --- /dev/null +++ b/ace/ace_standard/src/main/js/default/pages/refresh/prop/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%; +} + +.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; +} + +refresh{ + background: linear-gradient(pink,#fff000); + width: 50%; + margin-bottom: 5px; + height: 40%; +} + +.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/refresh/prop/index.hml b/ace/ace_standard/src/main/js/default/pages/refresh/prop/index.hml new file mode 100644 index 0000000000000000000000000000000000000000..f9dbf1541aaf1e652fa53426c49f5421ccaf7ac8 --- /dev/null +++ b/ace/ace_standard/src/main/js/default/pages/refresh/prop/index.hml @@ -0,0 +1,173 @@ +
+
+ + refresh通用属性 + + + + 通用属性 -- id + + + + + + 通用属性 -- class + + + + + + + + 通用属性 -- style + + + + + + 通用属性 -- ref + + + + + + + + 通用属性 -- disabled + + + + + + + + + + 通用属性 -- focusable + + + + + + + + + + 通用属性 -- data-* + + + + + + + + 通用属性 -- click-effect + + + + + + + + + + + + 通用属性 -- dir + + + + + + + + + + + + 渲染属性 -- for + + + + + + + + + + 渲染属性 -- if + + + + + + 渲染属性 -- show + + + + + + + +
+ +
+
+
+ + refresh特有属性 + + + + + + + + + + + + + + + + + +
+
diff --git a/ace/ace_standard/src/main/js/default/pages/refresh/prop/index.js b/ace/ace_standard/src/main/js/default/pages/refresh/prop/index.js new file mode 100644 index 0000000000000000000000000000000000000000..3298f5f3d067f3282660fd7e61f7a73ab38f0a9e --- /dev/null +++ b/ace/ace_standard/src/main/js/default/pages/refresh/prop/index.js @@ -0,0 +1,144 @@ +/** + * 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, + showPropTrue : null, + showPropFalse : null, + showPropNone : null, + offsetProp: null, + refreshingPropFalse: null, + refreshingPropTrue: null, + typePropAuto: null, + typePropPullDown: null, + lastTimePropTrue: null, + lastTimePropFalse: null, + frictionProp: 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, + offsetProp : this.offsetProp, + refreshingPropFalse : this.refreshingPropFalse, + refreshingPropTrue : this.refreshingPropTrue, + typePropAuto : this.typePropAuto, + typePropPullDown : this.typePropPullDown, + lastTimePropTrue : this.lastTimePropTrue, + lastTimePropFalse : this.lastTimePropFalse, + frictionProp : this.frictionProp + } + }, + + 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.offsetProp = this.$element("offsetProp").getInspector() + this.refreshingPropFalse = this.$element("refreshingPropFalse").getInspector() + this.refreshingPropTrue = this.$element("refreshingPropTrue").getInspector() + this.typePropAuto = this.$element("typePropAuto").getInspector() + this.typePropPullDown = this.$element("typePropPullDown").getInspector() + this.lastTimePropTrue = this.$element("lastTimePropTrue").getInspector() + this.lastTimePropFalse = this.$element("lastTimePropFalse").getInspector() + this.frictionProp = this.$element("frictionProp").getInspector() + }, +} diff --git a/ace/ace_standard/src/main/js/default/pages/refresh/index.css b/ace/ace_standard/src/main/js/default/pages/refresh/router/index.css similarity index 100% rename from ace/ace_standard/src/main/js/default/pages/refresh/index.css rename to ace/ace_standard/src/main/js/default/pages/refresh/router/index.css diff --git a/ace/ace_standard/src/main/js/default/pages/refresh/index.hml b/ace/ace_standard/src/main/js/default/pages/refresh/router/index.hml similarity index 100% rename from ace/ace_standard/src/main/js/default/pages/refresh/index.hml rename to ace/ace_standard/src/main/js/default/pages/refresh/router/index.hml diff --git a/ace/ace_standard/src/main/js/default/pages/refresh/index.js b/ace/ace_standard/src/main/js/default/pages/refresh/router/index.js similarity index 100% rename from ace/ace_standard/src/main/js/default/pages/refresh/index.js rename to ace/ace_standard/src/main/js/default/pages/refresh/router/index.js diff --git a/ace/ace_standard/src/main/js/default/pages/refresh/style/index.css b/ace/ace_standard/src/main/js/default/pages/refresh/style/index.css new file mode 100644 index 0000000000000000000000000000000000000000..5c4c1d87fa5e983621c40f7d950abae189ebeb90 --- /dev/null +++ b/ace/ace_standard/src/main/js/default/pages/refresh/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/refresh/style/index.hml b/ace/ace_standard/src/main/js/default/pages/refresh/style/index.hml new file mode 100644 index 0000000000000000000000000000000000000000..acd288a4bcd408d80a867b5cba64f6fb30653d9d --- /dev/null +++ b/ace/ace_standard/src/main/js/default/pages/refresh/style/index.hml @@ -0,0 +1,96 @@ +
+
+ + refresh通用样式 + + + + 通用样式 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/refresh/style/index.js b/ace/ace_standard/src/main/js/default/pages/refresh/style/index.js new file mode 100644 index 0000000000000000000000000000000000000000..8452f14bb05344e8032c4c0dbcf73b5b023d4e34 --- /dev/null +++ b/ace/ace_standard/src/main/js/default/pages/refresh/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/swiper/index.hml b/ace/ace_standard/src/main/js/default/pages/swiper/index.hml deleted file mode 100644 index 8dd53178e54ce525d83d3ee951ef379cbe5088e3..0000000000000000000000000000000000000000 --- a/ace/ace_standard/src/main/js/default/pages/swiper/index.hml +++ /dev/null @@ -1,781 +0,0 @@ - - -
-
- -
- - 通用样式 - - - swiper通用样式1 - - -
- First -
-
- Second -
-
- Third -
-
- - - - - - swiper通用样式2 - - -
- First -
-
- Second -
-
- Third -
-
- - - swiper通用样式3 - - -
- First -
-
- Second -
-
- Third -
-
- - - swiper通用样式4 - - -
- First -
-
- Second -
-
- Third -
-
- - - swiper通用样式5 - -
- -
- First -
-
- Second -
-
- Third -
-
- -
- First -
-
- Second -
-
- Third -
-
-
- - swiper特有样式 - - -
- First -
-
- Second -
-
- Third -
-
-
- - - -
- - 动画样式 - - - swiper动画样式1 - - -
- First -
-
- Second -
-
- Third -
-
- - - swiper动画样式2 - - -
- First -
-
- Second -
-
- Third -
-
-
-
- -
-
- -
- -
- - 通用属性 - - - swiper通用属性1 - - -
- First -
-
- Second -
-
- Third -
-
- - - swiper通用属性2 - - -
- First -
-
- Second -
-
- Third -
-
- - - swiper通用属性3 - - -
- First -
-
- Second -
-
- Third -
-
- - - swiper特有属性4 - - -
- First -
-
- Second -
-
- Third -
-
- - - swiper特有属性5 - - -
- First -
-
- Second -
-
- Third -
-
- - - swiper特有属性6 - - -
- First -
-
- Second -
-
- Third -
-
-
-
-
- -
- - 通用事件 - - - swiper通用事件1 - - -
- First -
-
- Second -
-
- Third -
-
- - - swiper通用事件2 - - -
- First -
-
- Second -
-
- Third -
-
- - - swiper通用事件3 - - -
- First -
-
- Second -
-
- Third -
-
- - - swiper特有事件1 - - -
- First -
-
- Second -
-
- Third -
-
-
-
-
- -
- - 通用方法 - - - swiper通用方法1 - - -
- First -
-
- Second -
-
- Third -
-
- - - swiper通用方法2 - - -
- First -
-
- Second -
-
- Third -
-
-
-
- -
-
- -
- -
- - 渐变样式 - - - swiper渐变样式1 - - -
- First -
-
- Second -
-
- Third -
-
- - - swiper渐变样式2 - - -
- First -
-
- Second -
-
- Third -
-
- - - swiper渐变样式3 - - -
- First -
-
- Second -
-
- Third -
-
- - - swiper渐变样式4 - - -
- First -
-
- Second -
-
- Third -
-
-
-
-
- -
- - 无障碍 - - - swiper无障碍1 - - -
- First -
-
- Second -
-
- Third -
-
- -
-
-
- -
- - 原子布局 - - - swiper原子布局1 - -
- -
- First -
-
- Second -
-
- Third -
-
- -
- First -
-
- Second -
-
- Third -
-
- -
- First -
-
- Second -
-
- Third -
-
-
- - swiper原子布局2 - -
- -
- First -
-
- Second -
-
- Third -
-
- -
- First -
-
- Second -
-
- Third -
-
- -
- First -
-
- Second -
-
- Third -
-
-
- - swiper原子布局3 - -
- -
- First -
-
- Second -
-
- Third -
-
- -
- First -
-
- Second -
-
- Third -
-
- -
- First -
-
- Second -
-
- Third -
-
-
-
-
-
- - 多模输入 - - - swiper多模输入1 - - -
- First -
-
- Second -
-
- Third -
-
-
-
-
-
diff --git a/ace/ace_standard/src/main/js/default/pages/swiper/prop/index.css b/ace/ace_standard/src/main/js/default/pages/swiper/prop/index.css new file mode 100644 index 0000000000000000000000000000000000000000..c3cba1049aee709a762d0290e3d2b190a2725ea4 --- /dev/null +++ b/ace/ace_standard/src/main/js/default/pages/swiper/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; +} + +.specific-container{ + flex-direction: column; + flex-weight: 1; +} + +swiper{ + background-color:#e00000; + width: 100%; + height: 15px; + 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/swiper/prop/index.hml b/ace/ace_standard/src/main/js/default/pages/swiper/prop/index.hml new file mode 100644 index 0000000000000000000000000000000000000000..3a8ecfe154caee443533700c64c9799e9f60d0d5 --- /dev/null +++ b/ace/ace_standard/src/main/js/default/pages/swiper/prop/index.hml @@ -0,0 +1,264 @@ +
+
+ + swiper通用属性 + + + + 通用属性 -- id + + + + + + 通用属性 -- class + + + + + + + + + 通用属性 -- style + + + + + + 通用属性 -- ref + + + + + + + + 通用属性 -- disabled + + + + + + + + + + 通用属性 -- focusable + + + + + + + + + + 通用属性 -- data-* + + + + + + + + 通用属性 -- click-effect + + + + + + + + + + + + 通用属性 -- dir + + + + + + + + + + + + 渲染属性 -- for + + + + + + + + + + 渲染属性 -- if + + + + + + 渲染属性 -- show + + + + + + + +
+ +
+
+
+ + swiper特有属性 + + + 特有属性 -- index + + + + + 特有属性 -- autoplay + + + + + + + 特有属性 -- interval + + + + + 特有属性 -- indicator + + + + + + + + 特有属性 -- digital + + + + + + + + 特有属性 -- indicatormask + + + + + + + + 特有属性 -- indicatordisabled + + + + + + + + 特有属性 -- loop + + + + + + + + 特有属性 -- duration + + + + + + 特有属性 -- vertical + + + + + + + + 特有属性 -- cachedsize + + + + + + 特有属性 -- scrolleffect + + + + + + + + 特有属性 -- displaymode + + + + + +
+
\ No newline at end of file diff --git a/ace/ace_standard/src/main/js/default/pages/swiper/prop/index.js b/ace/ace_standard/src/main/js/default/pages/swiper/prop/index.js new file mode 100644 index 0000000000000000000000000000000000000000..db754a0e17a7927020d71b199f77cdeaa903afd7 --- /dev/null +++ b/ace/ace_standard/src/main/js/default/pages/swiper/prop/index.js @@ -0,0 +1,186 @@ +/** + * 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, + showPropTrue : null, + showPropFalse : null, + showPropNone : null, + + indexProp: null, + autoplayPropTrue: null, + autoplayPropFalse: null, + intervalProp: null, + indicatorPropTrue: null, + indicatorPropFalse: null, + digitalPropFalse: null, + indicatorMaskPropTrue: null, + indicatorMaskPropFalse: null, + indicatorDisabledPropTrue: null, + indicatorDisabledPropFalse: null, + loopPropTrue: null, + loopPropFalse: null, + durationProp: null, + verticalPropTrue: null, + verticalPropFalse: null, + cachedSizeProp: null, + scrollEffectPropFade: null, + scrollEffectPropSpring: null, + displayModePropStretch: null, + displayModePropAutoLinear: 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, + autoplayPropTrue: this.autoplayPropTrue, + autoplayPropFalse: this.autoplayPropFalse, + intervalProp: this.intervalProp, + indicatorPropTrue: this.indicatorPropTrue, + indicatorPropFalse: this.indicatorPropFalse, + digitalPropFalse: this.digitalPropFalse, + indicatorMaskPropTrue: this.indicatorMaskPropTrue, + indicatorMaskPropFalse: this.indicatorMaskPropFalse, + indicatorDisabledPropTrue: this.indicatorDisabledPropTrue, + indicatorDisabledPropFalse: this.indicatorDisabledPropFalse, + loopPropTrue: this.loopPropTrue, + loopPropFalse: this.loopPropFalse, + durationProp: this.durationProp, + verticalPropTrue: this.verticalPropTrue, + verticalPropFalse: this.verticalPropFalse, + cachedSizeProp: this.cachedSizeProp, + scrollEffectPropFade: this.scrollEffectPropFade, + scrollEffectPropSpring: this.scrollEffectPropSpring, + displayModePropStretch: this.displayModePropStretch, + displayModePropAutoLinear: this.displayModePropAutoLinear, + } + }, + + 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("showPropNone").getInspector() + this.autoplayPropTrue = this.$element("autoplayPropTrue").getInspector() + this.autoplayPropFalse = this.$element("autoplayPropFalse").getInspector() + this.intervalProp = this.$element("intervalProp").getInspector() + this.indicatorPropTrue = this.$element("indicatorPropTrue").getInspector() + this.indicatorPropFalse = this.$element("indicatorPropFalse").getInspector() + this.digitalPropFalse = this.$element("digitalPropFalse").getInspector() + this.indicatorMaskPropTrue = this.$element("indicatorMaskPropTrue").getInspector() + this.indicatorMaskPropFalse = this.$element("indicatorMaskPropFalse").getInspector() + this.indicatorDisabledPropTrue = this.$element("indicatorDisabledPropTrue").getInspector() + this.indicatorDisabledPropFalse = this.$element("indicatorDisabledPropFalse").getInspector() + this.loopPropTrue = this.$element("loopPropTrue").getInspector() + this.loopPropFalse = this.$element("loopPropFalse").getInspector() + this.durationProp = this.$element("durationProp").getInspector() + this.verticalPropTrue = this.$element("verticalPropTrue").getInspector() + this.verticalPropFalse = this.$element("verticalPropFalse").getInspector() + this.cachedSizeProp = this.$element("cachedSizeProp").getInspector() + this.scrollEffectPropFade = this.$element("scrollEffectPropFade").getInspector() + this.scrollEffectPropSpring = this.$element("scrollEffectPropSpring").getInspector() + this.displayModePropStretch = this.$element("displayModePropStretch").getInspector() + this.displayModePropAutoLinear = this.$element("displayModePropAutoLinear").getInspector() + }, +} diff --git a/ace/ace_standard/src/main/js/default/pages/swiper/index.css b/ace/ace_standard/src/main/js/default/pages/swiper/router/index.css similarity index 100% rename from ace/ace_standard/src/main/js/default/pages/swiper/index.css rename to ace/ace_standard/src/main/js/default/pages/swiper/router/index.css diff --git a/ace/ace_standard/src/main/js/default/pages/swiper/router/index.hml b/ace/ace_standard/src/main/js/default/pages/swiper/router/index.hml new file mode 100644 index 0000000000000000000000000000000000000000..c70d854fa21d2b1ff78585040190c52e562028eb --- /dev/null +++ b/ace/ace_standard/src/main/js/default/pages/swiper/router/index.hml @@ -0,0 +1,455 @@ + + +
+
+ +
+ + 通用样式 + + + swiper通用样式1 + + + + + + swiper通用样式2 + + + + + + + swiper通用样式3 + + + + + + swiper通用样式4 + + + + + + swiper通用样式5 + +
+ + + + +
+ + swiper特有样式 + + + +
+ + + +
+ + 动画样式 + + + swiper动画样式1 + + + + + + swiper动画样式2 + + + +
+
+ +
+
+ +
+ +
+ + 通用属性 + + + swiper通用属性1 + + + + + + swiper通用属性2 + + + + + + swiper通用属性3 + + + + + + swiper特有属性4 + + + + + + swiper特有属性5 + + + + + + swiper特有属性6 + + + +
+
+
+ +
+ + 通用事件 + + + swiper通用事件1 + + + + + + swiper通用事件2 + + + + + + swiper通用事件3 + + + + + + swiper特有事件1 + + + +
+
+
+ +
+ + 通用方法 + + + swiper通用方法1 + + + + + + swiper通用方法2 + + + +
+
+ +
+
+ +
+ +
+ + 渐变样式 + + + swiper渐变样式1 + + + + + + swiper渐变样式2 + + + + + + swiper渐变样式3 + + + + + + swiper渐变样式4 + + + +
+
+
+ +
+ + 无障碍 + + + swiper无障碍1 + + + + +
+
+
+ +
+ + 原子布局 + + + swiper原子布局1 + +
+ + + + + + +
+ + swiper原子布局2 + +
+ + + + + + +
+ + swiper原子布局3 + +
+ + + + + + +
+
+
+
+ + 多模输入 + + + swiper多模输入1 + + + +
+
+
+
diff --git a/ace/ace_standard/src/main/js/default/pages/swiper/index.js b/ace/ace_standard/src/main/js/default/pages/swiper/router/index.js similarity index 100% rename from ace/ace_standard/src/main/js/default/pages/swiper/index.js rename to ace/ace_standard/src/main/js/default/pages/swiper/router/index.js diff --git a/ace/ace_standard/src/main/js/default/pages/swiper/style/index.css b/ace/ace_standard/src/main/js/default/pages/swiper/style/index.css new file mode 100644 index 0000000000000000000000000000000000000000..5c4c1d87fa5e983621c40f7d950abae189ebeb90 --- /dev/null +++ b/ace/ace_standard/src/main/js/default/pages/swiper/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/swiper/style/index.hml b/ace/ace_standard/src/main/js/default/pages/swiper/style/index.hml new file mode 100644 index 0000000000000000000000000000000000000000..8184c24ef4cdd723060fb23229606a51fdca1675 --- /dev/null +++ b/ace/ace_standard/src/main/js/default/pages/swiper/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/swiper/style/index.js b/ace/ace_standard/src/main/js/default/pages/swiper/style/index.js new file mode 100644 index 0000000000000000000000000000000000000000..8452f14bb05344e8032c4c0dbcf73b5b023d4e34 --- /dev/null +++ b/ace/ace_standard/src/main/js/default/pages/swiper/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/text/index.css b/ace/ace_standard/src/main/js/default/pages/text/index.css deleted file mode 100644 index 046712606b38bf84de9e7a3da7719ddc2d3cb9d8..0000000000000000000000000000000000000000 --- a/ace/ace_standard/src/main/js/default/pages/text/index.css +++ /dev/null @@ -1,44 +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: column; - align-items: center; - background-color: #F1F3F5; - justify-content: center; -} - -.text1 { - word-spacing: 10px; - adapt-height: true; -} - -.text2 { - width: 200px; - max-lines: 1; - text-overflow: ellipsis; - text-valign: middle; - line-height: 40px; - text-decoration: underline; - text-decoration-color: red; - text-indent: 20px; - white-space: pre; -} - -.common { - color: #ff4400; - text-decoration: line-through; -} diff --git a/ace/ace_standard/src/main/js/default/pages/text/prop/index.css b/ace/ace_standard/src/main/js/default/pages/text/prop/index.css new file mode 100644 index 0000000000000000000000000000000000000000..e815b366974cb2a04e98ed2dd5b2ba57913ff8c2 --- /dev/null +++ b/ace/ace_standard/src/main/js/default/pages/text/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/text/prop/index.hml b/ace/ace_standard/src/main/js/default/pages/text/prop/index.hml new file mode 100644 index 0000000000000000000000000000000000000000..15a2e12aa7a173d590cd3e9712fcea8412b684ff --- /dev/null +++ b/ace/ace_standard/src/main/js/default/pages/text/prop/index.hml @@ -0,0 +1,150 @@ +
+
+ + text通用属性 + + + + 通用属性 -- id + + + + + + 通用属性 -- class + + + + + + + + + 通用属性 -- style + + + + + + 通用属性 -- ref + + + + + + + + 通用属性 -- disabled + + + + + + + + + + 通用属性 -- focusable + + + + + + + + + + 通用属性 -- data-* + + + + + + + + 通用属性 -- click-effect + + + + + + + + + + + + 通用属性 -- dir + + + + + + + + + + + + 渲染属性 -- for + + + + + + + + + + 渲染属性 -- if + + + + + + 渲染属性 -- show + + + + + + + +
+ +
+
+
+ + div特有属性 + +
+
diff --git a/ace/ace_standard/src/main/js/default/pages/text/prop/index.js b/ace/ace_standard/src/main/js/default/pages/text/prop/index.js new file mode 100644 index 0000000000000000000000000000000000000000..f0abc71b8510c2139800e8c8de54900a209baf2a --- /dev/null +++ b/ace/ace_standard/src/main/js/default/pages/text/prop/index.js @@ -0,0 +1,119 @@ +/** + * 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, + 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/text/router/index.css b/ace/ace_standard/src/main/js/default/pages/text/router/index.css new file mode 100644 index 0000000000000000000000000000000000000000..9ddb8e0d0f2442b87242e5aca91d48281c9f8ebd --- /dev/null +++ b/ace/ace_standard/src/main/js/default/pages/text/router/index.css @@ -0,0 +1,432 @@ +/** + * 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: 75%; +} + +.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: 15px; + 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: 100%; + 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; + font-size: 10px; +} + +.style3{ + height: 15%; + 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: 100%; + 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 { + color: blueviolet; + font-size: 20px; + allow-scale: true; + letter-spacing: 5px; + word-spacing: 2px; + font-style: italic; + font-weight: bold; + text-decoration: underline; + text-decoration-color: pink; + text-align: center; + line-height: 40px; + text-overflow: clip; + font-family: sans-serif; + max-lines: 3; + min-font-size:10px; + max-font-size: 30px; + font-size-step:2px; + word-break: normal; + text-valign: middle; + white-space: normal; + text-indent: 1px; +} + +.style8{ + color: yellowgreen; + font-size: 16px; + allow-scale: false; + letter-spacing: 5px; + word-spacing: 2px; + font-style: normal; + font-weight: bold; + text-decoration: line-through; + text-decoration-color: pink; + text-align: left; + line-height: 40px; + text-overflow: clip; + font-family: sans-serif; + max-lines: 3; + min-font-size:10px; + max-font-size: 20px; + font-size-step:2px; + word-break: normal; + text-valign: middle; + white-space: normal; + text-indent: 1px; +} + +.style9{ + color: mediumslateblue; + allow-scale: false; + letter-spacing: 5px; + word-spacing: 2px; + font-style: normal; + font-weight: lighter; + text-decoration: none; + text-align: right; + line-height: 40px; + text-overflow: clip; + font-family: sans-serif; + max-lines: 3; + font-size-step:2px; + word-break: normal; + text-valign: middle; + white-space: normal; + text-indent: 1px; + prefer-font-sizes: 12px,14px,16px +} + +.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{ + flex-direction: row; + width: 90%; + flex-weight: 1; + overflow:scroll; +} + +.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; +} \ No newline at end of file diff --git a/ace/ace_standard/src/main/js/default/pages/text/router/index.hml b/ace/ace_standard/src/main/js/default/pages/text/router/index.hml new file mode 100644 index 0000000000000000000000000000000000000000..e0350b5cdf26a4b70f1c8abaf9b5b6e2a3e95a5d --- /dev/null +++ b/ace/ace_standard/src/main/js/default/pages/text/router/index.hml @@ -0,0 +1,260 @@ +
+
+
+ + 通用样式 + + + text通用样式1 + + + text通用样式2 + + + text通用样式3 + + + text通用样式4 + + + text通用样式5 + +
+ + + + +
+ + text特有样式 + + + text特有样式1 + + + text特有样式2 + + + text特有样式2 + +
+ + +
+ + 动画样式 + + + text动画样式1 + + + + + text动画样式2 + + + +
+
+ +
+
+ +
+
+ + 通用属性 + + + text通用属性1 + + + + + text通用属性2 + + + + + text通用属性3 + + + +
+
+
+
+ + 通用事件 + + + text通用事件1 + + + + + text通用事件2 + + + + + text通用事件3 + + + +
+
+
+
+ + 通用方法 + + + text通用方法1 + + + + + text通用方法2 + + + + + text通用方法3 + + + +
+
+ +
+
+ +
+
+ + 渐变样式 + + + text渐变样式1 + + + + + text渐变样式2 + + + + + text渐变样式3 + + + + + text渐变样式4 + + + +
+
+
+
+ + text无障碍 + + + text无障碍1 + + + +
+
+
+
+ + 原子布局 + + + text原子布局1 + +
+ + + + + + + + + + + + +
+ + text原子布局2 + +
+ + + + + + + + + + + + +
+ + div原子布局3 + +
+ + + + + + + + + + + + +
+
+
+
+ + 多模输入 + + + text多模输入1 + + + +
+
+
+
diff --git a/ace/ace_standard/src/main/js/default/pages/text/router/index.js b/ace/ace_standard/src/main/js/default/pages/text/router/index.js new file mode 100644 index 0000000000000000000000000000000000000000..fc54bd1646bf707af777fecf2a33846000e358ca --- /dev/null +++ b/ace/ace_standard/src/main/js/default/pages/text/router/index.js @@ -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. + */ + +import prompt from '@system.prompt'; + +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' + }, +]; + +export default { + + 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 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/pages/text/style/index.css b/ace/ace_standard/src/main/js/default/pages/text/style/index.css new file mode 100644 index 0000000000000000000000000000000000000000..ba39c3f2177da5582ba781c103f5ad8d20bd542d --- /dev/null +++ b/ace/ace_standard/src/main/js/default/pages/text/style/index.css @@ -0,0 +1,513 @@ +/** + * 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: 1.5px; + 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; +} + +.specific-container{ + flex-direction: column; + flex-weight: 1; +} + +#specificOne{ + width: 70px; + height: 25px; + flex-direction: row; + flex-wrap:nowrap; +} + +#specificTwo{ + width: 100%; + height: 50px; + flex-direction: column; + flex-wrap:wrap; + justify-content:flex-start; + align-items: flex-start; + align-content: flex-start; +} + +#specificThree{ + width: 18%; + height: 48%; + border: 1px solid pink; + flex-direction: row; + justify-content:flex-end; + align-items: flex-end; + align-content: flex-end; + margin: 1%; +} + +#specificFour{ + width: 18%; + height: 48%; + border: 1px solid pink; + flex-direction: row; + justify-content:center; + align-items: center; + align-items: center; + margin: 1%; +} + +#specificFive{ + width: 18%; + height: 48%; + border: 1px solid pink; + flex-direction: row; + justify-content:space-between; + align-items:stretch; + align-content: space-between; + margin: 1%; +} + +#specificSix{ + width: 18%; + height: 48%; + border: 1px solid pink; + flex-direction: row; + justify-content:space-around; + align-items: baseline; + align-content: space-around; + margin: 1%; +} + +#specificSeven{ + width: 50px; + height: 10px; + background-color: #ff0000; + overflow: hidden; +} + +#specificEight{ + width: 70px; + height: 10px; + background-color: #00ff00; + overflow: visible; + margin-left: 10px; +} + +#specificNine{ + width: 100%; + height: 50px; + margin-top: 10px; + overflow: scroll; + flex-direction: column; + scrollbar-color:#ff0000; + scrollbar-width:2px; + overscroll-effect:spring; +} + +#specificTen{ + width: 100%; + height: 10px; + margin-top: 10px; + overflow: scroll; + scrollbar-color:#ff0000; + scrollbar-width:2px; + overscroll-effect:fade; +} + +#specificEleven{ + width: 100%; + height: 10px; + margin-top: 10px; + overflow: scroll; + scrollbar-color:#ff0000; + scrollbar-width:2px; + overscroll-effect:none; +} + +#specificTwelve{ + width: 100%; + height: 30px; + display: grid; + background-color: #000fff; + grid-template-rows: 50px 100px 60px; + grid-rows-gap:10px; + grid-row-start: 1; + grid-row-end: 2; + grid-auto-flow:row; +} + +#specificThirteen{ + width: 100%; + height: 30px; + background-color: #fff000; + display: grid; + grid-template-columns: 50px 100px 60px; + grid-columns-gap:10px; + grid-column-start: 1; + grid-column-end: 2; + grid-auto-flow:column; +} + + +.flex-item{ + width: 40%; + height: 10px; +} + +.red-item{ + background-color: #ff0000; +} + +.green-item{ + background-color: #00ff00; +} + +.blue-item{ + background-color: #0000ff; +} + +.yellow-item{ + background-color: #fff000; +} + diff --git a/ace/ace_standard/src/main/js/default/pages/text/style/index.hml b/ace/ace_standard/src/main/js/default/pages/text/style/index.hml new file mode 100644 index 0000000000000000000000000000000000000000..5f72ac1c4635ce94cd1094b1e2ef76310957364f --- /dev/null +++ b/ace/ace_standard/src/main/js/default/pages/text/style/index.hml @@ -0,0 +1,236 @@ + + +
+
+ + 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 + +
+
+
+
+
+
+ + div特有样式 + + + + 特有样式 flex-direction flex-wrap justify-content align-items align-content + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ +
+
+
+
+
+
+
+
+ + 文本 + +
+
+
+
+ + + + + 特有样式 overflow scrollbar-color scrollbar-width overscroll-effect + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + 特有样式 grid + +
+
+
+
+ + + + + + + + + + + + + + + + + + + + + +
+
+ diff --git a/ace/ace_standard/src/main/js/default/pages/text/index.hml b/ace/ace_standard/src/main/js/default/pages/text/style/index.js similarity index 71% rename from ace/ace_standard/src/main/js/default/pages/text/index.hml rename to ace/ace_standard/src/main/js/default/pages/text/style/index.js index bd3ba576b892b9eac383d841c1fbc9bf80c12c98..8179ff70cbe9fa27c38c5386a6f497949bf60f3a 100644 --- a/ace/ace_standard/src/main/js/default/pages/text/index.hml +++ b/ace/ace_standard/src/main/js/default/pages/text/style/index.js @@ -1,4 +1,4 @@ - + */ - -
- - common style - - - This is a passage - - - This is a passage - -
\ No newline at end of file +export default { + + +} 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 f023ef29cb5f8362e1487d75cbe30762e240b13d..a7201e56d3c2d2c6a3d9a2b2c3841c35fb81a1f7 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 @@ -35,3 +35,7 @@ require('./labelProps.test.js') require('./stackProps.test.js') require('./panelProps.test.js') require('./pieceProps.test.js') +require('./refreshProps.test.js') +require('./swiperProps.test.js') +require('./textProps.test.js') +require('./popupProps.test.js') diff --git a/ace/ace_standard/src/main/js/default/test/panelProps.test.js b/ace/ace_standard/src/main/js/default/test/panelProps.test.js index 6815535802c3f7c0e0f32f56b9270d5f44c63c12..2ce8c96f7353e524373b72c4649e5258e73319ed 100644 --- a/ace/ace_standard/src/main/js/default/test/panelProps.test.js +++ b/ace/ace_standard/src/main/js/default/test/panelProps.test.js @@ -363,7 +363,7 @@ describe('panelPropsJsTest', function () { expect(obj.$type).assertEqual('panel') expect(obj.$attrs.id).assertEqual('dirPropNone') - expect(obj.$attrs.dir).assertEqual('auto') + expect(obj.$attrs.dir).assertEqual(undefined) done(); }); diff --git a/ace/ace_standard/src/main/js/default/test/pieceProps.test.js b/ace/ace_standard/src/main/js/default/test/pieceProps.test.js index 0821c8acd3769acfedfc1725d8c6b945f576eefd..cd17290345f6aed8e87da59d66dbe6cac809b058 100644 --- a/ace/ace_standard/src/main/js/default/test/pieceProps.test.js +++ b/ace/ace_standard/src/main/js/default/test/pieceProps.test.js @@ -701,7 +701,7 @@ describe('piecePropsJsTest', function () { expect(obj.$type).assertEqual('piece') expect(obj.$attrs.id).assertEqual('contentProp') //id - expect(obj.$attrs.show).assertEqual('content') //prop and value + expect(obj.$attrs.show).assertEqual(undefined) //prop and value console.info("[pieceProps] get content value is: " + JSON.stringify(obj.$attrs.content)); done(); }); diff --git a/ace/ace_standard/src/main/js/default/test/popupProps.test.js b/ace/ace_standard/src/main/js/default/test/popupProps.test.js new file mode 100644 index 0000000000000000000000000000000000000000..500eb4eae64bdc5122784a49817e10325750f06b --- /dev/null +++ b/ace/ace_standard/src/main/js/default/test/popupProps.test.js @@ -0,0 +1,749 @@ +/* + * 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('popupPropsJsTest', 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('[popupPropsJsTest] before each called') + + let result; + let options = { + uri: 'pages/popup/prop/index' + } + try { + result = router.push(options) + console.info("push popupProps page success " + JSON.stringify(result)); + } catch (err) { + console.error("push popupProps page error " + JSON.stringify(result)); + } + await sleep(4000) + done() + }); + + /** + * run after testcase + */ + afterAll(async function () { + console.info('[popupPropsJsTest] after each called') + await backToIndex() + await sleep(1000) + }); + + /** + * @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100 + * @tc.name testPopupIdProp + * @tc.desc ACE + */ + it('testPopupIdProp', 0, async function (done) { + console.info('testPopupIdProp START'); + console.info("[popupProps] get globalThis.value is: " + JSON.stringify(globalThis.value)); + + let obj = JSON.parse(globalThis.value.idProp); + console.info("[popupProps] get inspector value is: " + JSON.stringify(obj)); + console.info("[popupProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); + + expect(obj.$type).assertEqual('popup') + expect(obj.$attrs.id).assertEqual('idProp') + done(); + }); + + /** + * @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100 + * @tc.name testPopupClassProp + * @tc.desc ACE + */ + it('testPopupClassProp', 0, async function (done) { + console.info('testPopupClassProp START'); + console.info("[popupProps] get globalThis.value is: " + JSON.stringify(globalThis.value)); + + let obj = JSON.parse(globalThis.value.classProp); + console.info("[popupProps] get inspector value is: " + JSON.stringify(obj)); + console.info("[popupProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); + + expect(obj.$type).assertEqual('popup') + expect(obj.$attrs.id).assertEqual('classProp') + expect(obj.$attrs.className).assertEqual('classProp') + done(); + }); + + /** + * @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100 + * @tc.name testPopupClassPropNone + * @tc.desc ACE + */ + it('testPopupClassPropNone', 0, async function (done) { + console.info('testPopupClassPropNone START'); + console.info("[popupProps] get globalThis.value is: " + JSON.stringify(globalThis.value)); + + let obj = JSON.parse(globalThis.value.classPropNone); + console.info("[popupProps] get inspector value is: " + JSON.stringify(obj)); + console.info("[popupProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); + + expect(obj.$type).assertEqual('popup') + expect(obj.$attrs.id).assertEqual('classPropNone') + expect(obj.$attrs.className).assertEqual(undefined) + console.info("[popupProps] get className value is: " + JSON.stringify(obj.$attrs.className)); + done(); + }); + + + /** + * @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100 + * @tc.name testPopupRefProp + * @tc.desc ACE + */ + it('testPopupRefProp', 0, async function (done) { + console.info('testPopupRefProp START'); + console.info("[popupProps] get globalThis.value is: " + JSON.stringify(globalThis.value)); + + let obj = JSON.parse(globalThis.value.refProp); + console.info("[popupProps] get inspector value is: " + JSON.stringify(obj)); + console.info("[popupProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); + + expect(obj.$type).assertEqual('popup') + expect(obj.$attrs.id).assertEqual('refProp') + expect(obj.$attrs.ref).assertEqual('refProp') + done(); + }); + + /** + * @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100 + * @tc.name testPopupRefPropNone + * @tc.desc ACE + */ + it('testPopupRefPropNone', 0, async function (done) { + console.info('testPopupRefPropNone START'); + console.info("[popupProps] get globalThis.value is: " + JSON.stringify(globalThis.value)); + + let obj = JSON.parse(globalThis.value.refPropNone); + console.info("[popupProps] get inspector value is: " + JSON.stringify(obj)); + console.info("[popupProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); + + expect(obj.$type).assertEqual('popup') + expect(obj.$attrs.id).assertEqual('refPropNone') + expect(obj.$attrs.ref).assertEqual(undefined) + console.info("[popupProps] get ref value is: " + JSON.stringify(obj.$attrs.ref)); + done(); + }); + + /** + * @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100 + * @tc.name testPopupDisabledPropTrue + * @tc.desc ACE + */ + it('testPopupDisabledPropTrue', 0, async function (done) { + console.info('testPopupDisabledPropTrue START'); + console.info("[popupProps] get globalThis.value is: " + JSON.stringify(globalThis.value)); + + let obj = JSON.parse(globalThis.value.disabledPropTrue); + console.info("[popupProps] get inspector value is: " + JSON.stringify(obj)); + console.info("[popupProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); + + expect(obj.$type).assertEqual('popup') + expect(obj.$attrs.id).assertEqual('disabledPropTrue') + expect(obj.$attrs.disabled).assertEqual('true') + done(); + }); + + /** + * @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100 + * @tc.name testPopupDisabledPropFalse + * @tc.desc ACE + */ + it('testPopupDisabledPropFalse', 0, async function (done) { + console.info('testPopupDisabledPropFalse START'); + console.info("[popupProps] get globalThis.value is: " + JSON.stringify(globalThis.value)); + + let obj = JSON.parse(globalThis.value.disabledPropFalse); + console.info("[popupProps] get inspector value is: " + JSON.stringify(obj)); + console.info("[popupProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); + + expect(obj.$type).assertEqual('popup') + expect(obj.$attrs.id).assertEqual('disabledPropFalse') + expect(obj.$attrs.disabled).assertEqual('false') + done(); + }); + + /** + * @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100 + * @tc.name testPopupDisabledPropNone + * @tc.desc ACE + */ + it('testPopupDisabledPropNone', 0, async function (done) { + console.info('testPopupDisabledPropNone START'); + console.info("[popupProps] get globalThis.value is: " + JSON.stringify(globalThis.value)); + + let obj = JSON.parse(globalThis.value.disabledPropNone); + console.info("[popupProps] get inspector value is: " + JSON.stringify(obj)); + console.info("[popupProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); + + expect(obj.$type).assertEqual('popup') + expect(obj.$attrs.id).assertEqual('disabledPropNone') + expect(obj.$attrs.disabled).assertEqual('false') + done(); + }); + + /** + * @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100 + * @tc.name testPopupDataProp + * @tc.desc ACE + */ + it('testPopupDataProp', 0, async function (done) { + console.info('testPopupDataProp START'); + console.info("[popupProps] get globalThis.value is: " + JSON.stringify(globalThis.value)); + + let obj = JSON.parse(globalThis.value.dataProp); + console.info("[popupProps] get inspector value is: " + JSON.stringify(obj)); + console.info("[popupProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); + + expect(obj.$type).assertEqual('popup') + expect(obj.$attrs.id).assertEqual('dataProp') + expect(obj.$attrs.dataPopup).assertEqual(undefined); + console.info("[popupProps] get dataPopup value is: " + JSON.stringify(obj.$attrs.dataPopup)); + done(); + }); + + /** + * @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100 + * @tc.name testPopupDataPropNone + * @tc.desc ACE + */ + it('testPopupDataPropNone', 0, async function (done) { + console.info('testPopupDataPropNone START'); + console.info("[popupProps] get globalThis.value is: " + JSON.stringify(globalThis.value)); + + let obj = JSON.parse(globalThis.value.dataPropNone); + console.info("[popupProps] get inspector value is: " + JSON.stringify(obj)); + console.info("[popupProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); + + expect(obj.$type).assertEqual('popup') + expect(obj.$attrs.id).assertEqual('dataPropNone') + expect(obj.$attrs.dataPopup).assertEqual(undefined) + console.info("[popupProps] get dataPopup value is: " + JSON.stringify(obj.$attrs.dataPopup)); + done(); + }); + + /** + * @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100 + * @tc.name testPopupClickEffectPropSmall + * @tc.desc ACE + */ + it('testPopupClickEffectPropSmall', 0, async function (done) { + console.info('testPopupClickEffectPropSmall START'); + console.info("[popupProps] get globalThis.value is: " + JSON.stringify(globalThis.value)); + + let obj = JSON.parse(globalThis.value.clickEffectPropSmall); + console.info("[popupProps] get inspector value is: " + JSON.stringify(obj)); + console.info("[popupProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); + + expect(obj.$type).assertEqual('popup') + 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 testPopupClickEffectPropMedium + * @tc.desc ACE + */ + it('testPopupClickEffectPropMedium', 0, async function (done) { + console.info('testPopupClickEffectPropMedium START'); + console.info("[popupProps] get globalThis.value is: " + JSON.stringify(globalThis.value)); + + let obj = JSON.parse(globalThis.value.clickEffectPropMedium); + console.info("[popupProps] get inspector value is: " + JSON.stringify(obj)); + console.info("[popupProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); + + expect(obj.$type).assertEqual('popup') + 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 testPopupClickEffectPropLarge + * @tc.desc ACE + */ + it('testPopupClickEffectPropLarge', 0, async function (done) { + console.info('testPopupClickEffectPropLarge START'); + console.info("[popupProps] get globalThis.value is: " + JSON.stringify(globalThis.value)); + + let obj = JSON.parse(globalThis.value.clickEffectPropLarge); + console.info("[popupProps] get inspector value is: " + JSON.stringify(obj)); + console.info("[popupProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); + + expect(obj.$type).assertEqual('popup') + 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 testPopupClickEffectPropNone + * @tc.desc ACE + */ + it('testPopupClickEffectPropNone', 0, async function (done) { + console.info('testPopupClickEffectPropNone START'); + console.info("[popupProps] get globalThis.value is: " + JSON.stringify(globalThis.value)); + + let obj = JSON.parse(globalThis.value.clickEffectPropNone); + console.info("[popupProps] get inspector value is: " + JSON.stringify(obj)); + console.info("[popupProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); + + expect(obj.$type).assertEqual('popup') + expect(obj.$attrs.id).assertEqual('clickEffectPropNone') + expect(obj.$attrs.clickEffect).assertEqual(undefined) + console.info("[popupProps] get clickEffect value is: " + JSON.stringify(obj.$attrs.clickEffect)); + done(); + }); + + /** + * @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100 + * @tc.name testPopupDirPropRtl + * @tc.desc ACE + */ + it('testPopupDirPropRtl', 0, async function (done) { + console.info('testPopupDirPropRtl START'); + console.info("[popupProps] get globalThis.value is: " + JSON.stringify(globalThis.value)); + + let obj = JSON.parse(globalThis.value.dirPropRtl); + console.info("[popupProps] get inspector value is: " + JSON.stringify(obj)); + console.info("[popupProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); + + expect(obj.$type).assertEqual('popup') + expect(obj.$attrs.id).assertEqual('dirPropRtl') + expect(obj.$attrs.dir).assertEqual('rtl') + done(); + }); + + /** + * @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100 + * @tc.name testPopupDirPropLtr + * @tc.desc ACE + */ + it('testPopupDirPropLtr', 0, async function (done) { + console.info('testPopupDirPropLtr START'); + console.info("[popupProps] get globalThis.value is: " + JSON.stringify(globalThis.value)); + + let obj = JSON.parse(globalThis.value.dirPropLtr); + console.info("[popupProps] get inspector value is: " + JSON.stringify(obj)); + console.info("[popupProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); + + expect(obj.$type).assertEqual('popup') + expect(obj.$attrs.id).assertEqual('dirPropLtr') + expect(obj.$attrs.dir).assertEqual('ltr') + done(); + }); + + /** + * @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100 + * @tc.name testPopupDirPropAuto + * @tc.desc ACE + */ + it('testPopupDirPropAuto', 0, async function (done) { + console.info('testPopupDirPropAuto START'); + console.info("[popupProps] get globalThis.value is: " + JSON.stringify(globalThis.value)); + + let obj = JSON.parse(globalThis.value.dirPropAuto); + console.info("[popupProps] get inspector value is: " + JSON.stringify(obj)); + console.info("[popupProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); + + expect(obj.$type).assertEqual('popup') + expect(obj.$attrs.id).assertEqual('dirPropAuto') + expect(obj.$attrs.dir).assertEqual('auto') + done(); + }); + + /** + * @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100 + * @tc.name testPopupDirPropNone + * @tc.desc ACE + */ + it('testPopupDirPropNone', 0, async function (done) { + console.info('testPopupDirPropNone START'); + console.info("[popupProps] get globalThis.value is: " + JSON.stringify(globalThis.value)); + + let obj = JSON.parse(globalThis.value.dirPropNone); + console.info("[popupProps] get inspector value is: " + JSON.stringify(obj)); + console.info("[popupProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); + + expect(obj.$type).assertEqual('popup') + expect(obj.$attrs.id).assertEqual('dirPropNone') + expect(obj.$attrs.dir).assertEqual('auto') + done(); + }); + + /** + * @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100 + * @tc.name testPopupForPropNull + * @tc.desc ACE + */ + it('testPopupForPropNull', 0, async function (done) { + console.info('testPopupForPropNull START'); + console.info("[popupProps] get globalThis.value is: " + JSON.stringify(globalThis.value)); + + let obj = JSON.parse(globalThis.value.forPropNull); + console.info("[popupProps] get inspector value is: " + JSON.stringify(obj)); + console.info("[popupProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); + + expect(obj.$type).assertEqual('popup') + expect(obj.$attrs.id).assertEqual('forPropNull') + expect(obj.$attrs.for).assertEqual(undefined) + console.info("[popupProps] get for value is: " + JSON.stringify(obj.$attrs.for)); + done(); + }); + + /** + * @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100 + * @tc.name testPopupForPropOne + * @tc.desc ACE + */ + it('testPopupForPropOne', 0, async function (done) { + console.info('testPopupForPropOne START'); + console.info("[popupProps] get globalThis.value is: " + JSON.stringify(globalThis.value)); + + let obj = JSON.parse(globalThis.value.forPropOne); + console.info("[popupProps] get inspector value is: " + JSON.stringify(obj)); + console.info("[popupProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); + + expect(obj.$type).assertEqual('popup') + expect(obj.$attrs.id).assertEqual('forPropOne') + expect(obj.$attrs.for).assertEqual(undefined) + console.info("[popupProps] get for value is: " + JSON.stringify(obj.$attrs.for)); + done(); + }); + + /** + * @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100 + * @tc.name testPopupForPropThree + * @tc.desc ACE + */ + it('testPopupForPropThree', 0, async function (done) { + console.info('testPopupForPropThree START'); + console.info("[popupProps] get globalThis.value is: " + JSON.stringify(globalThis.value)); + + let obj = JSON.parse(globalThis.value.forPropThree); + console.info("[popupProps] get inspector value is: " + JSON.stringify(obj)); + console.info("[popupProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); + + expect(obj.$type).assertEqual('popup') + expect(obj.$attrs.id).assertEqual('forPropThree') + expect(obj.$attrs.for).assertEqual(undefined) + console.info("[popupProps] get for value is: " + JSON.stringify(obj.$attrs.for)); + done(); + }); + + /** + * @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100 + * @tc.name testPopupIfPropTrue + * @tc.desc ACE + */ + it('testPopupIfPropTrue', 0, async function (done) { + console.info('testPopupIfPropTrue START'); + console.info("[popupProps] get globalThis.value is: " + JSON.stringify(globalThis.value)); + + let obj = JSON.parse(globalThis.value.ifPropTrue); + console.info("[popupProps] get inspector value is: " + JSON.stringify(obj)); + console.info("[popupProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); + + expect(obj.$type).assertEqual('popup') + expect(obj.$attrs.id).assertEqual('ifPropTrue') + expect(obj.$attrs.if).assertEqual(undefined) + console.info("[popupProps] get for value is: " + JSON.stringify(obj.$attrs.if)); + done(); + }); + + + /** + * @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100 + * @tc.name testPopupShowPropTrue + * @tc.desc ACE + */ + it('testPopupShowPropTrue', 0, async function (done) { + console.info('testPopupShowPropTrue START'); + console.info("[popupProps] get globalThis.value is: " + JSON.stringify(globalThis.value)); + + let obj = JSON.parse(globalThis.value.showPropTrue); + console.info("[popupProps] get inspector value is: " + JSON.stringify(obj)); + console.info("[popupProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); + + expect(obj.$type).assertEqual('popup') + expect(obj.$attrs.id).assertEqual('showPropTrue') + expect(obj.$attrs.show).assertEqual('true') + console.info("[popupProps] get show value is: " + JSON.stringify(obj.$attrs.show)); + done(); + }); + + /** + * @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100 + * @tc.name testPopupShowPropFalse + * @tc.desc ACE + */ + it('testPopupShowPropFalse', 0, async function (done) { + console.info('testPopupShowPropFalse START'); + console.info("[popupProps] get globalThis.value is: " + JSON.stringify(globalThis.value)); + + let obj = JSON.parse(globalThis.value.showPropFalse); + console.info("[popupProps] get inspector value is: " + JSON.stringify(obj)); + console.info("[popupProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); + + expect(obj.$type).assertEqual('popup') + expect(obj.$attrs.id).assertEqual('showPropFalse') + expect(obj.$attrs.show).assertEqual('false') + console.info("[popupProps] get show value is: " + JSON.stringify(obj.$attrs.show)); + done(); + }); + + /** + * @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100 + * @tc.name testPopupShowPropNone + * @tc.desc ACE + */ + it('testPopupShowPropNone', 0, async function (done) { + console.info('testPopupShowPropNone START'); + console.info("[popupProps] get globalThis.value is: " + JSON.stringify(globalThis.value)); + + let obj = JSON.parse(globalThis.value.showPropNone); + console.info("[popupProps] get inspector value is: " + JSON.stringify(obj)); + console.info("[popupProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); + + expect(obj.$type).assertEqual('popup') + expect(obj.$attrs.id).assertEqual('showPropNone') + expect(obj.$attrs.show).assertEqual('true') + console.info("[popupProps] get show value is: " + JSON.stringify(obj.$attrs.show)); + done(); + }); + + /** + * @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100 + * @tc.name testPopupTargetProp + * @tc.desc ACE + */ + it('testPopupTargetProp', 0, async function (done) { + console.info('testPopupTargetProp START'); + console.info("[popupProps] get globalThis.value is: " + JSON.stringify(globalThis.value)); + + let obj = JSON.parse(globalThis.value.targetProp); //ID + console.info("[popupProps] get inspector value is: " + JSON.stringify(obj)); + console.info("[popupProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); + + expect(obj.$type).assertEqual('popup') + expect(obj.$attrs.id).assertEqual('targetProp') //ID + expect(obj.$attrs.target).assertEqual('target1') //PROP AND VALUE + console.info("[popupProps] get target value is: " + JSON.stringify(obj.$attrs.target)); //PROP + done(); + }); + + /** + * @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100 + * @tc.name testPlacementPropLeft + * @tc.desc ACE + */ + it('testPlacementPropLeft', 0, async function (done) { + console.info('testPlacementPropLeft START'); + console.info("[popupProps] get globalThis.value is: " + JSON.stringify(globalThis.value)); + + let obj = JSON.parse(globalThis.value.placementPropLeft); //ID + console.info("[popupProps] get inspector value is: " + JSON.stringify(obj)); + console.info("[popupProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); + + expect(obj.$type).assertEqual('popup') + expect(obj.$attrs.id).assertEqual('placementPropLeft') //ID + expect(obj.$attrs.placement).assertEqual('left') //PROP AND VALUE + console.info("[popupProps] get placement value is: " + JSON.stringify(obj.$attrs.placement)); //PROP + done(); + }); + + /** + * @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100 + * @tc.name testPlacementPropRight + * @tc.desc ACE + */ + it('testPlacementPropRight', 0, async function (done) { + console.info('testPlacementPropRight START'); + console.info("[popupProps] get globalThis.value is: " + JSON.stringify(globalThis.value)); + + let obj = JSON.parse(globalThis.value.placementPropRight); //ID + console.info("[popupProps] get inspector value is: " + JSON.stringify(obj)); + console.info("[popupProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); + + expect(obj.$type).assertEqual('popup') + expect(obj.$attrs.id).assertEqual('placementPropRight') //ID + expect(obj.$attrs.placement).assertEqual('right') //PROP AND VALUE + console.info("[popupProps] get placement value is: " + JSON.stringify(obj.$attrs.placement)); //PROP + done(); + }); + + /** + * @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100 + * @tc.name testPlacementPropTop + * @tc.desc ACE + */ + it('testPlacementPropTop', 0, async function (done) { + console.info('testPlacementPropTop START'); + console.info("[popupProps] get globalThis.value is: " + JSON.stringify(globalThis.value)); + + let obj = JSON.parse(globalThis.value.placementPropTop); //ID + console.info("[popupProps] get inspector value is: " + JSON.stringify(obj)); + console.info("[popupProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); + + expect(obj.$type).assertEqual('popup') + expect(obj.$attrs.id).assertEqual('placementPropTop') //ID + expect(obj.$attrs.placement).assertEqual('top') //PROP AND VALUE + console.info("[popupProps] get placement value is: " + JSON.stringify(obj.$attrs.placement)); //PROP + done(); + }); + + /** + * @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100 + * @tc.name testKeepAlivePropTrue + * @tc.desc ACE + */ + it('testKeepAlivePropTrue', 0, async function (done) { + console.info('testKeepAlivePropTrue START'); + console.info("[popupProps] get globalThis.value is: " + JSON.stringify(globalThis.value)); + + let obj = JSON.parse(globalThis.value.keepAlivePropTrue); //ID + console.info("[popupProps] get inspector value is: " + JSON.stringify(obj)); + console.info("[popupProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); + + expect(obj.$type).assertEqual('popup') + expect(obj.$attrs.id).assertEqual('keepAlivePropTrue') //ID + expect(obj.$attrs.keepalive).assertEqual('true') //PROP AND VALUE + console.info("[popupProps] get keepalive value is: " + JSON.stringify(obj.$attrs.keepalive)); //PROP + done(); + }); + + /** + * @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100 + * @tc.name testKeepAlivePropFalse + * @tc.desc ACE + */ + it('testKeepAlivePropFalse', 0, async function (done) { + console.info('testKeepAlivePropFalse START'); + console.info("[popupProps] get globalThis.value is: " + JSON.stringify(globalThis.value)); + + let obj = JSON.parse(globalThis.value.keepAlivePropFalse); //ID + console.info("[popupProps] get inspector value is: " + JSON.stringify(obj)); + console.info("[popupProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); + + expect(obj.$type).assertEqual('popup') + expect(obj.$attrs.id).assertEqual('keepAlivePropFalse') //ID + expect(obj.$attrs.keepalive).assertEqual('false') //PROP AND VALUE + console.info("[popupProps] get keepalive value is: " + JSON.stringify(obj.$attrs.keepalive)); //PROP + done(); + }); + + /** + * @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100 + * @tc.name testClickablePropTrue + * @tc.desc ACE + */ + it('testClickablePropTrue', 0, async function (done) { + console.info('testClickablePropTrue START'); + console.info("[popupProps] get globalThis.value is: " + JSON.stringify(globalThis.value)); + + let obj = JSON.parse(globalThis.value.clickablePropTrue); //ID + console.info("[popupProps] get inspector value is: " + JSON.stringify(obj)); + console.info("[popupProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); + + expect(obj.$type).assertEqual('popup') + expect(obj.$attrs.id).assertEqual('clickablePropTrue') //ID + expect(obj.$attrs.clickable).assertEqual('true') //PROP AND VALUE + console.info("[popupProps] get clickable value is: " + JSON.stringify(obj.$attrs.clickable)); //PROP + done(); + }); + + /** + * @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100 + * @tc.name testClickablePropFalse + * @tc.desc ACE + */ + it('testClickablePropFalse', 0, async function (done) { + console.info('testClickablePropFalse START'); + console.info("[popupProps] get globalThis.value is: " + JSON.stringify(globalThis.value)); + + let obj = JSON.parse(globalThis.value.clickablePropFalse); //ID + console.info("[popupProps] get inspector value is: " + JSON.stringify(obj)); + console.info("[popupProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); + + expect(obj.$type).assertEqual('popup') + expect(obj.$attrs.id).assertEqual('clickablePropFalse') //ID + expect(obj.$attrs.clickable).assertEqual('false') //PROP AND VALUE + console.info("[popupProps] get clickable value is: " + JSON.stringify(obj.$attrs.clickable)); //PROP + done(); + }); + + + /** + * @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100 + * @tc.name testArrowOffsetProp + * @tc.desc ACE + */ + it('testArrowOffsetProp', 0, async function (done) { + console.info('testArrowOffsetProp START'); + console.info("[popupProps] get globalThis.value is: " + JSON.stringify(globalThis.value)); + + let obj = JSON.parse(globalThis.value.arrowOffsetProp); //ID + console.info("[popupProps] get inspector value is: " + JSON.stringify(obj)); + console.info("[popupProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); + + expect(obj.$type).assertEqual('popup') + expect(obj.$attrs.id).assertEqual('arrowOffsetProp') //ID + expect(obj.$attrs.arrowoffset).assertEqual('10px') //PROP AND VALUE + console.info("[popupProps] get arrowoffset value is: " + JSON.stringify(obj.$attrs.arrowoffset)); //PROP + done(); + }); +}); diff --git a/ace/ace_standard/src/main/js/default/test/refreshProps.test.js b/ace/ace_standard/src/main/js/default/test/refreshProps.test.js new file mode 100644 index 0000000000000000000000000000000000000000..a8786b1d0775908b114c2ce545650392dff1de3b --- /dev/null +++ b/ace/ace_standard/src/main/js/default/test/refreshProps.test.js @@ -0,0 +1,856 @@ +/** + * 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('refreshPropsJsTest', 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('[refreshPropsJsTest] before each called') + + let result; + let options = { + uri: 'pages/refresh/prop/index' + } + try { + result = router.push(options) + console.info("push refreshProps page success " + JSON.stringify(result)); + } catch (err) { + console.error("push refreshProps page error " + JSON.stringify(result)); + } + await sleep(4000) + done() + }); + + /** + * run after testcase + */ + afterAll(async function () { + console.info('[refreshPropsJsTest] after each called') + await backToIndex() + await sleep(1000) + }); + + /** + * @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100 + * @tc.name testRefreshIdProp + * @tc.desc ACE + */ + it('testRefreshIdProp', 0, async function (done) { + console.info('testRefreshIdProp START'); + console.info("[RefreshProps] get globalThis.value is: " + JSON.stringify(globalThis.value)); + + let obj = JSON.parse(globalThis.value.idProp); + console.info("[RefreshProps] get inspector value is: " + JSON.stringify(obj)); + console.info("[RefreshProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); + + expect(obj.$type).assertEqual('refresh') + expect(obj.$attrs.id).assertEqual('idProp') + done(); + }); + + /** + * @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100 + * @tc.name testRefreshClassProp + * @tc.desc ACE + */ + it('testRefreshClassProp', 0, async function (done) { + console.info('testRefreshClassProp START'); + console.info("[refreshProps] get globalThis.value is: " + JSON.stringify(globalThis.value)); + + let obj = JSON.parse(globalThis.value.classProp); + console.info("[refreshProps] get inspector value is: " + JSON.stringify(obj)); + console.info("[refreshProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); + + expect(obj.$type).assertEqual('refresh') + expect(obj.$attrs.id).assertEqual('classProp') + expect(obj.$attrs.className).assertEqual('classProp') + done(); + }); + + /** + * @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100 + * @tc.name testRefreshClassPropNone + * @tc.desc ACE + */ + it('testRefreshClassPropNone', 0, async function (done) { + console.info('testRefreshClassPropNone START'); + console.info("[refreshProps] get globalThis.value is: " + JSON.stringify(globalThis.value)); + + let obj = JSON.parse(globalThis.value.classPropNone); + console.info("[refreshProps] get inspector value is: " + JSON.stringify(obj)); + console.info("[refreshProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); + + expect(obj.$type).assertEqual('refresh') + expect(obj.$attrs.id).assertEqual('classPropNone') + expect(obj.$attrs.className).assertEqual(undefined) + console.info("[refreshProps] get className value is: " + JSON.stringify(obj.$attrs.className)); + done(); + }); + + /** + * @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100 + * @tc.name testRefreshStyleProp + * @tc.desc ACEs + */ + // it('testRefreshStyleProp', 0, async function (done) { + // console.info('testRefreshStyleProp START'); + // console.info("[refreshProps] get globalThis.value is: " + JSON.stringify(globalThis.value)); + // + // let obj = JSON.parse(globalThis.value.styleProp); + // console.info("[refreshProps] get inspector value is: " + JSON.stringify(obj)); + // console.info("[refreshProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); + // + // expect(obj.$type).assertEqual('refresh') + // expect(obj.$attrs.id).assertEqual('styleProp') + // expect(obj.$attrs.style).assertEqual(undefined) + // console.info("[refreshProps] get style value is: " + JSON.stringify(obj.$attrs.style)); + // + // expect(obj.$styles.width).assertEqual(undefined); + // console.info("[refreshProps] get style width value is: " + JSON.stringify(obj.$styles.width)); + // expect(obj.$styles.height).assertEqual(undefined); + // console.info("[refreshProps] get style height value is: " + JSON.stringify(obj.$styles.height)); + // expect(obj.$styles.get('background-color')).assertEqual(undefined); + // console.info("[refreshProps] get style background-color value is: " + JSON.stringify(obj.$styles.get('background-color'))); + // done(); + // }); + + /** + * @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100 + * @tc.name testRefreshRefProp + * @tc.desc ACE + */ + it('testRefreshRefProp', 0, async function (done) { + console.info('testRefreshRefProp START'); + console.info("[refreshProps] get globalThis.value is: " + JSON.stringify(globalThis.value)); + + let obj = JSON.parse(globalThis.value.refProp); + console.info("[refreshProps] get inspector value is: " + JSON.stringify(obj)); + console.info("[refreshProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); + + expect(obj.$type).assertEqual('refresh') + expect(obj.$attrs.id).assertEqual('refProp') + expect(obj.$attrs.ref).assertEqual('refProp') + done(); + }); + + /** + * @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100 + * @tc.name testRefreshRefPropNone + * @tc.desc ACE + */ + it('testRefreshRefPropNone', 0, async function (done) { + console.info('testRefreshRefPropNone START'); + console.info("[refreshProps] get globalThis.value is: " + JSON.stringify(globalThis.value)); + + let obj = JSON.parse(globalThis.value.refPropNone); + console.info("[refreshProps] get inspector value is: " + JSON.stringify(obj)); + console.info("[refreshProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); + + expect(obj.$type).assertEqual('refresh') + expect(obj.$attrs.id).assertEqual('refPropNone') + expect(obj.$attrs.ref).assertEqual(undefined) + console.info("[refreshProps] get ref value is: " + JSON.stringify(obj.$attrs.ref)); + done(); + }); + + /** + * @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100 + * @tc.name testRefreshDisabledPropTrue + * @tc.desc ACE + */ + it('testRefreshDisabledPropTrue', 0, async function (done) { + console.info('testRefreshDisabledPropTrue START'); + console.info("[refreshProps] get globalThis.value is: " + JSON.stringify(globalThis.value)); + + let obj = JSON.parse(globalThis.value.disabledPropTrue); + console.info("[refreshProps] get inspector value is: " + JSON.stringify(obj)); + console.info("[refreshProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); + + expect(obj.$type).assertEqual('refresh') + expect(obj.$attrs.id).assertEqual('disabledPropTrue') + expect(obj.$attrs.disabled).assertEqual('true') + done(); + }); + + /** + * @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100 + * @tc.name testRefreshDisabledPropFalse + * @tc.desc ACE + */ + it('testRefreshDisabledPropFalse', 0, async function (done) { + console.info('testRefreshDisabledPropFalse START'); + console.info("[refreshProps] get globalThis.value is: " + JSON.stringify(globalThis.value)); + + let obj = JSON.parse(globalThis.value.disabledPropFalse); + console.info("[refreshProps] get inspector value is: " + JSON.stringify(obj)); + console.info("[refreshProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); + + expect(obj.$type).assertEqual('refresh') + expect(obj.$attrs.id).assertEqual('disabledPropFalse') + expect(obj.$attrs.disabled).assertEqual('false') + done(); + }); + + /** + * @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100 + * @tc.name testRefreshDisabledPropNone + * @tc.desc ACE + */ + it('testRefreshDisabledPropNone', 0, async function (done) { + console.info('testRefreshDisabledPropNone START'); + console.info("[refreshProps] get globalThis.value is: " + JSON.stringify(globalThis.value)); + + let obj = JSON.parse(globalThis.value.disabledPropNone); + console.info("[refreshProps] get inspector value is: " + JSON.stringify(obj)); + console.info("[refreshProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); + + expect(obj.$type).assertEqual('refresh') + expect(obj.$attrs.id).assertEqual('disabledPropNone') + expect(obj.$attrs.disabled).assertEqual('false') + done(); + }); + + /** + * @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100 + * @tc.name testRefreshFocusablePropTrue + * @tc.desc ACE + */ + it('testRefreshFocusablePropTrue', 0, async function (done) { + console.info('testRefreshFocusablePropTrue START'); + console.info("[refreshProps] get globalThis.value is: " + JSON.stringify(globalThis.value)); + + let obj = JSON.parse(globalThis.value.focusablePropTrue); + console.info("[refreshProps] get inspector value is: " + JSON.stringify(obj)); + console.info("[refreshProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); + + expect(obj.$type).assertEqual('refresh') + expect(obj.$attrs.id).assertEqual('focusablePropTrue') + expect(obj.$attrs.focusable).assertEqual('true') + done(); + }); + + /** + * @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100 + * @tc.name testRefreshFocusablePropFalse + * @tc.desc ACE + */ + it('testRefreshFocusablePropFalse', 0, async function (done) { + console.info('testRefreshFocusablePropFalse START'); + console.info("[refreshProps] get globalThis.value is: " + JSON.stringify(globalThis.value)); + + let obj = JSON.parse(globalThis.value.focusablePropFalse); + console.info("[refreshProps] get inspector value is: " + JSON.stringify(obj)); + console.info("[refreshProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); + + expect(obj.$type).assertEqual('refresh') + expect(obj.$attrs.id).assertEqual('focusablePropFalse') + expect(obj.$attrs.focusable).assertEqual('false') + done(); + }); + + /** + * @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100 + * @tc.name testRefreshFocusablePropNone + * @tc.desc ACE + */ + it('testRefreshFocusablePropNone', 0, async function (done) { + console.info('testRefreshFocusablePropNone START'); + console.info("[refreshProps] get globalThis.value is: " + JSON.stringify(globalThis.value)); + + let obj = JSON.parse(globalThis.value.focusablePropNone); + console.info("[refreshProps] get inspector value is: " + JSON.stringify(obj)); + console.info("[refreshProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); + + expect(obj.$type).assertEqual('refresh') + expect(obj.$attrs.id).assertEqual('focusablePropNone') + expect(obj.$attrs.focusable).assertEqual('false') + done(); + }); + + /** + * @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100 + * @tc.name testRefreshDataProp + * @tc.desc ACE + */ + it('testRefreshDataProp', 0, async function (done) { + console.info('testRefreshDataProp START'); + console.info("[refreshProps] get globalThis.value is: " + JSON.stringify(globalThis.value)); + + let obj = JSON.parse(globalThis.value.dataProp); + console.info("[refreshProps] get inspector value is: " + JSON.stringify(obj)); + console.info("[refreshProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); + + expect(obj.$type).assertEqual('refresh') + expect(obj.$attrs.id).assertEqual('dataProp') + expect(obj.$attrs.dataRefresh).assertEqual(undefined); + console.info("[refreshProps] get dataRefresh value is: " + JSON.stringify(obj.$attrs.dataRefresh)); + done(); + }); + + /** + * @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100 + * @tc.name testRefreshDataPropNone + * @tc.desc ACE + */ + it('testRefreshDataPropNone', 0, async function (done) { + console.info('testRefreshDataPropNone START'); + console.info("[refreshProps] get globalThis.value is: " + JSON.stringify(globalThis.value)); + + let obj = JSON.parse(globalThis.value.dataPropNone); + console.info("[refreshProps] get inspector value is: " + JSON.stringify(obj)); + console.info("[refreshProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); + + expect(obj.$type).assertEqual('refresh') + expect(obj.$attrs.id).assertEqual('dataPropNone') + expect(obj.$attrs.dataRefresh).assertEqual(undefined) + console.info("[refreshProps] get dataRefresh value is: " + JSON.stringify(obj.$attrs.dataRefresh)); + done(); + }); + + /** + * @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100 + * @tc.name testRefreshClickEffectPropSmall + * @tc.desc ACE + */ + it('testRefreshClickEffectPropSmall', 0, async function (done) { + console.info('testRefreshClickEffectPropSmall START'); + console.info("[refreshProps] get globalThis.value is: " + JSON.stringify(globalThis.value)); + + let obj = JSON.parse(globalThis.value.clickEffectPropSmall); + console.info("[refreshProps] get inspector value is: " + JSON.stringify(obj)); + console.info("[refreshProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); + + expect(obj.$type).assertEqual('refresh') + 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 testRefreshClickEffectPropMedium + * @tc.desc ACE + */ + it('testRefreshClickEffectPropMedium', 0, async function (done) { + console.info('testRefreshClickEffectPropMedium START'); + console.info("[refreshProps] get globalThis.value is: " + JSON.stringify(globalThis.value)); + + let obj = JSON.parse(globalThis.value.clickEffectPropMedium); + console.info("[refreshProps] get inspector value is: " + JSON.stringify(obj)); + console.info("[refreshProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); + + expect(obj.$type).assertEqual('refresh') + 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 testRefreshClickEffectPropLarge + * @tc.desc ACE + */ + it('testRefreshClickEffectPropLarge', 0, async function (done) { + console.info('testRefreshClickEffectPropLarge START'); + console.info("[refreshProps] get globalThis.value is: " + JSON.stringify(globalThis.value)); + + let obj = JSON.parse(globalThis.value.clickEffectPropLarge); + console.info("[refreshProps] get inspector value is: " + JSON.stringify(obj)); + console.info("[refreshProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); + + expect(obj.$type).assertEqual('refresh') + 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 testRefreshClickEffectPropNone + * @tc.desc ACE + */ + it('testRefreshClickEffectPropNone', 0, async function (done) { + console.info('testRefreshClickEffectPropNone START'); + console.info("[refreshProps] get globalThis.value is: " + JSON.stringify(globalThis.value)); + + let obj = JSON.parse(globalThis.value.clickEffectPropNone); + console.info("[refreshProps] get inspector value is: " + JSON.stringify(obj)); + console.info("[refreshProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); + + expect(obj.$type).assertEqual('refresh') + expect(obj.$attrs.id).assertEqual('clickEffectPropNone') + expect(obj.$attrs.clickEffect).assertEqual(undefined) + console.info("[refreshProps] get clickEffect value is: " + JSON.stringify(obj.$attrs.clickEffect)); + done(); + }); + + /** + * @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100 + * @tc.name testRefreshDirPropRtl + * @tc.desc ACE + */ + it('testRefreshDirPropRtl', 0, async function (done) { + console.info('testRefreshDirPropRtl START'); + console.info("[refreshProps] get globalThis.value is: " + JSON.stringify(globalThis.value)); + + let obj = JSON.parse(globalThis.value.dirPropRtl); + console.info("[refreshProps] get inspector value is: " + JSON.stringify(obj)); + console.info("[refreshProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); + + expect(obj.$type).assertEqual('refresh') + expect(obj.$attrs.id).assertEqual('dirPropRtl') + expect(obj.$attrs.dir).assertEqual('rtl') + done(); + }); + + /** + * @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100 + * @tc.name testRefreshDirPropLtr + * @tc.desc ACE + */ + it('testRefreshDirPropLtr', 0, async function (done) { + console.info('testRefreshDirPropLtr START'); + console.info("[refreshProps] get globalThis.value is: " + JSON.stringify(globalThis.value)); + + let obj = JSON.parse(globalThis.value.dirPropLtr); + console.info("[refreshProps] get inspector value is: " + JSON.stringify(obj)); + console.info("[refreshProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); + + expect(obj.$type).assertEqual('refresh') + expect(obj.$attrs.id).assertEqual('dirPropLtr') + expect(obj.$attrs.dir).assertEqual('ltr') + done(); + }); + + /** + * @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100 + * @tc.name testRefreshDirPropAuto + * @tc.desc ACE + */ + it('testRefreshDirPropAuto', 0, async function (done) { + console.info('testRefreshDirPropAuto START'); + console.info("[refreshProps] get globalThis.value is: " + JSON.stringify(globalThis.value)); + + let obj = JSON.parse(globalThis.value.dirPropAuto); + console.info("[refreshProps] get inspector value is: " + JSON.stringify(obj)); + console.info("[refreshProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); + + expect(obj.$type).assertEqual('refresh') + expect(obj.$attrs.id).assertEqual('dirPropAuto') + expect(obj.$attrs.dir).assertEqual('auto') + done(); + }); + + /** + * @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100 + * @tc.name testRefreshDirPropNone + * @tc.desc ACE + */ + it('testRefreshDirPropNone', 0, async function (done) { + console.info('testRefreshDirPropNone START'); + console.info("[refreshProps] get globalThis.value is: " + JSON.stringify(globalThis.value)); + + let obj = JSON.parse(globalThis.value.dirPropNone); + console.info("[refreshProps] get inspector value is: " + JSON.stringify(obj)); + console.info("[refreshProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); + + expect(obj.$type).assertEqual('refresh') + expect(obj.$attrs.id).assertEqual('dirPropNone') + expect(obj.$attrs.dir).assertEqual('auto') + done(); + }); + + /** + * @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100 + * @tc.name testRefreshForPropNull + * @tc.desc ACE + */ + it('testRefreshForPropNull', 0, async function (done) { + console.info('testRefreshForPropNull START'); + console.info("[RefreshProps] get globalThis.value is: " + JSON.stringify(globalThis.value)); + + let obj = JSON.parse(globalThis.value.forPropNull); + console.info("[refreshProps] get inspector value is: " + JSON.stringify(obj)); + console.info("[refreshProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); + + expect(obj.$type).assertEqual('refresh') + expect(obj.$attrs.id).assertEqual('forPropNull') + expect(obj.$attrs.for).assertEqual(undefined) + console.info("[refreshProps] get for value is: " + JSON.stringify(obj.$attrs.for)); + done(); + }); + + /** + * @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100 + * @tc.name testRefreshForPropOne + * @tc.desc ACE + */ + it('testRefreshForPropOne', 0, async function (done) { + console.info('testRefreshForPropOne START'); + console.info("[refreshProps] get globalThis.value is: " + JSON.stringify(globalThis.value)); + + let obj = JSON.parse(globalThis.value.forPropOne); + console.info("[refreshProps] get inspector value is: " + JSON.stringify(obj)); + console.info("[refreshProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); + + expect(obj.$type).assertEqual('refresh') + expect(obj.$attrs.id).assertEqual('forPropOne') + expect(obj.$attrs.for).assertEqual(undefined) + console.info("[refreshProps] get for value is: " + JSON.stringify(obj.$attrs.for)); + done(); + }); + + /** + * @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100 + * @tc.name testRefreshForPropThree + * @tc.desc ACE + */ + it('testRefreshForPropThree', 0, async function (done) { + console.info('testRefreshForPropThree START'); + console.info("[refreshProps] get globalThis.value is: " + JSON.stringify(globalThis.value)); + + let obj = JSON.parse(globalThis.value.forPropThree); + console.info("[refreshProps] get inspector value is: " + JSON.stringify(obj)); + console.info("[refreshProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); + + expect(obj.$type).assertEqual('refresh') + expect(obj.$attrs.id).assertEqual('forPropThree') + expect(obj.$attrs.for).assertEqual(undefined) + console.info("[refreshProps] get for value is: " + JSON.stringify(obj.$attrs.for)); + done(); + }); + + /** + * @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100 + * @tc.name testRefreshIfPropTrue + * @tc.desc ACE + */ + it('testRefreshIfPropTrue', 0, async function (done) { + console.info('testRefreshIfPropTrue START'); + console.info("[refreshProps] get globalThis.value is: " + JSON.stringify(globalThis.value)); + + let obj = JSON.parse(globalThis.value.ifPropTrue); + console.info("[refreshProps] get inspector value is: " + JSON.stringify(obj)); + console.info("[refreshProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); + + expect(obj.$type).assertEqual('refresh') + expect(obj.$attrs.id).assertEqual('ifPropTrue') + expect(obj.$attrs.if).assertEqual(undefined) + console.info("[refreshProps] get for value is: " + JSON.stringify(obj.$attrs.if)); + done(); + }); + + /** + * @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100 + * @tc.name testRefreshIfPropFalse + * @tc.desc ACE + */ + // it('testRefreshIfPropFalse', 0, async function (done) { + // console.info('testRefreshIfPropFalse START'); + // console.info("[refreshProps] get globalThis.value is: " + JSON.stringify(globalThis.value)); + // + // let obj = JSON.parse(globalThis.value.ifPropFalse); + // console.info("[refreshProps] get inspector value is: " + JSON.stringify(obj)); + // console.info("[refreshProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); + // + // expect(obj.$type).assertEqual('refresh') + // expect(obj.$attrs.id).assertEqual('ifPropFalse') + // expect(obj.$attrs.if).assertEqual(false) + // done(); + // }); + + /** + * @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100 + * @tc.name testRefreshIfPropNone + * @tc.desc ACE + */ + // it('testRefreshIfPropNone', 0, async function (done) { + // console.info('testRefreshIfPropNone START'); + // console.info("[refreshProps] get globalThis.value is: " + JSON.stringify(globalThis.value)); + // + // let obj = JSON.parse(globalThis.value.ifPropNone); + // console.info("[refreshProps] get inspector value is: " + JSON.stringify(obj)); + // console.info("[refreshProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); + // + // expect(obj.$type).assertEqual('refresh') + // expect(obj.$attrs.id).assertEqual('ifPropNone') + // expect(obj.$attrs.if).assertEqual(false) + // done(); + // }); + + /** + * @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100 + * @tc.name testRefreshShowPropTrue + * @tc.desc ACE + */ + it('testRefreshShowPropTrue', 0, async function (done) { + console.info('testRefreshShowPropTrue START'); + console.info("[refreshProps] get globalThis.value is: " + JSON.stringify(globalThis.value)); + + let obj = JSON.parse(globalThis.value.showPropTrue); + console.info("[refreshProps] get inspector value is: " + JSON.stringify(obj)); + console.info("[refreshProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); + + expect(obj.$type).assertEqual('refresh') + expect(obj.$attrs.id).assertEqual('showPropTrue') + expect(obj.$attrs.show).assertEqual('true') + console.info("[refreshProps] get show value is: " + JSON.stringify(obj.$attrs.show)); + done(); + }); + + /** + * @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100 + * @tc.name testRefreshShowPropFalse + * @tc.desc ACE + */ + it('testRefreshShowPropFalse', 0, async function (done) { + console.info('testRefreshShowPropFalse START'); + console.info("[refreshProps] get globalThis.value is: " + JSON.stringify(globalThis.value)); + + let obj = JSON.parse(globalThis.value.showPropFalse); + console.info("[refreshProps] get inspector value is: " + JSON.stringify(obj)); + console.info("[refreshProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); + + expect(obj.$type).assertEqual('refresh') + expect(obj.$attrs.id).assertEqual('showPropFalse') + expect(obj.$attrs.show).assertEqual('false') + console.info("[refreshProps] get show value is: " + JSON.stringify(obj.$attrs.show)); + done(); + }); + + /** + * @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100 + * @tc.name testRefreshShowPropNone + * @tc.desc ACE + */ + it('testRefreshShowPropNone', 0, async function (done) { + console.info('testRefreshShowPropNone START'); + console.info("[refreshProps] get globalThis.value is: " + JSON.stringify(globalThis.value)); + + let obj = JSON.parse(globalThis.value.showPropNone); + console.info("[refreshProps] get inspector value is: " + JSON.stringify(obj)); + console.info("[refreshProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); + + expect(obj.$type).assertEqual('refresh') + expect(obj.$attrs.id).assertEqual('showPropNone') + expect(obj.$attrs.show).assertEqual('true') + console.info("[refreshProps] get show value is: " + JSON.stringify(obj.$attrs.show)); + done(); + }); + + /** + * @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100 + * @tc.name testOffsetProp + * @tc.desc ACE + */ + + it('testOffsetProp', 0, async function (done) { + console.info('testOffsetProp START'); + console.info("[refreshProps] get globalThis.value is: " + JSON.stringify(globalThis.value)); + + let obj = JSON.parse(globalThis.value.offsetProp); + console.info("[refreshProps] get inspector value is: " + JSON.stringify(obj)); + console.info("[refreshProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); + + expect(obj.$type).assertEqual('refresh') + expect(obj.$attrs.id).assertEqual('offsetProp') + expect(obj.$attrs.offset).assertEqual('10px') + console.info("[refreshProps] get for value is: " + JSON.stringify(obj.$attrs.offset)); + done(); + }); + + /** + * @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100 + * @tc.name testRefreshingPropFalse + * @tc.desc ACE + */ + + it('testRefreshingPropFalse', 0, async function (done) { + console.info('testRefreshingPropFalse START'); + console.info("[refreshProps] get globalThis.value is: " + JSON.stringify(globalThis.value)); + + let obj = JSON.parse(globalThis.value.refreshingPropFalse); + console.info("[refreshProps] get inspector value is: " + JSON.stringify(obj)); + console.info("[refreshProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); + + expect(obj.$type).assertEqual('refresh') + expect(obj.$attrs.id).assertEqual('refreshingPropFalse') + expect(obj.$attrs.refreshing).assertEqual('false') + console.info("[refreshProps] get for value is: " + JSON.stringify(obj.$attrs.refreshing)); + done(); + }); + + /** + * @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100 + * @tc.name testRefreshingPropTrue + * @tc.desc ACE + */ + + it('testRefreshingPropTrue', 0, async function (done) { + console.info('testRefreshingPropTrue START'); + console.info("[refreshProps] get globalThis.value is: " + JSON.stringify(globalThis.value)); + + let obj = JSON.parse(globalThis.value.refreshingPropTrue);//id + console.info("[refreshProps] get inspector value is: " + JSON.stringify(obj)); + console.info("[refreshProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); + + expect(obj.$type).assertEqual('refresh')//type + expect(obj.$attrs.id).assertEqual('refreshingPropTrue')//id + expect(obj.$attrs.refreshing).assertEqual('false')//propValue + console.info("[refreshProps] get for value is: " + JSON.stringify(obj.$attrs.refreshing)); + done(); + }); + + /** + * @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100 + * @tc.name testTypePropAuto + * @tc.desc ACE + */ + + it('testTypePropAuto', 0, async function (done) { + console.info('testTypePropAuto START'); + console.info("[refreshProps] get globalThis.value is: " + JSON.stringify(globalThis.value)); + + let obj = JSON.parse(globalThis.value.typePropAuto); + console.info("[refreshProps] get inspector value is: " + JSON.stringify(obj)); + console.info("[refreshProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); + + expect(obj.$type).assertEqual('refresh') + expect(obj.$attrs.id).assertEqual('typePropAuto') + expect(obj.$attrs.type).assertEqual('auto') + console.info("[refreshProps] get for value is: " + JSON.stringify(obj.$attrs.type)); + done(); + }); + + /** + * @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100 + * @tc.name testTypePropPullDown + * @tc.desc ACE + */ + + it('testTypePropPullDown', 0, async function (done) { + console.info('testTypePropPullDown START'); + console.info("[refreshProps] get globalThis.value is: " + JSON.stringify(globalThis.value)); + + let obj = JSON.parse(globalThis.value.typePropPullDown); + console.info("[refreshProps] get inspector value is: " + JSON.stringify(obj)); + console.info("[refreshProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); + + expect(obj.$type).assertEqual('refresh') + expect(obj.$attrs.id).assertEqual('typePropPullDown') + expect(obj.$attrs.typePropAuto).assertEqual('auto') + console.info("[refreshProps] get for value is: " + JSON.stringify(obj.$attrs.type)); + done(); + }); + + /** + * @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100 + * @tc.name testLastTimePropTrue + * @tc.desc ACE + */ + + it('testLastTimePropTrue', 0, async function (done) { + console.info('testLastTimePropTrue START'); + console.info("[refreshProps] get globalThis.value is: " + JSON.stringify(globalThis.value)); + + let obj = JSON.parse(globalThis.value.lastTimePropTrue);//id + console.info("[refreshProps] get inspector value is: " + JSON.stringify(obj)); + console.info("[refreshProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); + + expect(obj.$type).assertEqual('refresh')//type + expect(obj.$attrs.id).assertEqual('lastTimePropTrue')//id + expect(obj.$attrs.refreshing).assertEqual('true')//propValue + console.info("[refreshProps] get for value is: " + JSON.stringify(obj.$attrs.lasttime));//pro + done(); + }); + + /** + * @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100 + * @tc.name testLastTimePropFalse + * @tc.desc ACE + */ + + it('testLastTimePropFalse', 0, async function (done) { + console.info('testLastTimePropFalse START'); + console.info("[refreshProps] get globalThis.value is: " + JSON.stringify(globalThis.value)); + + let obj = JSON.parse(globalThis.value.lastTimePropFalse);//id + console.info("[refreshProps] get inspector value is: " + JSON.stringify(obj)); + console.info("[refreshProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); + + expect(obj.$type).assertEqual('refresh')//type + expect(obj.$attrs.id).assertEqual('lastTimePropFalse')//id + expect(obj.$attrs.refreshing).assertEqual('false')//propValue + console.info("[refreshProps] get for value is: " + JSON.stringify(obj.$attrs.lasttime));//pro + done(); + }) + + /** + * @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100 + * @tc.name testFrictionProp + * @tc.desc ACE + */ + + it('testFrictionProp', 0, async function (done) { + console.info('testFrictionProp START'); + console.info("[refreshProps] get globalThis.value is: " + JSON.stringify(globalThis.value)); + + let obj = JSON.parse(globalThis.value.frictionProp);//id + console.info("[refreshProps] get inspector value is: " + JSON.stringify(obj)); + console.info("[refreshProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); + + expect(obj.$type).assertEqual('refresh')//type + expect(obj.$attrs.id).assertEqual('frictionProp')//id + expect(obj.$attrs.refreshing).assertEqual('42')//propValue + console.info("[refreshProps] get for value is: " + JSON.stringify(obj.$attrs.friction));//pro + done(); + }) + +}); diff --git a/ace/ace_standard/src/main/js/default/test/swiperProps.test.js b/ace/ace_standard/src/main/js/default/test/swiperProps.test.js new file mode 100644 index 0000000000000000000000000000000000000000..af47d356b706e51e56935e8f023b0f4555ed78b8 --- /dev/null +++ b/ace/ace_standard/src/main/js/default/test/swiperProps.test.js @@ -0,0 +1,1128 @@ +/** + * 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('swiperPropsJsTest', 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('[swiperPropsJsTest] before each called') + + let result; + let options = { + uri: 'pages/swiper/prop/index' + } + try { + result = router.push(options) + console.info("push swiperProps page success " + JSON.stringify(result)); + } catch (err) { + console.error("push swiperProps page error " + JSON.stringify(result)); + } + await sleep(4000) + done() + }); + + /** + * run after testcase + */ + afterAll(async function () { + console.info('[swiperPropsJsTest] after each called') + await backToIndex() + await sleep(1000) + }); + + /** + * @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100 + * @tc.name testSwiperIdProp + * @tc.desc ACE + */ + it('testSwiperIdProp', 0, async function (done) { + console.info('testSwiperIdProp START'); + console.info("[swiperProps] get globalThis.value is: " + JSON.stringify(globalThis.value)); + + let obj = JSON.parse(globalThis.value.idProp); + console.info("[swiperProps] get inspector value is: " + JSON.stringify(obj)); + console.info("[swiperProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); + + expect(obj.$type).assertEqual('swiper') + expect(obj.$attrs.id).assertEqual('idProp') + done(); + }); + + /** + * @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100 + * @tc.name testSwiperClassProp + * @tc.desc ACE + */ + it('testSwiperClassProp', 0, async function (done) { + console.info('testSwiperClassProp START'); + console.info("[swiperProps] get globalThis.value is: " + JSON.stringify(globalThis.value)); + + let obj = JSON.parse(globalThis.value.classProp); + console.info("[swiperProps] get inspector value is: " + JSON.stringify(obj)); + console.info("[swiperProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); + + expect(obj.$type).assertEqual('swiper') + expect(obj.$attrs.id).assertEqual('classProp') + expect(obj.$attrs.className).assertEqual('classProp') + done(); + }); + + /** + * @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100 + * @tc.name testSwiperClassPropNone + * @tc.desc ACE + */ + it('testSwiperClassPropNone', 0, async function (done) { + console.info('testSwiperClassPropNone START'); + console.info("[swiperProps] get globalThis.value is: " + JSON.stringify(globalThis.value)); + + let obj = JSON.parse(globalThis.value.classPropNone); + console.info("[swiperProps] get inspector value is: " + JSON.stringify(obj)); + console.info("[swiperProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); + + expect(obj.$type).assertEqual('swiper') + expect(obj.$attrs.id).assertEqual('classPropNone') + expect(obj.$attrs.className).assertEqual(undefined) + console.info("[swiperProps] get className value is: " + JSON.stringify(obj.$attrs.className)); + done(); + }); + + /** + * @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100 + * @tc.name testSwiperStyleProp + * @tc.desc ACEs + */ + // it('testSwiperStyleProp', 0, async function (done) { + // console.info('testSwiperStyleProp START'); + // console.info("[swiperProps] get globalThis.value is: " + JSON.stringify(globalThis.value)); + // + // let obj = JSON.parse(globalThis.value.styleProp); + // console.info("[swiperProps] get inspector value is: " + JSON.stringify(obj)); + // console.info("[swiperProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); + // + // expect(obj.$type).assertEqual('swiper') + // expect(obj.$attrs.id).assertEqual('styleProp') + // expect(obj.$attrs.style).assertEqual(undefined) + // console.info("[swiperProps] get style value is: " + JSON.stringify(obj.$attrs.style)); + // + // expect(obj.$styles.width).assertEqual(undefined); + // console.info("[swiperProps] get style width value is: " + JSON.stringify(obj.$styles.width)); + // expect(obj.$styles.height).assertEqual(undefined); + // console.info("[swiperProps] get style height value is: " + JSON.stringify(obj.$styles.height)); + // expect(obj.$styles.get('background-color')).assertEqual(undefined); + // console.info("[swiperProps] get style background-color value is: " + JSON.stringify(obj.$styles.get('background-color'))); + // done(); + // }); + + /** + * @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100 + * @tc.name testSwiperRefProp + * @tc.desc ACE + */ + it('testSwiperRefProp', 0, async function (done) { + console.info('testSwiperRefProp START'); + console.info("[swiperProps] get globalThis.value is: " + JSON.stringify(globalThis.value)); + + let obj = JSON.parse(globalThis.value.refProp); + console.info("[swiperProps] get inspector value is: " + JSON.stringify(obj)); + console.info("[swiperProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); + + expect(obj.$type).assertEqual('swiper') + expect(obj.$attrs.id).assertEqual('refProp') + expect(obj.$attrs.ref).assertEqual('refProp') + done(); + }); + + /** + * @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100 + * @tc.name testSwiperRefPropNone + * @tc.desc ACE + */ + it('testSwiperRefPropNone', 0, async function (done) { + console.info('testSwiperRefPropNone START'); + console.info("[swiperProps] get globalThis.value is: " + JSON.stringify(globalThis.value)); + + let obj = JSON.parse(globalThis.value.refPropNone); + console.info("[swiperProps] get inspector value is: " + JSON.stringify(obj)); + console.info("[swiperProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); + + expect(obj.$type).assertEqual('swiper') + expect(obj.$attrs.id).assertEqual('refPropNone') + expect(obj.$attrs.ref).assertEqual(undefined) + console.info("[swiperProps] get ref value is: " + JSON.stringify(obj.$attrs.ref)); + done(); + }); + + /** + * @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100 + * @tc.name testSwiperDisabledPropTrue + * @tc.desc ACE + */ + it('testSwiperDisabledPropTrue', 0, async function (done) { + console.info('testSwiperDisabledPropTrue START'); + console.info("[swiperProps] get globalThis.value is: " + JSON.stringify(globalThis.value)); + + let obj = JSON.parse(globalThis.value.disabledPropTrue); + console.info("[swiperProps] get inspector value is: " + JSON.stringify(obj)); + console.info("[swiperProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); + + expect(obj.$type).assertEqual('swiper') + expect(obj.$attrs.id).assertEqual('disabledPropTrue') + expect(obj.$attrs.disabled).assertEqual('true') + done(); + }); + + /** + * @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100 + * @tc.name testSwiperDisabledPropFalse + * @tc.desc ACE + */ + it('testSwiperDisabledPropFalse', 0, async function (done) { + console.info('testSwiperDisabledPropFalse START'); + console.info("[swiperProps] get globalThis.value is: " + JSON.stringify(globalThis.value)); + + let obj = JSON.parse(globalThis.value.disabledPropFalse); + console.info("[swiperProps] get inspector value is: " + JSON.stringify(obj)); + console.info("[swiperProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); + + expect(obj.$type).assertEqual('swiper') + expect(obj.$attrs.id).assertEqual('disabledPropFalse') + expect(obj.$attrs.disabled).assertEqual('false') + done(); + }); + + /** + * @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100 + * @tc.name testSwiperDisabledPropNone + * @tc.desc ACE + */ + it('testSwiperDisabledPropNone', 0, async function (done) { + console.info('testSwiperDisabledPropNone START'); + console.info("[swiperProps] get globalThis.value is: " + JSON.stringify(globalThis.value)); + + let obj = JSON.parse(globalThis.value.disabledPropNone); + console.info("[swiperProps] get inspector value is: " + JSON.stringify(obj)); + console.info("[swiperProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); + + expect(obj.$type).assertEqual('swiper') + expect(obj.$attrs.id).assertEqual('disabledPropNone') + expect(obj.$attrs.disabled).assertEqual('false') + done(); + }); + + /** + * @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100 + * @tc.name testSwiperFocusablePropTrue + * @tc.desc ACE + */ + it('testSwiperFocusablePropTrue', 0, async function (done) { + console.info('testSwiperFocusablePropTrue START'); + console.info("[swiperProps] get globalThis.value is: " + JSON.stringify(globalThis.value)); + + let obj = JSON.parse(globalThis.value.focusablePropTrue); + console.info("[swiperProps] get inspector value is: " + JSON.stringify(obj)); + console.info("[swiperProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); + + expect(obj.$type).assertEqual('swiper') + expect(obj.$attrs.id).assertEqual('focusablePropTrue') + expect(obj.$attrs.focusable).assertEqual('true') + done(); + }); + + /** + * @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100 + * @tc.name testSwiperFocusablePropFalse + * @tc.desc ACE + */ + it('testSwiperFocusablePropFalse', 0, async function (done) { + console.info('testSwiperFocusablePropFalse START'); + console.info("[swiperProps] get globalThis.value is: " + JSON.stringify(globalThis.value)); + + let obj = JSON.parse(globalThis.value.focusablePropFalse); + console.info("[swiperProps] get inspector value is: " + JSON.stringify(obj)); + console.info("[swiperProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); + + expect(obj.$type).assertEqual('swiper') + expect(obj.$attrs.id).assertEqual('focusablePropFalse') + expect(obj.$attrs.focusable).assertEqual('false') + done(); + }); + + /** + * @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100 + * @tc.name testSwiperFocusablePropNone + * @tc.desc ACE + */ + it('testSwiperFocusablePropNone', 0, async function (done) { + console.info('testSwiperFocusablePropNone START'); + console.info("[swiperProps] get globalThis.value is: " + JSON.stringify(globalThis.value)); + + let obj = JSON.parse(globalThis.value.focusablePropNone); + console.info("[swiperProps] get inspector value is: " + JSON.stringify(obj)); + console.info("[swiperProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); + + expect(obj.$type).assertEqual('swiper') + expect(obj.$attrs.id).assertEqual('focusablePropNone') + expect(obj.$attrs.focusable).assertEqual('false') + done(); + }); + + /** + * @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100 + * @tc.name testSwiperDataProp + * @tc.desc ACE + */ + it('testSwiperDataProp', 0, async function (done) { + console.info('testSwiperDataProp START'); + console.info("[swiperProps] get globalThis.value is: " + JSON.stringify(globalThis.value)); + + let obj = JSON.parse(globalThis.value.dataProp); + console.info("[swiperProps] get inspector value is: " + JSON.stringify(obj)); + console.info("[swiperProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); + + expect(obj.$type).assertEqual('swiper') + expect(obj.$attrs.id).assertEqual('dataProp') + expect(obj.$attrs.dataSwiper).assertEqual(undefined); + console.info("[swiperProps] get dataSwiper value is: " + JSON.stringify(obj.$attrs.dataSwiper)); + done(); + }); + + /** + * @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100 + * @tc.name testSwiperDataPropNone + * @tc.desc ACE + */ + it('testSwiperDataPropNone', 0, async function (done) { + console.info('testSwiperDataPropNone START'); + console.info("[swiperProps] get globalThis.value is: " + JSON.stringify(globalThis.value)); + + let obj = JSON.parse(globalThis.value.dataPropNone); + console.info("[swiperProps] get inspector value is: " + JSON.stringify(obj)); + console.info("[swiperProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); + + expect(obj.$type).assertEqual('swiper') + expect(obj.$attrs.id).assertEqual('dataPropNone') + expect(obj.$attrs.dataSwiper).assertEqual(undefined) + console.info("[swiperProps] get dataSwiper value is: " + JSON.stringify(obj.$attrs.dataSwiper)); + done(); + }); + + /** + * @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100 + * @tc.name testSwiperClickEffectPropSmall + * @tc.desc ACE + */ + it('testSwiperClickEffectPropSmall', 0, async function (done) { + console.info('testSwiperClickEffectPropSmall START'); + console.info("[swiperProps] get globalThis.value is: " + JSON.stringify(globalThis.value)); + + let obj = JSON.parse(globalThis.value.clickEffectPropSmall); + console.info("[swiperProps] get inspector value is: " + JSON.stringify(obj)); + console.info("[swiperProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); + + expect(obj.$type).assertEqual('swiper') + 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 testSwiperClickEffectPropMedium + * @tc.desc ACE + */ + it('testSwiperClickEffectPropMedium', 0, async function (done) { + console.info('testSwiperClickEffectPropMedium START'); + console.info("[swiperProps] get globalThis.value is: " + JSON.stringify(globalThis.value)); + + let obj = JSON.parse(globalThis.value.clickEffectPropMedium); + console.info("[swiperProps] get inspector value is: " + JSON.stringify(obj)); + console.info("[swiperProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); + + expect(obj.$type).assertEqual('swiper') + 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 testSwiperClickEffectPropLarge + * @tc.desc ACE + */ + it('testSwiperClickEffectPropLarge', 0, async function (done) { + console.info('testSwiperClickEffectPropLarge START'); + console.info("[swiperProps] get globalThis.value is: " + JSON.stringify(globalThis.value)); + + let obj = JSON.parse(globalThis.value.clickEffectPropLarge); + console.info("[swiperProps] get inspector value is: " + JSON.stringify(obj)); + console.info("[swiperProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); + + expect(obj.$type).assertEqual('swiper') + 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 testSwiperClickEffectPropNone + * @tc.desc ACE + */ + it('testSwiperClickEffectPropNone', 0, async function (done) { + console.info('testSwiperClickEffectPropNone START'); + console.info("[swiperProps] get globalThis.value is: " + JSON.stringify(globalThis.value)); + + let obj = JSON.parse(globalThis.value.clickEffectPropNone); + console.info("[swiperProps] get inspector value is: " + JSON.stringify(obj)); + console.info("[swiperProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); + + expect(obj.$type).assertEqual('swiper') + expect(obj.$attrs.id).assertEqual('clickEffectPropNone') + expect(obj.$attrs.clickEffect).assertEqual(undefined) + console.info("[swiperProps] get clickEffect value is: " + JSON.stringify(obj.$attrs.clickEffect)); + done(); + }); + + /** + * @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100 + * @tc.name testSwiperDirPropRtl + * @tc.desc ACE + */ + it('testSwiperDirPropRtl', 0, async function (done) { + console.info('testSwiperDirPropRtl START'); + console.info("[swiperProps] get globalThis.value is: " + JSON.stringify(globalThis.value)); + + let obj = JSON.parse(globalThis.value.dirPropRtl); + console.info("[swiperProps] get inspector value is: " + JSON.stringify(obj)); + console.info("[swiperProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); + + expect(obj.$type).assertEqual('swiper') + expect(obj.$attrs.id).assertEqual('dirPropRtl') + expect(obj.$attrs.dir).assertEqual('rtl') + done(); + }); + + /** + * @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100 + * @tc.name testSwiperDirPropLtr + * @tc.desc ACE + */ + it('testSwiperDirPropLtr', 0, async function (done) { + console.info('testSwiperDirPropLtr START'); + console.info("[swiperProps] get globalThis.value is: " + JSON.stringify(globalThis.value)); + + let obj = JSON.parse(globalThis.value.dirPropLtr); + console.info("[swiperProps] get inspector value is: " + JSON.stringify(obj)); + console.info("[swiperProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); + + expect(obj.$type).assertEqual('swiper') + expect(obj.$attrs.id).assertEqual('dirPropLtr') + expect(obj.$attrs.dir).assertEqual('ltr') + done(); + }); + + /** + * @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100 + * @tc.name testSwiperDirPropAuto + * @tc.desc ACE + */ + it('testSwiperDirPropAuto', 0, async function (done) { + console.info('testSwiperDirPropAuto START'); + console.info("[swiperProps] get globalThis.value is: " + JSON.stringify(globalThis.value)); + + let obj = JSON.parse(globalThis.value.dirPropAuto); + console.info("[swiperProps] get inspector value is: " + JSON.stringify(obj)); + console.info("[swiperProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); + + expect(obj.$type).assertEqual('swiper') + expect(obj.$attrs.id).assertEqual('dirPropAuto') + expect(obj.$attrs.dir).assertEqual('auto') + done(); + }); + + /** + * @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100 + * @tc.name testSwiperDirPropNone + * @tc.desc ACE + */ + it('testSwiperDirPropNone', 0, async function (done) { + console.info('testSwiperDirPropNone START'); + console.info("[swiperProps] get globalThis.value is: " + JSON.stringify(globalThis.value)); + + let obj = JSON.parse(globalThis.value.dirPropNone); + console.info("[swiperProps] get inspector value is: " + JSON.stringify(obj)); + console.info("[swiperProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); + + expect(obj.$type).assertEqual('swiper') + expect(obj.$attrs.id).assertEqual('dirPropNone') + expect(obj.$attrs.dir).assertEqual('auto') + done(); + }); + + /** + * @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100 + * @tc.name testSwiperForPropNull + * @tc.desc ACE + */ + it('testSwiperForPropNull', 0, async function (done) { + console.info('testSwiperForPropNull START'); + console.info("[swiperProps] get globalThis.value is: " + JSON.stringify(globalThis.value)); + + let obj = JSON.parse(globalThis.value.forPropNull); + console.info("[swiperProps] get inspector value is: " + JSON.stringify(obj)); + console.info("[swiperProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); + + expect(obj.$type).assertEqual('swiper') + expect(obj.$attrs.id).assertEqual('forPropNull') + expect(obj.$attrs.for).assertEqual(undefined) + console.info("[swiperProps] get for value is: " + JSON.stringify(obj.$attrs.for)); + done(); + }); + + /** + * @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100 + * @tc.name testSwiperForPropOne + * @tc.desc ACE + */ + it('testSwiperForPropOne', 0, async function (done) { + console.info('testSwiperForPropOne START'); + console.info("[swiperProps] get globalThis.value is: " + JSON.stringify(globalThis.value)); + + let obj = JSON.parse(globalThis.value.forPropOne); + console.info("[swiperProps] get inspector value is: " + JSON.stringify(obj)); + console.info("[swiperProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); + + expect(obj.$type).assertEqual('swiper') + expect(obj.$attrs.id).assertEqual('forPropOne') + expect(obj.$attrs.for).assertEqual(undefined) + console.info("[swiperProps] get for value is: " + JSON.stringify(obj.$attrs.for)); + done(); + }); + + /** + * @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100 + * @tc.name testSwiperForPropThree + * @tc.desc ACE + */ + it('testSwiperForPropThree', 0, async function (done) { + console.info('testSwiperForPropThree START'); + console.info("[swiperProps] get globalThis.value is: " + JSON.stringify(globalThis.value)); + + let obj = JSON.parse(globalThis.value.forPropThree); + console.info("[swiperProps] get inspector value is: " + JSON.stringify(obj)); + console.info("[swiperProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); + + expect(obj.$type).assertEqual('swiper') + expect(obj.$attrs.id).assertEqual('forPropThree') + expect(obj.$attrs.for).assertEqual(undefined) + console.info("[swiperProps] get for value is: " + JSON.stringify(obj.$attrs.for)); + done(); + }); + + /** + * @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100 + * @tc.name testSwiperIfPropTrue + * @tc.desc ACE + */ + it('testSwiperIfPropTrue', 0, async function (done) { + console.info('testSwiperIfPropTrue START'); + console.info("[swiperProps] get globalThis.value is: " + JSON.stringify(globalThis.value)); + + let obj = JSON.parse(globalThis.value.ifPropTrue); + console.info("[swiperProps] get inspector value is: " + JSON.stringify(obj)); + console.info("[swiperProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); + + expect(obj.$type).assertEqual('swiper') + expect(obj.$attrs.id).assertEqual('ifPropTrue') + expect(obj.$attrs.if).assertEqual(undefined) + console.info("[swiperProps] get for value is: " + JSON.stringify(obj.$attrs.if)); + done(); + }); + + /** + * @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100 + * @tc.name testSwiperIfPropFalse + * @tc.desc ACE + */ + // it('testSwiperIfPropFalse', 0, async function (done) { + // console.info('testSwiperIfPropFalse START'); + // console.info("[swiperProps] get globalThis.value is: " + JSON.stringify(globalThis.value)); + // + // let obj = JSON.parse(globalThis.value.ifPropFalse); + // console.info("[swiperProps] get inspector value is: " + JSON.stringify(obj)); + // console.info("[swiperProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); + // + // expect(obj.$type).assertEqual('swiper') + // expect(obj.$attrs.id).assertEqual('ifPropFalse') + // expect(obj.$attrs.if).assertEqual(false) + // done(); + // }); + + /** + * @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100 + * @tc.name testSwiperIfPropNone + * @tc.desc ACE + */ + // it('testSwiperIfPropNone', 0, async function (done) { + // console.info('testSwiperIfPropNone START'); + // console.info("[swiperProps] get globalThis.value is: " + JSON.stringify(globalThis.value)); + // + // let obj = JSON.parse(globalThis.value.ifPropNone); + // console.info("[swiperProps] get inspector value is: " + JSON.stringify(obj)); + // console.info("[swiperProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); + // + // expect(obj.$type).assertEqual('swiper') + // expect(obj.$attrs.id).assertEqual('ifPropNone') + // expect(obj.$attrs.if).assertEqual(false) + // done(); + // }); + + /** + * @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100 + * @tc.name testSwiperShowPropTrue + * @tc.desc ACE + */ + it('testSwiperShowPropTrue', 0, async function (done) { + console.info('testSwiperShowPropTrue START'); + console.info("[swiperProps] get globalThis.value is: " + JSON.stringify(globalThis.value)); + + let obj = JSON.parse(globalThis.value.showPropTrue); + console.info("[swiperProps] get inspector value is: " + JSON.stringify(obj)); + console.info("[swiperProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); + + expect(obj.$type).assertEqual('swiper') + expect(obj.$attrs.id).assertEqual('showPropTrue') + expect(obj.$attrs.show).assertEqual('true') + console.info("[swiperProps] get show value is: " + JSON.stringify(obj.$attrs.show)); + done(); + }); + + /** + * @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100 + * @tc.name testSwiperShowPropFalse + * @tc.desc ACE + */ + it('testSwiperShowPropFalse', 0, async function (done) { + console.info('testSwiperShowPropFalse START'); + console.info("[swiperProps] get globalThis.value is: " + JSON.stringify(globalThis.value)); + + let obj = JSON.parse(globalThis.value.showPropFalse); + console.info("[swiperProps] get inspector value is: " + JSON.stringify(obj)); + console.info("[swiperProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); + + expect(obj.$type).assertEqual('swiper') + expect(obj.$attrs.id).assertEqual('showPropFalse') + expect(obj.$attrs.show).assertEqual('false') + console.info("[swiperProps] get show value is: " + JSON.stringify(obj.$attrs.show)); + done(); + }); + + /** + * @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100 + * @tc.name testSwiperShowPropNone + * @tc.desc ACE + */ + it('testSwiperShowPropNone', 0, async function (done) { + console.info('testSwiperShowPropNone START'); + console.info("[swiperProps] get globalThis.value is: " + JSON.stringify(globalThis.value)); + + let obj = JSON.parse(globalThis.value.showPropNone); + console.info("[swiperProps] get inspector value is: " + JSON.stringify(obj)); + console.info("[swiperProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); + + expect(obj.$type).assertEqual('swiper') + expect(obj.$attrs.id).assertEqual('showPropNone') + expect(obj.$attrs.show).assertEqual('true') + console.info("[swiperProps] get show value is: " + JSON.stringify(obj.$attrs.show)); + done(); + }); + + /** + * @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100 + * @tc.name testSwiperIndexProp + * @tc.desc ACE + */ + it('testSwiperIndexProp', 0, async function (done) { + console.info('testSwiperIndexProp START'); + console.info("[swiperProps] get globalThis.value is: " + JSON.stringify(globalThis.value)); + + let obj = JSON.parse(globalThis.value.indexProp); //id + console.info("[swiperProps] get inspector value is: " + JSON.stringify(obj)); + console.info("[swiperProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); + + expect(obj.$type).assertEqual('swiper') + expect(obj.$attrs.id).assertEqual('indexProp') //ID + expect(obj.$attrs.index).assertEqual('0') // prop and propValue + console.info("[swiperProps] get index value is: " + JSON.stringify(obj.$attrs.index)); + done(); + }); + + /** + * @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100 + * @tc.name testSwiperAutoplayPropTrue + * @tc.desc ACE + */ + it('testSwiperAutoplayPropTrue', 0, async function (done) { + console.info('testSwiperAutoplayPropTrue START'); + console.info("[swiperProps] get globalThis.value is: " + JSON.stringify(globalThis.value)); + + let obj = JSON.parse(globalThis.value.autoplayPropTrue); //id + console.info("[swiperProps] get inspector value is: " + JSON.stringify(obj)); + console.info("[swiperProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); + + expect(obj.$type).assertEqual('swiper') + expect(obj.$attrs.id).assertEqual('autoplayPropTrue') //ID + expect(obj.$attrs.autoplay).assertEqual('true') // prop and propValue + console.info("[swiperProps] get autoplay value is: " + JSON.stringify(obj.$attrs.autoplay));//prop + done(); + }); + + /** + * @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100 + * @tc.name testSwiperAutoplayPropFalse + * @tc.desc ACE + */ + it('testSwiperAutoplayPropFalse', 0, async function (done) { + console.info('testSwiperAutoplayPropFalse START'); + console.info("[swiperProps] get globalThis.value is: " + JSON.stringify(globalThis.value)); + + let obj = JSON.parse(globalThis.value.autoplayPropFalse); //id + console.info("[swiperProps] get inspector value is: " + JSON.stringify(obj)); + console.info("[swiperProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); + + expect(obj.$type).assertEqual('swiper') + expect(obj.$attrs.id).assertEqual('autoplayPropFalse') //ID + expect(obj.$attrs.autoplay).assertEqual('false') // prop and propValue + console.info("[swiperProps] get autoplay value is: " + JSON.stringify(obj.$attrs.autoplay));//prop + done(); + }); + + /** + * @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100 + * @tc.name testSwiperIntervalProp + * @tc.desc ACE + */ + it('testSwiperIntervalProp', 0, async function (done) { + console.info('testSwiperIntervalProp START'); + console.info("[swiperProps] get globalThis.value is: " + JSON.stringify(globalThis.value)); + + let obj = JSON.parse(globalThis.value.intervalProp); //id + console.info("[swiperProps] get inspector value is: " + JSON.stringify(obj)); + console.info("[swiperProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); + + expect(obj.$type).assertEqual('swiper') + expect(obj.$attrs.id).assertEqual('intervalProp') //ID + expect(obj.$attrs.interval).assertEqual('2000') // prop and propValue + console.info("[swiperProps] get interval value is: " + JSON.stringify(obj.$attrs.interval));//prop + done(); + }); + + /** + * @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100 + * @tc.name testSwiperIndicatorPropTrue + * @tc.desc ACE + */ + it('testSwiperIndicatorPropTrue', 0, async function (done) { + console.info('testSwiperIndicatorPropTrue START'); + console.info("[swiperProps] get globalThis.value is: " + JSON.stringify(globalThis.value)); + + let obj = JSON.parse(globalThis.value.indicatorPropTrue); //id + console.info("[swiperProps] get inspector value is: " + JSON.stringify(obj)); + console.info("[swiperProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); + + expect(obj.$type).assertEqual('swiper') + expect(obj.$attrs.id).assertEqual('indicatorPropTrue') //ID + expect(obj.$attrs.indicator).assertEqual('true') // prop and propValue + console.info("[swiperProps] get indicator value is: " + JSON.stringify(obj.$attrs.indicator));//prop + done(); + }); + + /** + * @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100 + * @tc.name testSwiperIndicatorPropFalse + * @tc.desc ACE + */ + it('testSwiperIndicatorPropFalse', 0, async function (done) { + console.info('testSwiperIndicatorPropFalse START'); + console.info("[swiperProps] get globalThis.value is: " + JSON.stringify(globalThis.value)); + + let obj = JSON.parse(globalThis.value.indicatorPropFalse); //id + console.info("[swiperProps] get inspector value is: " + JSON.stringify(obj)); + console.info("[swiperProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); + + expect(obj.$type).assertEqual('swiper') + expect(obj.$attrs.id).assertEqual('indicatorPropFalse') //ID + expect(obj.$attrs.indicator).assertEqual('false') // prop and propValue + console.info("[swiperProps] get indicator value is: " + JSON.stringify(obj.$attrs.indicator));//prop + done(); + }); + + /** + * @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100 + * @tc.name testSwiperDigitalPropTrue + * @tc.desc ACE + */ + it('testSwiperDigitalPropTrue', 0, async function (done) { + console.info('testSwiperDigitalPropTrue START'); + console.info("[swiperProps] get globalThis.value is: " + JSON.stringify(globalThis.value)); + + let obj = JSON.parse(globalThis.value.digitalPropTrue); //id + console.info("[swiperProps] get inspector value is: " + JSON.stringify(obj)); + console.info("[swiperProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); + + expect(obj.$type).assertEqual('swiper') + expect(obj.$attrs.id).assertEqual('digitalPropTrue') //ID + expect(obj.$attrs.digital).assertEqual('true') // prop and propValue + console.info("[swiperProps] get digital value is: " + JSON.stringify(obj.$attrs.digital));//prop + done(); + }); + + /** + * @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100 + * @tc.name testSwiperDigitalPropFalse + * @tc.desc ACE + */ + it('testSwiperDigitalPropFalse', 0, async function (done) { + console.info('testSwiperDigitalPropFalse START'); + console.info("[swiperProps] get globalThis.value is: " + JSON.stringify(globalThis.value)); + + let obj = JSON.parse(globalThis.value.digitalPropFalse); //id + console.info("[swiperProps] get inspector value is: " + JSON.stringify(obj)); + console.info("[swiperProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); + + expect(obj.$type).assertEqual('swiper') + expect(obj.$attrs.id).assertEqual('digitalPropFalse') //ID + expect(obj.$attrs.digital).assertEqual('false') // prop and propValue + console.info("[swiperProps] get digital value is: " + JSON.stringify(obj.$attrs.digital));//prop + done(); + }); + + /** + * @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100 + * @tc.name testSwiperIndicatorMaskPropTrue + * @tc.desc ACE + */ + it('testSwiperIndicatorMaskPropTrue', 0, async function (done) { + console.info('testSwiperIndicatorMaskPropTrue START'); + console.info("[swiperProps] get globalThis.value is: " + JSON.stringify(globalThis.value)); + + let obj = JSON.parse(globalThis.value.indicatorMaskPropTrue); //id + console.info("[swiperProps] get inspector value is: " + JSON.stringify(obj)); + console.info("[swiperProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); + + expect(obj.$type).assertEqual('swiper') + expect(obj.$attrs.id).assertEqual('indicatorMaskPropTrue') //ID + expect(obj.$attrs.indicatormask).assertEqual('true') // prop and propValue + console.info("[swiperProps] get indicatormask value is: " + JSON.stringify(obj.$attrs.indicatormask));//prop + done(); + }); + + /** + * @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100 + * @tc.name testSwiperIndicatorMaskPropFalse + * @tc.desc ACE + */ + it('testSwiperIndicatorMaskPropFalse', 0, async function (done) { + console.info('testSwiperIndicatorMaskPropFalse START'); + console.info("[swiperProps] get globalThis.value is: " + JSON.stringify(globalThis.value)); + + let obj = JSON.parse(globalThis.value.indicatorMaskPropFalse); //id + console.info("[swiperProps] get inspector value is: " + JSON.stringify(obj)); + console.info("[swiperProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); + + expect(obj.$type).assertEqual('swiper') + expect(obj.$attrs.id).assertEqual('indicatorMaskPropFalse') //ID + expect(obj.$attrs.indicatormask).assertEqual('false') // prop and propValue + console.info("[swiperProps] get indicatormask value is: " + JSON.stringify(obj.$attrs.indicatormask));//prop + done(); + }); + + /** + * @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100 + * @tc.name testSwiperIndicatorDisabledPropTrue + * @tc.desc ACE + */ + it('testSwiperIndicatorDisabledPropTrue', 0, async function (done) { + console.info('testSwiperIndicatorDisabledPropTrue START'); + console.info("[swiperProps] get globalThis.value is: " + JSON.stringify(globalThis.value)); + + let obj = JSON.parse(globalThis.value.indicatorDisabledPropTrue); //id + console.info("[swiperProps] get inspector value is: " + JSON.stringify(obj)); + console.info("[swiperProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); + + expect(obj.$type).assertEqual('swiper') + expect(obj.$attrs.id).assertEqual('indicatorDisabledPropTrue') //ID + expect(obj.$attrs.indicatordisabled).assertEqual('true') // prop and propValue + console.info("[swiperProps] get indicatordisabled value is: " + JSON.stringify(obj.$attrs.indicatordisabled));//prop + done(); + }); + + /** + * @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100 + * @tc.name testSwiperIndicatorDisabledPropFalse + * @tc.desc ACE + */ + it('testSwiperIndicatorDisabledPropFalse', 0, async function (done) { + console.info('testSwiperIndicatorDisabledPropFalse START'); + console.info("[swiperProps] get globalThis.value is: " + JSON.stringify(globalThis.value)); + + let obj = JSON.parse(globalThis.value.indicatorDisabledPropTrue); //id + console.info("[swiperProps] get inspector value is: " + JSON.stringify(obj)); + console.info("[swiperProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); + + expect(obj.$type).assertEqual('swiper') + expect(obj.$attrs.id).assertEqual('indicatorDisabledPropFalse') //ID + expect(obj.$attrs.indicatordisabled).assertEqual('false') // prop and propValue + console.info("[swiperProps] get indicatordisabled value is: " + JSON.stringify(obj.$attrs.indicatordisabled));//prop + done(); + }); + + /** + * @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100 + * @tc.name testSwiperLoopPropTrue + * @tc.desc ACE + */ + it('testSwiperLoopPropTrue', 0, async function (done) { + console.info('testSwiperLoopPropTrue START'); + console.info("[swiperProps] get globalThis.value is: " + JSON.stringify(globalThis.value)); + + let obj = JSON.parse(globalThis.value.loopPropTrue); //id + console.info("[swiperProps] get inspector value is: " + JSON.stringify(obj)); + console.info("[swiperProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); + + expect(obj.$type).assertEqual('swiper') + expect(obj.$attrs.id).assertEqual('loopPropTrue') //ID + expect(obj.$attrs.loop).assertEqual('true') // prop and propValue + console.info("[swiperProps] get loop value is: " + JSON.stringify(obj.$attrs.loop));//prop + done(); + }); + + /** + * @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100 + * @tc.name testSwiperLoopPropFalse + * @tc.desc ACE + */ + it('testSwiperLoopPropFalse', 0, async function (done) { + console.info('testSwiperLoopPropFalse START'); + console.info("[swiperProps] get globalThis.value is: " + JSON.stringify(globalThis.value)); + + let obj = JSON.parse(globalThis.value.loopPropFalse); //id + console.info("[swiperProps] get inspector value is: " + JSON.stringify(obj)); + console.info("[swiperProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); + + expect(obj.$type).assertEqual('swiper') + expect(obj.$attrs.id).assertEqual('loopPropFalse') //ID + expect(obj.$attrs.loop).assertEqual('false') // prop and propValue + console.info("[swiperProps] get loop value is: " + JSON.stringify(obj.$attrs.loop));//prop + done(); + }); + + /** + * @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100 + * @tc.name testSwiperDurationProp + * @tc.desc ACE + */ + it('testSwiperDurationProp', 0, async function (done) { + console.info('testSwiperDurationProp START'); + console.info("[swiperProps] get globalThis.value is: " + JSON.stringify(globalThis.value)); + + let obj = JSON.parse(globalThis.value.durationProp); //id + console.info("[swiperProps] get inspector value is: " + JSON.stringify(obj)); + console.info("[swiperProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); + + expect(obj.$type).assertEqual('swiper') + expect(obj.$attrs.id).assertEqual('durationProp') //ID + expect(obj.$attrs.duration).assertEqual('3000') // prop and propValue + console.info("[swiperProps] get duration value is: " + JSON.stringify(obj.$attrs.duration));//prop + done(); + }); + + /** + * @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100 + * @tc.name testSwiperVerticalPropTrue + * @tc.desc ACE + */ + it('testSwiperVerticalPropTrue', 0, async function (done) { + console.info('testSwiperVerticalPropTrue START'); + console.info("[swiperProps] get globalThis.value is: " + JSON.stringify(globalThis.value)); + + let obj = JSON.parse(globalThis.value.verticalPropTrue); //id + console.info("[swiperProps] get inspector value is: " + JSON.stringify(obj)); + console.info("[swiperProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); + + expect(obj.$type).assertEqual('swiper') + expect(obj.$attrs.id).assertEqual('verticalPropTrue') //ID + expect(obj.$attrs.vertical).assertEqual('true') // prop and propValue + console.info("[swiperProps] get vertical value is: " + JSON.stringify(obj.$attrs.vertical));//prop + done(); + }); + + /** + * @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100 + * @tc.name testSwiperVerticalPropFalse + * @tc.desc ACE + */ + it('testSwiperVerticalPropFalse', 0, async function (done) { + console.info('testSwiperVerticalPropFalse START'); + console.info("[swiperProps] get globalThis.value is: " + JSON.stringify(globalThis.value)); + + let obj = JSON.parse(globalThis.value.verticalPropFalse); //id + console.info("[swiperProps] get inspector value is: " + JSON.stringify(obj)); + console.info("[swiperProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); + + expect(obj.$type).assertEqual('swiper') + expect(obj.$attrs.id).assertEqual('verticalPropFalse') //ID + expect(obj.$attrs.vertical).assertEqual('false') // prop and propValue + console.info("[swiperProps] get vertical value is: " + JSON.stringify(obj.$attrs.vertical));//prop + done(); + }); + + /** + * @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100 + * @tc.name testSwiperCachedSizeProp + * @tc.desc ACE + */ + it('testSwiperCachedSizeProp', 0, async function (done) { + console.info('testSwiperCachedSizeProp START'); + console.info("[swiperProps] get globalThis.value is: " + JSON.stringify(globalThis.value)); + + let obj = JSON.parse(globalThis.value.cachedSizeProp); //id + console.info("[swiperProps] get inspector value is: " + JSON.stringify(obj)); + console.info("[swiperProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); + + expect(obj.$type).assertEqual('swiper') + expect(obj.$attrs.id).assertEqual('cachedSizeProp') //ID + expect(obj.$attrs.cachedsize).assertEqual('-1') // prop and propValue + console.info("[swiperProps] get cachedsize value is: " + JSON.stringify(obj.$attrs.cachedsize));//prop + done(); + }); + + /** + * @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100 + * @tc.name testSwiperScrollEffectPropFade + * @tc.desc ACE + */ + it('testSwiperScrollEffectPropFade', 0, async function (done) { + console.info('testSwiperScrollEffectPropFade START'); + console.info("[swiperProps] get globalThis.value is: " + JSON.stringify(globalThis.value)); + + let obj = JSON.parse(globalThis.value.scrollEffectPropFade); //id + console.info("[swiperProps] get inspector value is: " + JSON.stringify(obj)); + console.info("[swiperProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); + + expect(obj.$type).assertEqual('swiper') + expect(obj.$attrs.id).assertEqual('scrollEffectPropFade') //ID + expect(obj.$attrs.scrolleffect).assertEqual('fade') // prop and propValue + console.info("[swiperProps] get scrolleffect value is: " + JSON.stringify(obj.$attrs.scrolleffect));//prop + done(); + }); + + /** + * @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100 + * @tc.name testSwiperScrollEffectPropSpring + * @tc.desc ACE + */ + it('testSwiperScrollEffectPropSpring', 0, async function (done) { + console.info('testSwiperScrollEffectPropSpring START'); + console.info("[swiperProps] get globalThis.value is: " + JSON.stringify(globalThis.value)); + + let obj = JSON.parse(globalThis.value.scrollEffectPropSpring); //id + console.info("[swiperProps] get inspector value is: " + JSON.stringify(obj)); + console.info("[swiperProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); + + expect(obj.$type).assertEqual('swiper') + expect(obj.$attrs.id).assertEqual('scrollEffectPropSpring') //ID + expect(obj.$attrs.scrolleffect).assertEqual('spring') // prop and propValue + console.info("[swiperProps] get scrolleffect value is: " + JSON.stringify(obj.$attrs.scrolleffect));//prop + done(); + }); + + /** + * @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100 + * @tc.name testSwiperDisplayModePropStretch + * @tc.desc ACE + */ + it('testSwiperDisplayModePropStretch', 0, async function (done) { + console.info('testSwiperDisplayModePropStretch START'); + console.info("[swiperProps] get globalThis.value is: " + JSON.stringify(globalThis.value)); + + let obj = JSON.parse(globalThis.value.displayModePropStretch); //id + console.info("[swiperProps] get inspector value is: " + JSON.stringify(obj)); + console.info("[swiperProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); + + expect(obj.$type).assertEqual('swiper') + expect(obj.$attrs.id).assertEqual('displayModePropStretch') //ID + expect(obj.$attrs.displaymode).assertEqual('stretch') // prop and propValue + console.info("[swiperProps] get displaymode value is: " + JSON.stringify(obj.$attrs.displaymode));//prop + done(); + }); + + /** + * @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100 + * @tc.name testSwiperDisplayModePropAutoLinear + * @tc.desc ACE + */ + it('testSwiperDisplayModePropAutoLinear', 0, async function (done) { + console.info('testSwiperDisplayModePropAutoLinear START'); + console.info("[swiperProps] get globalThis.value is: " + JSON.stringify(globalThis.value)); + + let obj = JSON.parse(globalThis.value.displayModePropAutoLinear); //id + console.info("[swiperProps] get inspector value is: " + JSON.stringify(obj)); + console.info("[swiperProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); + + expect(obj.$type).assertEqual('swiper') + expect(obj.$attrs.id).assertEqual('displayModePropAutoLinear') //ID + expect(obj.$attrs.displaymode).assertEqual('autoLinear') // prop and propValue + console.info("[swiperProps] get displaymode value is: " + JSON.stringify(obj.$attrs.displaymode));//prop + done(); + }); +}); diff --git a/ace/ace_standard/src/main/js/default/test/textProps.test.js b/ace/ace_standard/src/main/js/default/test/textProps.test.js new file mode 100644 index 0000000000000000000000000000000000000000..111dfeb5dfd5a199fea2b359df67abca77d0df26 --- /dev/null +++ b/ace/ace_standard/src/main/js/default/test/textProps.test.js @@ -0,0 +1,689 @@ +/** + * 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('textPropsJsTest', 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('[textPropsJsTest] before each called') + + let result; + let options = { + uri: 'pages/text/prop/index' + } + try { + result = router.push(options) + console.info("push textProps page success " + JSON.stringify(result)); + } catch (err) { + console.error("push textProps page error " + JSON.stringify(result)); + } + await sleep(4000) + done() + }); + + /** + * run after testcase + */ + afterAll(async function () { + console.info('[textPropsJsTest] after each called') + await backToIndex() + await sleep(1000) + }); + + /** + * @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100 + * @tc.name testTextIdProp + * @tc.desc ACE + */ + it('testTextIdProp', 0, async function (done) { + console.info('testTextIdProp START'); + console.info("[textProps] get globalThis.value is: " + JSON.stringify(globalThis.value)); + + let obj = JSON.parse(globalThis.value.idProp); + console.info("[textProps] get inspector value is: " + JSON.stringify(obj)); + console.info("[textProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); + + expect(obj.$type).assertEqual('text') + expect(obj.$attrs.id).assertEqual('idProp') + done(); + }); + + /** + * @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100 + * @tc.name testTextClassProp + * @tc.desc ACE + */ + it('testTextClassProp', 0, async function (done) { + console.info('testTextClassProp START'); + console.info("[textProps] get globalThis.value is: " + JSON.stringify(globalThis.value)); + + let obj = JSON.parse(globalThis.value.classProp); + console.info("[textProps] get inspector value is: " + JSON.stringify(obj)); + console.info("[textProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); + + expect(obj.$type).assertEqual('text') + expect(obj.$attrs.id).assertEqual('classProp') + expect(obj.$attrs.className).assertEqual('classProp') + done(); + }); + + /** + * @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100 + * @tc.name testTextClassPropNone + * @tc.desc ACE + */ + it('testTextClassPropNone', 0, async function (done) { + console.info('testTextClassPropNone START'); + console.info("[textProps] get globalThis.value is: " + JSON.stringify(globalThis.value)); + + let obj = JSON.parse(globalThis.value.classPropNone); + console.info("[textProps] get inspector value is: " + JSON.stringify(obj)); + console.info("[textProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); + + expect(obj.$type).assertEqual('text') + expect(obj.$attrs.id).assertEqual('classPropNone') + expect(obj.$attrs.className).assertEqual(undefined) + console.info("[textProps] get className value is: " + JSON.stringify(obj.$attrs.className)); + done(); + }); + + /** + * @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100 + * @tc.name testTextStyleProp + * @tc.desc ACEs + */ + // it('testTextStyleProp', 0, async function (done) { + // console.info('testTextStyleProp START'); + // console.info("[textProps] get globalThis.value is: " + JSON.stringify(globalThis.value)); + // + // let obj = JSON.parse(globalThis.value.styleProp); + // console.info("[textProps] get inspector value is: " + JSON.stringify(obj)); + // console.info("[textProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); + // + // expect(obj.$type).assertEqual('text') + // expect(obj.$attrs.id).assertEqual('styleProp') + // expect(obj.$attrs.style).assertEqual(undefined) + // console.info("[textProps] get style value is: " + JSON.stringify(obj.$attrs.style)); + // + // expect(obj.$styles.width).assertEqual(undefined); + // console.info("[textProps] get style width value is: " + JSON.stringify(obj.$styles.width)); + // expect(obj.$styles.height).assertEqual(undefined); + // console.info("[textProps] get style height value is: " + JSON.stringify(obj.$styles.height)); + // expect(obj.$styles.get('background-color')).assertEqual(undefined); + // console.info("[textProps] get style background-color value is: " + JSON.stringify(obj.$styles.get('background-color'))); + // done(); + // }); + + /** + * @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100 + * @tc.name testTextRefProp + * @tc.desc ACE + */ + it('testTextRefProp', 0, async function (done) { + console.info('testTextRefProp START'); + console.info("[textProps] get globalThis.value is: " + JSON.stringify(globalThis.value)); + + let obj = JSON.parse(globalThis.value.refProp); + console.info("[textProps] get inspector value is: " + JSON.stringify(obj)); + console.info("[textProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); + + expect(obj.$type).assertEqual('text') + expect(obj.$attrs.id).assertEqual('refProp') + expect(obj.$attrs.ref).assertEqual('refProp') + done(); + }); + + /** + * @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100 + * @tc.name testTextRefPropNone + * @tc.desc ACE + */ + it('testTextRefPropNone', 0, async function (done) { + console.info('testTextRefPropNone START'); + console.info("[textProps] get globalThis.value is: " + JSON.stringify(globalThis.value)); + + let obj = JSON.parse(globalThis.value.refPropNone); + console.info("[textProps] get inspector value is: " + JSON.stringify(obj)); + console.info("[textProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); + + expect(obj.$type).assertEqual('text') + expect(obj.$attrs.id).assertEqual('refPropNone') + expect(obj.$attrs.ref).assertEqual(undefined) + console.info("[textProps] get ref value is: " + JSON.stringify(obj.$attrs.ref)); + done(); + }); + + /** + * @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100 + * @tc.name testTextDisabledPropTrue + * @tc.desc ACE + */ + it('testTextDisabledPropTrue', 0, async function (done) { + console.info('testTextDisabledPropTrue START'); + console.info("[textProps] get globalThis.value is: " + JSON.stringify(globalThis.value)); + + let obj = JSON.parse(globalThis.value.disabledPropTrue); + console.info("[textProps] get inspector value is: " + JSON.stringify(obj)); + console.info("[textProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); + + expect(obj.$type).assertEqual('text') + expect(obj.$attrs.id).assertEqual('disabledPropTrue') + expect(obj.$attrs.disabled).assertEqual('true') + done(); + }); + + /** + * @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100 + * @tc.name testTextDisabledPropFalse + * @tc.desc ACE + */ + it('testTextDisabledPropFalse', 0, async function (done) { + console.info('testTextDisabledPropFalse START'); + console.info("[textProps] get globalThis.value is: " + JSON.stringify(globalThis.value)); + + let obj = JSON.parse(globalThis.value.disabledPropFalse); + console.info("[textProps] get inspector value is: " + JSON.stringify(obj)); + console.info("[textProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); + + expect(obj.$type).assertEqual('text') + expect(obj.$attrs.id).assertEqual('disabledPropFalse') + expect(obj.$attrs.disabled).assertEqual('false') + done(); + }); + + /** + * @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100 + * @tc.name testTextDisabledPropNone + * @tc.desc ACE + */ + it('testTextDisabledPropNone', 0, async function (done) { + console.info('testTextDisabledPropNone START'); + console.info("[textProps] get globalThis.value is: " + JSON.stringify(globalThis.value)); + + let obj = JSON.parse(globalThis.value.disabledPropNone); + console.info("[textProps] get inspector value is: " + JSON.stringify(obj)); + console.info("[textProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); + + expect(obj.$type).assertEqual('text') + expect(obj.$attrs.id).assertEqual('disabledPropNone') + expect(obj.$attrs.disabled).assertEqual('false') + done(); + }); + + /** + * @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100 + * @tc.name testTextFocusablePropTrue + * @tc.desc ACE + */ + it('testTextFocusablePropTrue', 0, async function (done) { + console.info('testTextFocusablePropTrue START'); + console.info("[textProps] get globalThis.value is: " + JSON.stringify(globalThis.value)); + + let obj = JSON.parse(globalThis.value.focusablePropTrue); + console.info("[textProps] get inspector value is: " + JSON.stringify(obj)); + console.info("[textProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); + + expect(obj.$type).assertEqual('text') + expect(obj.$attrs.id).assertEqual('focusablePropTrue') + expect(obj.$attrs.focusable).assertEqual('true') + done(); + }); + + /** + * @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100 + * @tc.name testTextFocusablePropFalse + * @tc.desc ACE + */ + it('testTextFocusablePropFalse', 0, async function (done) { + console.info('testTextFocusablePropFalse START'); + console.info("[textProps] get globalThis.value is: " + JSON.stringify(globalThis.value)); + + let obj = JSON.parse(globalThis.value.focusablePropFalse); + console.info("[textProps] get inspector value is: " + JSON.stringify(obj)); + console.info("[textProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); + + expect(obj.$type).assertEqual('text') + expect(obj.$attrs.id).assertEqual('focusablePropFalse') + expect(obj.$attrs.focusable).assertEqual('false') + done(); + }); + + /** + * @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100 + * @tc.name testTextFocusablePropNone + * @tc.desc ACE + */ + it('testTextFocusablePropNone', 0, async function (done) { + console.info('testTextFocusablePropNone START'); + console.info("[textProps] get globalThis.value is: " + JSON.stringify(globalThis.value)); + + let obj = JSON.parse(globalThis.value.focusablePropNone); + console.info("[textProps] get inspector value is: " + JSON.stringify(obj)); + console.info("[textProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); + + expect(obj.$type).assertEqual('text') + expect(obj.$attrs.id).assertEqual('focusablePropNone') + expect(obj.$attrs.focusable).assertEqual('false') + done(); + }); + + /** + * @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100 + * @tc.name testTextDataProp + * @tc.desc ACE + */ + it('testTextDataProp', 0, async function (done) { + console.info('testTextDataProp START'); + console.info("[textProps] get globalThis.value is: " + JSON.stringify(globalThis.value)); + + let obj = JSON.parse(globalThis.value.dataProp); + console.info("[textProps] get inspector value is: " + JSON.stringify(obj)); + console.info("[textProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); + + expect(obj.$type).assertEqual('text') + expect(obj.$attrs.id).assertEqual('dataProp') + expect(obj.$attrs.dataText).assertEqual(undefined); + console.info("[textProps] get dataText value is: " + JSON.stringify(obj.$attrs.dataText)); + done(); + }); + + /** + * @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100 + * @tc.name testTextDataPropNone + * @tc.desc ACE + */ + it('testTextDataPropNone', 0, async function (done) { + console.info('testTextDataPropNone START'); + console.info("[textProps] get globalThis.value is: " + JSON.stringify(globalThis.value)); + + let obj = JSON.parse(globalThis.value.dataPropNone); + console.info("[textProps] get inspector value is: " + JSON.stringify(obj)); + console.info("[textProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); + + expect(obj.$type).assertEqual('text') + expect(obj.$attrs.id).assertEqual('dataPropNone') + expect(obj.$attrs.dataText).assertEqual(undefined) + console.info("[textProps] get dataText value is: " + JSON.stringify(obj.$attrs.dataText)); + done(); + }); + + /** + * @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100 + * @tc.name testTextClickEffectPropSmall + * @tc.desc ACE + */ + it('testTextClickEffectPropSmall', 0, async function (done) { + console.info('testTextClickEffectPropSmall START'); + console.info("[textProps] get globalThis.value is: " + JSON.stringify(globalThis.value)); + + let obj = JSON.parse(globalThis.value.clickEffectPropSmall); + console.info("[textProps] get inspector value is: " + JSON.stringify(obj)); + console.info("[textProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); + + expect(obj.$type).assertEqual('text') + 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 testTextClickEffectPropMedium + * @tc.desc ACE + */ + it('testTextClickEffectPropMedium', 0, async function (done) { + console.info('testTextClickEffectPropMedium START'); + console.info("[textProps] get globalThis.value is: " + JSON.stringify(globalThis.value)); + + let obj = JSON.parse(globalThis.value.clickEffectPropMedium); + console.info("[textProps] get inspector value is: " + JSON.stringify(obj)); + console.info("[textProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); + + expect(obj.$type).assertEqual('text') + 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 testTextClickEffectPropLarge + * @tc.desc ACE + */ + it('testTextClickEffectPropLarge', 0, async function (done) { + console.info('testTextClickEffectPropLarge START'); + console.info("[textProps] get globalThis.value is: " + JSON.stringify(globalThis.value)); + + let obj = JSON.parse(globalThis.value.clickEffectPropLarge); + console.info("[textProps] get inspector value is: " + JSON.stringify(obj)); + console.info("[textProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); + + expect(obj.$type).assertEqual('text') + 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 testTextClickEffectPropNone + * @tc.desc ACE + */ + it('testTextClickEffectPropNone', 0, async function (done) { + console.info('testTextClickEffectPropNone START'); + console.info("[textProps] get globalThis.value is: " + JSON.stringify(globalThis.value)); + + let obj = JSON.parse(globalThis.value.clickEffectPropNone); + console.info("[textProps] get inspector value is: " + JSON.stringify(obj)); + console.info("[textProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); + + expect(obj.$type).assertEqual('text') + expect(obj.$attrs.id).assertEqual('clickEffectPropNone') + expect(obj.$attrs.clickEffect).assertEqual(undefined) + console.info("[textProps] get clickEffect value is: " + JSON.stringify(obj.$attrs.clickEffect)); + done(); + }); + + /** + * @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100 + * @tc.name testTextDirPropRtl + * @tc.desc ACE + */ + it('testTextDirPropRtl', 0, async function (done) { + console.info('testTextDirPropRtl START'); + console.info("[textProps] get globalThis.value is: " + JSON.stringify(globalThis.value)); + + let obj = JSON.parse(globalThis.value.dirPropRtl); + console.info("[textProps] get inspector value is: " + JSON.stringify(obj)); + console.info("[textProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); + + expect(obj.$type).assertEqual('text') + expect(obj.$attrs.id).assertEqual('dirPropRtl') + expect(obj.$attrs.dir).assertEqual('rtl') + done(); + }); + + /** + * @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100 + * @tc.name testTextDirPropLtr + * @tc.desc ACE + */ + it('testTextDirPropLtr', 0, async function (done) { + console.info('testTextDirPropLtr START'); + console.info("[textProps] get globalThis.value is: " + JSON.stringify(globalThis.value)); + + let obj = JSON.parse(globalThis.value.dirPropLtr); + console.info("[textProps] get inspector value is: " + JSON.stringify(obj)); + console.info("[textProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); + + expect(obj.$type).assertEqual('text') + expect(obj.$attrs.id).assertEqual('dirPropLtr') + expect(obj.$attrs.dir).assertEqual('ltr') + done(); + }); + + /** + * @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100 + * @tc.name testTextDirPropAuto + * @tc.desc ACE + */ + it('testTextDirPropAuto', 0, async function (done) { + console.info('testTextDirPropAuto START'); + console.info("[textProps] get globalThis.value is: " + JSON.stringify(globalThis.value)); + + let obj = JSON.parse(globalThis.value.dirPropAuto); + console.info("[textProps] get inspector value is: " + JSON.stringify(obj)); + console.info("[textProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); + + expect(obj.$type).assertEqual('text') + expect(obj.$attrs.id).assertEqual('dirPropAuto') + expect(obj.$attrs.dir).assertEqual('auto') + done(); + }); + + /** + * @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100 + * @tc.name testTextDirPropNone + * @tc.desc ACE + */ + it('testTextDirPropNone', 0, async function (done) { + console.info('testTextDirPropNone START'); + console.info("[textProps] get globalThis.value is: " + JSON.stringify(globalThis.value)); + + let obj = JSON.parse(globalThis.value.dirPropNone); + console.info("[textProps] get inspector value is: " + JSON.stringify(obj)); + console.info("[textProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); + + expect(obj.$type).assertEqual('text') + expect(obj.$attrs.id).assertEqual('dirPropNone') + expect(obj.$attrs.dir).assertEqual('auto') + done(); + }); + + /** + * @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100 + * @tc.name testTextForPropNull + * @tc.desc ACE + */ + it('testTextForPropNull', 0, async function (done) { + console.info('testTextForPropNull START'); + console.info("[textProps] get globalThis.value is: " + JSON.stringify(globalThis.value)); + + let obj = JSON.parse(globalThis.value.forPropNull); + console.info("[textProps] get inspector value is: " + JSON.stringify(obj)); + console.info("[textProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); + + expect(obj.$type).assertEqual('text') + expect(obj.$attrs.id).assertEqual('forPropNull') + expect(obj.$attrs.for).assertEqual(undefined) + console.info("[textProps] get for value is: " + JSON.stringify(obj.$attrs.for)); + done(); + }); + + /** + * @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100 + * @tc.name testTextForPropOne + * @tc.desc ACE + */ + it('testTextForPropOne', 0, async function (done) { + console.info('testTextForPropOne START'); + console.info("[textProps] get globalThis.value is: " + JSON.stringify(globalThis.value)); + + let obj = JSON.parse(globalThis.value.forPropOne); + console.info("[textProps] get inspector value is: " + JSON.stringify(obj)); + console.info("[textProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); + + expect(obj.$type).assertEqual('text') + expect(obj.$attrs.id).assertEqual('forPropOne') + expect(obj.$attrs.for).assertEqual(undefined) + console.info("[textProps] get for value is: " + JSON.stringify(obj.$attrs.for)); + done(); + }); + + /** + * @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100 + * @tc.name testTextForPropThree + * @tc.desc ACE + */ + it('testTextForPropThree', 0, async function (done) { + console.info('testTextForPropThree START'); + console.info("[textProps] get globalThis.value is: " + JSON.stringify(globalThis.value)); + + let obj = JSON.parse(globalThis.value.forPropThree); + console.info("[textProps] get inspector value is: " + JSON.stringify(obj)); + console.info("[textProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); + + expect(obj.$type).assertEqual('text') + expect(obj.$attrs.id).assertEqual('forPropThree') + expect(obj.$attrs.for).assertEqual(undefined) + console.info("[textProps] get for value is: " + JSON.stringify(obj.$attrs.for)); + done(); + }); + + /** + * @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100 + * @tc.name testTextIfPropTrue + * @tc.desc ACE + */ + it('testTextIfPropTrue', 0, async function (done) { + console.info('testTextIfPropTrue START'); + console.info("[textProps] get globalThis.value is: " + JSON.stringify(globalThis.value)); + + let obj = JSON.parse(globalThis.value.ifPropTrue); + console.info("[textProps] get inspector value is: " + JSON.stringify(obj)); + console.info("[textProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); + + expect(obj.$type).assertEqual('text') + expect(obj.$attrs.id).assertEqual('ifPropTrue') + expect(obj.$attrs.if).assertEqual(undefined) + console.info("[textProps] get for value is: " + JSON.stringify(obj.$attrs.if)); + done(); + }); + + /** + * @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100 + * @tc.name testTextIfPropFalse + * @tc.desc ACE + */ + // it('testTextIfPropFalse', 0, async function (done) { + // console.info('testTextIfPropFalse START'); + // console.info("[textProps] get globalThis.value is: " + JSON.stringify(globalThis.value)); + // + // let obj = JSON.parse(globalThis.value.ifPropFalse); + // console.info("[textProps] get inspector value is: " + JSON.stringify(obj)); + // console.info("[textProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); + // + // expect(obj.$type).assertEqual('text') + // expect(obj.$attrs.id).assertEqual('ifPropFalse') + // expect(obj.$attrs.if).assertEqual(false) + // done(); + // }); + + /** + * @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100 + * @tc.name testTextIfPropNone + * @tc.desc ACE + */ + // it('testTextIfPropNone', 0, async function (done) { + // console.info('testTextIfPropNone START'); + // console.info("[textProps] get globalThis.value is: " + JSON.stringify(globalThis.value)); + // + // let obj = JSON.parse(globalThis.value.ifPropNone); + // console.info("[textProps] get inspector value is: " + JSON.stringify(obj)); + // console.info("[textProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); + // + // expect(obj.$type).assertEqual('text') + // expect(obj.$attrs.id).assertEqual('ifPropNone') + // expect(obj.$attrs.if).assertEqual(false) + // done(); + // }); + + /** + * @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100 + * @tc.name testTextPropsShowPropTrue + * @tc.desc ACE + */ + it('testTextPropsShowPropTrue', 0, async function (done) { + console.info('testTextPropsShowPropTrue START'); + console.info("[textProps] get globalThis.value is: " + JSON.stringify(globalThis.value)); + + let obj = JSON.parse(globalThis.value.showPropTrue); + console.info("[textProps] get inspector value is: " + JSON.stringify(obj)); + console.info("[textProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); + + expect(obj.$type).assertEqual('text') + expect(obj.$attrs.id).assertEqual('showPropTrue') + expect(obj.$attrs.show).assertEqual('true') + console.info("[textProps] get show value is: " + JSON.stringify(obj.$attrs.show)); + done(); + }); + + /** + * @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100 + * @tc.name testTextShowPropFalse + * @tc.desc ACE + */ + it('testTextShowPropFalse', 0, async function (done) { + console.info('testTextShowPropFalse START'); + console.info("[textProps] get globalThis.value is: " + JSON.stringify(globalThis.value)); + + let obj = JSON.parse(globalThis.value.showPropFalse); + console.info("[textProps] get inspector value is: " + JSON.stringify(obj)); + console.info("[textProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); + + expect(obj.$type).assertEqual('text') + expect(obj.$attrs.id).assertEqual('showPropFalse') + expect(obj.$attrs.show).assertEqual('false') + console.info("[textProps] get show value is: " + JSON.stringify(obj.$attrs.show)); + done(); + }); + + /** + * @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100 + * @tc.name testTextShowPropNone + * @tc.desc ACE + */ + it('testTextShowPropNone', 0, async function (done) { + console.info('testTextShowPropNone START'); + console.info("[textProps] get globalThis.value is: " + JSON.stringify(globalThis.value)); + + let obj = JSON.parse(globalThis.value.showPropNone); + console.info("[textProps] get inspector value is: " + JSON.stringify(obj)); + console.info("[textProps] get inspector attrs value is: " + JSON.stringify(obj.$attrs)); + + expect(obj.$type).assertEqual('text') + expect(obj.$attrs.id).assertEqual('showPropNone') + expect(obj.$attrs.show).assertEqual('true') + console.info("[textProps] get show value is: " + JSON.stringify(obj.$attrs.show)); + done(); + }); +});