@shijiu/jsview-vue-samples 2.3.0 → 2.3.728-alpha.0

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 (326) hide show
  1. package/ABImageAlt/App.vue +114 -0
  2. package/ABImageAlt/Item.vue +133 -0
  3. package/{MetroWidgetDemos/SkeletonDiagram/assets/imageList.json → ABImageAlt/assets/imageList.js} +9 -1
  4. package/ABImageAlt/data.js +17 -0
  5. package/AI_Check_Rules.txt +5 -0
  6. package/AnimPicture/App.vue +20 -10
  7. package/ApicSwitch/App.vue +90 -0
  8. package/ApicSwitch/TabItem.vue +65 -0
  9. package/ApicSwitch/WebpShow.vue +24 -0
  10. package/ApicSwitch/data.js +50 -0
  11. package/Basic/AI_skills_update.md +1 -0
  12. package/Basic/components/div/ColorFormatTest.vue +93 -0
  13. package/Basic/components/div/DivRadius.vue +97 -15
  14. package/Basic/components/div/DivTag3Group.vue +30 -0
  15. package/Basic/components/img/ImageType.vue +65 -0
  16. package/Basic/components/panel/Panel2.vue +13 -1
  17. package/Basic/components/text/TextAlign.vue +7 -1
  18. package/BlobLoadTest/App.vue +201 -0
  19. package/BreakLinesApi/App.vue +82 -0
  20. package/CanvasDrawChart/App.vue +11 -0
  21. package/CanvasDrawChart/Graph1.vue +104 -0
  22. package/CanvasDrawChart/Graph2.vue +115 -0
  23. package/DashPath/App.vue +17 -16
  24. package/DashPath/AppForOperator.vue +2 -4
  25. package/DemoForOperator/AnimPic/AnimPic.vue +24 -2
  26. package/DemoForOperator/Banger/Banger/Banger.vue +73 -9
  27. package/DemoForOperator/Blur/Blur.vue +146 -0
  28. package/DemoForOperator/Blur/BlurInOut/BlurInOut.vue +184 -0
  29. package/DemoForOperator/Blur/BlurInOut/StaticBgSlide.vue +162 -0
  30. package/DemoForOperator/Blur/BlurPopup/BlurPopup.vue +249 -0
  31. package/DemoForOperator/BookFlip/App.vue +115 -0
  32. package/DemoForOperator/BookFlip/BookPage.vue +82 -0
  33. package/DemoForOperator/Bounce/Bounce.vue +33 -1
  34. package/DemoForOperator/Bounce/FreeMoveBuilder.js +1 -1
  35. package/DemoForOperator/ChunLian/Couplets.vue +44 -1
  36. package/DemoForOperator/ClickSpriteAnim/App.vue +130 -0
  37. package/DemoForOperator/ClickSpriteAnim/Item.vue +74 -0
  38. package/DemoForOperator/DominantColor/App.vue +187 -0
  39. package/DemoForOperator/EpisodeList/EpisodeList/Controller.vue +0 -3
  40. package/DemoForOperator/EpisodeList/EpisodeList/EpisodeList.vue +76 -2
  41. package/DemoForOperator/Firework1/App.vue +13 -2
  42. package/DemoForOperator/Firework1/Fireworks.vue +68 -11
  43. package/DemoForOperator/FlipPage/FlipPage/FlipPage.vue +30 -1
  44. package/DemoForOperator/Focus/Alpha/AlphaFocusBox.vue +27 -2
  45. package/DemoForOperator/Focus/Alpha/Item.vue +1 -0
  46. package/DemoForOperator/Focus/Light/Item.vue +1 -0
  47. package/DemoForOperator/Focus/Light/LightFocusBox.vue +42 -1
  48. package/DemoForOperator/Focus/Normal/Item.vue +1 -0
  49. package/DemoForOperator/Focus/Normal/NormalFocusBox.vue +12 -0
  50. package/DemoForOperator/FrameShadow/App.vue +193 -0
  51. package/DemoForOperator/FrameShadow/FrameShadow.vue +61 -0
  52. package/DemoForOperator/FullscreenIn/App.vue +1 -1
  53. package/DemoForOperator/FullscreenIn/FullscreenPoster.vue +18 -3
  54. package/DemoForOperator/Genie/App.vue +20 -6
  55. package/DemoForOperator/Genie/App2.vue +61 -0
  56. package/DemoForOperator/Genie/geniePakcer/GenieImage.vue +298 -0
  57. package/DemoForOperator/Genie/geniePakcer/GenieSlot.vue +292 -0
  58. package/DemoForOperator/Genie/geniePakcer/GenieTools.ts +463 -0
  59. package/DemoForOperator/GrayFilter/GrayFilter.vue +21 -0
  60. package/DemoForOperator/Jigsaw/JigsawFull.vue +58 -11
  61. package/DemoForOperator/Jigsaw/JigsawSingle.vue +47 -9
  62. package/DemoForOperator/LongChatBox/App.vue +36 -0
  63. package/DemoForOperator/LongChatBox/Bubble.vue +116 -0
  64. package/DemoForOperator/LongChatBox/LongChat.vue +204 -0
  65. package/DemoForOperator/LongChatBox/testData.js +14 -0
  66. package/DemoForOperator/Particle/Drop/DropParticle.vue +33 -1
  67. package/DemoForOperator/Particle/Explode/ExplodeParticle.vue +23 -2
  68. package/DemoForOperator/PosterAnim/PosterAnim.js +21 -0
  69. package/DemoForOperator/PosterOverflow/PosterOverflow.vue +16 -0
  70. package/DemoForOperator/Resize/App.vue +157 -0
  71. package/DemoForOperator/Resize/Resize/Item.vue +234 -0
  72. package/DemoForOperator/Resize/Resize/Resize.vue +96 -0
  73. package/DemoForOperator/Ripple/Ripple.vue +16 -1
  74. package/DemoForOperator/ScreenShootScale/App.vue +96 -0
  75. package/DemoForOperator/ScreenShootScale/Back.vue +86 -0
  76. package/DemoForOperator/ScreenShootScale/Front.vue +133 -0
  77. package/DemoForOperator/ScreenShootScale/Item.vue +62 -0
  78. package/DemoForOperator/ScreenShootScale/ScreenShootScale.vue +109 -0
  79. package/DemoForOperator/SmoothSwiper/App.vue +50 -0
  80. package/DemoForOperator/Sound/Bounce/App.vue +56 -0
  81. package/DemoForOperator/Sound/Bounce/Bounce.vue +87 -0
  82. package/DemoForOperator/Sound/Bounce/FreeMoveBuilder.js +146 -0
  83. package/DemoForOperator/Sound/Bounce/bgmusic.mp3 +0 -0
  84. package/DemoForOperator/Sound/Bounce/coin.mp3 +0 -0
  85. package/DemoForOperator/Sound/FocusMove/App.vue +134 -0
  86. package/DemoForOperator/Sound/FocusMove/Item.vue +43 -0
  87. package/DemoForOperator/Sound/FocusMove/move.mp3 +0 -0
  88. package/DemoForOperator/Sound/Rain/App.vue +11 -0
  89. package/DemoForOperator/Sound/Rain/Raining/Rain.vue +69 -0
  90. package/DemoForOperator/Sound/Rain/Raining/RainScene.vue +118 -0
  91. package/DemoForOperator/Sound/Sound/Sound.vue +24 -0
  92. package/DemoForOperator/Sound/Sound/index.js +4 -0
  93. package/DemoForOperator/Sound/Sound/useSound.js +112 -0
  94. package/DemoForOperator/Sprite/Sprite.vue +62 -5
  95. package/DemoForOperator/Stretch/Stretch/Stretch.vue +52 -2
  96. package/DemoForOperator/Swiper/App.vue +101 -0
  97. package/DemoForOperator/Swiper/Item.vue +56 -0
  98. package/DemoForOperator/Swiper/ParallaxSlide.vue +164 -0
  99. package/DemoForOperator/TabContent/TabContent/TabContent.vue +39 -1
  100. package/DemoForOperator/TabContentVertical/App.vue +104 -0
  101. package/DemoForOperator/TabContentVertical/ContentPage.vue +67 -0
  102. package/DemoForOperator/TabContentVertical/Item.vue +94 -0
  103. package/DemoForOperator/TabContentVertical/PageItem.vue +40 -0
  104. package/DemoForOperator/TabContentVertical/TabContent/CreepFocus.vue +160 -0
  105. package/DemoForOperator/TabContentVertical/TabContent/Item.vue +63 -0
  106. package/DemoForOperator/TabContentVertical/TabContent/TabContent.vue +184 -0
  107. package/DemoForOperator/TabContentVertical/TabContent/TabItem.vue +368 -0
  108. package/DemoForOperator/TabContentVertical/TabContent/TabWidget.vue +259 -0
  109. package/DemoForOperator/TabContentVertical/TabContent/Util.js +3 -0
  110. package/DemoForOperator/TabContentVertical/TabContent/ViewSwiper.vue +110 -0
  111. package/DemoForOperator/TabContentVertical/assets/children_science.png +0 -0
  112. package/DemoForOperator/TabContentVertical/assets/documentary.png +0 -0
  113. package/DemoForOperator/TabContentVertical/assets/free.png +0 -0
  114. package/DemoForOperator/TabContentVertical/assets/game.png +0 -0
  115. package/DemoForOperator/TabContentVertical/assets/home_selected.png +0 -0
  116. package/DemoForOperator/TabContentVertical/assets/movie_ticket.png +0 -0
  117. package/DemoForOperator/TabContentVertical/assets/my_account.png +0 -0
  118. package/DemoForOperator/TabContentVertical/assets/opera.png +0 -0
  119. package/DemoForOperator/TabContentVertical/assets/sports.png +0 -0
  120. package/DemoForOperator/TabContentVertical/assets/tv_drama.png +0 -0
  121. package/DemoForOperator/TabContentVertical/assets/variety_show.png +0 -0
  122. package/DemoForOperator/TabContentVertical/assets/vip.png +0 -0
  123. package/DemoForOperator/TabContentVertical/testData.js +76 -0
  124. package/DemoForOperator/Vortex/Vortex/Vortex.vue +26 -0
  125. package/DemoForOperator/routeList.js +125 -2
  126. package/DemoHomepage/App.vue +74 -1
  127. package/DemoHomepage/components/BodyFrame.vue +5 -0
  128. package/DemoHomepage/components/Item.vue +11 -0
  129. package/DemoHomepage/components/TabFrame.vue +1 -1
  130. package/DemoHomepage/router.js +798 -140
  131. package/DemoHomepage/views/Homepage.vue +60 -2
  132. package/DemoHomepage/watchTest.vue +50 -0
  133. package/DomRenderer/App.vue +133 -0
  134. package/FilterDemo/AnimatePic.vue +63 -17
  135. package/FilterDemo/App.vue +3 -3
  136. package/FlexCellDemo/AI_skills_update.md +4 -0
  137. package/FlexCellDemo/TestFrame1.vue +12 -2
  138. package/FlexCellDemo/TestFrame2.vue +10 -1
  139. package/FlexCellDemo/TestFrame3.vue +114 -59
  140. package/FpsLimit/App.vue +102 -0
  141. package/FreeMove/App.vue +24 -279
  142. package/FreeMove/TestScene1.vue +260 -0
  143. package/FreeMove/TestScene3.vue +431 -0
  144. package/FreeMoveChildAttract/App.vue +18 -8
  145. package/FreeMoveLink/App.vue +51 -22
  146. package/GiftRain/components/SpriteTranslate.vue +68 -48
  147. package/HashHistory/App.vue +2 -2
  148. package/HashHistory/router.js +1 -1
  149. package/Hover/App.vue +144 -0
  150. package/HttpRequestSSE/SSEReader.js +200 -0
  151. package/ImpactStop/App.vue +2 -2
  152. package/Input/FullKeyboard.vue +3 -3
  153. package/Input/InputPanel.vue +63 -3
  154. package/JsvLine/App.vue +53 -38
  155. package/LatexDemo/App.vue +3 -1
  156. package/LatexFormula/App.vue +196 -0
  157. package/LongImage/App.vue +1 -1
  158. package/LongImage/LongImageScroll.vue +111 -46
  159. package/LongImage/Scroll.vue +28 -9
  160. package/LongText/LongTextScroll.vue +14 -1
  161. package/Markdown/App.vue +36 -0
  162. package/Markdown/Bubble.vue +109 -0
  163. package/Markdown/LongChat.vue +216 -0
  164. package/Markdown/data.js +633 -0
  165. package/MetroWidgetDemos/AI_skills_update.md +2 -0
  166. package/MetroWidgetDemos/EpgFlowListType/App.vue +206 -0
  167. package/MetroWidgetDemos/EpgFlowListType/components/ContentCard.vue +105 -0
  168. package/MetroWidgetDemos/EpgFlowListType/components/FloorSection.vue +131 -0
  169. package/MetroWidgetDemos/EpgFlowListType/components/LeftTabItem.vue +41 -0
  170. package/MetroWidgetDemos/EpgFlowListType/data.js +78 -0
  171. package/MetroWidgetDemos/ListExpand/ChildItem.vue +130 -0
  172. package/MetroWidgetDemos/ListExpand/ExpandItem.vue +375 -0
  173. package/MetroWidgetDemos/ListExpand/ExpandItem1.vue +403 -0
  174. package/MetroWidgetDemos/ListExpand/assets/arrow-down.png +0 -0
  175. package/MetroWidgetDemos/ListExpand/assets/up-arrow.png +0 -0
  176. package/MetroWidgetDemos/ListExpand/components/WidgetListHandler.vue +150 -0
  177. package/MetroWidgetDemos/ListExpand/index.vue +88 -0
  178. package/MetroWidgetDemos/ListExpand/list.js +2421 -0
  179. package/MetroWidgetDemos/RefreshDemo/App.vue +14 -1
  180. package/MetroWidgetDemos/RenderAccelerate/App.vue +142 -0
  181. package/MetroWidgetDemos/RenderAccelerate/AppPage.vue +78 -0
  182. package/MetroWidgetDemos/RenderAccelerate/AppTab.vue +62 -0
  183. package/MetroWidgetDemos/RenderAccelerate/ContentItem.vue +409 -0
  184. package/MetroWidgetDemos/{TripleWidget → RenderAccelerate}/Item.vue +6 -3
  185. package/MetroWidgetDemos/RenderAccelerate/TabItem.vue +100 -0
  186. package/MetroWidgetDemos/RenderAccelerate/ViewSwiper.vue +215 -0
  187. package/MetroWidgetDemos/RenderAccelerate/WidgetItem.vue +107 -0
  188. package/MetroWidgetDemos/SkeletonDiagram/App.vue +35 -8
  189. package/MetroWidgetDemos/SkeletonDiagram/Item.vue +11 -2
  190. package/MetroWidgetDemos/SkeletonDiagram/assets/imageList.js +245 -0
  191. package/MetroWidgetDemos/SkeletonDiagram/data.js +3 -3
  192. package/MetroWidgetDemos/SpatialNav/App.vue +177 -0
  193. package/MetroWidgetDemos/SpatialNav/Buttons.vue +83 -0
  194. package/MetroWidgetDemos/SpatialNav/CustomFocus.vue +57 -0
  195. package/MetroWidgetDemos/SpatialNav/Item.vue +71 -0
  196. package/MetroWidgetDemos/SpatialNav/SimpleFloor.vue +86 -0
  197. package/MetroWidgetDemos/SpatialNav/StepMw.vue +113 -0
  198. package/MetroWidgetDemos/SpatialNav/TabContent/TabContent.vue +185 -0
  199. package/MetroWidgetDemos/SpatialNav/TripleSection/TripleSection.vue +69 -0
  200. package/MetroWidgetDemos/SpatialNav/TripleSection/WidgetItem.vue +100 -0
  201. package/MetroWidgetDemos/SpatialNav/TvSection/List.vue +75 -0
  202. package/MetroWidgetDemos/SpatialNav/TvSection/TvSection.vue +91 -0
  203. package/MetroWidgetDemos/basic2/App.vue +407 -0
  204. package/MetroWidgetDemos/basic2/Item.vue +68 -0
  205. package/MetroWidgetDemos/direction/App.vue +22 -0
  206. package/MetroWidgetDemos/gazeFocusDiff/App.vue +126 -0
  207. package/MetroWidgetDemos/gazeFocusDiff/Item.vue +87 -0
  208. package/MetroWidgetDemos/minimalUsage/App.vue +66 -0
  209. package/MetroWidgetDemos/minimalUsage/Item.vue +54 -0
  210. package/MetroWidgetDemos/ninePatchFocusPage/App.vue +23 -7
  211. package/MetroWidgetDemos/ninePatchFocusPage/Item.vue +7 -5
  212. package/MetroWidgetDemos/ninePatchFocusPage/focusConstants.js +2 -0
  213. package/MetroWidgetDemos/routeList.js +229 -8
  214. package/MetroWidgetDemos/slideSetting/App.vue +288 -99
  215. package/MetroWidgetDemos/zIndex/App.vue +117 -0
  216. package/MetroWidgetDemos/zIndex/Item.vue +61 -0
  217. package/NinePatchTester/App.vue +24 -31
  218. package/PosterPacker/App.vue +2 -2
  219. package/PreDecode/App.vue +140 -0
  220. package/ReactiveTest/App.vue +115 -0
  221. package/ReactiveTest/Item.vue +92 -0
  222. package/ReactiveTest/assets/imageList.js +245 -0
  223. package/ReactiveTest/component/TestSmartDiv.vue +50 -0
  224. package/ReactiveTest/component/TestSmartDivSrcList.vue +74 -0
  225. package/ReactiveTest/component/TestSmartImage.vue +46 -0
  226. package/ReactiveTest/component/TestSmartImageSrcList.vue +90 -0
  227. package/ReactiveTest/component/TestSmartImageStyle.vue +41 -0
  228. package/ReactiveTest/data.js +49 -0
  229. package/ScreenToBlob/App.vue +250 -0
  230. package/ScrollBoxTest/App.vue +52 -28
  231. package/ScrollBoxTest/ClipBar.vue +64 -2
  232. package/ScrollBoxTest/NinePatchBar.vue +64 -2
  233. package/ScrollBoxTest/SizeDivBar.vue +64 -2
  234. package/SecTorTest/App.vue +9 -3
  235. package/SpringFestival/SpringFestivalScene/FreeMoveBuilder.js +3 -3
  236. package/SyncDecode/App.vue +137 -0
  237. package/TextSizeLimit/App.vue +211 -0
  238. package/TextureAnimation/App3.vue +11 -1
  239. package/TouchWidget/App.vue +90 -5
  240. package/TouchWidget/WidgetItem.vue +1 -0
  241. package/TransitPage/App.vue +2 -0
  242. package/ViewOpacity/App.vue +19 -0
  243. package/assets/logo.png +0 -0
  244. package/package.json +1 -1
  245. package/DashPath/DashPath.vue +0 -118
  246. package/DemoForOperator/Genie/geniePakcer/Genie.vue +0 -699
  247. package/DemoForOperator/ScalePoster/App.vue +0 -4
  248. package/DemoForOperator/ScalePoster/ScalePoster.vue +0 -0
  249. package/DivMetroPerformance/App.vue +0 -157
  250. package/DivMetroPerformance/Item.vue +0 -58
  251. package/DivMetroPerformance/assets/bg.jpg +0 -0
  252. package/DivMetroPerformance/assets/coupon_content.png +0 -0
  253. package/DivMetroPerformance/assets/coupon_left.png +0 -0
  254. package/DivMetroPerformance/assets/coupon_mid.png +0 -0
  255. package/DivMetroPerformance/assets/coupon_right.png +0 -0
  256. package/DivMetroPerformance/assets/focus_border.png +0 -0
  257. package/DivMetroPerformance/assets/holder_logo.png +0 -0
  258. package/DivMetroPerformance/assets/jrbm.png +0 -0
  259. package/DivMetroPerformance/assets/line_left.png +0 -0
  260. package/DivMetroPerformance/assets/line_mid.png +0 -0
  261. package/DivMetroPerformance/assets/line_right.png +0 -0
  262. package/DivMetroPerformance/assets/loading.png +0 -0
  263. package/DivMetroPerformance/assets/logo.png +0 -0
  264. package/DivMetroPerformance/assets/mcjx.png +0 -0
  265. package/DivMetroPerformance/assets/tao.png +0 -0
  266. package/DivMetroPerformance/assets/tmall.png +0 -0
  267. package/DivMetroPerformance/border.png +0 -0
  268. package/DivMetroPerformance/components/ContentItem.vue +0 -384
  269. package/DivMetroPerformance/components/MyTab.vue +0 -129
  270. package/DivMetroPerformance/data.js +0 -124
  271. package/DivMetroPerformance/utils/GridItem.vue +0 -28
  272. package/DivMetroPerformance/utils/GridPlate.vue +0 -85
  273. package/MediaDemo/App.vue +0 -127
  274. package/MediaDemo/assets/audio-poster.png +0 -0
  275. package/MediaDemo/components/Button.vue +0 -69
  276. package/MediaDemo/components/Controllor.vue +0 -286
  277. package/MediaDemo/components/StatusBar.vue +0 -100
  278. package/MediaDemo/components/frames/AudioFrame.vue +0 -39
  279. package/MediaDemo/components/frames/AudioPoster.vue +0 -48
  280. package/MediaDemo/components/frames/MediaFrame.vue +0 -153
  281. package/MediaDemo/components/frames/VideoFrame.vue +0 -39
  282. package/MetroWidgetDemos/TripleWidget/App.vue +0 -81
  283. package/MetroWidgetDemos/TripleWidget/SWidgetItem.vue +0 -93
  284. package/MetroWidgetDemos/TripleWidget/WidgetItem.vue +0 -111
  285. package/Parkour/App.vue +0 -13
  286. package/Parkour/Common/Context.js +0 -21
  287. package/Parkour/Common/MatchmanInfo.js +0 -62
  288. package/Parkour/Common/Random.js +0 -61
  289. package/Parkour/Common/Sound.js +0 -50
  290. package/Parkour/appConfig/HOW_TO_CONFIG.md +0 -20
  291. package/Parkour/appConfig/app.config.mjs +0 -5
  292. package/Parkour/appConfig/app_sign_private_key_sample.crt +0 -28
  293. package/Parkour/appConfig/app_sign_public_key_sample.pem +0 -9
  294. package/Parkour/appConfig/jsview.config.mjs +0 -39
  295. package/Parkour/assets/Bgimages/bg1.png +0 -0
  296. package/Parkour/assets/Bgimages/bg2.png +0 -0
  297. package/Parkour/assets/Bgimages/bg3.png +0 -0
  298. package/Parkour/assets/Bgimages/bg4.png +0 -0
  299. package/Parkour/assets/Bgimages/bg5.png +0 -0
  300. package/Parkour/assets/audio/jump.mp3 +0 -0
  301. package/Parkour/assets/audio/lose.mp3 +0 -0
  302. package/Parkour/assets/role_skin1/fail.json +0 -44
  303. package/Parkour/assets/role_skin1/fail.png +0 -0
  304. package/Parkour/assets/role_skin1/jump_down.json +0 -20
  305. package/Parkour/assets/role_skin1/jump_down.png +0 -0
  306. package/Parkour/assets/role_skin1/jump_up.json +0 -44
  307. package/Parkour/assets/role_skin1/jump_up.png +0 -0
  308. package/Parkour/assets/role_skin1/roll.json +0 -44
  309. package/Parkour/assets/role_skin1/roll.png +0 -0
  310. package/Parkour/assets/role_skin1/run.json +0 -52
  311. package/Parkour/assets/role_skin1/run.png +0 -0
  312. package/Parkour/components/Backdrop.vue +0 -61
  313. package/Parkour/components/GameSence.vue +0 -602
  314. package/Parkour/components/Matchman.vue +0 -85
  315. package/TextureAnimation/utils/FrameCanvasStore.ts +0 -68
  316. package/TextureAnimation/utils/RotateFrame.vue +0 -146
  317. package/TextureAnimation/utils/circleHaloMask.png +0 -0
  318. package/ThrowMoveDemo/AccelerateDemo.vue +0 -85
  319. package/ThrowMoveDemo/App.vue +0 -104
  320. package/ThrowMoveDemo/LRParabolicDemo.vue +0 -101
  321. package/ThrowMoveDemo/TargetDemo.vue +0 -87
  322. package/ThrowMoveDemo/UDParabolicDemo.vue +0 -92
  323. /package/{AnimPicture/assets → assets}/animated_webp.webp +0 -0
  324. /package/{AnimPicture/assets → assets}/ball_3.webp +0 -0
  325. /package/{AnimPicture/assets → assets}/girl_run.gif +0 -0
  326. /package/{AnimPicture/assets → assets}/quan.webp +0 -0
