@shijiu/jsview-vue 1.9.731 → 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.
Files changed (217) hide show
  1. package/index.d.ts +4 -1
  2. package/index.js +4 -1
  3. package/package.json +5 -16
  4. package/samples/AnimPicture/App.vue +0 -207
  5. package/samples/AnimPicture/assets/animated_webp.webp +0 -0
  6. package/samples/AnimPicture/assets/ball_3.webp +0 -0
  7. package/samples/AnimPicture/assets/girl_run.gif +0 -0
  8. package/samples/AnimPicture/assets/quan.webp +0 -0
  9. package/samples/Basic/App.vue +0 -134
  10. package/samples/Basic/assets/border.png +0 -0
  11. package/samples/Basic/assets/border2.png +0 -0
  12. package/samples/Basic/assets/icon.png +0 -0
  13. package/samples/Basic/assets/test.jpg +0 -0
  14. package/samples/Basic/components/ContentBlock.vue +0 -38
  15. package/samples/Basic/components/FontStyle.css +0 -16
  16. package/samples/Basic/components/anim/AnimGroup.vue +0 -66
  17. package/samples/Basic/components/anim/AnimKeyframeBasic.vue +0 -119
  18. package/samples/Basic/components/anim/AnimKeyframeComposite.vue +0 -52
  19. package/samples/Basic/components/anim/AnimTransition.vue +0 -157
  20. package/samples/Basic/components/div/DivBackground.vue +0 -44
  21. package/samples/Basic/components/div/DivClip.vue +0 -159
  22. package/samples/Basic/components/div/DivCssScoped.vue +0 -20
  23. package/samples/Basic/components/div/DivCssVar.vue +0 -53
  24. package/samples/Basic/components/div/DivGroup1.vue +0 -47
  25. package/samples/Basic/components/div/DivGroup2.vue +0 -65
  26. package/samples/Basic/components/div/DivLayout.vue +0 -70
  27. package/samples/Basic/components/div/DivRadius.vue +0 -65
  28. package/samples/Basic/components/div/DivTransform.vue +0 -32
  29. package/samples/Basic/components/img/ImageGroup.vue +0 -31
  30. package/samples/Basic/components/img/ImgLayout.vue +0 -41
  31. package/samples/Basic/components/panel/Panel1.vue +0 -55
  32. package/samples/Basic/components/panel/Panel2.vue +0 -31
  33. package/samples/Basic/components/panel/TitleBar.vue +0 -29
  34. package/samples/Basic/components/text/TextAlign.vue +0 -66
  35. package/samples/Basic/components/text/TextEmoji.vue +0 -26
  36. package/samples/Basic/components/text/TextFontStyle.vue +0 -89
  37. package/samples/Basic/components/text/TextGroup1.vue +0 -49
  38. package/samples/Basic/components/text/TextGroup2.vue +0 -28
  39. package/samples/Basic/components/text/TextOverflow.vue +0 -110
  40. package/samples/BasicFocusControl/App.vue +0 -104
  41. package/samples/BasicFocusControl/components/BaseBlock.vue +0 -50
  42. package/samples/BasicFocusControl/components/MainArea.vue +0 -83
  43. package/samples/BasicFocusControl/components/MainAreaLeftBlock.vue +0 -17
  44. package/samples/BasicFocusControl/components/MainAreaRightBlock.vue +0 -27
  45. package/samples/BasicFocusControl/components/SideBar.vue +0 -58
  46. package/samples/BasicFocusControl/components/SideBarBlock.vue +0 -27
  47. package/samples/Collision/App.vue +0 -452
  48. package/samples/ColorSpace/App.vue +0 -126
  49. package/samples/DemoHomepage/App.vue +0 -27
  50. package/samples/DemoHomepage/components/BodyFrame.vue +0 -95
  51. package/samples/DemoHomepage/components/Dialog.vue +0 -94
  52. package/samples/DemoHomepage/components/Item.vue +0 -77
  53. package/samples/DemoHomepage/components/TabFrame.vue +0 -85
  54. package/samples/DemoHomepage/router.js +0 -196
  55. package/samples/DemoHomepage/views/Homepage.vue +0 -195
  56. package/samples/FilterDemo/AnimatePic.vue +0 -58
  57. package/samples/FilterDemo/App.vue +0 -159
  58. package/samples/FilterDemo/VideoLayer.vue +0 -62
  59. package/samples/FlipCard/App.vue +0 -71
  60. package/samples/FlipCard/FlipCard.vue +0 -118
  61. package/samples/FlipCard/assets/blue_egg.png +0 -0
  62. package/samples/FlipCard/assets/red_egg.png +0 -0
  63. package/samples/FlipCard/data.js +0 -13
  64. package/samples/GridDemo/App.vue +0 -215
  65. package/samples/GridDemo/ButtonBlock.vue +0 -112
  66. package/samples/GridDemo/FocusItem.vue +0 -37
  67. package/samples/GridDemo/Item.vue +0 -93
  68. package/samples/HashHistory/App.vue +0 -115
  69. package/samples/HashHistory/components/HorizontalButtonList.vue +0 -91
  70. package/samples/HashHistory/components/Item.vue +0 -60
  71. package/samples/HashHistory/router.js +0 -41
  72. package/samples/HashHistory/views/MainPage.vue +0 -57
  73. package/samples/HashHistory/views/SubPage.vue +0 -66
  74. package/samples/ImpactStop/App.vue +0 -435
  75. package/samples/Input/App.vue +0 -164
  76. package/samples/Input/FullKeyboard.vue +0 -87
  77. package/samples/Input/InputPanel.vue +0 -131
  78. package/samples/Input/KeyboardItem.vue +0 -58
  79. package/samples/LongImage/App.vue +0 -80
  80. package/samples/LongImage/Button.vue +0 -58
  81. package/samples/LongImage/ButtonItem.vue +0 -44
  82. package/samples/LongImage/LongImageScroll.vue +0 -92
  83. package/samples/LongImage/Scroll.vue +0 -14
  84. package/samples/LongImage/assets/1280x7200.jpg +0 -0
  85. package/samples/LongText/App.vue +0 -96
  86. package/samples/LongText/Button.vue +0 -51
  87. package/samples/LongText/ButtonItem.vue +0 -44
  88. package/samples/LongText/LongTextScroll.vue +0 -192
  89. package/samples/LongText/Scroll.vue +0 -14
  90. package/samples/Marquee/App.vue +0 -247
  91. package/samples/Marquee/longText.js +0 -14
  92. package/samples/MaskClip/App.vue +0 -122
  93. package/samples/MaskClip/images/mask-025/config.json +0 -29
  94. package/samples/MaskClip/images/mask-025/res/1.png +0 -0
  95. package/samples/MaskClip/images/mask-025/res/2.png +0 -0
  96. package/samples/MaskClip/images/mask-025/res/3.png +0 -0
  97. package/samples/MaskClip/images/mask-025/res/4.png +0 -0
  98. package/samples/MaskClip/images/mask-025/res/icon.png +0 -0
  99. package/samples/MaskClip/images/mask-025/res/stroke.png +0 -0
  100. package/samples/MaskClip/images/php.jpg +0 -0
  101. package/samples/MetroWidgetDemos/Advanced/App.vue +0 -46
  102. package/samples/MetroWidgetDemos/Advanced/ButtonItem.vue +0 -90
  103. package/samples/MetroWidgetDemos/Advanced/Buttons.vue +0 -70
  104. package/samples/MetroWidgetDemos/Advanced/Mixed.vue +0 -77
  105. package/samples/MetroWidgetDemos/Advanced/widgets/Item.vue +0 -83
  106. package/samples/MetroWidgetDemos/Advanced/widgets/WidgetItem.vue +0 -89
  107. package/samples/MetroWidgetDemos/Advanced/widgets/Widgets.vue +0 -116
  108. package/samples/MetroWidgetDemos/Advanced/widgets/focus1.png +0 -0
  109. package/samples/MetroWidgetDemos/Item.vue +0 -85
  110. package/samples/MetroWidgetDemos/PerformanceTest/App.vue +0 -210
  111. package/samples/MetroWidgetDemos/PerformanceTest/Item.vue +0 -90
  112. package/samples/MetroWidgetDemos/PerformanceTest/assets/bg.jpg +0 -0
  113. package/samples/MetroWidgetDemos/PerformanceTest/assets/coupon_content.png +0 -0
  114. package/samples/MetroWidgetDemos/PerformanceTest/assets/coupon_left.png +0 -0
  115. package/samples/MetroWidgetDemos/PerformanceTest/assets/coupon_mid.png +0 -0
  116. package/samples/MetroWidgetDemos/PerformanceTest/assets/coupon_right.png +0 -0
  117. package/samples/MetroWidgetDemos/PerformanceTest/assets/focus_border.png +0 -0
  118. package/samples/MetroWidgetDemos/PerformanceTest/assets/holder_logo.png +0 -0
  119. package/samples/MetroWidgetDemos/PerformanceTest/assets/jrbm.png +0 -0
  120. package/samples/MetroWidgetDemos/PerformanceTest/assets/line_left.png +0 -0
  121. package/samples/MetroWidgetDemos/PerformanceTest/assets/line_mid.png +0 -0
  122. package/samples/MetroWidgetDemos/PerformanceTest/assets/line_right.png +0 -0
  123. package/samples/MetroWidgetDemos/PerformanceTest/assets/loading.png +0 -0
  124. package/samples/MetroWidgetDemos/PerformanceTest/assets/logo.png +0 -0
  125. package/samples/MetroWidgetDemos/PerformanceTest/assets/mcjx.png +0 -0
  126. package/samples/MetroWidgetDemos/PerformanceTest/assets/tao.png +0 -0
  127. package/samples/MetroWidgetDemos/PerformanceTest/assets/tmall.png +0 -0
  128. package/samples/MetroWidgetDemos/PerformanceTest/border.png +0 -0
  129. package/samples/MetroWidgetDemos/PerformanceTest/components/ContentItem.vue +0 -386
  130. package/samples/MetroWidgetDemos/PerformanceTest/components/MyTab.vue +0 -129
  131. package/samples/MetroWidgetDemos/PerformanceTest/data.js +0 -45
  132. package/samples/MetroWidgetDemos/PingPong/App.vue +0 -135
  133. package/samples/MetroWidgetDemos/PingPong/AppPage.vue +0 -73
  134. package/samples/MetroWidgetDemos/PingPong/AppTab.vue +0 -62
  135. package/samples/MetroWidgetDemos/PingPong/TabItem.vue +0 -84
  136. package/samples/MetroWidgetDemos/PingPong/ViewSwiper.vue +0 -214
  137. package/samples/MetroWidgetDemos/Simple/AbsoluteTemplate.vue +0 -75
  138. package/samples/MetroWidgetDemos/Simple/App.vue +0 -45
  139. package/samples/MetroWidgetDemos/Simple/RelativeTemplate.vue +0 -111
  140. package/samples/MetroWidgetDemos/WidgetItem.vue +0 -89
  141. package/samples/MetroWidgetDemos/data.js +0 -205
  142. package/samples/NinePatchDemo/App.vue +0 -145
  143. package/samples/NinePatchDemo/Item.vue +0 -69
  144. package/samples/NinePatchDemo/assets/border.png +0 -0
  145. package/samples/Preload/App.vue +0 -135
  146. package/samples/Preload/Item.vue +0 -32
  147. package/samples/Preload/data.js +0 -23
  148. package/samples/Preload/images/awesomeface.png +0 -0
  149. package/samples/Preload/images/cat.jpg +0 -0
  150. package/samples/Preload/images/rank.png +0 -0
  151. package/samples/Preload/images/rank_focus.png +0 -0
  152. package/samples/Preload/images/rule.png +0 -0
  153. package/samples/Preload/images/rule_focus.png +0 -0
  154. package/samples/Preload/images/start.png +0 -0
  155. package/samples/Preload/images/start_focus.png +0 -0
  156. package/samples/QrcodeDemo/App.vue +0 -68
  157. package/samples/ScaleDownNeon/App.vue +0 -107
  158. package/samples/SoundPool/App.vue +0 -134
  159. package/samples/SoundPool/bgmusic.mp3 +0 -0
  160. package/samples/SoundPool/coin.mp3 +0 -0
  161. package/samples/SoundPool/jump.mp3 +0 -0
  162. package/samples/SoundPool/lose.mp3 +0 -0
  163. package/samples/SoundPool/run.mp3 +0 -0
  164. package/samples/SprayView/App.vue +0 -272
  165. package/samples/SprayView/assets/snow.png +0 -0
  166. package/samples/SpriteImage/App.vue +0 -173
  167. package/samples/SpriteImage/images/cat_run.png +0 -0
  168. package/samples/SpriteImage/images/egg_break.json +0 -116
  169. package/samples/SpriteImage/images/egg_break.png +0 -0
  170. package/samples/SpriteImage/images/sprite.png +0 -0
  171. package/samples/TextBox/App.vue +0 -91
  172. package/samples/TextBox/RenderCenter.vue +0 -133
  173. package/samples/TextBox/RenderLeft.vue +0 -138
  174. package/samples/TextBox/RenderOneLine.vue +0 -101
  175. package/samples/TextBox/RenderRight.vue +0 -131
  176. package/samples/TextShadowDemo/App.vue +0 -91
  177. package/samples/TextureAnimation/App.vue +0 -336
  178. package/samples/TextureAnimation/App2.vue +0 -111
  179. package/samples/TextureAnimation/assets/blackWhiteGrid.png +0 -0
  180. package/samples/TextureAnimation/assets/light.png +0 -0
  181. package/samples/TextureAnimation/assets/light2.png +0 -0
  182. package/samples/TextureAnimation/assets/mask.png +0 -0
  183. package/samples/TextureAnimation/assets/php.jpg +0 -0
  184. package/samples/TextureAnimation/assets/php2.png +0 -0
  185. package/samples/TextureAnimation/assets/swipLight.png +0 -0
  186. package/samples/TextureSize/App.vue +0 -132
  187. package/samples/TextureSize/bmpDemo.bmp +0 -0
  188. package/samples/TextureSize/jpegDemo.jpeg +0 -0
  189. package/samples/TextureSize/jpgDemo.jpg +0 -0
  190. package/samples/TextureSize/pngDemo.png +0 -0
  191. package/samples/TextureSize/pngNoAlphaDemo.png +0 -0
  192. package/samples/ThrowMoveDemo/AccelerateDemo.vue +0 -116
  193. package/samples/ThrowMoveDemo/App.vue +0 -114
  194. package/samples/ThrowMoveDemo/LRParabolicDemo.vue +0 -115
  195. package/samples/ThrowMoveDemo/TargetDemo.vue +0 -116
  196. package/samples/ThrowMoveDemo/UDParabolicDemo.vue +0 -121
  197. package/samples/TouchSample/App.vue +0 -136
  198. package/samples/TouchSample/Item.vue +0 -103
  199. package/samples/TouchSample/MetroWidgetHorizontal.vue +0 -144
  200. package/samples/TouchSample/MetroWidgetVertical.vue +0 -144
  201. package/samples/TouchSample/TouchContainerHorizontal.vue +0 -160
  202. package/samples/TouchSample/TouchContainerVertical.vue +0 -160
  203. package/samples/TouchSample/data.js +0 -81
  204. package/samples/TransitPage/App.vue +0 -29
  205. package/samples/VideoDemo/App.vue +0 -121
  206. package/samples/VideoDemo/components/Button.vue +0 -58
  207. package/samples/VideoDemo/components/Controllor.vue +0 -197
  208. package/samples/VideoDemo/components/VideoFrame.vue +0 -140
  209. package/samples/VisibleSensorDemo/App.vue +0 -234
  210. package/samples/assets/bmpDemo.bmp +0 -0
  211. package/samples/assets/jpegDemo.jpeg +0 -0
  212. package/samples/assets/pngDemo.png +0 -0
  213. package/samples/assets/pngNoAlphaDemo.png +0 -0
  214. package/samples/assets/webpDemo.webp +0 -0
  215. package/tsconfig.json +0 -47
  216. package/utils/index.d.ts +0 -3
  217. package/utils/index.js +0 -10
