@shijiu/jsview-vue-samples 1.9.747
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/AnimPicture/App.vue +207 -0
- package/AnimPicture/assets/animated_webp.webp +0 -0
- package/AnimPicture/assets/ball_3.webp +0 -0
- package/AnimPicture/assets/girl_run.gif +0 -0
- package/AnimPicture/assets/quan.webp +0 -0
- package/Basic/App.vue +134 -0
- package/Basic/assets/border.png +0 -0
- package/Basic/assets/border2.png +0 -0
- package/Basic/assets/icon.png +0 -0
- package/Basic/assets/test.jpg +0 -0
- package/Basic/components/ContentBlock.vue +38 -0
- package/Basic/components/FontStyle.css +16 -0
- package/Basic/components/anim/AnimGroup.vue +66 -0
- package/Basic/components/anim/AnimKeyframeBasic.vue +119 -0
- package/Basic/components/anim/AnimKeyframeComposite.vue +52 -0
- package/Basic/components/anim/AnimTransition.vue +157 -0
- package/Basic/components/div/DivBackground.vue +44 -0
- package/Basic/components/div/DivClip.vue +159 -0
- package/Basic/components/div/DivCssScoped.vue +20 -0
- package/Basic/components/div/DivCssVar.vue +53 -0
- package/Basic/components/div/DivGroup1.vue +47 -0
- package/Basic/components/div/DivGroup2.vue +65 -0
- package/Basic/components/div/DivLayout.vue +70 -0
- package/Basic/components/div/DivRadius.vue +65 -0
- package/Basic/components/div/DivTransform.vue +32 -0
- package/Basic/components/img/ImageGroup.vue +31 -0
- package/Basic/components/img/ImgLayout.vue +41 -0
- package/Basic/components/panel/Panel1.vue +55 -0
- package/Basic/components/panel/Panel2.vue +31 -0
- package/Basic/components/panel/TitleBar.vue +29 -0
- package/Basic/components/text/TextAlign.vue +66 -0
- package/Basic/components/text/TextEmoji.vue +26 -0
- package/Basic/components/text/TextFontStyle.vue +89 -0
- package/Basic/components/text/TextGroup1.vue +49 -0
- package/Basic/components/text/TextGroup2.vue +28 -0
- package/Basic/components/text/TextOverflow.vue +110 -0
- package/BasicFocusControl/App.vue +104 -0
- package/BasicFocusControl/components/BaseBlock.vue +50 -0
- package/BasicFocusControl/components/MainArea.vue +83 -0
- package/BasicFocusControl/components/MainAreaLeftBlock.vue +17 -0
- package/BasicFocusControl/components/MainAreaRightBlock.vue +27 -0
- package/BasicFocusControl/components/SideBar.vue +58 -0
- package/BasicFocusControl/components/SideBarBlock.vue +27 -0
- package/Collision/App.vue +452 -0
- package/ColorSpace/App.vue +126 -0
- package/ColorSpace/bmpDemo.bmp +0 -0
- package/ColorSpace/jpegDemo.jpeg +0 -0
- package/ColorSpace/pngDemo.png +0 -0
- package/ColorSpace/pngNoAlphaDemo.png +0 -0
- package/DemoHomepage/App.vue +27 -0
- package/DemoHomepage/components/BodyFrame.vue +95 -0
- package/DemoHomepage/components/Dialog.vue +94 -0
- package/DemoHomepage/components/Item.vue +77 -0
- package/DemoHomepage/components/TabFrame.vue +85 -0
- package/DemoHomepage/router.js +196 -0
- package/DemoHomepage/views/Homepage.vue +195 -0
- package/FilterDemo/AnimatePic.vue +58 -0
- package/FilterDemo/App.vue +159 -0
- package/FilterDemo/VideoLayer.vue +62 -0
- package/FilterDemo/jpegDemo.jpeg +0 -0
- package/FilterDemo/webpDemo.webp +0 -0
- package/FlipCard/App.vue +71 -0
- package/FlipCard/FlipCard.vue +118 -0
- package/FlipCard/assets/blue_egg.png +0 -0
- package/FlipCard/assets/red_egg.png +0 -0
- package/FlipCard/data.js +13 -0
- package/GridDemo/App.vue +215 -0
- package/GridDemo/ButtonBlock.vue +112 -0
- package/GridDemo/FocusItem.vue +37 -0
- package/GridDemo/Item.vue +93 -0
- package/HashHistory/App.vue +115 -0
- package/HashHistory/components/HorizontalButtonList.vue +91 -0
- package/HashHistory/components/Item.vue +60 -0
- package/HashHistory/router.js +41 -0
- package/HashHistory/views/MainPage.vue +57 -0
- package/HashHistory/views/SubPage.vue +66 -0
- package/ImpactStop/App.vue +435 -0
- package/Input/App.vue +164 -0
- package/Input/FullKeyboard.vue +87 -0
- package/Input/InputPanel.vue +131 -0
- package/Input/KeyboardItem.vue +58 -0
- package/LongImage/App.vue +80 -0
- package/LongImage/Button.vue +58 -0
- package/LongImage/ButtonItem.vue +44 -0
- package/LongImage/LongImageScroll.vue +92 -0
- package/LongImage/Scroll.vue +14 -0
- package/LongImage/assets/1280x7200.jpg +0 -0
- package/LongText/App.vue +96 -0
- package/LongText/Button.vue +51 -0
- package/LongText/ButtonItem.vue +44 -0
- package/LongText/LongTextScroll.vue +192 -0
- package/LongText/Scroll.vue +14 -0
- package/Marquee/App.vue +247 -0
- package/Marquee/longText.js +14 -0
- package/MaskClip/App.vue +122 -0
- package/MaskClip/images/mask-025/config.json +29 -0
- package/MaskClip/images/mask-025/res/1.png +0 -0
- package/MaskClip/images/mask-025/res/2.png +0 -0
- package/MaskClip/images/mask-025/res/3.png +0 -0
- package/MaskClip/images/mask-025/res/4.png +0 -0
- package/MaskClip/images/mask-025/res/icon.png +0 -0
- package/MaskClip/images/mask-025/res/stroke.png +0 -0
- package/MaskClip/images/php.jpg +0 -0
- package/MetroWidgetDemos/Advanced/App.vue +46 -0
- package/MetroWidgetDemos/Advanced/ButtonItem.vue +90 -0
- package/MetroWidgetDemos/Advanced/Buttons.vue +70 -0
- package/MetroWidgetDemos/Advanced/Mixed.vue +77 -0
- package/MetroWidgetDemos/Advanced/widgets/Item.vue +83 -0
- package/MetroWidgetDemos/Advanced/widgets/WidgetItem.vue +89 -0
- package/MetroWidgetDemos/Advanced/widgets/Widgets.vue +116 -0
- package/MetroWidgetDemos/Advanced/widgets/focus1.png +0 -0
- package/MetroWidgetDemos/Item.vue +85 -0
- package/MetroWidgetDemos/PerformanceTest/App.vue +210 -0
- package/MetroWidgetDemos/PerformanceTest/Item.vue +90 -0
- package/MetroWidgetDemos/PerformanceTest/assets/bg.jpg +0 -0
- package/MetroWidgetDemos/PerformanceTest/assets/coupon_content.png +0 -0
- package/MetroWidgetDemos/PerformanceTest/assets/coupon_left.png +0 -0
- package/MetroWidgetDemos/PerformanceTest/assets/coupon_mid.png +0 -0
- package/MetroWidgetDemos/PerformanceTest/assets/coupon_right.png +0 -0
- package/MetroWidgetDemos/PerformanceTest/assets/focus_border.png +0 -0
- package/MetroWidgetDemos/PerformanceTest/assets/holder_logo.png +0 -0
- package/MetroWidgetDemos/PerformanceTest/assets/jrbm.png +0 -0
- package/MetroWidgetDemos/PerformanceTest/assets/line_left.png +0 -0
- package/MetroWidgetDemos/PerformanceTest/assets/line_mid.png +0 -0
- package/MetroWidgetDemos/PerformanceTest/assets/line_right.png +0 -0
- package/MetroWidgetDemos/PerformanceTest/assets/loading.png +0 -0
- package/MetroWidgetDemos/PerformanceTest/assets/logo.png +0 -0
- package/MetroWidgetDemos/PerformanceTest/assets/mcjx.png +0 -0
- package/MetroWidgetDemos/PerformanceTest/assets/tao.png +0 -0
- package/MetroWidgetDemos/PerformanceTest/assets/tmall.png +0 -0
- package/MetroWidgetDemos/PerformanceTest/border.png +0 -0
- package/MetroWidgetDemos/PerformanceTest/components/ContentItem.vue +386 -0
- package/MetroWidgetDemos/PerformanceTest/components/MyTab.vue +129 -0
- package/MetroWidgetDemos/PerformanceTest/data.js +45 -0
- package/MetroWidgetDemos/PingPong/App.vue +135 -0
- package/MetroWidgetDemos/PingPong/AppPage.vue +73 -0
- package/MetroWidgetDemos/PingPong/AppTab.vue +62 -0
- package/MetroWidgetDemos/PingPong/TabItem.vue +84 -0
- package/MetroWidgetDemos/PingPong/ViewSwiper.vue +214 -0
- package/MetroWidgetDemos/Simple/AbsoluteTemplate.vue +75 -0
- package/MetroWidgetDemos/Simple/App.vue +45 -0
- package/MetroWidgetDemos/Simple/RelativeTemplate.vue +111 -0
- package/MetroWidgetDemos/WidgetItem.vue +89 -0
- package/MetroWidgetDemos/data.js +205 -0
- package/NinePatchDemo/App.vue +145 -0
- package/NinePatchDemo/Item.vue +69 -0
- package/NinePatchDemo/assets/border.png +0 -0
- package/Preload/App.vue +135 -0
- package/Preload/Item.vue +32 -0
- package/Preload/data.js +23 -0
- package/Preload/images/awesomeface.png +0 -0
- package/Preload/images/cat.jpg +0 -0
- package/Preload/images/rank.png +0 -0
- package/Preload/images/rank_focus.png +0 -0
- package/Preload/images/rule.png +0 -0
- package/Preload/images/rule_focus.png +0 -0
- package/Preload/images/start.png +0 -0
- package/Preload/images/start_focus.png +0 -0
- package/QrcodeDemo/App.vue +68 -0
- package/ScaleDownNeon/App.vue +107 -0
- package/SoundPool/App.vue +134 -0
- package/SoundPool/bgmusic.mp3 +0 -0
- package/SoundPool/coin.mp3 +0 -0
- package/SoundPool/jump.mp3 +0 -0
- package/SoundPool/lose.mp3 +0 -0
- package/SoundPool/run.mp3 +0 -0
- package/SprayView/App.vue +272 -0
- package/SprayView/assets/snow.png +0 -0
- package/SpriteImage/App.vue +173 -0
- package/SpriteImage/images/cat_run.png +0 -0
- package/SpriteImage/images/egg_break.json +116 -0
- package/SpriteImage/images/egg_break.png +0 -0
- package/SpriteImage/images/sprite.png +0 -0
- package/TextBox/App.vue +91 -0
- package/TextBox/RenderCenter.vue +133 -0
- package/TextBox/RenderLeft.vue +138 -0
- package/TextBox/RenderOneLine.vue +101 -0
- package/TextBox/RenderRight.vue +131 -0
- package/TextShadowDemo/App.vue +91 -0
- package/TextureAnimation/App.vue +336 -0
- package/TextureAnimation/App2.vue +111 -0
- package/TextureAnimation/assets/blackWhiteGrid.png +0 -0
- package/TextureAnimation/assets/light.png +0 -0
- package/TextureAnimation/assets/light2.png +0 -0
- package/TextureAnimation/assets/mask.png +0 -0
- package/TextureAnimation/assets/php.jpg +0 -0
- package/TextureAnimation/assets/php2.png +0 -0
- package/TextureAnimation/assets/swipLight.png +0 -0
- package/TextureSize/App.vue +132 -0
- package/TextureSize/bmpDemo.bmp +0 -0
- package/TextureSize/jpegDemo.jpeg +0 -0
- package/TextureSize/jpgDemo.jpg +0 -0
- package/TextureSize/pngDemo.png +0 -0
- package/TextureSize/pngNoAlphaDemo.png +0 -0
- package/ThrowMoveDemo/AccelerateDemo.vue +116 -0
- package/ThrowMoveDemo/App.vue +114 -0
- package/ThrowMoveDemo/LRParabolicDemo.vue +115 -0
- package/ThrowMoveDemo/TargetDemo.vue +116 -0
- package/ThrowMoveDemo/UDParabolicDemo.vue +121 -0
- package/TouchSample/App.vue +136 -0
- package/TouchSample/Item.vue +103 -0
- package/TouchSample/MetroWidgetHorizontal.vue +144 -0
- package/TouchSample/MetroWidgetVertical.vue +144 -0
- package/TouchSample/TouchContainerHorizontal.vue +160 -0
- package/TouchSample/TouchContainerVertical.vue +160 -0
- package/TouchSample/data.js +81 -0
- package/TransitPage/App.vue +29 -0
- package/VideoDemo/App.vue +121 -0
- package/VideoDemo/components/Button.vue +58 -0
- package/VideoDemo/components/Controllor.vue +197 -0
- package/VideoDemo/components/VideoFrame.vue +140 -0
- package/VisibleSensorDemo/App.vue +234 -0
- package/package.json +17 -0
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
<script>
|
|
2
|
+
import { JsvTextBox } from "jsview";
|
|
3
|
+
export default {
|
|
4
|
+
props: {
|
|
5
|
+
text: String,
|
|
6
|
+
},
|
|
7
|
+
components: { JsvTextBox },
|
|
8
|
+
};
|
|
9
|
+
</script>
|
|
10
|
+
|
|
11
|
+
<template>
|
|
12
|
+
<div :style="{ top: 750 + 300 + 50 }">
|
|
13
|
+
<div
|
|
14
|
+
:style="{
|
|
15
|
+
left: 0,
|
|
16
|
+
top: -50,
|
|
17
|
+
width: 400,
|
|
18
|
+
height: 50,
|
|
19
|
+
fontSize: '20px',
|
|
20
|
+
textAlign: 'left',
|
|
21
|
+
lineHeight: '50px',
|
|
22
|
+
backgroundColor: '#00ff00',
|
|
23
|
+
}"
|
|
24
|
+
>
|
|
25
|
+
整体垂直向上对齐、文字水平居左显示
|
|
26
|
+
</div>
|
|
27
|
+
<JsvTextBox
|
|
28
|
+
:verticalAlign="'top'"
|
|
29
|
+
:style="{
|
|
30
|
+
left: 0,
|
|
31
|
+
top: 0,
|
|
32
|
+
width: 400,
|
|
33
|
+
height: 80,
|
|
34
|
+
backgroundColor: 'rgba(255,255,0,0.5)',
|
|
35
|
+
fontSize: '30px',
|
|
36
|
+
textAlign: 'left',
|
|
37
|
+
lineHeight: '80px',
|
|
38
|
+
}"
|
|
39
|
+
>
|
|
40
|
+
{{ text }}
|
|
41
|
+
</JsvTextBox>
|
|
42
|
+
<div
|
|
43
|
+
:style="{
|
|
44
|
+
left: 410,
|
|
45
|
+
top: -50,
|
|
46
|
+
width: 400,
|
|
47
|
+
height: 50,
|
|
48
|
+
fontSize: '20px',
|
|
49
|
+
textAlign: 'left',
|
|
50
|
+
lineHeight: '50px',
|
|
51
|
+
backgroundColor: '#00ff00',
|
|
52
|
+
}"
|
|
53
|
+
>
|
|
54
|
+
整体垂直居中对齐、文字水平居中显示
|
|
55
|
+
</div>
|
|
56
|
+
<JsvTextBox
|
|
57
|
+
:verticalAlign="'middle'"
|
|
58
|
+
:style="{
|
|
59
|
+
left: 410,
|
|
60
|
+
top: 0,
|
|
61
|
+
width: 400,
|
|
62
|
+
height: 80,
|
|
63
|
+
backgroundColor: 'rgba(255,255,0,0.5)',
|
|
64
|
+
fontSize: '30px',
|
|
65
|
+
textAlign: 'center',
|
|
66
|
+
lineHeight: '80px',
|
|
67
|
+
}"
|
|
68
|
+
>
|
|
69
|
+
{{ text }}
|
|
70
|
+
</JsvTextBox>
|
|
71
|
+
<div
|
|
72
|
+
:style="{
|
|
73
|
+
left: 820,
|
|
74
|
+
top: -50,
|
|
75
|
+
width: 400,
|
|
76
|
+
height: 50,
|
|
77
|
+
fontSize: '20px',
|
|
78
|
+
textAlign: 'left',
|
|
79
|
+
lineHeight: '50px',
|
|
80
|
+
backgroundColor: '#00ff00',
|
|
81
|
+
}"
|
|
82
|
+
>
|
|
83
|
+
整体垂直向下对齐、文字水平居右显示
|
|
84
|
+
</div>
|
|
85
|
+
<JsvTextBox
|
|
86
|
+
:verticalAlign="'bottom'"
|
|
87
|
+
:style="{
|
|
88
|
+
left: 820,
|
|
89
|
+
top: 0,
|
|
90
|
+
width: 400,
|
|
91
|
+
height: 80,
|
|
92
|
+
backgroundColor: 'rgba(255,255,0,0.5)',
|
|
93
|
+
fontSize: '30px',
|
|
94
|
+
textAlign: 'right',
|
|
95
|
+
lineHeight: '80px',
|
|
96
|
+
}"
|
|
97
|
+
>
|
|
98
|
+
{{ text }}
|
|
99
|
+
</JsvTextBox>
|
|
100
|
+
</div>
|
|
101
|
+
</template>
|
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
<script>
|
|
2
|
+
import { JsvTextBox } from "jsview";
|
|
3
|
+
export default {
|
|
4
|
+
props: {
|
|
5
|
+
text: String,
|
|
6
|
+
},
|
|
7
|
+
components: { JsvTextBox },
|
|
8
|
+
};
|
|
9
|
+
</script>
|
|
10
|
+
|
|
11
|
+
<template>
|
|
12
|
+
<div :style="{ top: 750 }">
|
|
13
|
+
<div
|
|
14
|
+
:style="{
|
|
15
|
+
left: 0,
|
|
16
|
+
top: -50,
|
|
17
|
+
width: 400,
|
|
18
|
+
height: 50,
|
|
19
|
+
fontSize: '20px',
|
|
20
|
+
textAlign: 'left',
|
|
21
|
+
lineHeight: '50px',
|
|
22
|
+
backgroundColor: '#00ff00',
|
|
23
|
+
}"
|
|
24
|
+
>
|
|
25
|
+
整体垂直向上对齐、文字水平居右显示
|
|
26
|
+
</div>
|
|
27
|
+
<JsvTextBox
|
|
28
|
+
:verticalAlign="'top'"
|
|
29
|
+
:style="{
|
|
30
|
+
left: 0,
|
|
31
|
+
top: 0,
|
|
32
|
+
width: 400,
|
|
33
|
+
height: 300,
|
|
34
|
+
backgroundColor: 'rgba(255,255,0,0.5)',
|
|
35
|
+
fontSize: '30px',
|
|
36
|
+
textAlign: 'right',
|
|
37
|
+
lineHeight: '40px',
|
|
38
|
+
}"
|
|
39
|
+
>
|
|
40
|
+
{{ `[TR]${text}` }}
|
|
41
|
+
</JsvTextBox>
|
|
42
|
+
<div
|
|
43
|
+
:style="{
|
|
44
|
+
left: 410,
|
|
45
|
+
top: -50,
|
|
46
|
+
width: 400,
|
|
47
|
+
height: 50,
|
|
48
|
+
fontSize: '20px',
|
|
49
|
+
textAlign: 'left',
|
|
50
|
+
lineHeight: '50px',
|
|
51
|
+
backgroundColor: '#00ff00',
|
|
52
|
+
}"
|
|
53
|
+
>
|
|
54
|
+
整体垂直居中对齐、文字水平居右显示
|
|
55
|
+
</div>
|
|
56
|
+
<JsvTextBox
|
|
57
|
+
:verticalAlign="'middle'"
|
|
58
|
+
:style="{
|
|
59
|
+
left: 410,
|
|
60
|
+
top: 0,
|
|
61
|
+
width: 400,
|
|
62
|
+
height: 300,
|
|
63
|
+
backgroundColor: 'rgba(255,255,0,0.5)',
|
|
64
|
+
fontSize: '30px',
|
|
65
|
+
textAlign: 'right',
|
|
66
|
+
lineHeight: '40px',
|
|
67
|
+
}"
|
|
68
|
+
>
|
|
69
|
+
{{ `[MR]${text}` }}
|
|
70
|
+
</JsvTextBox>
|
|
71
|
+
<div
|
|
72
|
+
:style="{
|
|
73
|
+
left: 820,
|
|
74
|
+
top: -50,
|
|
75
|
+
width: 400,
|
|
76
|
+
height: 50,
|
|
77
|
+
fontSize: '20px',
|
|
78
|
+
textAlign: 'left',
|
|
79
|
+
lineHeight: '50px',
|
|
80
|
+
backgroundColor: '#00ff00',
|
|
81
|
+
}"
|
|
82
|
+
>
|
|
83
|
+
整体垂直向下对齐、文字水平居右显示
|
|
84
|
+
</div>
|
|
85
|
+
<JsvTextBox
|
|
86
|
+
:verticalAlign="'bottom'"
|
|
87
|
+
:style="{
|
|
88
|
+
left: 820,
|
|
89
|
+
top: 0,
|
|
90
|
+
width: 400,
|
|
91
|
+
height: 300,
|
|
92
|
+
backgroundColor: 'rgba(255,255,0,0.5)',
|
|
93
|
+
fontSize: '30px',
|
|
94
|
+
textAlign: 'right',
|
|
95
|
+
lineHeight: '40px',
|
|
96
|
+
}"
|
|
97
|
+
>
|
|
98
|
+
{{ `[BR]${text}` }}
|
|
99
|
+
</JsvTextBox>
|
|
100
|
+
|
|
101
|
+
<div
|
|
102
|
+
:style="{
|
|
103
|
+
left: 1240,
|
|
104
|
+
top: -50,
|
|
105
|
+
width: 500,
|
|
106
|
+
height: 50,
|
|
107
|
+
fontSize: '20px',
|
|
108
|
+
textAlign: 'left',
|
|
109
|
+
lineHeight: '50px',
|
|
110
|
+
backgroundColor: '#00ff00',
|
|
111
|
+
}"
|
|
112
|
+
>
|
|
113
|
+
整体垂直向下对齐、文字水平居右显示、行高80px
|
|
114
|
+
</div>
|
|
115
|
+
<JsvTextBox
|
|
116
|
+
:verticalAlign="'bottom'"
|
|
117
|
+
:style="{
|
|
118
|
+
left: 1240,
|
|
119
|
+
top: 0,
|
|
120
|
+
width: 500,
|
|
121
|
+
height: 300,
|
|
122
|
+
backgroundColor: 'rgba(255,255,0,0.5)',
|
|
123
|
+
fontSize: '30px',
|
|
124
|
+
textAlign: 'right',
|
|
125
|
+
lineHeight: '80px',
|
|
126
|
+
}"
|
|
127
|
+
>
|
|
128
|
+
{{ `[BR]${text}` }}
|
|
129
|
+
</JsvTextBox>
|
|
130
|
+
</div>
|
|
131
|
+
</template>
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
<!--
|
|
2
|
+
* 当TextData数据中有blur为0(不显示阴影)时,为了测试会报“StyleFormatCheck.js?058c:447 textShadow: blur shadow above 0(now=2 2 0 #00FF00)”错误
|
|
3
|
+
-->
|
|
4
|
+
<script>
|
|
5
|
+
import { JsvTextBox } from "jsview";
|
|
6
|
+
|
|
7
|
+
export default {
|
|
8
|
+
components: {
|
|
9
|
+
JsvTextBox,
|
|
10
|
+
},
|
|
11
|
+
data() {
|
|
12
|
+
return {
|
|
13
|
+
TextData: [
|
|
14
|
+
{
|
|
15
|
+
id: 0,
|
|
16
|
+
title: "偏移x,y为0(文字发光)",
|
|
17
|
+
textShadow: "0 0 3 #00FF00",
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
id: 1,
|
|
21
|
+
title: "blur为0(不显示阴影)",
|
|
22
|
+
textShadow: "2 2 0 #00FF00",
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
id: 2,
|
|
26
|
+
title: "rgba格式颜色(半透明红)",
|
|
27
|
+
textShadow: "4 4 3 rgba(255,0,0,0.5)",
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
id: 3,
|
|
31
|
+
title: "#格式颜色(蓝色)",
|
|
32
|
+
textShadow: "4 4 0.5 #0000EF",
|
|
33
|
+
},
|
|
34
|
+
],
|
|
35
|
+
};
|
|
36
|
+
},
|
|
37
|
+
methods: {
|
|
38
|
+
onKeyDown(ev) {
|
|
39
|
+
if (ev.keyCode == 8 || ev.keyCode == 27 || ev.keyCode == 10000) {
|
|
40
|
+
this.$router?.go(-1); // 有router时,是从DemoHomepage进入,回退
|
|
41
|
+
}
|
|
42
|
+
return true;
|
|
43
|
+
},
|
|
44
|
+
},
|
|
45
|
+
};
|
|
46
|
+
</script>
|
|
47
|
+
|
|
48
|
+
<template>
|
|
49
|
+
<jsv-focus-block
|
|
50
|
+
autoFocus
|
|
51
|
+
:onAction="{
|
|
52
|
+
onKeyDown: onKeyDown,
|
|
53
|
+
}"
|
|
54
|
+
>
|
|
55
|
+
<div
|
|
56
|
+
v-for="item in TextData"
|
|
57
|
+
:key="item.id"
|
|
58
|
+
:style="{ left: 320 * item.id }"
|
|
59
|
+
>
|
|
60
|
+
<div>
|
|
61
|
+
<div
|
|
62
|
+
:style="{
|
|
63
|
+
width: 320,
|
|
64
|
+
height: 50,
|
|
65
|
+
fontSize: '25px',
|
|
66
|
+
textAlign: 'center',
|
|
67
|
+
lineHeight: '50px',
|
|
68
|
+
backgroundColor: item.id % 2 == 0 ? '#00ff00' : '#0000ff',
|
|
69
|
+
}"
|
|
70
|
+
>
|
|
71
|
+
{{ item.title }}
|
|
72
|
+
</div>
|
|
73
|
+
<JsvTextBox
|
|
74
|
+
:verticalAlign="'middle'"
|
|
75
|
+
:style="{
|
|
76
|
+
top: 50,
|
|
77
|
+
width: 320,
|
|
78
|
+
height: 70,
|
|
79
|
+
textShadow: item.textShadow,
|
|
80
|
+
backgroundColor: item.id % 2 == 0 ? '#ffffee' : '#ffff10',
|
|
81
|
+
fontSize: '35px',
|
|
82
|
+
textAlign: 'center',
|
|
83
|
+
lineHeight: '40px',
|
|
84
|
+
}"
|
|
85
|
+
>
|
|
86
|
+
文字阴影
|
|
87
|
+
</JsvTextBox>
|
|
88
|
+
</div>
|
|
89
|
+
</div>
|
|
90
|
+
</jsv-focus-block>
|
|
91
|
+
</template>
|
|
@@ -0,0 +1,336 @@
|
|
|
1
|
+
<script>
|
|
2
|
+
import {
|
|
3
|
+
jJsvRuntimeBridge,
|
|
4
|
+
getKeyFramesGroup,
|
|
5
|
+
JsvTextureAnim,
|
|
6
|
+
} from "jsview";
|
|
7
|
+
import img from "./assets/php2.png";
|
|
8
|
+
import swipLight from "./assets/swipLight.png";
|
|
9
|
+
|
|
10
|
+
export default {
|
|
11
|
+
components: {
|
|
12
|
+
JsvTextureAnim,
|
|
13
|
+
},
|
|
14
|
+
setup() {
|
|
15
|
+
let styleShell = getKeyFramesGroup();
|
|
16
|
+
|
|
17
|
+
const translateAnim =
|
|
18
|
+
"{from {transform: translate3d(-100%, -50%, 0);} to {transform: translate3d(100%, 50%, 0);}}";
|
|
19
|
+
const rotateAnim =
|
|
20
|
+
"{from {transform: rotate3d(1,-1,1,0);} to {transform: rotate3d(1,-1,1,360deg);}}";
|
|
21
|
+
const scaleAnim =
|
|
22
|
+
"{from {transform: scale3d(0.5, 0.5, 1);} to {transform: scale3d(1.5, 1.5, 1);}}";
|
|
23
|
+
|
|
24
|
+
const swipAnim =
|
|
25
|
+
"{from {transform: translate3d(-100%, 0, 0);} to {transform: translate3d(100%, 0, 0);}}";
|
|
26
|
+
|
|
27
|
+
return {
|
|
28
|
+
styleShell,
|
|
29
|
+
img,
|
|
30
|
+
borderRadius: "40px",
|
|
31
|
+
repeat: -1,
|
|
32
|
+
duration: 3000,
|
|
33
|
+
translateAnim,
|
|
34
|
+
rotateAnim,
|
|
35
|
+
scaleAnim,
|
|
36
|
+
swipAnim,
|
|
37
|
+
translateTransform: "translate3d(50%, 50%, 0)",
|
|
38
|
+
rotateTransform: "rotate3d(1,1,1, 30deg)",
|
|
39
|
+
scaleTransform: "scale3d(0.5, 1.5, 1.0)",
|
|
40
|
+
swipLight,
|
|
41
|
+
};
|
|
42
|
+
},
|
|
43
|
+
methods: {
|
|
44
|
+
onKeyDown(ev) {
|
|
45
|
+
// 8:Backspace, 27:Escape, 10000:盒子返回键
|
|
46
|
+
if (ev.keyCode == 8 || ev.keyCode == 27 || ev.keyCode == 10000) {
|
|
47
|
+
this.$router?.go(-1); // 有router时,是从DemoHomepage进入,回退
|
|
48
|
+
}
|
|
49
|
+
return true;
|
|
50
|
+
},
|
|
51
|
+
},
|
|
52
|
+
created() {
|
|
53
|
+
this.styleShell.insertRule(
|
|
54
|
+
"@keyframes texture-anim-translate " + this.translateAnim
|
|
55
|
+
);
|
|
56
|
+
this.styleShell.insertRule(
|
|
57
|
+
"@keyframes texture-anim-rotate " + this.rotateAnim
|
|
58
|
+
);
|
|
59
|
+
this.styleShell.insertRule(
|
|
60
|
+
"@keyframes texture-anim-scale " + this.scaleAnim
|
|
61
|
+
);
|
|
62
|
+
},
|
|
63
|
+
mounted() {
|
|
64
|
+
jJsvRuntimeBridge.notifyPageLoaded();
|
|
65
|
+
},
|
|
66
|
+
beforeUnmount() {
|
|
67
|
+
this.styleShell.removeRule("texture-anim-translate");
|
|
68
|
+
this.styleShell.removeRule("texture-anim-rotate");
|
|
69
|
+
this.styleShell.removeRule("texture-anim-scale");
|
|
70
|
+
},
|
|
71
|
+
};
|
|
72
|
+
</script>
|
|
73
|
+
<template>
|
|
74
|
+
<jsv-focus-block
|
|
75
|
+
autoFocus
|
|
76
|
+
:onKeyDown="onKeyDown"
|
|
77
|
+
:style="{
|
|
78
|
+
width: 1920,
|
|
79
|
+
height: 1080,
|
|
80
|
+
backgroundColor: '#007788',
|
|
81
|
+
}"
|
|
82
|
+
>
|
|
83
|
+
<div
|
|
84
|
+
:style="{
|
|
85
|
+
left: 100,
|
|
86
|
+
top: 20,
|
|
87
|
+
}"
|
|
88
|
+
>
|
|
89
|
+
<div
|
|
90
|
+
:style="{
|
|
91
|
+
width: 300,
|
|
92
|
+
height: 150,
|
|
93
|
+
backgroundColor: 'rgba(0,255,0,0.5)',
|
|
94
|
+
}"
|
|
95
|
+
/>
|
|
96
|
+
<jsv-texture-anim
|
|
97
|
+
ref="textureAnim1"
|
|
98
|
+
:src="img"
|
|
99
|
+
:width="300"
|
|
100
|
+
:height="150"
|
|
101
|
+
:animation="translateAnim"
|
|
102
|
+
:duration="duration"
|
|
103
|
+
:transform="null"
|
|
104
|
+
:borderRadius="borderRadius"
|
|
105
|
+
:repeat="repeat"
|
|
106
|
+
:autoStart="true"
|
|
107
|
+
></jsv-texture-anim>
|
|
108
|
+
<div
|
|
109
|
+
:style="{
|
|
110
|
+
width: 300,
|
|
111
|
+
height: 150,
|
|
112
|
+
backgroundColor: 'rgba(255,0,0,0.5)',
|
|
113
|
+
transform: null,
|
|
114
|
+
animation: `texture-anim-translate ${
|
|
115
|
+
duration / 1000
|
|
116
|
+
}s linear infinite`,
|
|
117
|
+
}"
|
|
118
|
+
/>
|
|
119
|
+
</div>
|
|
120
|
+
|
|
121
|
+
<div
|
|
122
|
+
:style="{
|
|
123
|
+
left: 100,
|
|
124
|
+
top: 230,
|
|
125
|
+
}"
|
|
126
|
+
>
|
|
127
|
+
<div
|
|
128
|
+
:style="{
|
|
129
|
+
width: 300,
|
|
130
|
+
height: 150,
|
|
131
|
+
backgroundColor: 'rgba(0,255,0,0.5)',
|
|
132
|
+
}"
|
|
133
|
+
/>
|
|
134
|
+
<jsv-texture-anim
|
|
135
|
+
ref="textureAnim1"
|
|
136
|
+
:src="img"
|
|
137
|
+
:width="300"
|
|
138
|
+
:height="150"
|
|
139
|
+
:animation="rotateAnim"
|
|
140
|
+
:duration="duration"
|
|
141
|
+
:transform="null"
|
|
142
|
+
:borderRadius="borderRadius"
|
|
143
|
+
:repeat="repeat"
|
|
144
|
+
:autoStart="true"
|
|
145
|
+
></jsv-texture-anim>
|
|
146
|
+
<div
|
|
147
|
+
:style="{
|
|
148
|
+
width: 300,
|
|
149
|
+
height: 150,
|
|
150
|
+
backgroundColor: 'rgba(255,0,0,0.5)',
|
|
151
|
+
transform: null,
|
|
152
|
+
animation: `texture-anim-rotate ${duration / 1000}s linear infinite`,
|
|
153
|
+
}"
|
|
154
|
+
/>
|
|
155
|
+
</div>
|
|
156
|
+
|
|
157
|
+
<div
|
|
158
|
+
:style="{
|
|
159
|
+
left: 100,
|
|
160
|
+
top: 460,
|
|
161
|
+
}"
|
|
162
|
+
>
|
|
163
|
+
<div
|
|
164
|
+
:style="{
|
|
165
|
+
width: 300,
|
|
166
|
+
height: 150,
|
|
167
|
+
backgroundColor: 'rgba(0,255,0,0.5)',
|
|
168
|
+
}"
|
|
169
|
+
/>
|
|
170
|
+
<jsv-texture-anim
|
|
171
|
+
ref="textureAnim1"
|
|
172
|
+
:src="img"
|
|
173
|
+
:width="300"
|
|
174
|
+
:height="150"
|
|
175
|
+
:animation="scaleAnim"
|
|
176
|
+
:duration="duration"
|
|
177
|
+
:transform="null"
|
|
178
|
+
:borderRadius="borderRadius"
|
|
179
|
+
:repeat="repeat"
|
|
180
|
+
:autoStart="true"
|
|
181
|
+
></jsv-texture-anim>
|
|
182
|
+
<div
|
|
183
|
+
:style="{
|
|
184
|
+
width: 300,
|
|
185
|
+
height: 150,
|
|
186
|
+
backgroundColor: 'rgba(255,0,0,0.5)',
|
|
187
|
+
transform: null,
|
|
188
|
+
animation: `texture-anim-scale ${duration / 1000}s linear infinite`,
|
|
189
|
+
}"
|
|
190
|
+
/>
|
|
191
|
+
</div>
|
|
192
|
+
<!-- transform sample -->
|
|
193
|
+
<div
|
|
194
|
+
:style="{
|
|
195
|
+
left: 500,
|
|
196
|
+
top: 20,
|
|
197
|
+
}"
|
|
198
|
+
>
|
|
199
|
+
<div
|
|
200
|
+
:style="{
|
|
201
|
+
width: 300,
|
|
202
|
+
height: 150,
|
|
203
|
+
backgroundColor: 'rgba(0,255,0,0.5)',
|
|
204
|
+
}"
|
|
205
|
+
/>
|
|
206
|
+
<jsv-texture-anim
|
|
207
|
+
ref="textureAnim1"
|
|
208
|
+
:src="img"
|
|
209
|
+
:width="300"
|
|
210
|
+
:height="150"
|
|
211
|
+
:duration="duration"
|
|
212
|
+
:transform="translateTransform"
|
|
213
|
+
:borderRadius="borderRadius"
|
|
214
|
+
:repeat="repeat"
|
|
215
|
+
:autoStart="true"
|
|
216
|
+
></jsv-texture-anim>
|
|
217
|
+
<div
|
|
218
|
+
:style="{
|
|
219
|
+
width: 300,
|
|
220
|
+
height: 150,
|
|
221
|
+
backgroundColor: 'rgba(255,0,0,0.5)',
|
|
222
|
+
transform: translateTransform,
|
|
223
|
+
}"
|
|
224
|
+
/>
|
|
225
|
+
</div>
|
|
226
|
+
|
|
227
|
+
<div
|
|
228
|
+
:style="{
|
|
229
|
+
left: 500,
|
|
230
|
+
top: 230,
|
|
231
|
+
}"
|
|
232
|
+
>
|
|
233
|
+
<div
|
|
234
|
+
:style="{
|
|
235
|
+
width: 300,
|
|
236
|
+
height: 150,
|
|
237
|
+
backgroundColor: 'rgba(0,255,0,0.5)',
|
|
238
|
+
}"
|
|
239
|
+
/>
|
|
240
|
+
<jsv-texture-anim
|
|
241
|
+
ref="textureAnim1"
|
|
242
|
+
:src="img"
|
|
243
|
+
:width="300"
|
|
244
|
+
:height="150"
|
|
245
|
+
:duration="duration"
|
|
246
|
+
:transform="rotateTransform"
|
|
247
|
+
:borderRadius="borderRadius"
|
|
248
|
+
:repeat="repeat"
|
|
249
|
+
:autoStart="true"
|
|
250
|
+
></jsv-texture-anim>
|
|
251
|
+
<div
|
|
252
|
+
:style="{
|
|
253
|
+
width: 300,
|
|
254
|
+
height: 150,
|
|
255
|
+
backgroundColor: 'rgba(255,0,0,0.5)',
|
|
256
|
+
transform: rotateTransform,
|
|
257
|
+
}"
|
|
258
|
+
/>
|
|
259
|
+
</div>
|
|
260
|
+
|
|
261
|
+
<div
|
|
262
|
+
:style="{
|
|
263
|
+
left: 500,
|
|
264
|
+
top: 460,
|
|
265
|
+
}"
|
|
266
|
+
>
|
|
267
|
+
<div
|
|
268
|
+
:style="{
|
|
269
|
+
width: 300,
|
|
270
|
+
height: 150,
|
|
271
|
+
backgroundColor: 'rgba(0,255,0,0.5)',
|
|
272
|
+
}"
|
|
273
|
+
/>
|
|
274
|
+
<jsv-texture-anim
|
|
275
|
+
ref="textureAnim1"
|
|
276
|
+
:src="img"
|
|
277
|
+
:width="300"
|
|
278
|
+
:height="150"
|
|
279
|
+
:duration="duration"
|
|
280
|
+
:transform="scaleTransform"
|
|
281
|
+
:borderRadius="borderRadius"
|
|
282
|
+
:repeat="repeat"
|
|
283
|
+
:autoStart="true"
|
|
284
|
+
></jsv-texture-anim>
|
|
285
|
+
<div
|
|
286
|
+
:style="{
|
|
287
|
+
width: 300,
|
|
288
|
+
height: 150,
|
|
289
|
+
backgroundColor: 'rgba(255,0,0,0.5)',
|
|
290
|
+
transform: scaleTransform,
|
|
291
|
+
}"
|
|
292
|
+
/>
|
|
293
|
+
</div>
|
|
294
|
+
<!-- swip light -->
|
|
295
|
+
<div
|
|
296
|
+
:style="{
|
|
297
|
+
left: 850,
|
|
298
|
+
top: 460,
|
|
299
|
+
}"
|
|
300
|
+
>
|
|
301
|
+
<div
|
|
302
|
+
:style="{
|
|
303
|
+
width: 300,
|
|
304
|
+
height: 150,
|
|
305
|
+
backgroundColor: 'rgba(0,255,0,0.5)',
|
|
306
|
+
}"
|
|
307
|
+
/>
|
|
308
|
+
<jsv-texture-anim
|
|
309
|
+
ref="textureAnim1"
|
|
310
|
+
:src="swipLight"
|
|
311
|
+
:animation="swipAnim"
|
|
312
|
+
:width="300"
|
|
313
|
+
:height="150"
|
|
314
|
+
:duration="duration"
|
|
315
|
+
transform="scale3d(0.5, 1, 1) rotate3d(0,0,1, 30deg)"
|
|
316
|
+
:borderRadius="borderRadius"
|
|
317
|
+
:repeat="repeat"
|
|
318
|
+
:autoStart="true"
|
|
319
|
+
></jsv-texture-anim>
|
|
320
|
+
</div>
|
|
321
|
+
|
|
322
|
+
<!-- 说明文字 -->
|
|
323
|
+
<div
|
|
324
|
+
:style="{
|
|
325
|
+
left: 100,
|
|
326
|
+
top: 620,
|
|
327
|
+
width: 1920,
|
|
328
|
+
height: 200,
|
|
329
|
+
fontSize: 30,
|
|
330
|
+
color: '#000000',
|
|
331
|
+
}"
|
|
332
|
+
>
|
|
333
|
+
{{ "1. 注意圆角\n2. 红色半透明的view为标准, 图片的动画需要与其一致" }}
|
|
334
|
+
</div>
|
|
335
|
+
</jsv-focus-block>
|
|
336
|
+
</template>
|