@@ -103,7 +103,17 @@ import {
103
103
  buildPreloadInfo,
104
104
  } from "jsview";
105
105
  import { shallowRef, onBeforeUnmount, watch } from "vue";
106
+
106
107
  const props = defineProps({
108
+ /**
109
+ * 春联图片资源配置对象
110
+ * @type {Object}
111
+ * @property {string} leftContent - 左侧春联图片URL
112
+ * @property {string} rightContent - 右侧春联图片URL
113
+ * @property {string} scrollSprite - 滚轴精灵图URL
114
+ * @property {string} scrollStatic - 静态滚轴图片URL
115
+ * @required
116
+ */
107
117
  sourceMap: {
108
118
  type: Object,
109
119
  require: true,
@@ -116,6 +126,14 @@ const props = defineProps({
116
126
  );
117
127
  },
118
128
  },
129
+
130
+ /**
131
+ * 春联尺寸配置
132
+ * @type {Object}
133
+ * @property {number} width - 春联宽度
134
+ * @property {number} height - 春联高度
135
+ * @required
136
+ */
119
137
  size: {
120
138
  type: Object,
121
139
  required: true,
@@ -123,6 +141,14 @@ const props = defineProps({
123
141
  return "width" in value && "height" in value;
124
142
  },
125
143
  },
144
+
145
+ /**
146
+ * 左侧春联位置配置
147
+ * @type {Object}
148
+ * @property {number} left - 左侧春联的水平位置
149
+ * @property {number} top - 左侧春联的垂直位置
150
+ * @required
151
+ */
126
152
  leftPosition: {
127
153
  type: Object,
128
154
  require: true,
@@ -130,6 +156,14 @@ const props = defineProps({
130
156
  return "left" in value && "top" in value;
131
157
  },
132
158
  },
159
+
160
+ /**
161
+ * 右侧春联位置配置
162
+ * @type {Object}
163
+ * @property {number} left - 右侧春联的水平位置
164
+ * @property {number} top - 右侧春联的垂直位置
165
+ * @required
166
+ */
133
167
  rightPosition: {
134
168
  type: Object,
135
169
  require: true,
@@ -137,7 +171,16 @@ const props = defineProps({
137
171
  return "left" in value && "top" in value;
138
172
  },
139
173
  },
140
- duration: { type: Number, require: true },
174
+
175
+ /**
176
+ * 动画持续时间(单位:秒)
177
+ * @type {Number}
178
+ * @required
179
+ */
180
+ duration: {
181
+ type: Number,
182
+ require: true
183
+ }
141
184
  });
142
185
  const layouts = [{ ...props.leftPosition, isLeft: true }, props.rightPosition];
143
186
  let myShow = shallowRef(false);
@@ -0,0 +1,130 @@
1
+ <!--
2
+ * @Author: ChenChanghua
3
+ * @Date: 2023-03-08 14:52:08
4
+ * @Description: file content
5
+ -->
6
+ <script setup>
7
+ import { MetroWidget, VERTICAL, useFocusHub } from "jsview";
8
+ import Item from "./Item.vue";
9
+ import { onMounted, shallowRef } from "vue";
10
+
11
+ const TAG = "MetroWidgetDemo";
12
+
13
+ const focusHub = useFocusHub();
14
+
15
+ const provideData = () => {
16
+ const data = [
17
+ {
18
+ width: 50,
19
+ height: 50,
20
+ marginRight: 10,
21
+ index: 0,
22
+ },
23
+ {
24
+ width: 50,
25
+ height: 50,
26
+ marginRight: 10,
27
+ index: 1,
28
+ },
29
+ {
30
+ width: 50,
31
+ height: 50,
32
+ marginRight: 10,
33
+ index: 2,
34
+ spriteSrc:
35
+ "https://cdn.release.qcast.cn/JsViewFrameworkTester/JsViewVueSampleResources/DemoForOperator/ClickSpriteAnim/good.png",
36
+ },
37
+ ];
38
+ return data;
39
+ };
40
+
41
+ const measures = (data) => {
42
+ return {
43
+ width: data.width,
44
+ height: data.height,
45
+ marginRight: data.marginRight,
46
+ marginBottom: data.marginBottom,
47
+ };
48
+ };
49
+
50
+ // callbacks
51
+ const onEdge = (edgeInfo) => {
52
+ console.log(TAG, "onEdge", edgeInfo);
53
+ };
54
+
55
+ const onFocus = () => {
56
+ console.log(TAG, "onFocus");
57
+ };
58
+
59
+ const onBlur = () => {
60
+ console.log(TAG, "onBlur");
61
+ };
62
+
63
+ const onScroll = (start, range, totalSize) => {
64
+ console.log(TAG, "onScroll", start, range, totalSize);
65
+ };
66
+
67
+ const widgetLayout = {
68
+ left: (1280 - 180) / 2,
69
+ top: 100,
70
+ width: 180,
71
+ height: 300,
72
+ };
73
+
74
+ onMounted(() => {
75
+ //组件mount后设置焦点
76
+ focusHub.setFocus("mainMw");
77
+ });
78
+
79
+ const widgetRef = shallowRef(null);
80
+ window.widgetRef = widgetRef;
81
+
82
+ const show = shallowRef(false);
83
+ setTimeout(() => {
84
+ show.value = true;
85
+ }, 1000);
86
+ </script>
87
+
88
+ <template>
89
+ <div
90
+ :style="{
91
+ width: 1280,
92
+ height: 720,
93
+ backgroundColor: '#007788',
94
+ }"
95
+ />
96
+ <metro-widget
97
+ v-if="show"
98
+ ref="widgetRef"
99
+ name="mainMw"
100
+ :left="widgetLayout.left"
101
+ :top="widgetLayout.top"
102
+ :width="widgetLayout.width"
103
+ :height="widgetLayout.height"
104
+ :provideData="provideData"
105
+ :direction="VERTICAL"
106
+ :measures="measures"
107
+ :onEdge="onEdge"
108
+ :onFocus="onFocus"
109
+ :onBlur="onBlur"
110
+ :onScroll="onScroll"
111
+ >
112
+ <template #renderItem="{ data, onAction }">
113
+ <item :data="data" :onAction="onAction" />
114
+ </template>
115
+ </metro-widget>
116
+
117
+ <div
118
+ :style="{
119
+ width: 1280,
120
+ height: 80,
121
+ lineHeight: 80,
122
+ backgroundColor: '#00000077',
123
+ fontSize: 30,
124
+ textAlign: 'center',
125
+ color: '#ffffff',
126
+ }"
127
+ >
128
+ 第三项摁OK会有动画
129
+ </div>
130
+ </template>
@@ -0,0 +1,74 @@
1
+ <!--
2
+ * @Author: ChenChanghua
3
+ * @Date: 2023-03-08 14:52:17
4
+ * @Description: file content
5
+ -->
6
+ <script setup>
7
+ import { ref, shallowRef } from "vue";
8
+ import Sprite from "../Sprite/Sprite.vue";
9
+
10
+ const props = defineProps({
11
+ data: Object,
12
+ onAction: Object,
13
+ });
14
+
15
+ const focused = ref(false);
16
+ const spriteController = shallowRef(null);
17
+ // 注册回调
18
+ const onFocus = () => {
19
+ focused.value = true;
20
+ };
21
+ const onBlur = () => {
22
+ focused.value = false;
23
+ };
24
+ const onClick = () => {
25
+ spriteController.value?.play();
26
+ };
27
+ props.onAction.register("onFocus", onFocus);
28
+ props.onAction.register("onBlur", onBlur);
29
+ props.onAction.register("onClick", onClick);
30
+
31
+ const onAnimEnd = () => {
32
+ console.log("anim end");
33
+ };
34
+ </script>
35
+
36
+ <template>
37
+ <div
38
+ :style="{
39
+ width: data.width,
40
+ height: data.height,
41
+ backgroundColor: focused ? '#22222299' : '#00000000',
42
+ borderRadius: Math.round(data.width / 2),
43
+ }"
44
+ ></div>
45
+ <Sprite
46
+ v-if="data.spriteSrc"
47
+ ref="spriteController"
48
+ :spriteSrc="data.spriteSrc"
49
+ :repeat="0"
50
+ :layout="{
51
+ width: data.width,
52
+ height: data.height,
53
+ }"
54
+ :onEnd="onAnimEnd"
55
+ :duration="1"
56
+ endFrame="end"
57
+ :autoStart="false"
58
+ ></Sprite>
59
+ <div
60
+ v-else
61
+ :style="{
62
+ width: data.width,
63
+ height: data.height,
64
+ fontSize: 30,
65
+ color: '#ffffff',
66
+ textAlign: 'center',
67
+ lineHeight: data.height,
68
+ backgroundColor: '#ffffff33',
69
+ borderRadius: Math.round(data.width / 2),
70
+ }"
71
+ >
72
+ {{ data.index }}
73
+ </div>
74
+ </template>
@@ -0,0 +1,187 @@
1
+ <script setup>
2
+ import { shallowRef, onMounted, onBeforeUnmount } from "vue";
3
+ import { JsvTextureStoreApi, JsvPreload, buildPreloadInfo } from "jsview";
4
+
5
+ const Image1 =
6
+ "https://cdn.release.qcast.cn/JsViewFrameworkTester/JsViewVueSampleResources/CustomShader/App/panda.jpeg";
7
+ const Image2 =
8
+ "https://cdn.release.qcast.cn/JsViewFrameworkTester/JsViewVueSampleResources/CustomShader/App/owl.jpeg";
9
+
10
+ const vToCapture = shallowRef(null);
11
+ const colorList1 = shallowRef([]);
12
+ const colorList2 = shallowRef([]);
13
+ const isPreloadDone = shallowRef(false);
14
+
15
+ let cancelHandel1 = null;
16
+ let cancelHandel2 = null;
17
+
18
+ const preloadList = [buildPreloadInfo(Image1)];
19
+
20
+ function handlePreloadDone() {
21
+ console.log("图片预加载完成");
22
+ isPreloadDone.value = true;
23
+ catpure();
24
+ }
25
+
26
+ function catpure() {
27
+ try {
28
+ cancelHandel1 = JsvTextureStoreApi.capture2Texture(
29
+ vToCapture.value,
30
+ (textureName, autoRecycle, w, h) => {
31
+ console.log("ccht captureBlurTexture", textureName, autoRecycle, w, h);
32
+ if (textureName) {
33
+ cancelHandel1 = JsvTextureStoreApi.getDominantColor(
34
+ `jsvtexturestore://${textureName}`,
35
+ (info) => {
36
+ console.log("ccht getDominantColor", info);
37
+ if (info.dominantColors) {
38
+ colorList1.value = info.dominantColors.map((color) => {
39
+ return "#" + color;
40
+ });
41
+ }
42
+ }
43
+ );
44
+ }
45
+ },
46
+ true
47
+ );
48
+ } catch (error) {
49
+ console.error("captureTexture error", error, new Error().stack);
50
+ }
51
+ }
52
+
53
+ onMounted(() => {
54
+ cancelHandel2 = JsvTextureStoreApi.getDominantColor(Image2, (info) => {
55
+ console.log("ccht getDominantColor2", info);
56
+ if (info.dominantColors) {
57
+ colorList2.value = info.dominantColors.map((color) => {
58
+ return "#" + color;
59
+ });
60
+ }
61
+ });
62
+ });
63
+
64
+ onBeforeUnmount(() => {
65
+ cancelHandel1?.();
66
+ cancelHandel2?.();
67
+ });
68
+ </script>
69
+
70
+ <template>
71
+ <div
72
+ :style="{
73
+ left: 0,
74
+ top: 0,
75
+ width: 1280,
76
+ height: 720,
77
+ backgroundColor: '#FFFFFF',
78
+ }"
79
+ ></div>
80
+ <jsv-preload
81
+ :preloadList="preloadList"
82
+ :onPreloadDone="handlePreloadDone"
83
+ ></jsv-preload>
84
+ <div
85
+ ref="vToCapture"
86
+ :style="{
87
+ left: 0,
88
+ top: 50,
89
+ width: 640, // 截屏区域的宽
90
+ height: 360, // 截屏区域的高
91
+ }"
92
+ >
93
+ <div
94
+ :style="{
95
+ width: 640,
96
+ height: 360,
97
+ backgroundImage: `url(${Image1})`,
98
+ }"
99
+ />
100
+ <div
101
+ :style="{
102
+ width: 300,
103
+ height: 300,
104
+ backgroundColor: '#007788',
105
+ }"
106
+ ></div>
107
+ </div>
108
+ <div
109
+ :style="{
110
+ left: 50,
111
+ top: 420,
112
+ }"
113
+ v-if="colorList1.length > 0"
114
+ >
115
+ <div
116
+ v-for="(color, index) in colorList1"
117
+ :style="{
118
+ left: 60 * index,
119
+ width: 50,
120
+ height: 50,
121
+ backgroundColor: color,
122
+ }"
123
+ ></div>
124
+ <div
125
+ :style="{
126
+ top: 50,
127
+ width: 480,
128
+ height: 40,
129
+ fontSize: 20,
130
+ textAlign: 'center',
131
+ lineHeight: '40px',
132
+ }"
133
+ >
134
+ 截图取主色调
135
+ </div>
136
+ </div>
137
+
138
+ <div
139
+ :style="{
140
+ left: 640,
141
+ top: 50,
142
+ width: 640,
143
+ height: 360,
144
+ backgroundImage: `url(${Image2})`,
145
+ }"
146
+ />
147
+ <div
148
+ :style="{
149
+ top: 420,
150
+ left: 690,
151
+ }"
152
+ v-if="colorList2.length > 0"
153
+ >
154
+ <div
155
+ v-for="(color, index) in colorList2"
156
+ :style="{
157
+ left: 60 * index,
158
+ width: 50,
159
+ height: 50,
160
+ backgroundColor: color,
161
+ }"
162
+ ></div>
163
+ <div
164
+ :style="{
165
+ top: 50,
166
+ width: 480,
167
+ height: 40,
168
+ fontSize: 20,
169
+ textAlign: 'center',
170
+ lineHeight: '40px',
171
+ }"
172
+ >
173
+ 图片取主色调
174
+ </div>
175
+ </div>
176
+ </template>
177
+
178
+ <style>
179
+ @keyframes rotate {
180
+ 0% {
181
+ transform: rotate3d(0, 0, 1, 0deg);
182
+ }
183
+ 100% {
184
+ transform: rotate3d(0, 0, 1, 360deg);
185
+ }
186
+ }
187
+ </style>
@@ -53,9 +53,6 @@ const onEdge = (edgeInfo) => {
53
53
  };
