From ed95ee9bb0b469a66b5af33e2f22bbd3f555da44 Mon Sep 17 00:00:00 2001 From: dongwei Date: Tue, 8 Mar 2022 18:26:25 +0800 Subject: [PATCH] add test cases Signed-off-by: dongwei --- .../main/js/default/pages/text/prop/index.hml | 34 ++- .../js/default/pages/text/router/index.hml | 1 + .../js/default/pages/text/router/index.js | 7 + .../main/js/default/pages/textPath/index.css | 173 --------------- .../main/js/default/pages/textPath/index.hml | 199 ------------------ .../js/default/pages/textPath/prop/index.css | 53 +++++ .../js/default/pages/textPath/prop/index.hml | 183 ++++++++++++++++ .../js/default/pages/textPath/prop/index.js | 99 +++++++++ .../default/pages/textPath/router/index.css | 36 ++++ .../default/pages/textPath/router/index.hml | 71 +++++++ .../pages/textPath/{ => router}/index.js | 0 .../js/default/pages/textarea/prop/index.css | 10 + .../js/default/pages/textarea/prop/index.hml | 23 ++ .../default/pages/textarea/router/index.hml | 7 + .../js/default/pages/textarea/router/index.js | 18 ++ 15 files changed, 541 insertions(+), 373 deletions(-) delete mode 100644 ace/ace_standard/src/main/js/default/pages/textPath/index.css delete mode 100644 ace/ace_standard/src/main/js/default/pages/textPath/index.hml create mode 100644 ace/ace_standard/src/main/js/default/pages/textPath/prop/index.css create mode 100644 ace/ace_standard/src/main/js/default/pages/textPath/prop/index.hml create mode 100644 ace/ace_standard/src/main/js/default/pages/textPath/prop/index.js create mode 100644 ace/ace_standard/src/main/js/default/pages/textPath/router/index.css create mode 100644 ace/ace_standard/src/main/js/default/pages/textPath/router/index.hml rename ace/ace_standard/src/main/js/default/pages/textPath/{ => router}/index.js (100%) 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 index 15a2e12aa..b88c995c9 100644 --- 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 @@ -138,13 +138,45 @@ + + + 特有属性 -- shareid + + + + + + + + 特有属性 -- tid + + + + + + +
+ + + + + + +
- div特有属性 + text特有属性
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 index e0350b5cd..ce2481f2b 100644 --- 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 @@ -116,6 +116,7 @@ ondragover="dragOver" ondragleave="dragLeave" ondrop="drop"> + text
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 index fc54bd164..49e66d2db 100644 --- 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 @@ -485,5 +485,12 @@ export default { prompt.showToast({ message: 'reachBottom' }); + }, + + onAccessibility(event) { + if (event.eventType == 1) { + console.log("onAccessibility" + event.eventType); + } + console.log("onAccessibility" + JSON.stringify(event)); } } diff --git a/ace/ace_standard/src/main/js/default/pages/textPath/index.css b/ace/ace_standard/src/main/js/default/pages/textPath/index.css deleted file mode 100644 index 6d86e3f7a..000000000 --- a/ace/ace_standard/src/main/js/default/pages/textPath/index.css +++ /dev/null @@ -1,173 +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{ - color: #72ac33; - stroke-width: 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) skew(40deg); - background-position:10% 10% - } - 30% { - background-color: #60f761; - opacity:0.5; - width:70px; - height: 70px; - background-position:12% 12%; - transform:translateX(10px) translateY(5px) rotateX(20deg) rotateY(25deg) scaleX(0.6) scaleY(0.5) skewX(25deg) skewY(15deg) - } - to { - background-color: #6160f7; - opacity:1; - width:90px; - height: 90px; - background-position:22% 22%; - transform:rotate(180deg) scale(2) - } -} - - -.ani2{ - color: #ad4e2a; - stroke-width: 55px; - margin: 5px; - transform-origin: 2% 3%; - animation-name:ani2Go; - animation-delay:5s; - animation-duration:10s; - animation-iteration-count:4; - animation-timing-function:ease-out; - animation-direction:reverse; - animation-fill-mode:forwards; - animation-play-state:running; - transition:all 0 ease 0; -} - -@keyframes ani2Go -{ - from { - background-color: #f76160; - opacity:0.3; - width:50px; - height: 50px; - background-position:10% 10% - } - 30% { - background-color: #60f761; - opacity:0.5; - width:70px; - height: 70px; - background-position:12% 12%; - transform:translateX(10px) translateY(5px) translateZ(15px) - rotateX(20deg) rotateY(25deg) rotateZ(15deg) scaleX(0.6) scaleY(0.5) scaleZ(1.5) perspective(10); - } - to { - background-color: #6160f7; - opacity:1; - width:90px; - height: 90px; - background-position:22% 22%; - transform:translateX(30px) translateY(45px) translateZ(55px) - rotateX(180deg) rotateY(185deg) rotateZ(150deg) scaleX(2) scaleY(2.5) scaleZ(3.5); - } -} - -.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{ - 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/textPath/index.hml b/ace/ace_standard/src/main/js/default/pages/textPath/index.hml deleted file mode 100644 index 1ad329f55..000000000 --- a/ace/ace_standard/src/main/js/default/pages/textPath/index.hml +++ /dev/null @@ -1,199 +0,0 @@ -
-
-
- - 通用属性 - - - textPath通用属性1 - - - - - - textPath - - - textPath - - - - - textPath通用属性2 - - - - - - textPath - - - textPath - - - textPath - - - - - - textPath通用属性3 - - - - - - textPath - - - textPath - - - -
- - -
- - 动画样式 - - - textPath动画样式1 - - - - - textPath - - - textPath - - - - - textPath动画样式2 - - - - - textPath - - - textPath - - - -
-
- - - - -
-
- - 渐变样式 - - - textPath渐变样式1 - - - - - textPath - - - - - textPath渐变样式2 - - - - - textPath - - - - - textPath渐变样式3 - - - - - textPath - - - - - textPath渐变样式4 - - - - - textPath - - - -
- - -
- - 无障碍 - - - textPath无障碍1 - - - - - textPath - - - -
- - - -
- - 多模输入 - - - textPath多模输入1 - - - - - textPath - - - -
-
-
diff --git a/ace/ace_standard/src/main/js/default/pages/textPath/prop/index.css b/ace/ace_standard/src/main/js/default/pages/textPath/prop/index.css new file mode 100644 index 000000000..97320ec86 --- /dev/null +++ b/ace/ace_standard/src/main/js/default/pages/textPath/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/textPath/prop/index.hml b/ace/ace_standard/src/main/js/default/pages/textPath/prop/index.hml new file mode 100644 index 000000000..2310b6ac7 --- /dev/null +++ b/ace/ace_standard/src/main/js/default/pages/textPath/prop/index.hml @@ -0,0 +1,183 @@ + + +
+
+ + textPath通用属性 + +
+ +
+
+
+ + textPath特有属性 + + + 标识属性 -- id + + + + + text + + + + + + 路径属性 -- path + + + + + text + + + text + + + + + + 起始偏移量属性 -- startOffset + + + + + text + + + text + + + text + + + + + + 字体大小属性 -- font-size + + + + + text + + + text + + + + + + 字体填充颜色属性 -- fill + + + + + text + + + text + + + + + + 动画的偏移属性 -- by + + + + + 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/textPath/prop/index.js b/ace/ace_standard/src/main/js/default/pages/textPath/prop/index.js new file mode 100644 index 000000000..aba8b92d8 --- /dev/null +++ b/ace/ace_standard/src/main/js/default/pages/textPath/prop/index.js @@ -0,0 +1,99 @@ +/** + * 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, + pathProp : null, + pathPropNone: null, + startOffsetPropLength : null, + startOffsetPropPercentage : null, + startOffsetPropNone : null, + byProp : null, + byPropNone : 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, + pathProp : this.pathProp, + pathPropNone : this.pathPropNone, + fontSizeProp : this.fontSizeProp, + fontSizePropNone : this.fontSizePropNone, + startOffsetPropLength : this.startOffsetPropLength, + startOffsetPropPercentage : this.startOffsetPropPercentage, + startOffsetPropNone : this.startOffsetPropNone, + byProp : this.byProp, + byPropNone : this.byPropNone, + 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.pathProp = this.$element("pathProp").getInspector() + this.pathPropNone = this.$element("pathPropNone").getInspector() + this.fontSizeProp = this.$element("fontSizeProp").getInspector() + this.fontSizePropNone = this.$element("fontSizePropNone").getInspector() + this.startOffsetPropLength = this.$element("startOffsetPropLength").getInspector() + this.startOffsetPropPercentage = this.$element("startOffsetPropPercentage").getInspector() + this.startOffsetPropNone = this.$element("startOffsetPropNone").getInspector() + this.byProp = this.$element("byProp").getInspector() + this.byPropNone = this.$element("byPropNone").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/textPath/router/index.css b/ace/ace_standard/src/main/js/default/pages/textPath/router/index.css new file mode 100644 index 000000000..b2f1e3079 --- /dev/null +++ b/ace/ace_standard/src/main/js/default/pages/textPath/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/textPath/router/index.hml b/ace/ace_standard/src/main/js/default/pages/textPath/router/index.hml new file mode 100644 index 000000000..525c257d2 --- /dev/null +++ b/ace/ace_standard/src/main/js/default/pages/textPath/router/index.hml @@ -0,0 +1,71 @@ +
+
+
+ + 通用属性 + + + textPath通用属性1 + + + + + + textPath + + + textPath + + + + + textPath通用属性2 + + + + + + textPath + + + textPath + + + + + + textPath通用属性3 + + + + + + textPath + + + textPath + + + + + + + + textPath + + + +
+
+
diff --git a/ace/ace_standard/src/main/js/default/pages/textPath/index.js b/ace/ace_standard/src/main/js/default/pages/textPath/router/index.js similarity index 100% rename from ace/ace_standard/src/main/js/default/pages/textPath/index.js rename to ace/ace_standard/src/main/js/default/pages/textPath/router/index.js diff --git a/ace/ace_standard/src/main/js/default/pages/textarea/prop/index.css b/ace/ace_standard/src/main/js/default/pages/textarea/prop/index.css index d8afcf790..7ce08d042 100644 --- a/ace/ace_standard/src/main/js/default/pages/textarea/prop/index.css +++ b/ace/ace_standard/src/main/js/default/pages/textarea/prop/index.css @@ -660,6 +660,16 @@ padding-start: 10px; padding-end: 10px; } +.propNewAdd{ + height: 15px; + margin-bottom: 3px; + 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/textarea/prop/index.hml b/ace/ace_standard/src/main/js/default/pages/textarea/prop/index.hml index 7c737bf89..74f6b92af 100644 --- a/ace/ace_standard/src/main/js/default/pages/textarea/prop/index.hml +++ b/ace/ace_standard/src/main/js/default/pages/textarea/prop/index.hml @@ -271,5 +271,28 @@ + + + 特有属性 -- tid + + + + + + 特有属性 -- elif + + + + diff --git a/ace/ace_standard/src/main/js/default/pages/textarea/router/index.hml b/ace/ace_standard/src/main/js/default/pages/textarea/router/index.hml index cbe2ce56f..6a1348202 100644 --- a/ace/ace_standard/src/main/js/default/pages/textarea/router/index.hml +++ b/ace/ace_standard/src/main/js/default/pages/textarea/router/index.hml @@ -76,4 +76,11 @@ selectedend="7" menuoptions="{}"> + + 特有事件1 + +
+ +
diff --git a/ace/ace_standard/src/main/js/default/pages/textarea/router/index.js b/ace/ace_standard/src/main/js/default/pages/textarea/router/index.js index 20ad15558..996abf8e7 100644 --- a/ace/ace_standard/src/main/js/default/pages/textarea/router/index.js +++ b/ace/ace_standard/src/main/js/default/pages/textarea/router/index.js @@ -20,5 +20,23 @@ export default { message: 'value: ' + e.text + ', lines: ' + e.lines + ', height: ' + e.height, duration: 3000, }); + }, + selectchange(e){ + prompt.showToast({ + message: 'value: ' + e.text + ', lines: ' + e.lines + ', height: ' + e.height, + duration: 3000, + }); + }, + share(e){ + prompt.showToast({ + message: 'value: ' + e.text + ', lines: ' + e.lines + ', height: ' + e.height, + duration: 3000, + }); + }, + translate(e){ + prompt.showToast({ + message: 'value: ' + e.text + ', lines: ' + e.lines + ', height: ' + e.height, + duration: 3000, + }); } } \ No newline at end of file -- GitLab