From e136a57b6a46efc2a23f9580dc44e0c7ff978400 Mon Sep 17 00:00:00 2001 From: dongwei Date: Tue, 8 Mar 2022 18:25:12 +0800 Subject: [PATCH] add test cases Signed-off-by: dongwei --- .../main/js/default/pages/svg/prop/index.hml | 23 ++- .../main/js/default/pages/svg_text/index.css | 136 ------------ .../main/js/default/pages/svg_text/index.hml | 130 ------------ .../js/default/pages/svg_text/prop/index.css | 53 +++++ .../js/default/pages/svg_text/prop/index.hml | 194 ++++++++++++++++++ .../js/default/pages/svg_text/prop/index.js | 120 +++++++++++ .../default/pages/svg_text/router/index.css | 36 ++++ .../default/pages/svg_text/router/index.hml | 45 ++++ .../pages/svg_text/{ => router}/index.js | 7 - .../js/default/pages/swiper/prop/index.hml | 22 ++ .../js/default/pages/swiper/router/index.css | 1 + .../js/default/pages/swiper/router/index.hml | 5 + .../js/default/pages/swiper/router/index.js | 7 + .../js/default/pages/switch/prop/index.css | 60 ++++++ .../js/default/pages/switch/prop/index.hml | 33 +++ .../js/default/pages/switch/router/index.hml | 2 +- 16 files changed, 596 insertions(+), 278 deletions(-) delete mode 100644 ace/ace_standard/src/main/js/default/pages/svg_text/index.css delete mode 100644 ace/ace_standard/src/main/js/default/pages/svg_text/index.hml create mode 100644 ace/ace_standard/src/main/js/default/pages/svg_text/prop/index.css create mode 100644 ace/ace_standard/src/main/js/default/pages/svg_text/prop/index.hml create mode 100644 ace/ace_standard/src/main/js/default/pages/svg_text/prop/index.js create mode 100644 ace/ace_standard/src/main/js/default/pages/svg_text/router/index.css create mode 100644 ace/ace_standard/src/main/js/default/pages/svg_text/router/index.hml rename ace/ace_standard/src/main/js/default/pages/svg_text/{ => router}/index.js (76%) diff --git a/ace/ace_standard/src/main/js/default/pages/svg/prop/index.hml b/ace/ace_standard/src/main/js/default/pages/svg/prop/index.hml index 665462854..9021a48cf 100644 --- a/ace/ace_standard/src/main/js/default/pages/svg/prop/index.hml +++ b/ace/ace_standard/src/main/js/default/pages/svg/prop/index.hml @@ -215,14 +215,29 @@ 特有属性-show - - + + - + - + + + + + + + 特有属性-elif + + + + + + + + + diff --git a/ace/ace_standard/src/main/js/default/pages/svg_text/index.css b/ace/ace_standard/src/main/js/default/pages/svg_text/index.css deleted file mode 100644 index a9d3a5a86..000000000 --- a/ace/ace_standard/src/main/js/default/pages/svg_text/index.css +++ /dev/null @@ -1,136 +0,0 @@ -.container { - flex-direction:row; - width:100%; - height:100%; - padding: 1px; -} - -.sub-container{ - flex-direction: column; - height: 100%; - flex-weight: 1; -} - -.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; -} - -.contain1{ - width: 100%; - height: 70px; - flex-direction: column; -} - -.prop-container{ - flex-direction: column; - height: 100%; - flex-weight: 2; -} - -.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{ - margin: 5px; - background: linear-gradient(red, #00ff00); -} - -.gradient2{ - margin: 5px; - background: linear-gradient(45deg, rgb(255,0,0),rgb(0, 255, 0)); -} - -.gradient3{ - margin: 5px; - background: linear-gradient(to right, rgb(255,0,0) 90px, rgb(0, 255, 0) 60%); -} - -.gradient4{ - stroke-width: 30px; - 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{ - color: #321124; - background-color: #321124; - stroke-width: 30px; - margin: 5px; -} - -.multimode-container{ - flex-direction: column; -} - -.multimode1{ - background-color: #978666; - margin: 5px; -} \ No newline at end of file diff --git a/ace/ace_standard/src/main/js/default/pages/svg_text/index.hml b/ace/ace_standard/src/main/js/default/pages/svg_text/index.hml deleted file mode 100644 index 7449be879..000000000 --- a/ace/ace_standard/src/main/js/default/pages/svg_text/index.hml +++ /dev/null @@ -1,130 +0,0 @@ -
-
-
- - 通用属性 - - - svg_text通用属性1 - - - x: 5% ; y: 20 - dx: 10% ; dy: 10 - - - svg_text通用属性2 - - - rotate: 30 - rotate: -30 - - - svg_text通用属性3 - - - font-size: 22px - fill: #00ff00 - - - svg_text通用属性4 - - - fill-opacity: 0.5 - opacity: 0.7 - - - svg_text通用属性5 - - - stroke: black - stroke-width: 2 - stroke-opacity: 0.5 - -
- - -
- - 动画样式 - - - svg_text动画样式1 - - - svg_text - - - svg_text动画样式2 - - - svg_text - -
-
- - -
-
- - 渐变样式 - - - svg_text渐变样式1 - - - svg_text - - - svg_text渐变样式2 - - - svg_text - - - svg_text渐变样式3 - - - svg_text - - - svg_text渐变样式4 - - - svg_text - -
- - - -
- - 无障碍 - - - svg_text无障碍1 - - - svg_text - -
- - - -
- - 多模输入 - - - svg_text多模输入1 - - - svg_text - -
-
-
diff --git a/ace/ace_standard/src/main/js/default/pages/svg_text/prop/index.css b/ace/ace_standard/src/main/js/default/pages/svg_text/prop/index.css new file mode 100644 index 000000000..97320ec86 --- /dev/null +++ b/ace/ace_standard/src/main/js/default/pages/svg_text/prop/index.css @@ -0,0 +1,53 @@ +/** + * 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; +} + +.svg-style{ + width: 100px; + flex-weight: 1; + background-color: #eee; +} + +.prop-container{ + flex-direction: column; + flex-weight: 1; +} + +.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/svg_text/prop/index.hml b/ace/ace_standard/src/main/js/default/pages/svg_text/prop/index.hml new file mode 100644 index 000000000..66bf7d6d3 --- /dev/null +++ b/ace/ace_standard/src/main/js/default/pages/svg_text/prop/index.hml @@ -0,0 +1,194 @@ + + +
+
+ + text通用属性 + +
+ +
+
+
+ + text特有属性 + + + 标识属性 -- id + + + + text + + + + + x坐标属性 -- x + + + + text + + + text + + + text + + + + + y坐标属性 -- y + + + + text + + + text + + + text + + + + + x轴偏移属性 -- dx + + + + text + + + text + + + text + + + + + y轴偏移属性 -- dy + + + + text + + + text + + + text + + + + + 旋转属性 -- rotate + + + + text + + + text + + + + + 字体大小属性 -- font-size + + + + text + + + text + + + + + 字体填充颜色属性 -- fill + + + + text + + + text + + + + + 字体填充透明度属性 -- fill-opacity + + + + text + + + text + + + + + 元素的透明度属性 -- opacity + + + + text + + + text + + + + + 字体边框颜色属性 -- stroke + + + + text + + + text + + + + + 字体边框宽度属性 -- stroke-width + + + + text + + + text + + + + + 字体边框透明度属性 -- stroke-opacity + + + + text + + + text + + +
+
diff --git a/ace/ace_standard/src/main/js/default/pages/svg_text/prop/index.js b/ace/ace_standard/src/main/js/default/pages/svg_text/prop/index.js new file mode 100644 index 000000000..c6a4b9efa --- /dev/null +++ b/ace/ace_standard/src/main/js/default/pages/svg_text/prop/index.js @@ -0,0 +1,120 @@ +/** + * 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, + xPropLength : null, + xPropPercentage: null, + xPropNone : null, + yPropLength : null, + yPropPercentage : null, + yPropNone : null, + dxPropLength : null, + dxPropPercentage: null, + dxPropNone : null, + dyPropLength : null, + dyPropPercentage : null, + dyPropNone : null, + rotateProp : null, + rotatePropNone: null, + fontSizeProp : null, + fontSizePropNone: null, + fillProp : null, + fillPropNone : null, + fillOpacityProp : null, + fillOpacityPropNone : null, + opacityProp : null, + opacityPropNone : null, + strokeProp : null, + strokePropNone : null, + strokeWidthProp : null, + strokeWidthPropNone : null, + strokeOpacityProp : null, + strokeOpacityPropNone : null, + }, + + onShow(){ + this.getCommonPropValues(); + globalThis.value = { + idProp : this.idProp, + xPropLength : this.xPropLength, + xPropPercentage: this.xPropPercentage, + xPropNone : this.xPropNone, + yPropLength : this.yPropLength, + yPropPercentage : this.yPropPercentage, + yPropNone : this.yPropNone, + dxPropLength : this.dxPropLength, + dxPropPercentage: this.dxPropPercentage, + dxPropNone : this.dxPropNone, + dyPropLength : this.dyPropLength, + dyPropPercentage : this.dyPropPercentage, + dyPropNone : this.dyPropNone, + rotateProp : this.rotateProp, + rotatePropNone : this.rotatePropNone, + fontSizeProp : this.fontSizeProp, + fontSizePropNone : this.fontSizePropNone, + fillProp : this.fillProp, + fillPropNone : this.fillPropNone, + fillOpacityProp : this.fillOpacityProp, + fillOpacityPropNone : this.fillOpacityPropNone, + opacityProp : this.opacityProp, + opacityPropNone : this.opacityPropNone, + strokeProp : this.strokeProp, + strokePropNone : this.strokePropNone, + strokeWidthProp : this.strokeWidthProp, + strokeWidthPropNone : this.strokeWidthPropNone, + strokeOpacityProp : this.strokeOpacityProp, + strokeOpacityPropNone : this.strokeOpacityPropNone, + } + }, + + getCommonPropValues(){ + this.idProp = this.$element("idProp").getInspector() + this.xPropLength = this.$element("xPropLength").getInspector() + this.xPropPercentage = this.$element("xPropPercentage").getInspector() + this.xPropNone = this.$element("xPropNone").getInspector() + this.yPropLength = this.$element("yPropLength").getInspector() + this.yPropPercentage = this.$element("yPropPercentage").getInspector() + this.yPropNone = this.$element("yPropNone").getInspector() + this.dxPropLength = this.$element("dxPropLength").getInspector() + this.dxPropPercentage = this.$element("dxPropPercentage").getInspector() + this.dxPropNone = this.$element("dxPropNone").getInspector() + this.dyPropLength = this.$element("dyPropLength").getInspector() + this.dyPropPercentage = this.$element("dyPropPercentage").getInspector() + this.dyPropNone = this.$element("dyPropNone").getInspector() + this.rotateProp = this.$element("rotateProp").getInspector() + this.rotatePropNone = this.$element("rotatePropNone").getInspector() + this.fontSizeProp = this.$element("fontSizeProp").getInspector() + this.fontSizePropNone = this.$element("fontSizePropNone").getInspector() + this.fillProp = this.$element("fillProp").getInspector() + this.fillPropNone = this.$element("fillPropNone").getInspector() + this.fillOpacityProp = this.$element("fillOpacityProp").getInspector() + this.fillOpacityPropNone = this.$element("fillOpacityPropNone").getInspector() + this.opacityProp = this.$element("opacityProp").getInspector() + this.opacityPropNone = this.$element("opacityPropNone").getInspector() + this.strokeProp = this.$element("strokeProp").getInspector() + this.strokePropNone = this.$element("strokePropNone").getInspector() + this.strokeWidthProp = this.$element("strokeWidthProp").getInspector() + this.strokeWidthPropNone = this.$element("strokeWidthPropNone").getInspector() + this.strokeOpacityProp = this.$element("strokeOpacityProp").getInspector() + this.strokeOpacityPropNone = this.$element("strokeOpacityPropNone").getInspector() + return + }, +} diff --git a/ace/ace_standard/src/main/js/default/pages/svg_text/router/index.css b/ace/ace_standard/src/main/js/default/pages/svg_text/router/index.css new file mode 100644 index 000000000..b2f1e3079 --- /dev/null +++ b/ace/ace_standard/src/main/js/default/pages/svg_text/router/index.css @@ -0,0 +1,36 @@ +.container { + flex-direction:row; + width:100%; + height:100%; + padding: 1px; +} + +.sub-container{ + flex-direction: column; + height: 100%; + flex-weight: 1; +} + +.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: center; + margin: 2px; + padding: 2px; +} + +.prop-container{ + flex-direction: column; + height: 100%; + flex-weight: 2; + align-items: center; +} \ No newline at end of file diff --git a/ace/ace_standard/src/main/js/default/pages/svg_text/router/index.hml b/ace/ace_standard/src/main/js/default/pages/svg_text/router/index.hml new file mode 100644 index 000000000..b1e65bae4 --- /dev/null +++ b/ace/ace_standard/src/main/js/default/pages/svg_text/router/index.hml @@ -0,0 +1,45 @@ +
+
+
+ + 通用属性 + + + svg_text通用属性1 + + + x: 5% ; y: 20 + dx: 10% ; dy: 10 + + + svg_text通用属性2 + + + rotate: 30 + rotate: -30 + + + svg_text通用属性3 + + + font-size: 22px + fill: #00ff00 + + + svg_text通用属性4 + + + fill-opacity: 0.5 + opacity: 0.7 + + + svg_text通用属性5 + + + stroke: black + stroke-width: 2 + stroke-opacity: 0.5 + +
+
+
diff --git a/ace/ace_standard/src/main/js/default/pages/svg_text/index.js b/ace/ace_standard/src/main/js/default/pages/svg_text/router/index.js similarity index 76% rename from ace/ace_standard/src/main/js/default/pages/svg_text/index.js rename to ace/ace_standard/src/main/js/default/pages/svg_text/router/index.js index 87eb2e4aa..5f7728fdf 100644 --- a/ace/ace_standard/src/main/js/default/pages/svg_text/index.js +++ b/ace/ace_standard/src/main/js/default/pages/svg_text/router/index.js @@ -14,11 +14,4 @@ */ export default { - onShow(){ - // 通用属性 - var prop1 = this.$element("prop1"); - var name1 = prop1.dataSet.a - var prop2 = this.$refs.prop2; - var name2 = prop2.dataSet.a - } } 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 index 3a8ecfe15..543f5e3c5 100644 --- 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 @@ -260,5 +260,27 @@ + + + 特有属性 -- tid + + + + + + +
+ + + + + + +
\ No newline at end of file diff --git a/ace/ace_standard/src/main/js/default/pages/swiper/router/index.css b/ace/ace_standard/src/main/js/default/pages/swiper/router/index.css index df202d3f1..99b5076e5 100644 --- a/ace/ace_standard/src/main/js/default/pages/swiper/router/index.css +++ b/ace/ace_standard/src/main/js/default/pages/swiper/router/index.css @@ -86,6 +86,7 @@ border: 1px solid #000000; indicator-color: #cf2411; indicator-size: 8px; + indicator-left: 1px; indicator-bottom: 1px; indicator-right: 30px; indicator-top: 50%; 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 index c70d854fa..54016d177 100644 --- 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 @@ -279,6 +279,11 @@ scrolleffect="spring"> + + swiperOnAccessibility + + + swiper特有事件1 diff --git a/ace/ace_standard/src/main/js/default/pages/swiper/router/index.js b/ace/ace_standard/src/main/js/default/pages/swiper/router/index.js index 2b9585e78..9721f49d0 100644 --- a/ace/ace_standard/src/main/js/default/pages/swiper/router/index.js +++ b/ace/ace_standard/src/main/js/default/pages/swiper/router/index.js @@ -515,6 +515,13 @@ export default { prompt.showToast({ message: 'reachBottom' }); + }, + + onAccessibility(event) { + if (event.eventType == 1) { + console.log("onAccessibility" + event.eventType); + } + console.log("onAccessibility" + JSON.stringify(event)); } } \ No newline at end of file diff --git a/ace/ace_standard/src/main/js/default/pages/switch/prop/index.css b/ace/ace_standard/src/main/js/default/pages/switch/prop/index.css index b171d07a1..ded17d4f2 100644 --- a/ace/ace_standard/src/main/js/default/pages/switch/prop/index.css +++ b/ace/ace_standard/src/main/js/default/pages/switch/prop/index.css @@ -425,4 +425,64 @@ margin-right: 10px; } +#tidProp { + flex-weight: 1; + background-color:#0e0000; + width: 100%; + margin-left: 10px; + margin-right: 10px; + padding-start: 10px; + padding-end: 10px; +} + +#tidPropNone { + flex-weight: 1; + background-color:#c00000; + width: 100%; + margin-left: 10px; + margin-right: 10px; + padding-start: 10px; + padding-end: 10px; +} + +#elifPropTrue { + flex-weight: 1; + background-color:#0e0000; + width: 100%; + margin-left: 10px; + margin-right: 10px; + padding-start: 10px; + padding-end: 10px; +} + +#elifPropFalse { + flex-weight: 1; + background-color:#c00000; + width: 100%; + margin-left: 10px; + margin-right: 10px; + padding-start: 10px; + padding-end: 10px; +} + +#dataPropOneNone { + flex-weight: 1; + background-color:#0e0000; + width: 100%; + margin-left: 10px; + margin-right: 10px; + padding-start: 10px; + padding-end: 10px; +} + +#dataPropOne { + flex-weight: 1; + background-color:#c00000; + width: 100%; + margin-left: 10px; + margin-right: 10px; + padding-start: 10px; + padding-end: 10px; +} + diff --git a/ace/ace_standard/src/main/js/default/pages/switch/prop/index.hml b/ace/ace_standard/src/main/js/default/pages/switch/prop/index.hml index 29d527714..6a6791dfb 100644 --- a/ace/ace_standard/src/main/js/default/pages/switch/prop/index.hml +++ b/ace/ace_standard/src/main/js/default/pages/switch/prop/index.hml @@ -88,6 +88,16 @@ data-switch=""> + + 通用属性 -- data + + + + + + 通用属性 -- click-effect @@ -152,6 +162,29 @@ + + + 属性 -- tid + + + + + + + + 属性 -- elif + + + + + + +
diff --git a/ace/ace_standard/src/main/js/default/pages/switch/router/index.hml b/ace/ace_standard/src/main/js/default/pages/switch/router/index.hml index c8962bd30..14ab45424 100644 --- a/ace/ace_standard/src/main/js/default/pages/switch/router/index.hml +++ b/ace/ace_standard/src/main/js/default/pages/switch/router/index.hml @@ -175,7 +175,7 @@ + onswipe="swipe" onattached="attached" ondetached="detached" onaccessibility="attached"> -- GitLab