54
54
 
55
55
  const onBlur = () => {
56
- if (!firstLock) {
57
- props.widgetHandler.widget.value?.setFocusId(targetFocus, false, false);
58
- }
59
56
  firstLock = false;
60
57
  };
61
58
 
@@ -4,6 +4,16 @@
4
4
  * @Description: file content
5
5
  -->
6
6
  <script>
7
+ /**
8
+ * @slot listItem - 渲染单个列表项
9
+ * @property {Object} data - 项数据
10
+ * @property {Function} onAction - 动作处理函数
11
+ * @property {Object} query - 查询参数
12
+ *
13
+ * @slot groupItem - 渲染分页组项
14
+ * @property {Object} item - 分页组项数据
15
+ * @property {number} index - 分页组项索引
16
+ */
7
17
  let TOKEN = 0;
8
18
  </script>
9
19
  <script setup>
@@ -19,34 +29,95 @@ import Controller from "./Controller.vue";
19
29
  import { onMounted, ref } from "vue";
20
30
 
21
31
  const props = defineProps({
32
+ /**
33
+ * 组件名称标识
34
+ * @type {string}
35
+ * @required
36
+ */
22
37
  name: {
23
38
  type: String,
39
+ required: true,
24
40
  },
41
+
42
+ /**
43
+ * 列表布局配置
44
+ * @type {Object}
45
+ * @required
46
+ * @property {number} left - 列表左侧位置
47
+ * @property {number} top - 列表顶部位置
48
+ * @property {number} width - 列表宽度
49
+ * @property {number} height - 列表高度
50
+ */
25
51
  listLayout: {
26
52
  type: Object,
27
53
  required: true,
28
54
  },
55
+
56
+ /**
57
+ * 分页器布局配置
58
+ * @type {Object}
59
+ * @required
60
+ * @property {number} left - 分页器左侧位置
61
+ * @property {number} top - 分页器顶部位置
62
+ * @property {number} width - 分页器宽度
63
+ * @property {number} height - 分页器高度
64
+ */
29
65
  groupLayout: {
30
66
  type: Object,
31
67
  required: true,
32
68
  },
69
+
70
+ /**
71
+ * 每页显示项数
72
+ * @type {number}
73
+ * @default 10
74
+ */
33
75
  numPerPage: {
34
76
  type: Number,
35
77
  default: 10,
36
78
  },
37
- /* (index: Number) => {width: Number, height: Number, marginRight?: Number, data: Object} */
79
+
80
+ /**
81
+ * 列表项测量函数
82
+ * @type {Function}
83
+ * @required
84
+ * @param {number} index - 当前项索引
85
+ * @returns {Object} 包含尺寸和数据的对象
86
+ * @returns {number} return.width - 项宽度
87
+ * @returns {number} return.height - 项高度
88
+ * @returns {number} [return.marginRight] - 右侧间距
89
+ * @returns {Object} return.data - 项数据
90
+ */
38
91
  listMeasures: {
39
92
  type: Function,
40
93
  },
94
+
95
+ /**
96
+ * 分页组测量函数
97
+ * @type {Function}
98
+ * @required
99
+ */
41
100
  groupMeasures: {
42
101
  type: Function,
43
102
  },
103
+
104
+ /**
105
+ * 总项数
106
+ * @type {number}
107
+ * @required
108
+ */
44
109
  totalNumber: {
45
110
  type: Number,
46
111
  },
112
+
113
+ /**
114
+ * 列表内边距配置
115
+ * @type {Object}
116
+ * @optional
117
+ */
47
118
  listPadding: {
48
119
  type: Object,
49
- },
120
+ }
50
121
  });
