@shijiu/jsview-vue 1.9.727 → 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,386 +0,0 @@
1
- <!--
2
- * @Author: ChenChanghua
3
- * @Date: 2021-06-10 14:17:17
4
- * @LastEditors: ChenChanghua
5
- * @LastEditTime: 2022-07-11 18:20:58
6
- * @Description: file content
7
- -->
8
- <script setup>
9
- import posterHolder from "../assets/holder_logo.png";
10
- import couponLeft from "../assets/coupon_left.png";
11
- import couponRight from "../assets/coupon_right.png";
12
- import couponMid from "../assets/coupon_mid.png";
13
- import borderLeft from "../assets/line_left.png";
14
- import borderMid from "../assets/line_mid.png";
15
- import borderRight from "../assets/line_right.png";
16
- import { ref, shallowRef, computed } from "vue";
17
-
18
- const props = defineProps({
19
- data: Object,
20
- query: Object,
21
- onEdge: Function,
22
- onAction: Object,
23
- });
24
-
25
- const focused = ref(false);
26
- const onFocus = () => {
27
- focused.value = true;
28
- };
29
-
30
- const onBlur = () => {
31
- focused.value = false;
32
- };
33
-
34
- props.onAction.register("onFocus", onFocus);
35
- props.onAction.register("onBlur", onBlur);
36
-
37
- const focusTransform = computed(() => {
38
- return focused.value ? "scale3d(1.2, 1.2, 1)" : null;
39
- });
40
-
41
- const savePrizeWidth = computed(() => {
42
- return 10 * props.data.savePrize.length + 26;
43
- });
44
-
45
- const soldTotalWidth = computed(() => {
46
- let width = 44 + 22; //base width;
47
- if (props.data.soldTotal >= 10000) {
48
- let text = parseInt(props.data.soldTotal / 10000) + "";
49
- width += text.length * 12 + 22;
50
- } else {
51
- width += (props.data.soldTotal + "").length * 12;
52
- }
53
- return width;
54
- });
55
-
56
- const soldTotalText = computed(() => {
57
- let text = "";
58
- if (props.data.soldTotal >= 10000) {
59
- text = parseInt(props.data.soldTotal / 10000) + "万";
60
- } else {
61
- text = props.data.soldTotal;
62
- }
63
- return text;
64
- });
65
- </script>
66
-
67
- <template>
68
- <div
69
- class="frame-background"
70
- :style="{
71
- transform: focusTransform,
72
- }"
73
- >
74
- <div class="poster-holder">
75
- <div
76
- :style="{
77
- width: 107,
78
- height: 23,
79
- left: 53,
80
- top: 95,
81
- backgroundImage: posterHolder,
82
- }"
83
- />
84
- </div>
85
- <div
86
- class="poster"
87
- :style="{
88
- backgroundImage: `url(${data.pictUrl})`,
89
- }"
90
- />
91
- <div class="title-font title-layout">
92
- {{ data.index + data.name }}
93
- </div>
94
- <div
95
- :style="{
96
- height: 24,
97
- left: 13,
98
- top: 256,
99
- width: savePrizeWidth,
100
- }"
101
- >
102
- <div
103
- :style="{ width: 5, height: 24, backgroundImage: couponLeft }"
104
- />
105
- <div
106
- :style="{
107
- left: 5,
108
- width: savePrizeWidth - 11,
109
- height: 24,
110
- backgroundImage: couponMid,
111
- }"
112
- />
113
- <div
114
- :style="{
115
- left: savePrizeWidth - 6,
116
- width: 5,
117
- height: 24,
118
- backgroundImage: couponRight,
119
- }"
120
- />
121
- <div
122
- class="ticket-text"
123
- :style="{
124
- width: savePrizeWidth,
125
- }"
126
- >
127
- {{ `${data.savePrize}元券` }}
128
- </div>
129
- </div>
130
-
131
- <div
132
- :style="{
133
- top: 256,
134
- left: 27 + savePrizeWidth,
135
- }"
136
- >
137
- <div
138
- :style="{ width: 7, height: 25, backgroundImage: borderLeft }"
139
- />
140
- <div
141
- :style="{
142
- left: 7,
143
- width: soldTotalWidth - 13,
144
- height: 25,
145
- backgroundImage: borderMid,
146
- }"
147
- />
148
- <div
149
- :style="{
150
- left: soldTotalWidth - 7,
151
- width: 7,
152
- height: 25,
153
- backgroundImage: borderRight,
154
- }"
155
- />
156
- <div
157
- class="sold-text"
158
- :style="{
159
- width: soldTotalWidth,
160
- }"
161
- >
162
- {{ `已售${soldTotalText}件` }}
163
- </div>
164
- </div>
165
-
166
- <div
167
- :style="{
168
- height: 24,
169
- left: 13,
170
- top: 270,
171
- width: savePrizeWidth,
172
- }"
173
- >
174
- <div
175
- :style="{ width: 5, height: 24, backgroundImage: couponLeft }"
176
- />
177
- <div
178
- :style="{
179
- left: 5,
180
- width: savePrizeWidth - 11,
181
- height: 24,
182
- backgroundImage: couponMid,
183
- }"
184
- />
185
- <div
186
- :style="{
187
- left: savePrizeWidth - 6,
188
- width: 5,
189
- height: 24,
190
- backgroundImage: couponRight,
191
- }"
192
- />
193
- <div
194
- class="ticket-text"
195
- :style="{
196
- width: savePrizeWidth,
197
- }"
198
- >
199
- {{ `${data.savePrize}元券` }}
200
- </div>
201
- </div>
202
- <div
203
- :style="{
204
- top: 270,
205
- left: 27 + savePrizeWidth,
206
- }"
207
- >
208
- <div
209
- :style="{ width: 7, height: 25, backgroundImage: borderLeft }"
210
- />
211
- <div
212
- :style="{
213
- left: 7,
214
- width: soldTotalWidth - 13,
215
- height: 25,
216
- backgroundImage: borderMid,
217
- }"
218
- />
219
- <div
220
- :style="{
221
- left: soldTotalWidth - 7,
222
- width: 7,
223
- height: 25,
224
- backgroundImage: borderRight,
225
- }"
226
- />
227
- <div
228
- class="sold-text"
229
- :style="{
230
- width: soldTotalWidth,
231
- }"
232
- >
233
- {{ `已售${soldTotalText}件` }}
234
- </div>
235
- </div>
236
-
237
- <div
238
- :style="{
239
- height: 24,
240
- left: 13,
241
- top: 280,
242
- width: savePrizeWidth,
243
- }"
244
- >
245
- <div
246
- :style="{ width: 5, height: 24, backgroundImage: couponLeft }"
247
- />
248
- <div
249
- :style="{
250
- left: 5,
251
- width: savePrizeWidth - 11,
252
- height: 24,
253
- backgroundImage: couponMid,
254
- }"
255
- />
256
- <div
257
- :style="{
258
- left: savePrizeWidth - 6,
259
- width: 5,
260
- height: 24,
261
- backgroundImage: couponRight,
262
- }"
263
- />
264
- <div
265
- class="ticket-text"
266
- :style="{
267
- width: savePrizeWidth,
268
- }"
269
- >
270
- {{ `${data.savePrize}元券` }}
271
- </div>
272
- </div>
273
- <div
274
- :style="{
275
- top: 280,
276
- left: 27 + savePrizeWidth,
277
- }"
278
- >
279
- <div
280
- :style="{ width: 7, height: 25, backgroundImage: borderLeft }"
281
- />
282
- <div
283
- :style="{
284
- left: 7,
285
- width: soldTotalWidth - 13,
286
- height: 25,
287
- backgroundImage: borderMid,
288
- }"
289
- />
290
- <div
291
- :style="{
292
- left: soldTotalWidth - 7,
293
- width: 7,
294
- height: 25,
295
- backgroundImage: borderRight,
296
- }"
297
- />
298
- <div
299
- class="sold-text"
300
- :style="{
301
- width: soldTotalWidth,
302
- }"
303
- >
304
- {{ `已售${soldTotalText}件` }}
305
- </div>
306
- </div>
307
-
308
- <div class="prize-title-font prize-title-layout">券后</div>
309
- <div class="prize-font">
310
- {{ `¥${data.prize - data.savePrize}` }}
311
- </div>
312
- </div>
313
- </template>
314
-
315
- <style scoped>
316
- .frame-background {
317
- width: 213px;
318
- height: 337px;
319
- border-radius: 10px 10px 10px 10px;
320
- background-color: #f7f7f4;
321
- transition: transform 0.2s linear;
322
- }
323
-
324
- .poster-holder {
325
- width: 213px;
326
- height: 213px;
327
- border-radius: 10px 10px 0px 0px;
328
- background-color: #cfcac6;
329
- }
330
- .poster {
331
- width: 213px;
332
- height: 213px;
333
- border-radius: 7px 7px 0px 0px;
334
- }
335
-
336
- .title-font {
337
- font-size: 21px;
338
- color: #73665c;
339
- line-height: 29px;
340
- overflow: hidden;
341
- white-space: nowrap;
342
- text-overflow: ellipsis;
343
- text-align: center;
344
- }
345
- .title-layout {
346
- top: 221;
347
- left: 13;
348
- width: 193px;
349
- height: 29px;
350
- }
351
- .ticket-text {
352
- height: 24;
353
- color: #ffffff;
354
- font-size: 16px;
355
- text-align: center;
356
- line-height: 24px;
357
- }
358
- .sold-text {
359
- height: 25px;
360
- color: #ff7a00;
361
- font-size: 20px;
362
- text-align: center;
363
- line-height: 25px;
364
- }
365
- .prize-title-layout {
366
- width: 35px;
367
- height: 24px;
368
- top: 296;
369
- left: 13;
370
- }
371
- .prize-title-font {
372
- color: #de2825;
373
- text-align: center;
374
- font-size: 17px;
375
- line-height: 24px;
376
- }
377
- .prize-font {
378
- top: 289;
379
- left: 53;
380
- width: 158; /*213 - 55*/
381
- height: 37px;
382
- line-height: 37px;
383
- font-size: 28px;
384
- color: #de2825;
385
- }
386
- </style>
@@ -1,129 +0,0 @@
1
- <!--
2
- * @Author: ChenChanghua
3
- * @Date: 2021-09-29 16:13:35
4
- * @LastEditors: ChenChanghua
5
- * @LastEditTime: 2021-09-29 17:07:19
6
- * @Description: file content
7
- -->
8
- <script>
9
- import { ref, shallowRef } from "vue";
10
-
11
- export default {
12
- props: {
13
- name: Object,
14
- onEdgeDown: Function,
15
- onItemFocus: Function,
16
- },
17
- setup() {
18
- let activeId = ref(0);
19
- let focused = ref(false);
20
- return {
21
- activeId,
22
- focused,
23
- };
24
- },
25
- computed: {
26
- tab1Class() {
27
- if (this.activeId == 0) {
28
- return this.focused
29
- ? "text-active item-focused"
30
- : "text-active item-normal";
31
- } else {
32
- return "text-normal item-normal";
33
- }
34
- },
35
- tab2Class() {
36
- if (this.activeId == 1) {
37
- return this.focused
38
- ? "text-active item-focused"
39
- : "text-active item-normal";
40
- } else {
41
- return "text-normal item-normal";
42
- }
43
- },
44
- tab3Class() {
45
- if (this.activeId == 2) {
46
- return this.focused
47
- ? "text-active item-focused"
48
- : "text-active item-normal";
49
- } else {
50
- return "text-normal item-normal";
51
- }
52
- },
53
- },
54
- methods: {
55
- onKeyDown(ev) {
56
- switch (ev.keyCode) {
57
- case 37:
58
- this.activeId--;
59
- if (this.activeId < 0) {
60
- this.activeId = 2;
61
- }
62
- this.onItemFocus(this.activeId);
63
- break;
64
- case 39:
65
- this.activeId++;
66
- if (this.activeId > 2) {
67
- this.activeId = 0;
68
- }
69
- this.onItemFocus(this.activeId);
70
- break;
71
- case 40:
72
- this.onEdgeDown();
73
- break;
74
- }
75
- },
76
- onFocus() {
77
- this.focused = true;
78
- },
79
- onBlur() {
80
- this.focused = false;
81
- },
82
- getOnAction() {
83
- return {
84
- onKeyDown: this.onKeyDown,
85
- onFocus: this.onFocus,
86
- onBlur: this.onBlur,
87
- };
88
- },
89
- },
90
- };
91
- </script>
92
-
93
- <template>
94
- <jsv-focus-block :name="name" :onAction="getOnAction()"></jsv-focus-block>
95
- <div :class="tab1Class">Tab1</div>
96
- <div :class="tab2Class" :style="{ left: 220 }">Tab2</div>
97
- <div :class="tab3Class" :style="{ left: 440 }">Tab3</div>
98
- </template>
99
-
100
- <style scoped>
101
- .text-normal {
102
- width: 200px;
103
- height: 50px;
104
- line-height: 50px;
105
- color: #444444;
106
- font-size: 25px;
107
- text-align: center;
108
- }
109
-
110
- .text-active {
111
- width: 200px;
112
- height: 50px;
113
- line-height: 50px;
114
- color: #ffffff;
115
- font-size: 25px;
116
- text-align: center;
117
- }
118
-
119
- .item-focused {
120
- width: 200px;
121
- height: 50px;
122
- background-color: #008080;
123
- }
124
- .item-normal {
125
- width: 200px;
126
- height: 50px;
127
- background-color: #87CECB;
128
- }
129
- </style>
@@ -1,45 +0,0 @@
1
- let data1 = [];
2
-
3
- // 添加300个模拟数据
4
- for (let i = 0; i < 40; i++) {
5
- data1.push({
6
- index: i,
7
- name: `商品:骆驼奶粉蛋白质粉,限时抢购,立刻发货,序号:${i}`,
8
- prize: `${Math.floor(Math.random() * 200) +
9
- 200}` /* 测试数据要保证比最高优惠券(300左右)要高 */,
10
- savePrize: `${i}`,
11
- soldTotal: `${Math.floor(Math.random() * 50000)}`,
12
- pictUrl:
13
- "http://img.alicdn.com/bao/uploaded/i3/2207313464483/O1CN01Ab4vWz1izGAyRL1Yf_!!0-item_pic.jpg",
14
- });
15
- }
16
-
17
- let data2 = [];
18
- for (let i = 0; i < 50; i++) {
19
- data2.push({
20
- index: i,
21
- name: `商品:骆驼奶粉蛋白质粉,限时抢购,立刻发货,序号:${i}`,
22
- prize: `${Math.floor(Math.random() * 200) +
23
- 200}` /* 测试数据要保证比最高优惠券(300左右)要高 */,
24
- savePrize: `${i}`,
25
- soldTotal: `${Math.floor(Math.random() * 50000)}`,
26
- pictUrl:
27
- "http://img.alicdn.com/bao/uploaded/i3/2207313464483/O1CN01Ab4vWz1izGAyRL1Yf_!!0-item_pic.jpg",
28
- });
29
- }
30
-
31
- let data3 = [];
32
- for (let i = 0; i < 30; i++) {
33
- data3.push({
34
- index: i,
35
- name: `商品:骆驼奶粉蛋白质粉,限时抢购,立刻发货,序号:${i}`,
36
- prize: `${Math.floor(Math.random() * 200) +
37
- 200}` /* 测试数据要保证比最高优惠券(300左右)要高 */,
38
- savePrize: `${i}`,
39
- soldTotal: `${Math.floor(Math.random() * 50000)}`,
40
- pictUrl:
41
- "http://img.alicdn.com/bao/uploaded/i3/2207313464483/O1CN01Ab4vWz1izGAyRL1Yf_!!0-item_pic.jpg",
42
- });
43
- }
44
-
45
- export { data1, data2, data3 };
@@ -1,135 +0,0 @@
1
- <!--
2
- * @Author: ChenChanghua
3
- * @Date: 2021-12-21 15:36:29
4
- * @LastEditors: ChenChanghua
5
- * @LastEditTime: 2022-09-01 17:08:21
6
- * @Description: file content
7
- -->
8
- <script>
9
- import ViewSwiper from "./ViewSwiper.vue";
10
- import AppTab from "./AppTab.vue";
11
- import { reactive } from "vue";
12
- import { EdgeDirection } from "jsview";
13
- import { advanceMetroWidget, randomColor } from "../data.js";
14
-
15
- const pageList = [];
16
- const tabData = [];
17
-
18
- for (let i = 0; i < 5; i++) {
19
- tabData.push({
20
- width: 100,
21
- height: 50,
22
- marginRight: 10,
23
- content: "Tab_" + i,
24
- color: randomColor(),
25
- });
26
-
27
- let data = JSON.parse(JSON.stringify(advanceMetroWidget));
28
- data.forEach((item) => {
29
- item.name = "testPage_" + i + "-" + item.name;
30
- });
31
- pageList.push({
32
- width: 600,
33
- height: 600,
34
- data: data,
35
- name: "testPage-" + i,
36
- });
37
- }
38
- export default {
39
- components: {
40
- ViewSwiper,
41
- AppTab,
42
- },
43
- setup() {
44
- let globalInfo = reactive({
45
- tabId: 0,
46
- });
47
- return {
48
- tabData,
49
- appPageName: "/page",
50
- appTabName: "/tab",
51
- globalInfo,
52
- pageList,
53
- preFocusName: "/tab",
54
- curFocusName: "/tab",
55
- };
56
- },
57
- provide() {
58
- return {
59
- globalInfo: this.globalInfo,
60
- };
61
- },
62
- methods: {
63
- $_app_onFocus() {
64
- console.log("App onFocus");
65
- this.$refs.focusNode.findBlockByName(this.curFocusName).requestFocus();
66
- },
67
- onKeyDown(ev) {
68
- if (ev.keyCode == 8 || ev.keyCode == 27 || ev.keyCode == 10000) {
69
- this.$router?.go(-1);
70
- }
71
- return true;
72
- },
73
- $_app_pageOnEdge(info) {
74
- console.log("App page on edge ", info);
75
- if (info.direction === EdgeDirection.top) {
76
- this.curFocusName = "/tab";
77
- this.$refs.focusNode.findBlockByName(this.appTabName).requestFocus();
78
- }
79
- },
80
- $_app_tabOnEdge(info) {
81
- console.log("App tab on edge ", info);
82
- if (info.direction === EdgeDirection.bottom) {
83
- this.curFocusName = "/page";
84
- this.$refs.focusNode.findBlockByName(this.appPageName).requestFocus();
85
- }
86
- },
87
- },
88
- };
89
- </script>
90
-
91
- <template>
92
- <jsv-focus-block
93
- ref="focusNode"
94
- name="/main"
95
- autoFocus
96
- :onAction="{
97
- onKeyDown: onKeyDown,
98
- onFocus: $_app_onFocus,
99
- }"
100
- :style="{
101
- width: 1920,
102
- height: 1080,
103
- backgroundColor: '#007788',
104
- }"
105
- >
106
- <div
107
- :style="{
108
- top: 0,
109
- left: 100,
110
- }"
111
- >
112
- <app-tab
113
- :data="tabData"
114
- :name="appTabName"
115
- :layout="{ width: 1920, height: 100 }"
116
- :onEdge="$_app_tabOnEdge"
117
- :style="{
118
- top: 15,
119
- }"
120
- ></app-tab>
121
- </div>
122
-
123
- <div :style="{ top: 100, left: 200 }">
124
- <view-swiper
125
- :name="appPageName"
126
- :pageData="pageList"
127
- :onEdge="$_app_pageOnEdge"
128
- :layout="{
129
- width: 600,
130
- height: 600,
131
- }"
132
- ></view-swiper>
133
- </div>
134
- </jsv-focus-block>
135
- </template>