diff --git a/ace/ace_standard/src/main/config.json b/ace/ace_standard/src/main/config.json index 05b1e61c301fbdde7af1ffe0996cc98fa12b4740..52b8b520a131e8d62859945d7bf3b010d8a6c95b 100755 --- a/ace/ace_standard/src/main/config.json +++ b/ace/ace_standard/src/main/config.json @@ -91,7 +91,9 @@ "pages/stack/index", "pages/stepper/index", "pages/swiper/index", - "pages/tabs/index" + "pages/tabs/index", + "pages/tab-bar/index", + "pages/tab-content/index" ], "name": "default", "window": { diff --git a/ace/ace_standard/src/main/js/default/pages/div/index.hml b/ace/ace_standard/src/main/js/default/pages/div/index.hml index c7e6fa5aaff8d0afb7916f8b1e248722c920c206..44c740e3ff11f7f1a8f12ec8cf07f04b6a07afb5 100644 --- a/ace/ace_standard/src/main/js/default/pages/div/index.hml +++ b/ace/ace_standard/src/main/js/default/pages/div/index.hml @@ -202,22 +202,22 @@ div通用方法1 -
+
div通用方法2 -
+
div通用方法3 -
+
div特有方法 -
+
diff --git a/ace/ace_standard/src/main/js/default/pages/listItem/index.css b/ace/ace_standard/src/main/js/default/pages/listItem/index.css index a3c739a98d080c57d38b25d9ca92219c0e6abc0f..efcff82d8f0c225de354b318a2f7111e0c1f3796 100644 --- a/ace/ace_standard/src/main/js/default/pages/listItem/index.css +++ b/ace/ace_standard/src/main/js/default/pages/listItem/index.css @@ -1,19 +1,3 @@ -/** - * Copyright (c) 2022 Shenzhen kaiHong Digital Industry Development Co., Ltd. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/* xxx.css */ .container { flex-direction:row; width:100%; @@ -173,7 +157,7 @@ height: 30px; position: absolute; left: 5px; - top: 5px; + top: 50px; bottom: 5px; right: 10px; background-color: pink; diff --git a/ace/ace_standard/src/main/js/default/pages/listItem/index.hml b/ace/ace_standard/src/main/js/default/pages/listItem/index.hml index 1d7fc71bbbebf5a541c447415bba976ca20869da..e6a97acfee99a88afef59dc4462a451908bc8c1b 100644 --- a/ace/ace_standard/src/main/js/default/pages/listItem/index.hml +++ b/ace/ace_standard/src/main/js/default/pages/listItem/index.hml @@ -1,18 +1,3 @@ - -
@@ -21,54 +6,37 @@ listItem通用样式1 - - - {{$item.value}} - - + + list-item通用样式2 - - - {{$item.value}} - - + + list-item通用样式3 - - - 通用样式3 - - + + list-item通用样式4 - - - - - + + list-item通用样式5 -
- - - - - - - - +
+ + + +
list-item特有样式 - {{$item.value}}
@@ -78,79 +46,26 @@
- 通用属性 + 通用&特有属性 - - - - - list-item通用属性1 - - - - - list-item通用属性2 - - - - - div通用属性3 - - - - - list-item特有属性 - - - - - list-item特有属性2 - - - - - - - list-item通用属性1 - - - list-item通用属性2 - - - list-item通用属性3 - - - list-item特有属性 - - - list-item特有属性2 -
@@ -200,11 +115,9 @@ list-item动画样式1
- - - {{$item.value}} - - + + {{$item.value}} +
@@ -219,24 +132,12 @@
- - list-item渐变样式1 - - - list-item渐变样式1 - - - list-item渐变样式1 - - - list-item渐变样式1 -
@@ -253,7 +154,7 @@ accessibilitytext="这是list" accessibilitydescription="点击此按键会弹出一个对话框" accessibilityimportance="no-hide-descendants"> - + {{$item.value}} @@ -274,12 +175,6 @@ - - - - - -
diff --git a/ace/ace_standard/src/main/js/default/pages/listItemGroup/index.hml b/ace/ace_standard/src/main/js/default/pages/listItemGroup/index.hml index a82782c9f304ad83130864e82419f606cdc70bad..a9b9ff2cea23dc62838636398f6b0cc41286b02a 100644 --- a/ace/ace_standard/src/main/js/default/pages/listItemGroup/index.hml +++ b/ace/ace_standard/src/main/js/default/pages/listItemGroup/index.hml @@ -1,17 +1,3 @@ -/** - * 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. - */
@@ -20,68 +6,33 @@ listItemGroup样式1 - - - - {{$item.value}} - - - + + listItemGroup样式2 - - - - {{$item.value}} - - - + + listItemGroup样式3 - - - - 通用样式3 - - - + + listItemGroup样式4 - - - - - - - + + listItemGroup样式5 -
- - - - - - - - - - -
+ + listItemGroup样式 - - - - {{$item.value}} - - - + +
@@ -92,34 +43,22 @@ 通用属性 + + + + + + + + - - - listGroup属性1 - - - - - listGroup属性2 - - - - - listGroup属性3 - - - - - listGroup属性 - - @@ -127,44 +66,6 @@ - - - - - - - listGroup属性1 - - - - - listGroup属性2 - - - - - listGroup属性3 - - - - - listGroup特有属性 - - - - - listGroup特有属性 - - -
@@ -173,33 +74,24 @@ 通用特有事件 - + + + + + + - - - listItemGroup通用事件1 - - - - - listItemGroup通用事件2 - - - - - listItemGroup通用事件3 - - + -
@@ -212,13 +104,8 @@ listItemGroup动画1
- - - - {{$item.value}} - - - + +
@@ -232,27 +119,13 @@ 渐变样式 - - - - listGroup渐变1 - - - - - listGroup渐变2 - - - - - listGroup渐变3 - - - - - listGroup渐变4 - - + + + + + + +
@@ -265,16 +138,12 @@ listGroup无障碍1 - - - - {{$item.value}} - - - + +
@@ -286,19 +155,11 @@ listGroup原子布局1 - - - - - - - - - - - - - + + + + +
diff --git a/ace/ace_standard/src/main/js/default/pages/marquee/index.css b/ace/ace_standard/src/main/js/default/pages/marquee/index.css index 7c8fea0670611fb17a7d1fd9a4f08147979852ff..f39a2d085c333a0035c786c1446b67480f445985 100644 --- a/ace/ace_standard/src/main/js/default/pages/marquee/index.css +++ b/ace/ace_standard/src/main/js/default/pages/marquee/index.css @@ -335,7 +335,6 @@ .prop5 { color: #831834; - stroke-width: 40px; line-cap: square; margin: 5px; height: 70px; @@ -349,7 +348,6 @@ .ani1{ color: #72ac33; - stroke-width: 55px; line-cap: square; margin: 5px; transform-origin: 0% 0%; @@ -423,11 +421,11 @@ background: repeating-linear-gradient(to right, rgba(255, 255, 0, 1) 30px,rgba(0, 0, 255, .5) 60px); } -.access-container{ +.accessibility-container{ flex-direction: column; } -.access1{ +.accessibility1{ background-color: #321124; margin: 5px; width: 90%; diff --git a/ace/ace_standard/src/main/js/default/pages/marquee/index.hml b/ace/ace_standard/src/main/js/default/pages/marquee/index.hml index 9d4b37bf8dbe530717b965a75b2b41d1b4cadb42..8b6ad0485c43cbf7dae1be1c38a77f742ef82ead 100644 --- a/ace/ace_standard/src/main/js/default/pages/marquee/index.hml +++ b/ace/ace_standard/src/main/js/default/pages/marquee/index.hml @@ -20,52 +20,43 @@ 通用样式 - marque通用样式1 + 通用样式1 - 文字1 - marque通用样式2 + 通用样式2 - 文字2 - marque通用样式3 + 通用样式3 - 文字3 - marque通用样式4 + 通用样式4 - 文字4 - marque通用样式5 + 通用样式5
- 文字5 - 文字6
- marque特有样式 + 特有样式
- 样式 - 样式 - 样式
@@ -76,16 +67,14 @@ 动画样式 - div动画样式1 + 动画样式1 - 动画1 - div动画样式2 + 动画样式2 - 动画2
@@ -99,35 +88,32 @@ 通用属性 - mar通用属性1 + 通用属性1 - 属性1---- - mar通用属性2 + 通用属性2 - 属性2---- - mar通用属性3 + 通用属性3 - 属性3---- - marque特有属性 + 特有属性 - 属性4---- + 特有属性
@@ -137,22 +123,20 @@ 通用事件 - mar通用事件1 + 通用事件1 - 事件1---- - mar通用事件2 + 通用事件2 - 事件2---- - mar通用事件3 + 通用事件3 - 事件3---- - mar特有事件1 + 特有事件1
@@ -177,25 +160,22 @@ 通用方法 - marque通用方法1 + 通用方法1 - 方法1---- - marque通用方法2 + 通用方法2 - 方法2---- - marque通用方法3 + 通用方法3 - 方法3---- - marque特有方法 + 特有方法
-
+
无障碍 - marque无障碍1 + 无障碍1 - @@ -260,7 +240,7 @@ 原子布局 - marque原子布局1 + 原子布局1
@@ -277,7 +257,7 @@
- marque原子布局2 + 原子布局2
@@ -294,7 +274,7 @@
- marque原子布局3 + 原子布局3
@@ -317,7 +297,7 @@ 多模输入 - marque多模输入1 + 多模输入1 diff --git a/ace/ace_standard/src/main/js/default/pages/marquee/index.js b/ace/ace_standard/src/main/js/default/pages/marquee/index.js index 2ffb969c568b5870392ccd66ebe70e8ae494e6c9..ee6626e3d878eccc5b3407b75c3bf6d58bad9491 100644 --- a/ace/ace_standard/src/main/js/default/pages/marquee/index.js +++ b/ace/ace_standard/src/main/js/default/pages/marquee/index.js @@ -1,88 +1,5 @@ -/** - * 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(){ @@ -444,6 +361,74 @@ export default { functionTest3(event){ var function3 = this.$element('function3'); + var options = { + duration: 1500, + easing: 'friction', + delay: 100, + fill: 'forwards', + iterations: 2, + direction: 'normal', + }; + var frames = [ + { + transform: { + translate: '-120px', + rotate:'10deg', + scale:0.2, + skew:'40deg' + }, + opacity: 0.1, + offset: 0.0, + width: '40%', + height:'20px', + backgroundColor:'#ff0000', + backgroundPosition:'10px 20px', + transformOrigin:'left top' + }, + { + transform: { + translateX: '0px', + translateY: '5px', + rotateX:'10deg', + rotateY:'10deg', + scaleX:0.5, + scaleY:0.7, + skewX:'22deg', + skewY:'30deg' + }, + opacity: 0.6, + offset: 2.0, + width: '60%', + height:'30px', + backgroundColor:'#ff00ff', + backgroundPosition:'15px 25px', + transformOrigin:'center top' + }, + { + transform: { + translateX: '100px', + translateY: '0px', + translateZ: '20px', + rotateX:'0deg', + rotateY:'0deg', + rotateZ:'30deg', + scaleX:1, + scaleY:1, + scaleZ:2, + skewX:'0', + skewY:'0', + skewZ:'30deg' + }, + opacity: 1, + offset: 0.0, + width: '100%', + height:'30px', + backgroundColor:'#ffff00', + backgroundPosition:'0px', + transformOrigin:'center center' + }, + ]; + var animation = function3.animate(frames, options); animation.play() animation.onfinish = function(){ diff --git a/ace/ace_standard/src/main/js/default/pages/panel/index.css b/ace/ace_standard/src/main/js/default/pages/panel/index.css index 78fed8bcc38a06a674c102ca65e756f195f758da..0532e3a8c23010152176681682fe0152753150dd 100644 --- a/ace/ace_standard/src/main/js/default/pages/panel/index.css +++ b/ace/ace_standard/src/main/js/default/pages/panel/index.css @@ -50,10 +50,6 @@ flex-direction: column; } -.multimode-container{ - flex-direction: column; -} - .title{ width: 100%; font-size: 18px; @@ -167,7 +163,6 @@ mask-image: url('common/images/icon.png'); mask-size: cover; mask-position: center; - } .style3{ @@ -188,48 +183,6 @@ flex-shrink: 1; } -.style4{ - width: 60%; - height: 5%; - padding: 10px; - margin: 5px; - border: 2px solid #000000; -} - - - -.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 { - margin-bottom: 10px; - margin-top: 10px; - color: green; - stroke-width: 30px; - line-cap: round; -} - - .event1{ width: 60%; flex-weight: 1; @@ -264,12 +217,13 @@ -#prop1 { +.prop1 { color: #ad4e2a; height: 30px; background-color: mediumslateblue; width: 100%; margin: 5px; + } .prop2 { @@ -381,16 +335,6 @@ margin: 5px; } - - -.multimode1{ - color: #978666; - stroke-width: 30px; - line-cap: square; - margin: 5px; -} - - .function1{ background-color: #ff0000; width: 60%; diff --git a/ace/ace_standard/src/main/js/default/pages/panel/index.hml b/ace/ace_standard/src/main/js/default/pages/panel/index.hml index 6798d847e09b0ec842c64f99a2a398013cb37140..d9c399afab2ec1f62e47f8767ffd25d9055ead2d 100644 --- a/ace/ace_standard/src/main/js/default/pages/panel/index.hml +++ b/ace/ace_standard/src/main/js/default/pages/panel/index.hml @@ -3,273 +3,58 @@
- - 通用样式 - - - panel通用样式1 - -
- -
- -
-
- Simple panel in mini mode -
+
-
-
+ - - panel通用样式2 - -
- -
- -
-
- Simple panel in half mode -
+
-
-
- - - panel通用样式3 - -
- -
- -
-
- Simple panel in full mode -
-
- -
-
-
- - - panel通用样式4 - -
- -
- -
-
- Simple panel in {{modeFlag}} mode -
-
- -
-
-
-
- - panel通用样式5 - -
- -
- -
-
- Simple panel in {{modeFlag}} mode -
-
- -
-
- - panel通用样式6 + panel样式3 -
- -
- -
-
- Simple panel in {{modeFlag}} mode -
-
- -
-
-
-
- - panel特有样式7 - -
- -
- -
-
- Simple panel in {{modeFlag}} mode -
+ +
-
-
- - -
- - - -
- - 动画样式 - - - panel动画样式1 - -
- -
- -
-
- Simple panel in {{modeFlag}} mode -
-
- -
-
-
- - panel动画样式2 - -
- -
- -
-
- Simple panel in {{modeFlag}} mode -
-
- -
-
-
@@ -285,12 +70,10 @@ panel通用属性1 -
- -
+ -
-
- Simple panel in {{modeFlag}} mode -
-
- -
+
+
panel通用属性2 -
- -
- -
-
- Simple panel in {{modeFlag}} mode -
-
- -
+ + +
+
panel通用属性3 -
- -
- -
-
- Simple panel in {{modeFlag}} mode -
-
- -
+ + +
+
panel特有属性4 -
- -
- + + -
-
- Simple panel in mini mode -
-
- -
+
+
panel特有属性5 -
- -
- + + -
-
- Simple panel in half mode -
-
- -
+
+
panel特有属性6 -
- -
- + + -
-
- Simple panel in full mode -
-
- -
+
+
-
@@ -467,97 +203,69 @@ panel渐变样式1 -
- -
- + + -
-
- Simple panel in {{modeFlag}} mode -
-
- -
+
+
panel渐变样式2 -
- -
- + + -
-
- Simple panel in {{modeFlag}} mode -
-
- -
+
+
panel渐变样式3 -
- -
- + + -
-
- Simple panel in {{modeFlag}} mode -
-
- -
+
+
panel渐变样式4 -
- -
- + + -
-
- Simple panel in {{modeFlag}} mode -
-
- -
+
+
@@ -568,70 +276,26 @@ 无障碍 - - panel无障碍1 - -
- -
- + + -
-
- Simple panel in {{modeFlag}} mode -
-
- -
+
+
- -
- - 多模输入 - - - panel多模输入1 - -
- -
- -
-
- Simple panel in {{modeFlag}} mode -
-
- -
-
-
-
diff --git a/ace/ace_standard/src/main/js/default/pages/panel/index.js b/ace/ace_standard/src/main/js/default/pages/panel/index.js index e3e621b4a05383e9d6a4a34b3945c449cc45b34e..758f95247055eb9c1ee5e4e642019a0c8332e6e1 100644 --- a/ace/ace_standard/src/main/js/default/pages/panel/index.js +++ b/ace/ace_standard/src/main/js/default/pages/panel/index.js @@ -89,52 +89,52 @@ export default { }, // 样式 showPanel1() { - this.$element('simplepanel1').show() + this.$element('simplePanel1').show() }, closePanel1() { - this.$element('simplepanel1').close() + this.$element('simplePanel1').close() }, showPanel2() { - this.$element('simplepanel2').show() + this.$element('simplePanel2').show() }, closePanel2() { - this.$element('simplepanel2').close() + this.$element('simplePanel2').close() }, showPanel3() { - this.$element('simplepanel3').show() + this.$element('simplePanel3').show() }, closePanel3() { - this.$element('simplepanel3').close() + this.$element('simplePanel3').close() }, showPanel4() { - this.$element('simplepanel4').show() + this.$element('simplePanel4').show() }, closePanel4() { - this.$element('simplepanel4').close() + this.$element('simplePanel4').close() }, showPanel5() { - this.$element('simplepanel5').show() + this.$element('simplePanel5').show() }, closePanel5() { - this.$element('simplepanel5').close() + this.$element('simplePanel5').close() }, showPanel6() { - this.$element('simplepanel6').show() + this.$element('simplePanel6').show() }, closePanel6() { - this.$element('simplepanel6').close() + this.$element('simplePanel6').close() }, showPanel7() { - this.$element('simplepanel7').show() + this.$element('simplePanel7').show() }, closePanel7() { - this.$element('simplepanel7').close() + this.$element('simplePanel7').close() }, showPanel() { - this.$element('simplepanel').show() + this.$element('simplePanel').show() }, closePanel() { - this.$element('simplepanel').close() + this.$element('simplePanel').close() }, // 属性 showPanelPro1() { @@ -150,28 +150,28 @@ export default { this.$element('prop2').close() }, showPanelPro3() { - this.$element('simplepanelPro3').show() + this.$element('simplePanelPro3').show() }, closePanelPro3() { - this.$element('simplepanelPro3').close() + this.$element('simplePanelPro3').close() }, showPanelPro4() { - this.$element('simplepanelPro4').show() + this.$element('simplePanelPro4').show() }, closePanelPro4() { - this.$element('simplepanelPro4').close() + this.$element('simplePanelPro4').close() }, showPanelPro5() { - this.$element('simplepanelPro5').show() + this.$element('simplePanelPro5').show() }, closePanelPro5() { - this.$element('simplepanelPro5').close() + this.$element('simplePanelPro5').close() }, showPanelPro6() { - this.$element('simplepanelPro6').show() + this.$element('simplePanelPro6').show() }, closePanelPro6() { - this.$element('simplepanelPro6').close() + this.$element('simplePanelPro6').close() }, //事件 showOne() { @@ -200,55 +200,55 @@ export default { }, // 渐变 showPanelA() { - this.$element('simplepanelA1').show() + this.$element('simplePanelA1').show() }, closePanelA() { - this.$element('simplepanelA1').close() + this.$element('simplePanelA1').close() }, showPanelB() { - this.$element('simplepanelB1').show() + this.$element('simplePanelB1').show() }, closePanelB() { - this.$element('simplepanelB1').close() + this.$element('simplePanelB1').close() }, showPanelC() { - this.$element('simplepanelC1').show() + this.$element('simplePanelC1').show() }, closePanelC() { - this.$element('simplepanelC1').close() + this.$element('simplePanelC1').close() }, showPanelD() { - this.$element('simplepanelD1').show() + this.$element('simplePanelD1').show() }, closePanelD() { - this.$element('simplepanelD1').close() + this.$element('simplePanelD1').close() }, // 动画 showPanelAni1() { - this.$element('simplepanelAni1').show() + this.$element('simplePanelAni1').show() }, closePanelAni1() { - this.$element('simplepanelAni1').close() + this.$element('simplePanelAni1').close() }, showPanelAni2() { - this.$element('simplepanelAni2').show() + this.$element('simplePanelAni2').show() }, closePanelAni2() { - this.$element('simplepanelAni2').close() + this.$element('simplePanelAni2').close() }, // 无障碍 showPanelNo() { - this.$element('simplepanelNo').show() + this.$element('simplePanelNo').show() }, closePanelNo() { - this.$element('simplepanelNo').close() + this.$element('simplePanelNo').close() }, // 多模输入 showPanelMore() { - this.$element('simplepanelMore').show() + this.$element('simplePanelMore').show() }, closePanelMore() { - this.$element('simplepanelMore').close() + this.$element('simplePanelMore').close() }, changeMode(e) { this.modeFlag = e.mode diff --git a/ace/ace_standard/src/main/js/default/pages/popup/index.css b/ace/ace_standard/src/main/js/default/pages/popup/index.css index 675d444d198bf07cf1123b1e25506aa6e5fc7545..894cd60e92e73bfb1b1027b355415450b2a4cf5c 100644 --- a/ace/ace_standard/src/main/js/default/pages/popup/index.css +++ b/ace/ace_standard/src/main/js/default/pages/popup/index.css @@ -336,18 +336,16 @@ } .access1{ - color: #321124; - stroke-width: 30px; - line-cap: square; + background-color: #321124; margin: 5px; + width: 90%; + height: 30px; } - - .multimode1{ - color: #978666; - stroke-width: 30px; - line-cap: square; + background-color: #978666; + width: 100%; + height: 30px; margin: 5px; } diff --git a/ace/ace_standard/src/main/js/default/pages/popup/index.hml b/ace/ace_standard/src/main/js/default/pages/popup/index.hml index c64130be80a9dfe90906ac37d087b4da51a6cbba..89769fbc243f3a6282ce576494250dce19793cbd 100644 --- a/ace/ace_standard/src/main/js/default/pages/popup/index.hml +++ b/ace/ace_standard/src/main/js/default/pages/popup/index.hml @@ -1,7 +1,7 @@
- +
- - 通用样式 - - - - popup通用样式1 - + + 通用样式 + - - popup通用样式2 - + + popup通用样式1 + - - popup通用样式3 - + + popup通用样式2 + - - popup通用样式4 - + + popup通用样式3 + -
- popup通用样式5 + popup通用样式4 - - popup通用样式6 + +
+ + popup通用样式5 + + + popup通用样式6 + +
+ + + popup特有样式
- - - popup特有样式 - -
- +
@@ -484,7 +476,7 @@
- +
通用属性 @@ -536,7 +528,7 @@
- +
通用事件 @@ -544,7 +536,7 @@ popup通用事件1 - + popup通用事件2 @@ -575,7 +567,7 @@ popup特有方法
- +
@@ -599,7 +591,6 @@ popup渐变样式4 -
@@ -607,10 +598,9 @@ 无障碍 - + popup无障碍1 -
@@ -618,10 +608,9 @@ 多模输入 - + popup多模输入1
- diff --git a/ace/ace_standard/src/main/js/default/pages/refresh/index.css b/ace/ace_standard/src/main/js/default/pages/refresh/index.css index 63a18685b74095d6693b08167bf7221d1f775b27..ceb56321ba8d4796bf7e30aa3584acc66d67194b 100644 --- a/ace/ace_standard/src/main/js/default/pages/refresh/index.css +++ b/ace/ace_standard/src/main/js/default/pages/refresh/index.css @@ -225,6 +225,7 @@ refresh{ } .style5{ + background: linear-gradient(pink,#fff000); width: 50%; margin-bottom: 5px; height: 40%; @@ -246,7 +247,8 @@ refresh{ 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; + background: linear-gradient(pink,#fff000); + border-image: url('common/images/image.png') 1px 2px 3px 4px 2px 3px 4px 5px 3px 4px 5px 6px round; } .style7 { @@ -259,6 +261,7 @@ refresh{ line-cap: round; height: 12%; background-color:darkorchid; + background: linear-gradient(gray,#fff000); progress-color:skyblue; } diff --git a/ace/ace_standard/src/main/js/default/pages/refresh/index.hml b/ace/ace_standard/src/main/js/default/pages/refresh/index.hml index bb1770a2cb843be18cf4111bd1c877f388ceb0cb..d43539af4aeeb3583d1d396cf033b7b28bf07349 100644 --- a/ace/ace_standard/src/main/js/default/pages/refresh/index.hml +++ b/ace/ace_standard/src/main/js/default/pages/refresh/index.hml @@ -28,13 +28,6 @@ offset="10px" refreshing="{{fresh}}" onrefresh="refresh"> - - -
- {{$item}} -
-
-
@@ -44,13 +37,6 @@ offset="10px" refreshing="{{fresh}}" onrefresh="refresh"> - - -
- {{$item}} -
-
-
@@ -60,13 +46,6 @@ offset="10px" refreshing="{{fresh}}" onrefresh="refresh"> - - -
- {{$item}} -
-
-
@@ -76,13 +55,6 @@ offset="10px" refreshing="{{fresh}}" onrefresh="refresh"> - - -
- {{$item}} -
-
-
@@ -93,25 +65,11 @@ offset="10px" refreshing="{{fresh}}" onrefresh="refresh"> - - -
- {{$item}} -
-
-
- - -
- {{$item}} -
-
-
@@ -121,13 +79,6 @@ offset="10px" refreshing="{{fresh}}" onrefresh="refresh"> - - -
- {{$item}} -
-
-
@@ -144,13 +95,6 @@ offset="10px" refreshing="{{fresh}}" onrefresh="refresh"> - - -
- {{$item}} -
-
-
@@ -160,13 +104,6 @@ offset="10px" refreshing="{{fresh}}" onrefresh="refresh"> - - -
- {{$item}} -
-
-
@@ -192,13 +129,6 @@ offset="10px" refreshing="{{fresh}}" onrefresh="refresh"> - - -
- {{$item}} -
-
-
@@ -214,13 +144,6 @@ offset="10px" refreshing="{{fresh}}" onrefresh="refresh"> - - -
- {{$item}} -
-
-
@@ -231,13 +154,6 @@ offset="10px" refreshing="{{fresh}}" onrefresh="refresh"> - - -
- {{$item}} -
-
-
@@ -248,16 +164,9 @@ type="auto" lasttime="true" friction="42" - timeoffset="10" + timeoffset="2px" refreshing="true" onrefresh="refresh"> - - -
- {{$item}} -
-
-
@@ -271,13 +180,6 @@ timeoffset="5px" refreshing="{{fresh}}" onrefresh="refresh"> - - -
- {{$item}} -
-
-
@@ -298,13 +200,6 @@ timeoffset="5px" refreshing="{{fresh}}" onrefresh="refresh"> - - -
- {{$item}} -
-
-
@@ -318,13 +213,6 @@ timeoffset="5px" refreshing="{{fresh}}" onrefresh="refresh"> - - -
- {{$item}} -
-
-
@@ -338,13 +226,6 @@ timeoffset="5px" refreshing="{{fresh}}" onrefresh="refresh"> - - -
- {{$item}} -
-
-
@@ -358,13 +239,6 @@ timeoffset="5px" refreshing="{{fresh}}" onrefresh="refresh"> - - -
- {{$item}} -
-
-
@@ -378,6 +252,7 @@ refresh通用方法1 - - -
- {{$item}} -
-
-
@@ -412,13 +280,6 @@ offset="10px" refreshing="{{fresh}}" onrefresh="refresh"> - - -
- {{$item}} -
-
-
@@ -428,13 +289,6 @@ offset="10px" refreshing="{{fresh}}" onrefresh="refresh"> - - -
- {{$item}} -
-
-
@@ -444,13 +298,6 @@ offset="10px" refreshing="{{fresh}}" onrefresh="refresh"> - - -
- {{$item}} -
-
-
@@ -460,13 +307,6 @@ offset="10px" refreshing="{{fresh}}" onrefresh="refresh"> - - -
- {{$item}} -
-
-
@@ -488,13 +328,6 @@ offset="10px" refreshing="{{fresh}}" onrefresh="refresh"> - - -
- {{$item}} -
-
-
@@ -512,37 +345,16 @@ offset="10px" refreshing="{{fresh}}" onrefresh="refresh"> - - -
- {{$item}} -
-
-
- - -
- {{$item}} -
-
-
- - -
- {{$item}} -
-
-
@@ -553,37 +365,16 @@ offset="10px" refreshing="{{fresh}}" onrefresh="refresh"> - - -
- {{$item}} -
-
-
- - -
- {{$item}} -
-
-
- - -
- {{$item}} -
-
-
@@ -594,37 +385,16 @@ offset="10px" refreshing="{{fresh}}" onrefresh="refresh"> - - -
- {{$item}} -
-
-
- - -
- {{$item}} -
-
-
- - -
- {{$item}} -
-
-
@@ -637,16 +407,13 @@ refresh多模输入1 - - -
- {{$item}} -
-
-
diff --git a/ace/ace_standard/src/main/js/default/pages/refresh/index.js b/ace/ace_standard/src/main/js/default/pages/refresh/index.js index 7e0e7af8a7228b44f2ebe9d2f7b8c482305bba1d..1c1440bd6200ed54715b6846a20b205dd6e9714d 100644 --- a/ace/ace_standard/src/main/js/default/pages/refresh/index.js +++ b/ace/ace_standard/src/main/js/default/pages/refresh/index.js @@ -1,88 +1,5 @@ -/** - * 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 { data: { list:[], @@ -437,6 +354,74 @@ export default { functionTest3(event){ var function3 = this.$element('function3'); + var options = { + duration: 1500, + easing: 'friction', + delay: 100, + fill: 'forwards', + iterations: 2, + direction: 'normal', + }; + var frames = [ + { + transform: { + translate: '-120px', + rotate:'10deg', + scale:0.2, + skew:'40deg' + }, + opacity: 0.1, + offset: 0.0, + width: '40%', + height:'20px', + backgroundColor:'#ff0000', + backgroundPosition:'10px 20px', + transformOrigin:'left top' + }, + { + transform: { + translateX: '0px', + translateY: '5px', + rotateX:'10deg', + rotateY:'10deg', + scaleX:0.5, + scaleY:0.7, + skewX:'22deg', + skewY:'30deg' + }, + opacity: 0.6, + offset: 2.0, + width: '60%', + height:'30px', + backgroundColor:'#ff00ff', + backgroundPosition:'15px 25px', + transformOrigin:'center top' + }, + { + transform: { + translateX: '100px', + translateY: '0px', + translateZ: '20px', + rotateX:'0deg', + rotateY:'0deg', + rotateZ:'30deg', + scaleX:1, + scaleY:1, + scaleZ:2, + skewX:'0', + skewY:'0', + skewZ:'30deg' + }, + opacity: 1, + offset: 0.0, + width: '100%', + height:'30px', + backgroundColor:'#ffff00', + backgroundPosition:'0px', + transformOrigin:'center center' + }, + ]; + var animation = function3.animate(frames, options); animation.play() animation.onfinish = function(){ diff --git a/ace/ace_standard/src/main/js/default/pages/stack/index.css b/ace/ace_standard/src/main/js/default/pages/stack/index.css index 94aa797bf0ca36f0626f32c90e24460d800698ee..e55486788bda84804ae43efa5be250815816a8a8 100644 --- a/ace/ace_standard/src/main/js/default/pages/stack/index.css +++ b/ace/ace_standard/src/main/js/default/pages/stack/index.css @@ -1,406 +1,361 @@ +/** + * 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. + */ -.back-child { - width: 100%; - height: 100%; - background-color: #3f56ea; -} -.front-child { - width: 50%; - height: 50%; - background-color: #00bfc9; -} -.positioned-child { - width: 50%; - height: 50%; - left: 30%; - top: 20%; - background-color: #47cc47; -} -.bd-radius { - border-radius: 16px; -} - -/* xxx.css */ .container { - flex-direction:row; - width:100%; - height:100%; - padding: 1px; + flex-direction:row; + width:100%; + height:100%; + padding: 1px; } .sub-container{ - flex-direction: column; - height: 100%; - flex-weight: 1; + flex-direction: column; + height: 100%; + flex-weight: 1; } .style-container{ - flex-direction: column; - height: 70%; -} -.contain1{ - width: 100%; - height: 15%; - flex-direction: column; -} - -.event-container{ - flex-direction: column; - height: 45%; -} - -.prop-container{ - flex-direction: column; - padding-left: 2px; -} - -.ani-container{ - flex-direction: column; - height: 100%; - flex-weight: 1; -} - -.gradient-container{ - flex-direction: column; - height: 40%; -} - -.function-container{ - flex-direction: column; - height: 35%; -} - -.access-container{ - flex-direction: column; - height: 20%; -} - -.atom-container{ - flex-direction: column; - height: 60%; -} - -.multimode-container{ - flex-direction: column; + flex-direction: column; + height: 70%; } .title{ - width: 100%; - font-size: 18px; - margin: 2px; - font-weight: bold; - text-align: center; + width: 100%; + font-size: 18px; + margin: 2px; + padding: 2px; + font-weight: bold; + text-align: center; } + .sub-title{ - width: 100%; - height: 25px; - font-size: 15px; - text-align: left; - margin-bottom: 1px; - padding: 2px; + width: 100%; + font-size: 14px; + text-align: left; + margin: 2px; + padding: 2px; } .style1{ - width: 100%; - mask-color:red; - height: 100%; - min-width: 25px; - min-height: 10px; - max-width: 300px; - max-height: 50px; - padding-left: 10px; - padding-top: 1px; - padding-right: 15px; - padding-bottom: 1px; - margin-left: 10px; - margin-top: 0px; - 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; + width: 100%; + height: 100%; + min-width: 25px; + min-height: 10px; + max-width: 300px; + max-height: 50px; + padding-left: 10px; + padding-top: 20px; + padding-right: 15px; + padding-bottom: 5px; + margin-left: 10px; + margin-top: 20px; + margin-right: 15px; + margin-bottom: 5px; + border-left-style: solid; + border-right-style: dashed; + border-top-style: dashed; + border-bottom-style: dotted; + border-left-width: 1px; + border-right-width: 2px; + border-top-width: 2px; + border-bottom-width: 1px; + border-left-color: #ff0000; + border-right-color: #00ff00; + border-top-color: #0000ff; + border-bottom-color: #fff000; + border-bottom-left-radius: 10px; + border-bottom-right-radius: 15px; + border-top-left-radius: 8px; + border-top-right-radius: 12px; + background: linear-gradient(pink,#fff000); + box-shadow: 2px 4px 6px 8px #888888; + opacity: 0.5; + display: flex; + visibility: visible; + align-self: center; + image-fill: #000fff; + clip-path: margin-box; } .style2{ - width: 70%; - height: 12%; - 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; - + width: 50px; + height: 20px; + padding-start: 10px; + padding-end: 15px; + margin-start: 5px; + margin-end: 10px; + border-style: dotted; + border-width: 2px; + border-color:#000000; + border-radius:5px; + background-color:#ffaa00; + mask-image: url('common/images/icon.png'); + mask-size: cover; + mask-position: center; } .style3{ - width: 100%; - padding: 10px; - margin: 5px; - border-left: 1px solid #000000; - border-right: 2px dashed #00ff00; - border-top: 1.5px dotted #0000ff; - border-bottom: 2.5px dotted #fff000; - background-image:url('common/images/image.png'); - background-size:cover; - background-repeat: repeat-x; - background-position: center; - flex:1; - flex-grow: 2; - flex-basis: 10px; - flex-shrink: 1; + width: 100%; + padding: 10px; + margin: 5px; + border-left: 1px solid #000000; + border-right: 2px dashed #00ff00; + border-top: 1.5px dotted #0000ff; + border-bottom: 2.5px dotted #fff000; + background-image:url('common/images/image.png'); + background-size:cover; + background-repeat: repeat-x; + background-position: center; + flex:1; + flex-grow: 2; + flex-basis: 10px; + flex-shrink: 1; } .style4{ - width: 60%; - height: 5%; - padding: 1px; - margin: 5px; - border: 2px solid #000000; + width: 60%; + height: 5%; + padding: 10px; + margin: 5px; + border: 2px solid #000000; +} + +.contain1{ + width: 100%; + height: 70px; + flex-direction: column; } .style5{ - width: 50%; - height: 30px; - background-color: yellow; - border-image-source: url('/common/images/image.png'); - border-image-slice: 1px 2px 3px 4px; - border-image-width: 2px 3px 4px 5px; - border-image-outset: 3px 4px 5px 6px; - border-image-repeat: repeat; + 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 { - height: 40px; - margin-bottom: 5px; - margin-top: 5px; - color: green; - stroke-width: 20px; - mask-color:lightblue; - line-cap: round; -} - -.pstyle { - height: 10%; - margin-bottom: 1px; - margin-top: 1px; - color: green; - stroke-width: 20px; - mask-color:lightblue; - line-cap: round; + 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; } +.event-container{ + flex-direction: column; + flex-weight: 1; +} .event1{ - width: 60%; - flex-weight: 1; - background-color: salmon; + width: 60%; + flex-weight: 1; + background-color: yellow; } .event2{ - width: 70%; - flex-weight: 1; - background-color: darkorchid; + width: 70%; + flex-weight: 1; + background-color: red; } .event3{ - width: 80%; - flex-weight: 1; - background-color: #ad4e2a; + width: 80%; + flex-weight: 1; + background-color: #ad4e2a; } .event4{ - flex-direction: row; - width: 90%; - flex-weight: 1; - overflow:scroll; + flex-direction: row; + width: 90%; + flex-weight: 1; + overflow:scroll; } .event5{ - flex-direction: column; - width: 100%; - height: 90px; - overflow:scroll; + flex-direction: column; + width: 100%; + height: 90px; + overflow:scroll; +} + +.prop-container{ + flex-direction: column; } #prop1 { - height: 50px; - color: #ad4e2a; - stroke-width: 10px; - line-cap: square; - margin: 5px; + height: 30px; + background-color: mediumslateblue; + width: 100%; + margin: 5px; } .prop2 { - height: 50px; - color: #343524; - stroke-width: 15px; - line-cap: round; - margin: 5px; + height: 30px; + background-color: pink; + width: 100%; + margin: 5px; } -.prop4 { - color: #456345; - stroke-width: 25px; - line-cap: round; - margin: 5px; +.prop3 { + height: 30px; + background-color: darkseagreen; + width: 100%; + margin: 5px; } -.prop5 { - color: #831834; - stroke-width: 40px; - line-cap: square; - margin: 5px; - height: 70px; +.ani-container{ + flex-direction: column; + height: 100%; + flex-weight: 1; } .ani1{ - color: #72ac33; - stroke-width: 55px; - line-cap: square; - margin: 5px; - transform-origin: 0% 0%; - animation: ani1Go 3s infinite; + 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) 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) - } + 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: 100%; - height: 55px; - margin: 5px; + background-color: #ad4e2a; + width: 55px; + height: 55px; + margin: 5px; +} + +.gradient-container{ + flex-direction: column; } .gradient1{ - stroke-width: 30px; - line-cap: square; - margin: 5px; - background: linear-gradient(red, #00ff00); + width: 100%; + height: 20px; + margin: 5px; + background: linear-gradient(red, #00ff00); } .gradient2{ - stroke-width: 30px; - line-cap: square; - margin: 5px; - background: linear-gradient(45deg, rgb(255,0,0),rgb(0, 255, 0)); + width: 100%; + height: 20px; + margin: 5px; + background: linear-gradient(45deg, rgb(255,0,0),rgb(0, 255, 0)); } .gradient3{ - stroke-width: 30px; - line-cap: square; - margin: 5px; - background: linear-gradient(to right, rgb(255,0,0) 90px, rgb(0, 255, 0) 60%); + width: 100%; + height: 20px; + margin: 5px; + background: linear-gradient(to right, rgb(255,0,0) 90px, rgb(0, 255, 0) 60%); } .gradient4{ - stroke-width: 30px; - line-cap: square; - margin: 5px; - background: repeating-linear-gradient(to right, rgba(255, 255, 0, 1) 30px,rgba(0, 0, 255, .5) 60px); + 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{ - color: #321124; - stroke-width: 30px; - line-cap: square; - margin: 5px; + background-color: #321124; + margin: 5px; + width: 90%; + height: 30px; } -.multimode1{ - color: #978666; - stroke-width: 30px; - line-cap: square; - margin: 5px; +.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: 30px; + background-color: #ff0000; + width: 60%; + height: 20px; } .function2{ - background-color: #00ff00; - width: 60%; - height: 30px; + background-color: #00ff00; + width: 60%; + height: 20px; } .function3{ - background-color: #0000ff; - width: 100%; - height: 30px; + background-color: #0000ff; + width: 100%; + height: 20px; } -.function4 { - flex-direction: row; - width: 60%; - height: 60px; - overflow: scroll; -} +.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/stack/index.hml b/ace/ace_standard/src/main/js/default/pages/stack/index.hml index 4ff6d2157b41228dedb4ad910e980f9d0191df4d..702921f0cbe6871f4f0adcbe740f05155700b803 100644 --- a/ace/ace_standard/src/main/js/default/pages/stack/index.hml +++ b/ace/ace_standard/src/main/js/default/pages/stack/index.hml @@ -1,5 +1,5 @@
通用样式 @@ -24,94 +23,55 @@ stack通用样式1 -
-
-
- stack通用样式2 -
-
-
- - + stack通用样式3 -
-
-
- stack通用样式4 -
-
-
- stack通用样式5
-
-
-
-
-
-
- - stack特有样式 - - -
-
-
-
-
- - 动画样式 - - - stack动画样式1 - - -
-
-
-
- - - stack动画样式2 - - -
-
-
-
-
+ + 动画样式 + + + stack动画样式1 + + + + + stack动画样式2 + + + +
-
通用属性 @@ -119,63 +79,27 @@ stack通用属性1 - -
-
-
+ - stack通用属性2 - -
-
-
+ - stack通用属性3 - -
-
-
-
- - - stack特有属性4 - - -
-
-
-
- - - stack特有属性5 - - -
-
-
+
-
通用事件 @@ -183,68 +107,30 @@ stack通用事件1 - -
-
-
+ - stack通用事件2 - -
-
-
+ - stack通用事件3 - -
-
-
+ - - stack通用事件4 - - -
-
-
-
-
通用方法 @@ -252,34 +138,17 @@ stack通用方法1 - -
-
-
+ - stack通用方法2 - -
-
-
+ - stack通用方法3 - -
-
-
+
@@ -288,7 +157,6 @@
-
渐变样式 @@ -296,43 +164,26 @@ stack渐变样式1 - -
-
-
+ - stack渐变样式2 - -
-
-
+ - stack渐变样式3 - -
-
-
+ - stack渐变样式4 - -
-
-
+ -
-
无障碍 @@ -340,20 +191,14 @@ stack无障碍1 - -
-
-
+ -
-
原子布局 @@ -362,81 +207,48 @@ stack原子布局1
- -
-
-
+ - -
-
-
+ - -
-
-
+
stack原子布局2
- -
-
-
+ - -
-
-
+ - -
-
-
+
stack原子布局3 -
- -
-
-
+
+ - -
-
-
+ - -
-
-
+
-
+
多模输入 stack多模输入1 - -
-
-
+
- - - - diff --git a/ace/ace_standard/src/main/js/default/pages/stack/index.js b/ace/ace_standard/src/main/js/default/pages/stack/index.js index 99233175ad0be405c922d8b5e3ae063aedf78b8b..e0f4eb3c6ac35f5a12cd0fcec52b5da74601f311 100644 --- a/ace/ace_standard/src/main/js/default/pages/stack/index.js +++ b/ace/ace_standard/src/main/js/default/pages/stack/index.js @@ -84,6 +84,7 @@ var frames = [ ]; export default { + onShow(){ // 通用属性 var prop1 = this.$element('prop1'); @@ -410,6 +411,7 @@ export default { functionTest3(event){ var function3 = this.$element('function3'); + var animation = function3.animate(frames, options); animation.play() animation.onfinish = function(){ @@ -484,4 +486,4 @@ export default { message: 'reachBottom' }); } -} \ No newline at end of file +} diff --git a/ace/ace_standard/src/main/js/default/pages/stepper/index.hml b/ace/ace_standard/src/main/js/default/pages/stepper/index.hml index 60c093bbada29705a92eb813f0d55bedc16cf825..445aa7679a0bcc2c032f4cd4f012113a683e6abf 100644 --- a/ace/ace_standard/src/main/js/default/pages/stepper/index.hml +++ b/ace/ace_standard/src/main/js/default/pages/stepper/index.hml @@ -22,7 +22,7 @@ stepper通用样式1 - +
First @@ -46,7 +46,7 @@ stepper通用样式2 - +
First @@ -70,7 +70,7 @@ stepper通用样式3 - +
First @@ -94,7 +94,7 @@ stepper通用样式4 - +
First @@ -118,7 +118,7 @@ stepper通用样式5
- +
First @@ -138,7 +138,7 @@ - +
First @@ -162,7 +162,7 @@ stepper特有样式 - +
First @@ -194,7 +194,7 @@ stepper动画样式1 @@ -222,7 +222,7 @@ stepper动画样式2 @@ -290,7 +290,7 @@ stepper通用属性2 - @@ -341,7 +341,7 @@ stepper特有属性4 - +
First @@ -373,7 +373,7 @@ stepper通用事件1 @@ -520,7 +520,7 @@ @@ -598,7 +598,7 @@ stepper渐变样式2 @@ -626,7 +626,7 @@ stepper渐变样式3 @@ -654,7 +654,7 @@ stepper渐变样式4 @@ -694,7 +694,7 @@ accessibilitytext="这是div" accessibilitydescription="点击此按键会弹出一个对话框" accessibilityimportance="no-hide-descendants" - id="mystepper" + id="access1" index="0" onnext="next" onback="back"> @@ -731,7 +731,7 @@
@@ -755,7 +755,7 @@ @@ -779,7 +779,7 @@ @@ -809,7 +809,7 @@
@@ -833,7 +833,7 @@ @@ -857,7 +857,7 @@ @@ -886,7 +886,7 @@
@@ -910,7 +910,7 @@ @@ -934,7 +934,7 @@ @@ -968,7 +968,7 @@ stepper多模输入1 diff --git a/ace/ace_standard/src/main/js/default/pages/stepper/index.js b/ace/ace_standard/src/main/js/default/pages/stepper/index.js index 73fe1715c7af019abc40f42484527eea5ad5c5a1..58095131b767d33d087606729d22f908b14dc51d 100644 --- a/ace/ace_standard/src/main/js/default/pages/stepper/index.js +++ b/ace/ace_standard/src/main/js/default/pages/stepper/index.js @@ -106,10 +106,39 @@ export default { }, setRightButton(e) { this.$element('mystepper').setNextButtonStatus({status: 'skip', label: 'SKIP'}); + this.$element('style1').setNextButtonStatus({status: 'skip', label: 'SKIP'}); + this.$element('style2').setNextButtonStatus({status: 'skip', label: 'SKIP'}); + this.$element('style2').setNextButtonStatus({status: 'skip', label: 'SKIP'}); + this.$element('style3').setNextButtonStatus({status: 'skip', label: 'SKIP'}); + this.$element('style4').setNextButtonStatus({status: 'skip', label: 'SKIP'}); + this.$element('style5').setNextButtonStatus({status: 'skip', label: 'SKIP'}); + this.$element('style6').setNextButtonStatus({status: 'skip', label: 'SKIP'}); + this.$element('style7').setNextButtonStatus({status: 'skip', label: 'SKIP'}); + this.$element('ani1').setNextButtonStatus({status: 'skip', label: 'SKIP'}); + this.$element('ani2').setNextButtonStatus({status: 'skip', label: 'SKIP'}); this.$element('prop1').setNextButtonStatus({status: 'skip', label: 'SKIP'}); this.$element('prop2').setNextButtonStatus({status: 'skip', label: 'SKIP'}); - this.$element('mystepper1').setNextButtonStatus({status: 'skip', label: 'SKIP'}); - this.$element('mystepper2').setNextButtonStatus({status: 'skip', label: 'SKIP'}); + this.$element('prop3').setNextButtonStatus({status: 'skip', label: 'SKIP'}); + this.$element('prop4').setNextButtonStatus({status: 'skip', label: 'SKIP'}); + this.$element('event1').setNextButtonStatus({status: 'skip', label: 'SKIP'}); + this.$element('event2').setNextButtonStatus({status: 'skip', label: 'SKIP'}); + this.$element('function1').setNextButtonStatus({status: 'skip', label: 'SKIP'}); + this.$element('function2').setNextButtonStatus({status: 'skip', label: 'SKIP'}); + this.$element('gradient1').setNextButtonStatus({status: 'skip', label: 'SKIP'}); + this.$element('gradient2').setNextButtonStatus({status: 'skip', label: 'SKIP'}); + this.$element('gradient3').setNextButtonStatus({status: 'skip', label: 'SKIP'}); + this.$element('gradient4').setNextButtonStatus({status: 'skip', label: 'SKIP'}); + this.$element('access1').setNextButtonStatus({status: 'skip', label: 'SKIP'}); + this.$element('ato1').setNextButtonStatus({status: 'skip', label: 'SKIP'}); + this.$element('ato2').setNextButtonStatus({status: 'skip', label: 'SKIP'}); + this.$element('ato3').setNextButtonStatus({status: 'skip', label: 'SKIP'}); + this.$element('atom1').setNextButtonStatus({status: 'skip', label: 'SKIP'}); + this.$element('atom2').setNextButtonStatus({status: 'skip', label: 'SKIP'}); + this.$element('atom3').setNextButtonStatus({status: 'skip', label: 'SKIP'}); + this.$element('atomA1').setNextButtonStatus({status: 'skip', label: 'SKIP'}); + this.$element('atomA2').setNextButtonStatus({status: 'skip', label: 'SKIP'}); + this.$element('atomA3').setNextButtonStatus({status: 'skip', label: 'SKIP'}); + this.$element('mul1').setNextButtonStatus({status: 'skip', label: 'SKIP'}); }, next(e) { var index = { @@ -447,7 +476,7 @@ export default { }, functionTest1(event){ - var function1 = this.$element('mystepper1'); + var function1 = this.$element('function1'); function1.focus(true) var rect = function1.getBoundingClientRect(); var width = rect.width; @@ -462,7 +491,7 @@ export default { }, functionTest2(event){ - var function2 = this.$element('mystepper2'); + var function2 = this.$element('function2'); let observer = function2.createIntersectionObserver({ ratios: [0.2, 0], // number }); diff --git a/ace/ace_standard/src/main/js/default/pages/tab-bar/index.css b/ace/ace_standard/src/main/js/default/pages/tab-bar/index.css new file mode 100644 index 0000000000000000000000000000000000000000..d9879947b50cc371672b207e6e6e14d7ce3e06f2 --- /dev/null +++ b/ace/ace_standard/src/main/js/default/pages/tab-bar/index.css @@ -0,0 +1,443 @@ +/** + * 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 */ +.tabs { + width: 100%; + height: 40px; +} +.tabcontent { + width: 100%; + height: 20%; + justify-content: center; +} +.item-content { + height: 100%; + justify-content: center; +} +.item-title { + font-size: 12px; +} +.tab-bar { + margin: 1px; + width: 100%; + height: 60%; + border-color: #007dff; + border-width: 1px; +} +.tab-text { + font-size: 9px; + width: 100%; + text-align: center; +} + +.container { + flex-direction:row; + width:100%; + height:100%; + padding: 1px; +} + +.sub-container{ + flex-direction: column; + height: 100%; + flex-weight: 1; +} + +.style-container{ + flex-direction: column; + height: 70%; +} +.contain1{ + width: 100%; + height: 20%; + flex-direction: column; +} +.ani-container{ + flex-direction: column; + height: 100%; + flex-weight: 1; +} + +.prop-container{ + height: 70%; + flex-direction: column; + padding-left: 2px; +} + +.event-container{ + flex-direction: column; + height: 40%; +} + +.function-container{ + flex-direction: column; + height: 30%; +} + +.gradient-container{ + flex-direction: column; + height: 40%; +} + +.access-container{ + flex-direction: column; + height: 20%; +} + +.atom-container{ + flex-direction: column; + height: 60%; +} + +.multimode-container{ + flex-direction: column; +} + +.title{ + width: 100%; + font-size: 18px; + margin: 2px; + font-weight: bold; + text-align: center; +} + +.sub-title{ + width: 100%; + font-size: 13px; + text-align: center; + margin-top: 1px; +} + +.style1{ + width: 100%; + height: 40px; + min-width: 25px; + min-height: 10px; + max-width: 300px; + max-height: 60px; + padding-left: 1px; + padding-top: 1px; + padding-right: 1px; + padding-bottom: 1px; + margin-left: 1px; + margin-top: 1px; + margin-right: 1px; + margin-bottom: 1px; + border-left-style: solid; + border-right-style: dashed; + border-top-style: dashed; + border-bottom-style: dotted; + border-left-width: 1px; + border-right-width: 2px; + border-top-width: 2px; + border-bottom-width: 1px; + border-left-color: #ff0000; + border-right-color: #00ff00; + border-top-color: #0000ff; + border-bottom-color: #fff000; + border-bottom-left-radius: 10px; + border-bottom-right-radius: 15px; + border-top-left-radius: 8px; + border-top-right-radius: 12px; + background: linear-gradient(pink,#fff000); + box-shadow: 2px 4px 6px 8px #888888; + opacity: 0.5; + display: flex; + visibility: visible; + align-self: center; + image-fill: #000fff; + clip-path: margin-box; +} + +.style2{ + width: 100%; + height: 40px; + padding-start: 1px; + padding-end: 1px; + margin-start: 2px; + margin-end: 1px; + border-style: dotted; + border-width: 2px; + border-color:#000000; + border-radius:5px; + background-color:#ffaa00; + mask-image: url('common/images/icon.png'); + mask-size: cover; + mask-position: center; +} + +.style3{ + width: 100%; + padding-top: 30%; + padding-left: 10%; + padding-right: 10%; + padding-bottom: 30%; + margin: 1px; + border-left: 1px solid #000000; + border-right: 2px dashed #00ff00; + border-top: 1.5px dotted #0000ff; + border-bottom: 2.5px dotted #fff000; + background-image:url('common/images/image.png'); + background-size:cover; + background-repeat: repeat-x; + background-position: center; + flex:1; + flex-grow: 2; + flex-basis: 10px; + flex-shrink: 1; +} + +.style4{ + width: 100%; + height: 40px; + padding: 1px; + margin: 2px; + border: 2px solid #000000; +} + +.style5{ + width: 100%; + height: 60px; + background-color: yellow; + border-image-source: url('/common/images/image.png'); + border-image-slice: 1px 2px 3px 4px; + border-image-width: 2px 3px 4px 5px; + border-image-outset: 3px 4px 5px 6px; + border-image-repeat: repeat; +} + +.style6{ + width: 100%; + height: 60px; + position: absolute; + left: -57; + top: 15px; + bottom: 5px; + right: 2px; + background-color: pink; + border-image: url('common/images/image.png') 1px 2px 3px 4px 2px 3px 4px 5px 3px 4px 5px 6px round; +} + +.barStyle6{ + width: 100%; + height: 35%; + background-color: pink; + border-image: url('common/images/image.png') 1px 2px 3px 4px 2px 3px 4px 5px 3px 4px 5px 6px round; +} + +.style7 { + width: 100%; + height: 60px; + margin-bottom: 2px; + margin-top: 2px; + color: green; + stroke-width: 40px; + line-cap: round; +} + +.tstyle { + width: 100%; + height: 30px; + margin-bottom: 2px; + margin-top: 2px; + color: green; + stroke-width: 40px; + line-cap: round; +} + +.barStyle7{ + width: 100%; + height: 60px; + margin-bottom: 2px; + margin-top: 6px; + color: green; +} + +.event1{ + width: 100%; + height: 40px; + background-color: salmon; +} + +.event2{ + width: 100%; + height: 40px; + background-color: darkorchid; +} + +.event3{ + width: 100%; + height: 40px; + background-color: #ad4e2a; +} + +.event4{ + flex-direction: row; + width: 100%; + height: 40px; + overflow:scroll; +} + +.event5{ + flex-direction: column; + width: 100%; + height: 90px; + overflow:scroll; +} + +#prop1 { + color: #ad4e2a; + width: 100%; + height: 40px; + margin: 1px; + border-color: #007dff; + border-width: 1px; +} + +.prop2 { + color: #343524; + stroke-width: 15px; + line-cap: round; + margin: 5px; +} + +.prop4 { + color: #456345; + stroke-width: 25px; + line-cap: round; + margin: 5px; +} + +.prop5 { + color: #831834; + stroke-width: 40px; + line-cap: square; + margin: 5px; + height: 70px; +} + + +.ani1{ + color: #72ac33; + stroke-width: 55px; + line-cap: square; + margin: 5px; + transform-origin: 0% 0%; + animation: ani1Go 3s infinite; +} + +@keyframes ani1Go +{ + from { + background-color: #f76160; + opacity:0.3; + width:50px; + height: 50px; + transform:translate(20px) rotate(10deg) scale(0.2) skew(40deg); + background-position:10% 10% + } + 30% { + background-color: #60f761; + opacity:0.5; + width:70px; + height: 70px; + background-position:12% 12%; + transform:translateX(10px) translateY(5px) rotateX(20deg) rotateY(25deg) scaleX(0.6) scaleY(0.5) skewX(25deg) skewY(15deg) + } + to { + background-color: #6160f7; + opacity:1; + width:90px; + height: 90px; + background-position:22% 22%; + transform:rotate(180deg) scale(2) + } +} + +.ani2{ + background-color: #ad4e2a; + width: 100%; + height: 55px; + margin: 5px; +} + +.gradient1{ + stroke-width: 30px; + line-cap: square; + margin: 5px; + background: linear-gradient(red, #00ff00); +} + +.gradient2{ + stroke-width: 30px; + line-cap: square; + margin: 5px; + background: linear-gradient(45deg, rgb(255,0,0),rgb(0, 255, 0)); +} + +.gradient3{ + stroke-width: 30px; + line-cap: square; + margin: 5px; + background: linear-gradient(to right, rgb(255,0,0) 90px, rgb(0, 255, 0) 60%); +} + +.gradient4{ + stroke-width: 30px; + line-cap: square; + margin: 5px; + background: repeating-linear-gradient(to right, rgba(255, 255, 0, 1) 30px,rgba(0, 0, 255, .5) 60px); +} + +.access1{ + color: #321124; + stroke-width: 30px; + line-cap: square; + margin: 5px; +} + +.multimode1{ + color: #978666; + stroke-width: 30px; + line-cap: square; + margin: 5px; +} + + +.function1{ + background-color: #ff0000; + width: 60%; + height: 30px; +} + +.function2{ + background-color: #00ff00; + width: 60%; + height: 30px; +} + +.function3{ + background-color: #0000ff; + width: 100%; + height: 30px; +} + +.function4 { + flex-direction: row; + width: 60%; + height: 60px; + overflow: scroll; +} \ No newline at end of file diff --git a/ace/ace_standard/src/main/js/default/pages/tab-bar/index.hml b/ace/ace_standard/src/main/js/default/pages/tab-bar/index.hml new file mode 100644 index 0000000000000000000000000000000000000000..18b85e016b365d2abce7a49b46379073e8dce0ff --- /dev/null +++ b/ace/ace_standard/src/main/js/default/pages/tab-bar/index.hml @@ -0,0 +1,580 @@ + + +
+
+ +
+ + 通用样式 + + + tabs通用样式1 + + + + Home + Index + + + + + tabs通用样式2 + + + + Home + Index + + + + + tabs通用样式3 + + + + Home + Index + + + + + tabs通用样式4 + + + + Home + Index + + + + + tabs通用样式5 + +
+ + + Home + Index + + + + + Home + Index + + +
+ + tabs特有样式 + + + + Home + Index + + +
+ + + +
+ + 动画样式 + + + tabs动画样式1 + + + + Home + Index + + + + + tabs动画样式2 + + + + Home + Index + + + +
+
+ +
+
+ +
+ +
+ + 通用属性 + + + tabs通用属性1 + + + + Home + Index + + + + + tabs通用属性2 + + + + Home + Index + + + + + tabs通用属性3 + + + + Home + Index + + + + + tabs特有属性4 + + + + Home + Index + + + + + tabs特有属性5 + + + + Home + Index + + +
+
+
+ +
+ + 通用事件 + + + tabs通用事件1 + + + + Home + Index + + + + + tabs通用事件2 + + + + Home + Index + + + + tabs通用事件3 + + + + Home + Index + + + +
+
+
+ +
+ + 通用方法 + + + tabs通用方法1 + + + + Home + Index + + + + + tab-bar通用方法2 + + + + Home + Index + + + + + tabs通用方法3 + + + + Home + Index + + +
+ +
+ +
+
+ +
+ +
+ + 渐变样式 + + + tabs渐变样式1 + + + + Home + Index + + + + + tabs渐变样式2 + + + + Home + Index + + + + + tabs渐变样式3 + + + + Home + Index + + + + + tabs渐变样式4 + + + + Home + Index + + + +
+
+
+ +
+ + 无障碍 + + + tabs无障碍1 + + + + Home + Index + + +
+
+
+ +
+ + 原子布局 + + + tabs原子布局1 + +
+ + + Home + Index + + + + + Home + Index + + + + + Home + Index + + + +
+ + tabs原子布局2 + +
+ + + Home + Index + + + + + Home + Index + + + + + Home + Index + + +
+ + tabs原子布局3 + +
+ + + Home + Index + + + + + Home + Index + + + + + Home + Index + + +
+
+
+
+ + 多模输入 + + + tabs多模输入1 + + + + Home + Index + + + +
+
+
+
diff --git a/ace/ace_standard/src/main/js/default/pages/tab-bar/index.js b/ace/ace_standard/src/main/js/default/pages/tab-bar/index.js new file mode 100644 index 0000000000000000000000000000000000000000..4bd702c40097d26363cf66834eb5835317a9b058 --- /dev/null +++ b/ace/ace_standard/src/main/js/default/pages/tab-bar/index.js @@ -0,0 +1,492 @@ +/** + * 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 { + change: function(e) { + console.log("Tab index: " + e.index); + }, + + onShow(){ + // 通用属性 + var prop1 = this.$element('prop1'); + var name1 = prop1.dataSet.name + var prop2 = this.$refs.prop2; + var name2 = prop2.dataSet.name + prompt.showToast({ + message: 'prop1--' + name1 + '\nprop2--' + name2 + }); + }, + + touchStart(event){ + var globalX = event.touches[0].globalX + var globalY = event.touches[0].globalY + var localX = event.touches[0].localX + var localY = event.touches[0].localY + var size = event.touches[0].size + var force = event.touches[0].force + var changeGlobalX = event.changedTouches[0].globalX + var changeGlobalY = event.changedTouches[0].globalY + var changeLocalX = event.changedTouches[0].localX + var changeLocalY = event.changedTouches[0].localY + var changeSize = event.changedTouches[0].size + var changeForce = event.changedTouches[0].force + var message = 'globalX--' + globalX + ',globalY--' + globalY + + ',localX--' + localX + ',localY--' + localY + ',size--' + size + ',force--' + force + + ',changeGlobalX--' + changeGlobalX + ',changeGlobalY--' + changeGlobalY + + ',changeLocalX--' + changeLocalX + ',changeLocalY--' + changeLocalY + + ',changeSize--' + changeSize + ',changeForce--' + changeForce; + prompt.showToast({ + message: 'touchstart:\n' + message + }); + }, + + touchMove(event){ + var globalX = event.touches[0].globalX + 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' + }); + } + +} \ No newline at end of file diff --git a/ace/ace_standard/src/main/js/default/pages/tab-content/index.css b/ace/ace_standard/src/main/js/default/pages/tab-content/index.css new file mode 100644 index 0000000000000000000000000000000000000000..f6bccdaa3abd6ea7ed3c76790db4c9307156e1a6 --- /dev/null +++ b/ace/ace_standard/src/main/js/default/pages/tab-content/index.css @@ -0,0 +1,420 @@ +/** + * 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 */ +.tabs { + width: 100%; + height: 40px; +} +.tabcontent { + width: 100%; + height: 28%; + justify-content: center; +} +.item-content { + height: 100%; + justify-content: center; +} +.item-title { + font-size: 12px; +} +.tab-bar { + margin: 1px; + width: 100%; + height: 60%; + border-color: #007dff; + border-width: 1px; +} +.tab-text { + font-size: 9px; + width: 100%; + text-align: center; +} + +.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: 60%; +} +.contain1{ + width: 100%; + height: 23%; + flex-direction: column; +} +.ani-container{ + flex-direction: column; + height: 100%; + flex-weight: 1; +} + +.prop-container{ + height: 55%; + flex-direction: column; + padding-left: 2px; +} + +.event-container{ + flex-direction: column; + height: 30%; +} + +.function-container{ + flex-direction: column; + height: 30%; +} + +.gradient-container{ + flex-direction: column; + height: 50%; +} + +.access-container{ + flex-direction: column; + height: 20%; +} + +.atom-container{ + flex-direction: column; + height: 60%; +} + +.multimode-container{ + flex-direction: column; +} + +.title{ + width: 100%; + font-size: 18px; + margin: 2px; + font-weight: bold; + text-align: center; +} + +.sub-title{ + width: 100%; + font-size: 10px; + text-align: center; + margin-top: 5px; + margin-bottom: 5px; +} + +.style1{ + width: 100%; + height: 40px; + min-width: 25px; + min-height: 10px; + max-width: 300px; + max-height: 60px; + padding-left: 1px; + padding-top: 1px; + padding-right: 1px; + padding-bottom: 1px; + margin-left: 1px; + margin-top: 1px; + margin-right: 1px; + margin-bottom: 1px; + border-left-style: solid; + border-right-style: dashed; + border-top-style: dashed; + border-bottom-style: dotted; + border-left-width: 1px; + border-right-width: 2px; + border-top-width: 2px; + border-bottom-width: 1px; + border-left-color: #ff0000; + border-right-color: #00ff00; + border-top-color: #0000ff; + border-bottom-color: #fff000; + border-bottom-left-radius: 10px; + border-bottom-right-radius: 15px; + border-top-left-radius: 8px; + border-top-right-radius: 12px; + background: linear-gradient(pink,#fff000); + box-shadow: 2px 4px 6px 8px #888888; + opacity: 0.5; + display: flex; + visibility: visible; + align-self: center; + image-fill: #000fff; + clip-path: margin-box; +} + +.style2{ + width: 100%; + height: 40px; + padding-start: 1px; + padding-end: 1px; + margin-start: 2px; + margin-end: 1px; + border-style: dotted; + border-width: 2px; + border-color:#000000; + border-radius:5px; + background-color:#ffaa00; + mask-image: url('common/images/icon.png'); + mask-size: cover; + mask-position: center; +} + +.style3{ + width: 100%; + padding-top: 30%; + padding-left: 10%; + padding-right: 10%; + padding-bottom: 30%; + margin: 1px; + border-left: 1px solid #000000; + border-right: 2px dashed #00ff00; + border-top: 1.5px dotted #0000ff; + border-bottom: 2.5px dotted #fff000; + background-image:url('common/images/image.png'); + background-size:cover; + background-repeat: repeat-x; + background-position: center; + flex:1; + flex-grow: 2; + flex-basis: 10px; + flex-shrink: 1; +} + +.style4{ + width: 100%; + height: 40px; + padding: 1px; + margin: 2px; + border: 2px solid #000000; +} + +.style5{ + width: 100%; + height: 60px; + margin-top: 2px; + background-color: yellow; + border-image-source: url('/common/images/image.png'); + border-image-slice: 1px 2px 3px 4px; + border-image-width: 2px 3px 4px 5px; + border-image-outset: 3px 4px 5px 6px; + border-image-repeat: repeat; +} + +.style6{ + width: 100%; + height: 60px; + position: absolute; + left: -57; + top: 10px; + bottom: 10px; + right: 2px; + background-color: pink; + border-image: url('common/images/image.png') 1px 2px 3px 4px 2px 3px 4px 5px 3px 4px 5px 6px round; +} + +.style7 { + width: 100%; + height: 60px; + margin-bottom: 2px; + margin-top: 2px; + color: green; + stroke-width: 40px; + line-cap: round; +} + +.event1{ + width: 100%; + height: 40px; + background-color: salmon; +} + +.event2{ + width: 100%; + height: 40px; + background-color: darkorchid; +} + +.event3{ + width: 100%; + height: 40px; + background-color: #ad4e2a; +} + +.event4{ + flex-direction: row; + width: 100%; + height: 40px; + overflow:scroll; +} + +.event5{ + flex-direction: column; + width: 100%; + height: 90px; + overflow:scroll; +} + +#prop1 { + color: #ad4e2a; + width: 100%; + height: 40px; + margin: 1px; + border-color: #007dff; + border-width: 1px; +} + +.prop2 { + color: #343524; + width: 100%; + height: 40px; + margin: 5px; +} + +.prop4 { + color: #456345; + stroke-width: 25px; + line-cap: round; + margin: 5px; +} + +.prop5 { + color: #831834; + stroke-width: 40px; + line-cap: square; + margin: 5px; + height: 70px; +} + + +.ani1{ + color: #72ac33; + stroke-width: 55px; + line-cap: square; + margin: 5px; + transform-origin: 0% 0%; + animation: ani1Go 3s infinite; +} + +@keyframes ani1Go +{ + from { + background-color: #f76160; + opacity:0.3; + width:50px; + height: 50px; + transform:translate(20px) rotate(10deg) scale(0.2) skew(40deg); + background-position:10% 10% + } + 30% { + background-color: #60f761; + opacity:0.5; + width:70px; + height: 70px; + background-position:12% 12%; + transform:translateX(10px) translateY(5px) rotateX(20deg) rotateY(25deg) scaleX(0.6) scaleY(0.5) skewX(25deg) skewY(15deg) + } + to { + background-color: #6160f7; + opacity:1; + width:90px; + height: 90px; + background-position:22% 22%; + transform:rotate(180deg) scale(2) + } +} + +.ani2{ + background-color: #ad4e2a; + width: 100%; + height: 55px; + margin: 5px; +} + +.gradient1{ + stroke-width: 30px; + line-cap: square; + margin: 5px; + background: linear-gradient(red, #00ff00); +} + +.gradient2{ + stroke-width: 30px; + line-cap: square; + margin: 5px; + background: linear-gradient(45deg, rgb(255,0,0),rgb(0, 255, 0)); +} + +.gradient3{ + stroke-width: 30px; + line-cap: square; + margin: 5px; + background: linear-gradient(to right, rgb(255,0,0) 90px, rgb(0, 255, 0) 60%); +} + +.gradient4{ + stroke-width: 30px; + line-cap: square; + margin: 5px; + background: repeating-linear-gradient(to right, rgba(255, 255, 0, 1) 30px,rgba(0, 0, 255, .5) 60px); +} + +.access1{ + color: #321124; + stroke-width: 30px; + line-cap: square; + margin: 5px; +} + +.multimode1{ + color: #978666; + stroke-width: 30px; + line-cap: square; + margin: 5px; +} + + +.function1{ + background-color: #ff0000; + width: 60%; + height: 30px; +} + +.function2{ + background-color: #00ff00; + width: 60%; + height: 30px; +} + +.function3{ + background-color: #0000ff; + width: 100%; + height: 30px; +} + +.function4 { + flex-direction: row; + width: 60%; + height: 60px; + overflow: scroll; +} \ No newline at end of file diff --git a/ace/ace_standard/src/main/js/default/pages/tab-content/index.hml b/ace/ace_standard/src/main/js/default/pages/tab-content/index.hml new file mode 100644 index 0000000000000000000000000000000000000000..884078ed68dd8fcab2a5e9657501fa86ada9c15d --- /dev/null +++ b/ace/ace_standard/src/main/js/default/pages/tab-content/index.hml @@ -0,0 +1,709 @@ + + +
+
+ +
+ + 通用样式 + + + tab-content通用样式1 + + + +
+ First +
+
+ Second +
+
+
+ + + tab-content通用样式2 + + + +
+ First +
+
+ Second +
+
+
+ + + tab-content通用样式3 + + + +
+ First +
+
+ Second +
+
+
+ + + tab-content通用样式4 + + + +
+ First +
+
+ Second +
+
+
+ + + tab-content通用样式5 + +
+ + +
+ First +
+
+ Second +
+
+
+ + +
+ First +
+
+ Second +
+
+
+
+
+ + + +
+ + 动画样式 + + + tabs动画样式1 + + + +
+ First +
+
+ Second +
+
+
+ + + tabs动画样式2 + + + +
+ First +
+
+ Second +
+
+
+ +
+
+ +
+
+ +
+ +
+ + 通用属性 + + + tab-content通用属性1 + + + +
+ First +
+
+ Second +
+
+
+ + + tab-content通用属性2 + + + +
+ First +
+
+ Second +
+
+
+ + + tab-content通用属性3 + + + +
+ First +
+
+ Second +
+
+
+ + + tabs特有属性4 + + + +
+ First +
+
+ Second +
+
+
+ + + tabs特有属性5 + + + +
+ First +
+
+ Second +
+
+
+
+
+
+ +
+ + 通用事件 + + + tab-content通用事件1 + + + +
+ First +
+
+ Second +
+
+
+ + + tab-content通用事件2 + + + +
+ First +
+
+ Second +
+
+
+ + tab-content通用事件3 + + + +
+ First +
+
+ Second +
+
+
+
+ +
+
+ + +
+ + 通用方法 + + + tab-content通用方法1 + + + +
+ First +
+
+ Second +
+
+
+ + + tab-content通用方法2 + + + +
+ First +
+
+ Second +
+
+
+ + + tab-content通用方法3 + + + +
+ First +
+
+ Second +
+
+
+
+ +
+ +
+
+ +
+ +
+ + 渐变样式 + + + tabs渐变样式1 + + + +
+ First +
+
+ Second +
+
+
+ + + tabs渐变样式2 + + + +
+ First +
+
+ Second +
+
+
+ + + tabs渐变样式3 + + + +
+ First +
+
+ Second +
+
+
+ + + tabs渐变样式4 + + + +
+ First +
+
+ Second +
+
+
+ +
+
+
+ +
+ + 无障碍 + + + tabs无障碍1 + + + +
+ First +
+
+ Second +
+
+
+
+
+
+ +
+ + 原子布局 + + + tabs原子布局1 + +
+ + +
+ First +
+
+ Second +
+
+
+ + +
+ First +
+
+ Second +
+
+
+ + +
+ First +
+
+ Second +
+
+
+ +
+ + tabs原子布局2 + +
+ + +
+ First +
+
+ Second +
+
+
+ + +
+ First +
+
+ Second +
+
+
+ + +
+ First +
+
+ Second +
+
+
+
+ + tabs原子布局3 + +
+ + +
+ First +
+
+ Second +
+
+
+ + +
+ First +
+
+ Second +
+
+
+ + +
+ First +
+
+ Second +
+
+
+
+
+
+
+ + 多模输入 + + + tabs多模输入1 + + + +
+ First +
+
+ Second +
+
+
+
+
+
+
diff --git a/ace/ace_standard/src/main/js/default/pages/tab-content/index.js b/ace/ace_standard/src/main/js/default/pages/tab-content/index.js new file mode 100644 index 0000000000000000000000000000000000000000..4bd702c40097d26363cf66834eb5835317a9b058 --- /dev/null +++ b/ace/ace_standard/src/main/js/default/pages/tab-content/index.js @@ -0,0 +1,492 @@ +/** + * 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 { + change: function(e) { + console.log("Tab index: " + e.index); + }, + + onShow(){ + // 通用属性 + var prop1 = this.$element('prop1'); + var name1 = prop1.dataSet.name + var prop2 = this.$refs.prop2; + var name2 = prop2.dataSet.name + prompt.showToast({ + message: 'prop1--' + name1 + '\nprop2--' + name2 + }); + }, + + touchStart(event){ + var globalX = event.touches[0].globalX + var globalY = event.touches[0].globalY + var localX = event.touches[0].localX + var localY = event.touches[0].localY + var size = event.touches[0].size + var force = event.touches[0].force + var changeGlobalX = event.changedTouches[0].globalX + var changeGlobalY = event.changedTouches[0].globalY + var changeLocalX = event.changedTouches[0].localX + var changeLocalY = event.changedTouches[0].localY + var changeSize = event.changedTouches[0].size + var changeForce = event.changedTouches[0].force + var message = 'globalX--' + globalX + ',globalY--' + globalY + + ',localX--' + localX + ',localY--' + localY + ',size--' + size + ',force--' + force + + ',changeGlobalX--' + changeGlobalX + ',changeGlobalY--' + changeGlobalY + + ',changeLocalX--' + changeLocalX + ',changeLocalY--' + changeLocalY + + ',changeSize--' + changeSize + ',changeForce--' + changeForce; + prompt.showToast({ + message: 'touchstart:\n' + message + }); + }, + + touchMove(event){ + var globalX = event.touches[0].globalX + 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' + }); + } + +} \ No newline at end of file diff --git a/ace/ace_standard/src/main/js/default/pages/tabs/index.css b/ace/ace_standard/src/main/js/default/pages/tabs/index.css index 2998b93c6bb699d9642873fc5044555c31ccc775..06b41a39a11d8d3084224e27097c49fab8bc2e4d 100644 --- a/ace/ace_standard/src/main/js/default/pages/tabs/index.css +++ b/ace/ace_standard/src/main/js/default/pages/tabs/index.css @@ -72,7 +72,7 @@ } .prop-container{ - height: 60%; + height: 70%; flex-direction: column; padding-left: 2px; } @@ -84,7 +84,7 @@ .function-container{ flex-direction: column; - height: 40%; + height: 30%; } .gradient-container{ @@ -263,6 +263,17 @@ stroke-width: 40px; line-cap: round; } + +.tstyle { + width: 100%; + height: 30px; + margin-bottom: 2px; + margin-top: 2px; + color: green; + stroke-width: 40px; + line-cap: round; +} + .barStyle7{ width: 100%; height: 60px; @@ -290,44 +301,29 @@ } .event4{ - flex-direction: row; width: 100%; height: 40px; - overflow:scroll; + background-color: blanchedalmond; } -.event5{ - flex-direction: column; - width: 100%; - height: 90px; - overflow:scroll; -} #prop1 { - color: #ad4e2a; - stroke-width: 10px; - line-cap: square; + background-color: mediumslateblue; margin: 5px; } .prop2 { - color: #343524; - stroke-width: 15px; - line-cap: round; + background-color: salmon; margin: 5px; } .prop4 { - color: #456345; - stroke-width: 25px; - line-cap: round; + background-color: skyblue; margin: 5px; } .prop5 { - color: #831834; - stroke-width: 40px; - line-cap: square; + background-color: gold; margin: 5px; height: 70px; } @@ -413,9 +409,7 @@ } .multimode1{ - color: #978666; - stroke-width: 30px; - line-cap: square; + background-color: firebrick; margin: 5px; } diff --git a/ace/ace_standard/src/main/js/default/pages/tabs/index.hml b/ace/ace_standard/src/main/js/default/pages/tabs/index.hml index 7a63ba835bb6c01b7966e307460c8f8058ac0bda..2fbe7a7c21d84ec50b79bfa7aeca20bf8b0f2692 100644 --- a/ace/ace_standard/src/main/js/default/pages/tabs/index.hml +++ b/ace/ace_standard/src/main/js/default/pages/tabs/index.hml @@ -27,18 +27,6 @@ index="0" vertical="false" onchange="change"> - - Home - Index - - -
- First -
-
- Second -
-
@@ -48,18 +36,6 @@ index="0" vertical="false" onchange="change"> - - Home - Index - - -
- First -
-
- Second -
-
@@ -69,18 +45,6 @@ index="0" vertical="false" onchange="change"> - - Home - Index - - -
- First -
-
- Second -
-
@@ -90,18 +54,6 @@ index="0" vertical="false" onchange="change"> - - Home - Index - - -
- First -
-
- Second -
-
@@ -112,34 +64,10 @@ index="0" vertical="false" onchange="change"> - - Home - Index - - -
- First -
-
- Second -
-
- - Home - Index - - -
- First -
-
- Second -
-
@@ -148,20 +76,6 @@ - - Home - Index - - -
- First -
-
- Second -
-
@@ -178,18 +92,6 @@ index="0" vertical="true" onchange="change"> - - Home - Index - - -
- First -
-
- Second -
-
@@ -199,18 +101,6 @@ index="0" vertical="true" onchange="change"> - - Home - Index - - -
- First -
-
- Second -
-
@@ -238,32 +128,6 @@ index="0" vertical="false" onchange="change"> - - Home - Index - - -
- First -
-
- Second -
-
@@ -275,101 +139,38 @@ click-effect="spring-large" dir ="ltr" class = "tabs style7 prop2" + ref="prop2" index="0" vertical="false" onchange="change"> - - Home - Index - - -
- First -
-
- Second -
-
tabs通用属性3 - - - Home - Index - - -
- First -
-
- Second -
-
tabs特有属性4 - - - Home - Index - - -
- First -
-
- Second -
-
tabs特有属性5 - - - Home - Index - - -
- First -
-
- Second -
-
@@ -382,41 +183,19 @@ tabs通用事件1 - - - Home - Index - - -
- First -
-
- Second -
-
tabs通用事件2 - - - Home - Index - - -
- First -
-
- Second -
-
tabs通用事件3 - - - Home - Index - - -
- First -
-
- Second -
-
tabs特有事件1 - - - Home - Index - - -
- First -
-
- Second -
-
@@ -550,87 +245,33 @@ tabs通用方法1 - - - Home - Index - - -
- First -
-
- Second -
-
tabs通用方法2 - - - Home - Index - - -
- First -
-
- Second -
-
tabs通用方法3 - - - Home - Index - - -
- First -
-
- Second -
-
@@ -654,18 +295,6 @@ index="0" vertical="false" onchange="change"> - - Home - Index - - -
- First -
-
- Second -
-
@@ -675,18 +304,6 @@ index="0" vertical="false" onchange="change"> - - Home - Index - - -
- First -
-
- Second -
-
@@ -696,18 +313,6 @@ index="0" vertical="false" onchange="change"> - - Home - Index - - -
- First -
-
- Second -
-
@@ -717,18 +322,6 @@ index="0" vertical="false" onchange="change"> - - Home - Index - - -
- First -
-
- Second -
-
@@ -742,7 +335,7 @@ tabs无障碍1 - - - Home - Index - - -
- First -
-
- Second -
-
@@ -775,56 +356,20 @@ tabs原子布局1
- - - Home - Index - - -
- First -
-
- Second -
-
- - - Home - Index - - -
- First -
-
- Second -
-
- - - Home - Index - - -
- First -
-
- Second -
-
@@ -832,112 +377,40 @@ tabs原子布局2
- - - Home - Index - - -
- First -
-
- Second -
-
- - - Home - Index - - -
- First -
-
- Second -
-
- - - Home - Index - - -
- First -
-
- Second -
-
tabs原子布局3
- - - Home - Index - - -
- First -
-
- Second -
-
- - - Home - Index - - -
- First -
-
- Second -
-
- - - Home - Index - - -
- First -
-
- Second -
-
@@ -950,23 +423,12 @@ tabs多模输入1 - - Home - Index - - -
- First -
-
- Second -
-
-
diff --git a/ace/ace_standard/src/main/js/default/test/commonComponentJsApi.test.js b/ace/ace_standard/src/main/js/default/test/commonComponentJsApi.test.js index 6118164d5d49b50feda3ad464b7db07b552f800b..58da3e3f075017ca4e3d0bd6365d97e363c0c790 100644 --- a/ace/ace_standard/src/main/js/default/test/commonComponentJsApi.test.js +++ b/ace/ace_standard/src/main/js/default/test/commonComponentJsApi.test.js @@ -54,7 +54,7 @@ describe('aceJsTest', function () { afterEach(async function () { console.info('[aceJsTest] after each called') await backToIndex(); - await sleep(1000) + await sleep(5000) }); /** @@ -920,4 +920,50 @@ describe('aceJsTest', function () { expect("pages/tabs/").assertEqual(pages.path); done(); }); + + /** + * @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100 + * @tc.name testTabBarComponent + * @tc.desc ACE + */ + it('testTabBarComponent', 0, async function (done) { + let result; + let options = { + uri: 'pages/tab-bar/index' + } + try { + result = router.push(options) + console.info("push tab-bar page success " + JSON.stringify(result)); + } catch (err) { + console.error("push tab-bar page error " + JSON.stringify(result)); + } + await sleep(5000) + let pages = router.getState(); + console.info("[router.tab-bar] getState" + JSON.stringify(pages)); + expect("pages/tab-bar/").assertEqual(pages.path); + done(); + }); + + /** + * @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100 + * @tc.name testTabContentComponent + * @tc.desc ACE + */ + it('testTabContentComponent', 0, async function (done) { + let result; + let options = { + uri: 'pages/tab-content/index' + } + try { + result = router.push(options) + console.info("push tab-content page success " + JSON.stringify(result)); + } catch (err) { + console.error("push tab-content page error " + JSON.stringify(result)); + } + await sleep(5000) + let pages = router.getState(); + console.info("[router.tab-content] getState" + JSON.stringify(pages)); + expect("pages/tab-content/").assertEqual(pages.path); + done(); + }); });