51
122
 
52
123
  const controller = ref(null);
@@ -118,6 +189,9 @@ const onFocus = () => {
118
189
 
119
190
  onMounted(() => {});
120
191
 
192
+ /**
193
+ * 处理组件获取焦点时的操作
194
+ */
121
195
  function componentOnFocus() {
122
196
  focusHub.setFocus(curFocusName);
123
197
  }
@@ -1,13 +1,13 @@
1
1
  <template>
2
2
  <div :style="{ width: 1280, height: 720, backgroundColor: '#00000055' }"></div>
3
- <Fireworks :top="500" :left="600" :srcConfig="config" />
3
+ <Fireworks :top="500" :left="600" :srcConfig="config" :onShoot="onShoot" :onExplode="onExplode" />
4
4
  </template>
5
5
 
6
6
  <script setup>
7
7
  import Fireworks from "./Fireworks.vue";
8
8
 
9
9
  const config = {
10
- group1_1: "https://cdn.release.qcast.cn/JsViewFrameworkTester/JsViewVueSampleResources/DemoForOperator/AnimPic/App/firework1/group1_1.png",
10
+ group1_1: "https://oss.image.qcast.cn/JsViewVideo/ImageTestSample/JsViewFrameworkDemo/firework1/group1_1.png",
11
11
  group1_2: "https://oss.image.qcast.cn/JsViewVideo/ImageTestSample/JsViewFrameworkDemo/firework1/group1_2.png",
12
12
  group2_1: "https://oss.image.qcast.cn/JsViewVideo/ImageTestSample/JsViewFrameworkDemo/firework1/group2_1.png",
13
13
  group2_2: "https://oss.image.qcast.cn/JsViewVideo/ImageTestSample/JsViewFrameworkDemo/firework1/group2_2.png",
@@ -22,4 +22,15 @@ const config = {
22
22
  //精灵图素材
23
23
  fireworkSpriteSrc: "https://oss.image.qcast.cn/JsViewVideo/ImageTestSample/JsViewFrameworkDemo/firework1/fireworks.png",
24
24
  };
25
+
26
+ const onShoot = () => {
27
+ //可以加音效
28
+ console.log("onShoot");
29
+ }
30
+
31
+ const onExplode = () => {
32
+ //可以加音效
33
+ console.log("onExplode");
34
+ }
35
+
25
36
  </script>