@@ -1,144 +0,0 @@
1
- <script>
2
- import {
3
- VERTICAL,
4
- MetroWidget,
5
- WholePageSlide,
6
- SeamlessSlide,
7
- FixPositionSlide,
8
- } from "jsview";
9
-
10
- import Item from "./Item.vue";
11
-
12
- import { metroWidgetV, measures } from "./data.js";
13
- import { ref, shallowRef } from "vue";
14
-
15
- export default {
16
- components: {
17
- MetroWidget,
18
- Item,
19
- },
20
- setup() {
21
- return {
22
- measures,
23
- name: "/metroWidgetH",
24
- direction: VERTICAL,
25
- wholePageSlide: new WholePageSlide({
26
- speed: 1.5,
27
- }),
28
- seamlessSlide: new SeamlessSlide({
29
- startPercent: 0.4,
30
- endPercent: 0.6,
31
- speed: 0.5,
32
- }),
33
- fixPositionSlide: new FixPositionSlide({
34
- fixPercent: 0.5,
35
- speed: 0.5,
36
- }),
37
- token: ref(0),
38
- CONST_ITEM_WIDTH: 300,
39
- CONST_ITEM_HEIGHT: 100,
40
- };
41
- },
42
- methods: {
43
- _provideData() {
44
- return metroWidgetV;
45
- },
46
- },
47
-
48
- mounted() {},
49
- };
50
- </script>
51
-
52
- <template>
53
- <div class="rootSize">
54
- <div :style="{ width: 1280, height: 720, left: 50, overflow: 'hidden' }">
55
- <div
56
- :style="{
57
- left: 0,
58
- width: 200,
59
- height: 40,
60
- fontSize: 25,
61
- lineHeight: '40px',
62
- color: '#fff753',
63
- }"
64
- >
65
- 整页滑动
66
- </div>
67
- <div
68
- :style="{
69
- left: 200,
70
- width: CONST_ITEM_WIDTH + 20,
71
- height: CONST_ITEM_HEIGHT * 5 + 20,
72
- backgroundColor: '#ff0000',
73
- }"
74
- >
75
- <metro-widget
76
- name="simpleWidgetVertical1"
77
- :width="CONST_ITEM_WIDTH + 20"
78
- :height="CONST_ITEM_HEIGHT * 5 + 20"
79
- :direction="direction"
80
- :measures="measures"
81
- :provideData="_provideData"
82
- :padding="{ top: 10, left: 10, right: 10, bottom: 10 }"
83
- :enableTouch="true"
84
- :flingPageWidth="CONST_ITEM_HEIGHT * 5"
85
- >
86
- <template #renderItem="{ data, query, onEdge, onAction }">
87
- <item
88
- :data="data"
89
- :query="query"
90
- :onEdge="onEdge"
91
- :onAction="onAction"
92
- /> </template
93
- ></metro-widget>
94
- </div>
95
- <div
96
- :style="{
97
- left: 600,
98
- width: 200,
99
- height: 40,
100
- fontSize: 25,
101
- lineHeight: '40px',
102
- color: '#fff753',
103
- }"
104
- >
105
- 普通滑动
106
- </div>
107
- <div
108
- :style="{
109
- left: 800,
110
- width: CONST_ITEM_WIDTH + 20,
111
- height: CONST_ITEM_HEIGHT * 5 + 20,
112
- backgroundColor: '#ff0000',
113
- }"
114
- >
115
- <metro-widget
116
- name="simpleWidgetVertical2"
117
- :width="CONST_ITEM_WIDTH + 20"
118
- :height="CONST_ITEM_HEIGHT * 5 + 20"
119
- :direction="direction"
120
- :measures="measures"
121
- :provideData="_provideData"
122
- :padding="{ top: 10, left: 10, right: 10, bottom: 10 }"
123
- :enableTouch="true"
124
- >
125
- <template #renderItem="{ data, query, onEdge, onAction }">
126
- <item
127
- :data="data"
128
- :query="query"
129
- :onEdge="onEdge"
130
- :onAction="onAction"
131
- /> </template
132
- ></metro-widget>
133
- </div>
134
- </div>
135
- </div>
136
- </template>
137
-
138
- <style scoped>
139
- .rootSize {
140
- width: 1920;
141
- height: 1080;
142
- background-color: #334c4c;
143
- }
144
- </style>
@@ -1,160 +0,0 @@
1
- <!--
2
- * @Author: ChenChanghua
3
- * @Date: 2022-04-10 21:21:02
4
- * @LastEditors: ChenChanghua
5
- * @LastEditTime: 2022-07-08 14:40:19
6
- * @Description: file content
7
- -->
8
- <script>
9
- import {
10
- JsvTouchContainer,
11
- DIRECTION_VERTICAL,
12
- DIRECTION_HORIZONTAL,
13
- DIRECTION_DISABLE,
14
- } from "jsview";
15
- import { touchContainerH, measures } from "./data.js";
16
- function randomColor() {
17
- let randomColor = Math.round(Math.random() * 2 ** 24).toString(16);
18
- return (
19
- "#" + new Array(6 - randomColor.length).fill("0").join("") + randomColor
20
- );
21
- }
22
- export default {
23
- components: {
24
- JsvTouchContainer,
25
- },
26
- setup() {
27
- return {
28
- DIRECTION_VERTICAL,
29
- DIRECTION_HORIZONTAL,
30
- DIRECTION_DISABLE,
31
- touchContainerH,
32
- measures,
33
- randomColor,
34
- };
35
- },
36
- methods: {
37
- _onClick(msg) {
38
- console.log(`_onClick:${JSON.stringify(msg)}`);
39
- return true;
40
- },
41
- },
42
- };
43
- </script>
44
-
45
- <template>
46
- <div :style="{ width: 1280, height: 720, overflow: 'hidden' }">
47
- <jsv-touch-container
48
- :style="{ width: 1280, height: 720 * 2, backgroundColor: '#7b7a1c' }"
49
- :direction="DIRECTION_VERTICAL"
50
- :dragLimitArea="{ x: 0, y: 0, width: 1280, height: 720 }"
51
- >
52
- <div
53
- :style="{
54
- left: 30,
55
- top: 0,
56
- width: 400,
57
- height: 30,
58
- fontSize: 18,
59
- lineHeight: '30px',
60
- color: '#f0ef29',
61
- }"
62
- >
63
- 整屏幕滑动
64
- </div>
65
- <jsv-touch-container
66
- :style="{
67
- left: 0,
68
- top: 40,
69
- width: (1280 - 60) * 5,
70
- height: 220,
71
- backgroundColor: 'rgba(255,0,0,0.5)',
72
- }"
73
- :direction="DIRECTION_HORIZONTAL"
74
- :flingPageWidth="1280 - 60"
75
- :dragLimitArea="{ x: 0, y: 0, width: 1280 - 60, height: 220 }"
76
- >
77
- <div
78
- v-for="(tabList, tabIndex) in touchContainerH"
79
- :key="'tab' + tabIndex"
80
- :style="{
81
- left: (1280 - 60) * tabIndex,
82
- top: 0,
83
- width: 1280 - 60,
84
- height: 220,
85
- backgroundColor: randomColor(),
86
- }"
87
- >
88
- <jsv-touch-container
89
- v-for="(item, itemIndex) in tabList"
90
- :key="'tab' + tabIndex + '-' + itemIndex"
91
- :style="{
92
- left: item.left,
93
- top: item.top,
94
- width: item.width,
95
- height: item.height,
96
- backgroundColor: item.backgroundColor,
97
- fontSize: 18,
98
- }"
99
- :onClick="_onClick"
100
- :direction="DIRECTION_DISABLE"
101
- >{{ item.content }}</jsv-touch-container
102
- >
103
- </div>
104
- </jsv-touch-container>
105
-
106
- <div
107
- :style="{
108
- left: 30,
109
- top: 280,
110
- width: 400,
111
- height: 40,
112
- fontSize: 18,
113
- lineHeight: '40px',
114
- color: '#f0ef29',
115
- }"
116
- >
117
- 左右滑动
118
- </div>
119
- <jsv-touch-container
120
- :style="{
121
- left: 0,
122
- top: 320,
123
- width: (1280 - 60) * 5,
124
- height: 220,
125
- backgroundColor: '#1d9797',
126
- }"
127
- :direction="DIRECTION_HORIZONTAL"
128
- :dragLimitArea="{ x: 0, y: 0, width: 1280 - 60, height: 220 }"
129
- >
130
- <div
131
- v-for="(tabList, tabIndex) in touchContainerH"
132
- :key="'tab' + tabIndex"
133
- :style="{
134
- left: (1280 - 60) * tabIndex,
135
- top: 0,
136
- width: 1280 - 60,
137
- height: 220,
138
- backgroundColor: randomColor(),
139
- }"
140
- >
141
- <jsv-touch-container
142
- v-for="(item, itemIndex) in tabList"
143
- :key="'tab' + tabIndex + '-' + itemIndex"
144
- :style="{
145
- left: item.left,
146
- top: item.top,
147
- width: item.width,
148
- height: item.height,
149
- backgroundColor: item.backgroundColor,
150
- fontSize: 18,
151
- }"
152
- :onClick="_onClick"
153
- :direction="DIRECTION_DISABLE"
154
- >{{ item.content }}</jsv-touch-container
155
- >
156
- </div>
157
- </jsv-touch-container>
158
- </jsv-touch-container>
159
- </div>
160
- </template>
@@ -1,160 +0,0 @@
1
- <!--
2
- * @Author: ChenChanghua
3
- * @Date: 2022-04-10 21:21:02
4
- * @LastEditors: ChenChanghua
5
- * @LastEditTime: 2022-04-11 09:04:26
6
- * @Description: file content
7
- -->
8
- <script>
9
- import {
10
- JsvTouchContainer,
11
- DIRECTION_VERTICAL,
12
- DIRECTION_HORIZONTAL,
13
- DIRECTION_DISABLE,
14
- } from "jsview";
15
- import { touchContainerV, measures } from "./data.js";
16
- function randomColor() {
17
- let randomColor = Math.round(Math.random() * 2 ** 24).toString(16);
18
- return (
19
- "#" + new Array(6 - randomColor.length).fill("0").join("") + randomColor
20
- );
21
- }
22
- export default {
23
- components: {
24
- JsvTouchContainer,
25
- },
26
- setup() {
27
- return {
28
- DIRECTION_VERTICAL,
29
- DIRECTION_HORIZONTAL,
30
- DIRECTION_DISABLE,
31
- touchContainerV,
32
- measures,
33
- randomColor,
34
- };
35
- },
36
- methods: {
37
- _onClick(msg) {
38
- console.log(`_onClick:${JSON.stringify(msg)}`);
39
- return true;
40
- },
41
- },
42
- };
43
- </script>
44
-
45
- <template>
46
- <div :style="{ width: 1280, height: 720, overflow: 'hidden' }">
47
- <jsv-touch-container
48
- :style="{ width: 1280, height: 720 * 2, backgroundColor: '#7b7a1c' }"
49
- :direction="DIRECTION_HORIZONTAL"
50
- :dragLimitArea="{ x: 0, y: 0, width: 1280, height: 720 }"
51
- >
52
- <div
53
- :style="{
54
- left: 30,
55
- top: 0,
56
- width: 400,
57
- height: 40,
58
- fontSize: 25,
59
- lineHeight: '40px',
60
- color: '#f0ef29',
61
- }"
62
- >
63
- 整屏幕滑动
64
- </div>
65
- <jsv-touch-container
66
- :style="{
67
- left: 30,
68
- top: 50,
69
- width: 400,
70
- height: 500 * 5,
71
- backgroundColor: '#810000',
72
- }"
73
- :direction="DIRECTION_VERTICAL"
74
- :flingPageWidth="500"
75
- :dragLimitArea="{ x: 0, y: 0, width: 400, height: 500 }"
76
- >
77
- <div
78
- v-for="(tabList, tabIndex) in touchContainerV"
79
- :key="'tab' + tabIndex"
80
- :style="{
81
- left: 0,
82
- top: 500 * tabIndex,
83
- width: 400,
84
- height: 500,
85
- backgroundColor: randomColor(),
86
- }"
87
- >
88
- <jsv-touch-container
89
- v-for="(item, itemIndex) in tabList"
90
- :key="'tab' + tabIndex + '-' + itemIndex"
91
- :style="{
92
- left: item.left,
93
- top: item.top,
94
- width: item.width,
95
- height: item.height,
96
- backgroundColor: item.backgroundColor,
97
- fontSize: 18,
98
- }"
99
- :onClick="_onClick"
100
- :direction="DIRECTION_DISABLE"
101
- >{{ item.content }}</jsv-touch-container
102
- >
103
- </div>
104
- </jsv-touch-container>
105
-
106
- <div
107
- :style="{
108
- left: 530,
109
- top: 0,
110
- width: 400,
111
- height: 40,
112
- fontSize: 25,
113
- lineHeight: '40px',
114
- color: '#f0ef29',
115
- }"
116
- >
117
- 上下滑动
118
- </div>
119
- <jsv-touch-container
120
- :style="{
121
- left: 530,
122
- top: 50,
123
- width: 400,
124
- height: 500 * 5,
125
- backgroundColor: '#810000',
126
- }"
127
- :direction="DIRECTION_VERTICAL"
128
- :dragLimitArea="{ x: 0, y: 0, width: 400, height: 500 }"
129
- >
130
- <div
131
- v-for="(tabList, tabIndex) in touchContainerV"
132
- :key="'tab' + tabIndex"
133
- :style="{
134
- left: 0,
135
- top: 500 * tabIndex,
136
- width: 400,
137
- height: 500,
138
- backgroundColor: randomColor(),
139
- }"
140
- >
141
- <jsv-touch-container
142
- v-for="(item, itemIndex) in tabList"
143
- :key="'tab' + tabIndex + '-' + itemIndex"
144
- :style="{
145
- left: item.left,
146
- top: item.top,
147
- width: item.width,
148
- height: item.height,
149
- backgroundColor: item.backgroundColor,
150
- fontSize: 18,
151
- }"
152
- :onClick="_onClick"
153
- :direction="DIRECTION_DISABLE"
154
- >{{ item.content }}</jsv-touch-container
155
- >
156
- </div>
157
- </jsv-touch-container>
158
- </jsv-touch-container>
159
- </div>
160
- </template>
@@ -1,81 +0,0 @@
1
- /*
2
- * @Author: ChenChanghua
3
- * @Date: 2022-04-10 21:23:15
4
- * @LastEditors: ChenChanghua
5
- * @LastEditTime: 2022-04-11 10:03:21
6
- * @Description: file content
7
- */
8
- function randomColor() {
9
- let randomColor = Math.round(Math.random() * 2 ** 24).toString(16);
10
- return (
11
- "#" + new Array(6 - randomColor.length).fill("0").join("") + randomColor
12
- );
13
- }
14
-
15
- const metroWidgetH = [];
16
- for (let i = 0; i < 500; i++) {
17
- metroWidgetH.push({
18
- content: i,
19
- id: i,
20
- width: 100,
21
- height: 200,
22
- color: randomColor(),
23
- });
24
- }
25
-
26
- const metroWidgetV = [];
27
- for (let i = 0; i < 500; i++) {
28
- metroWidgetV.push({
29
- content: i,
30
- id: i,
31
- width: 200,
32
- height: 100,
33
- color: randomColor(),
34
- });
35
- }
36
-
37
- const touchContainerH = [];
38
- for (let i = 0; i < 5; i++) {
39
- const tabData = [];
40
- for (let i = 0; i < 20; i++) {
41
- tabData.push({
42
- content: i,
43
- id: i,
44
- left: (122 / 2) * i,
45
- top: 10,
46
- width: 122 / 2 - 10,
47
- height: 200,
48
- backgroundColor: randomColor(),
49
- });
50
- }
51
- touchContainerH.push(tabData);
52
- }
53
-
54
- const touchContainerV = [];
55
- for (let i = 0; i < 5; i++) {
56
- const tabData = [];
57
- for (let i = 0; i < 20; i++) {
58
- tabData.push({
59
- content: i,
60
- id: i,
61
- left: 10,
62
- top: 50 * i,
63
- width: 300,
64
- height: 40,
65
- backgroundColor: randomColor(),
66
- });
67
- }
68
- touchContainerV.push(tabData);
69
- }
70
-
71
- function measures(item) {
72
- return item;
73
- }
74
-
75
- export {
76
- metroWidgetH,
77
- metroWidgetV,
78
- touchContainerH,
79
- touchContainerV,
80
- measures,
81
- };
@@ -1,29 +0,0 @@
1
- <script setup>
2
- import DemoApp from "../DemoHomepage/App.vue";
3
- import ActivityApp from "../MetroWidgetDemos/PerformanceTest/App.vue"; // TODO
4
- import { jJsvRuntimeBridge } from "jsview";
5
- import { ref, shallowRef, onMounted } from "vue";
6
-
7
- const getShowMode = () => {
8
- let showMode = 0;
9
- // showMode信息可被URL中的?后缀信息替换
10
- if (window.location.search.indexOf("showMode=0") >= 0) {
11
- showMode = 0;
12
- } else if (window.location.search.indexOf("showMode=1") >= 0) {
13
- showMode = 1;
14
- }
15
-
16
- return showMode;
17
- };
18
-
19
- const showMode = ref(getShowMode());
20
-
21
- onMounted(() => {
22
- jJsvRuntimeBridge.notifyPageLoaded();
23
- });
24
- </script>
25
-
26
- <template>
27
- <DemoApp v-if="showMode === 0" />
28
- <ActivityApp v-else-if="showMode === 1" />
29
- </template>
@@ -1,121 +0,0 @@
1
- <script setup>
2
- import { provide, reactive, ref, shallowRef, watch } from "vue";
3
- import Controllor from "./components/Controllor.vue";
4
- import VideoFrame from "./components/VideoFrame.vue";
5
-
6
- const Caption = {
7
- offscreenVideo:
8
- "名称:OffscreenVideo(自动播放)\n" +
9
- "功能描述:\n" +
10
- "1.离屏视频播放、支持前进/后退控制\n" +
11
- "2.支持圆角设置\n" +
12
- "3.支持平移、缩放、旋转等动画\n" +
13
- "4.支持ObjectFit调整\n",
14
- normalVideo:
15
- "名称:Video\n" +
16
- "功能描述:\n" +
17
- "1.视频播放、支持前进/后退控制\n" +
18
- "2.支持ObjectFit调整\n",
19
- };
20
-
21
- let caption = shallowRef(null);
22
- let useTexture = shallowRef(null);
23
- let videoTime = reactive({
24
- currentTime: 0,
25
- duration: 0,
26
- });
27
- let objectFitTitle = shallowRef(null);
28
- let playStatus = ref("");
29
- provide("useTexture", useTexture);
30
- provide("objectFit", shallowRef(null));
31
- provide("videoRect", ref({}));
32
- provide("playVideo", shallowRef(null));
33
- provide("seekVideo", shallowRef(null));
34
- provide("enableAnimation", shallowRef(null));
35
- provide("videoTime", videoTime);
36
- provide("objectFitTitle", objectFitTitle);
37
- provide("playStatus", playStatus);
38
- watch(useTexture, () => {
39
- caption.value = useTexture.value ? Caption.offscreenVideo : Caption.normalVideo;
40
- });
41
- </script>
42
-
43
- <template>
44
- <div
45
- :style="{
46
- top: 0,
47
- left: 0,
48
- width: 1280,
49
- height: 720,
50
- backgroundColor: 'rgb(222,211,140)',
51
- }"
52
- >
53
- <!-- :key="useTexture" => 当useTexture属性变化时,重建VideoFrame -->
54
- <VideoFrame :key="useTexture" />
55
-
56
- <!-- :key="useTexture" => JsView bug,当useTexture属性变化时,为了保证显示在VideoFrame前面 -->
57
- <div class="caption" :key="useTexture">
58
- {{ caption }}
59
- </div>
60
- <div>
61
- <div class="text status">
62
- {{ "播放状态: " + playStatus }}
63
- </div>
64
- <div class="text objectFit">
65
- {{ objectFitTitle }}
66
- </div>
67
- <div class="text current">
68
- {{ Math.ceil(videoTime.currentTime) }}
69
- </div>
70
- <div class="text duration">
71
- {{ "/" + Math.ceil(videoTime.duration) }}
72
- </div>
73
- </div>
74
- <Controllor class="controllor" />
75
- </div>
76
- </template>
77
-
78
- <style scoped>
79
- .caption {
80
- text-align: left;
81
- font-size: 24px;
82
- line-height: 30px;
83
- color: #ffffff;
84
- left: 10;
85
- top: 10;
86
- width: 400;
87
- height: 180;
88
- background-color: rgba(27, 38, 151, 0.8);
89
- }
90
-
91
- .text {
92
- color: #ff0000;
93
- font-size: 24px;
94
- top: 550;
95
- width: 60;
96
- height: 40;
97
- }
98
- .status {
99
- left: 50;
100
- width: 300;
101
- }
102
- .objectFit {
103
- left: 800;
104
- width: 200;
105
- text-align: center;
106
- }
107
-
108
- .current {
109
- left: 1060;
110
- text-align: right;
111
- }
112
- .duration {
113
- left: 1120;
114
- text-align: left;
115
- }
116
-
117
- .controllor {
118
- left: 40;
119
- top: 600;
120
- }
121
- </style>