@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.
- package/ABImageAlt/App.vue +114 -0
- package/ABImageAlt/Item.vue +133 -0
- package/{MetroWidgetDemos/SkeletonDiagram/assets/imageList.json → ABImageAlt/assets/imageList.js} +9 -1
- package/ABImageAlt/data.js +17 -0
- package/AI_Check_Rules.txt +5 -0
- package/AnimPicture/App.vue +20 -10
- package/ApicSwitch/App.vue +90 -0
- package/ApicSwitch/TabItem.vue +65 -0
- package/ApicSwitch/WebpShow.vue +24 -0
- package/ApicSwitch/data.js +50 -0
- package/Basic/AI_skills_update.md +1 -0
- package/Basic/components/div/ColorFormatTest.vue +93 -0
- package/Basic/components/div/DivRadius.vue +97 -15
- package/Basic/components/div/DivTag3Group.vue +30 -0
- package/Basic/components/img/ImageType.vue +65 -0
- package/Basic/components/panel/Panel2.vue +13 -1
- package/Basic/components/text/TextAlign.vue +7 -1
- package/BlobLoadTest/App.vue +201 -0
- package/BreakLinesApi/App.vue +82 -0
- package/CanvasDrawChart/App.vue +11 -0
- package/CanvasDrawChart/Graph1.vue +104 -0
- package/CanvasDrawChart/Graph2.vue +115 -0
- package/DashPath/App.vue +17 -16
- package/DashPath/AppForOperator.vue +2 -4
- package/DemoForOperator/AnimPic/AnimPic.vue +24 -2
- package/DemoForOperator/Banger/Banger/Banger.vue +73 -9
- package/DemoForOperator/Blur/Blur.vue +146 -0
- package/DemoForOperator/Blur/BlurInOut/BlurInOut.vue +184 -0
- package/DemoForOperator/Blur/BlurInOut/StaticBgSlide.vue +162 -0
- package/DemoForOperator/Blur/BlurPopup/BlurPopup.vue +249 -0
- package/DemoForOperator/BookFlip/App.vue +115 -0
- package/DemoForOperator/BookFlip/BookPage.vue +82 -0
- package/DemoForOperator/Bounce/Bounce.vue +33 -1
- package/DemoForOperator/Bounce/FreeMoveBuilder.js +1 -1
- package/DemoForOperator/ChunLian/Couplets.vue +44 -1
- package/DemoForOperator/ClickSpriteAnim/App.vue +130 -0
- package/DemoForOperator/ClickSpriteAnim/Item.vue +74 -0
- package/DemoForOperator/DominantColor/App.vue +187 -0
- package/DemoForOperator/EpisodeList/EpisodeList/Controller.vue +0 -3
- package/DemoForOperator/EpisodeList/EpisodeList/EpisodeList.vue +76 -2
- package/DemoForOperator/Firework1/App.vue +13 -2
- package/DemoForOperator/Firework1/Fireworks.vue +68 -11
- package/DemoForOperator/FlipPage/FlipPage/FlipPage.vue +30 -1
- package/DemoForOperator/Focus/Alpha/AlphaFocusBox.vue +27 -2
- package/DemoForOperator/Focus/Alpha/Item.vue +1 -0
- package/DemoForOperator/Focus/Light/Item.vue +1 -0
- package/DemoForOperator/Focus/Light/LightFocusBox.vue +42 -1
- package/DemoForOperator/Focus/Normal/Item.vue +1 -0
- package/DemoForOperator/Focus/Normal/NormalFocusBox.vue +12 -0
- package/DemoForOperator/FrameShadow/App.vue +193 -0
- package/DemoForOperator/FrameShadow/FrameShadow.vue +61 -0
- package/DemoForOperator/FullscreenIn/App.vue +1 -1
- package/DemoForOperator/FullscreenIn/FullscreenPoster.vue +18 -3
- package/DemoForOperator/Genie/App.vue +20 -6
- package/DemoForOperator/Genie/App2.vue +61 -0
- package/DemoForOperator/Genie/geniePakcer/GenieImage.vue +298 -0
- package/DemoForOperator/Genie/geniePakcer/GenieSlot.vue +292 -0
- package/DemoForOperator/Genie/geniePakcer/GenieTools.ts +463 -0
- package/DemoForOperator/GrayFilter/GrayFilter.vue +21 -0
- package/DemoForOperator/Jigsaw/JigsawFull.vue +58 -11
- package/DemoForOperator/Jigsaw/JigsawSingle.vue +47 -9
- package/DemoForOperator/LongChatBox/App.vue +36 -0
- package/DemoForOperator/LongChatBox/Bubble.vue +116 -0
- package/DemoForOperator/LongChatBox/LongChat.vue +204 -0
- package/DemoForOperator/LongChatBox/testData.js +14 -0
- package/DemoForOperator/Particle/Drop/DropParticle.vue +33 -1
- package/DemoForOperator/Particle/Explode/ExplodeParticle.vue +23 -2
- package/DemoForOperator/PosterAnim/PosterAnim.js +21 -0
- package/DemoForOperator/PosterOverflow/PosterOverflow.vue +16 -0
- package/DemoForOperator/Resize/App.vue +157 -0
- package/DemoForOperator/Resize/Resize/Item.vue +234 -0
- package/DemoForOperator/Resize/Resize/Resize.vue +96 -0
- package/DemoForOperator/Ripple/Ripple.vue +16 -1
- package/DemoForOperator/ScreenShootScale/App.vue +96 -0
- package/DemoForOperator/ScreenShootScale/Back.vue +86 -0
- package/DemoForOperator/ScreenShootScale/Front.vue +133 -0
- package/DemoForOperator/ScreenShootScale/Item.vue +62 -0
- package/DemoForOperator/ScreenShootScale/ScreenShootScale.vue +109 -0
- package/DemoForOperator/SmoothSwiper/App.vue +50 -0
- package/DemoForOperator/Sound/Bounce/App.vue +56 -0
- package/DemoForOperator/Sound/Bounce/Bounce.vue +87 -0
- package/DemoForOperator/Sound/Bounce/FreeMoveBuilder.js +146 -0
- package/DemoForOperator/Sound/Bounce/bgmusic.mp3 +0 -0
- package/DemoForOperator/Sound/Bounce/coin.mp3 +0 -0
- package/DemoForOperator/Sound/FocusMove/App.vue +134 -0
- package/DemoForOperator/Sound/FocusMove/Item.vue +43 -0
- package/DemoForOperator/Sound/FocusMove/move.mp3 +0 -0
- package/DemoForOperator/Sound/Rain/App.vue +11 -0
- package/DemoForOperator/Sound/Rain/Raining/Rain.vue +69 -0
- package/DemoForOperator/Sound/Rain/Raining/RainScene.vue +118 -0
- package/DemoForOperator/Sound/Sound/Sound.vue +24 -0
- package/DemoForOperator/Sound/Sound/index.js +4 -0
- package/DemoForOperator/Sound/Sound/useSound.js +112 -0
- package/DemoForOperator/Sprite/Sprite.vue +62 -5
- package/DemoForOperator/Stretch/Stretch/Stretch.vue +52 -2
- package/DemoForOperator/Swiper/App.vue +101 -0
- package/DemoForOperator/Swiper/Item.vue +56 -0
- package/DemoForOperator/Swiper/ParallaxSlide.vue +164 -0
- package/DemoForOperator/TabContent/TabContent/TabContent.vue +39 -1
- package/DemoForOperator/TabContentVertical/App.vue +104 -0
- package/DemoForOperator/TabContentVertical/ContentPage.vue +67 -0
- package/DemoForOperator/TabContentVertical/Item.vue +94 -0
- package/DemoForOperator/TabContentVertical/PageItem.vue +40 -0
- package/DemoForOperator/TabContentVertical/TabContent/CreepFocus.vue +160 -0
- package/DemoForOperator/TabContentVertical/TabContent/Item.vue +63 -0
- package/DemoForOperator/TabContentVertical/TabContent/TabContent.vue +184 -0
- package/DemoForOperator/TabContentVertical/TabContent/TabItem.vue +368 -0
- package/DemoForOperator/TabContentVertical/TabContent/TabWidget.vue +259 -0
- package/DemoForOperator/TabContentVertical/TabContent/Util.js +3 -0
- package/DemoForOperator/TabContentVertical/TabContent/ViewSwiper.vue +110 -0
- package/DemoForOperator/TabContentVertical/assets/children_science.png +0 -0
- package/DemoForOperator/TabContentVertical/assets/documentary.png +0 -0
- package/DemoForOperator/TabContentVertical/assets/free.png +0 -0
- package/DemoForOperator/TabContentVertical/assets/game.png +0 -0
- package/DemoForOperator/TabContentVertical/assets/home_selected.png +0 -0
- package/DemoForOperator/TabContentVertical/assets/movie_ticket.png +0 -0
- package/DemoForOperator/TabContentVertical/assets/my_account.png +0 -0
- package/DemoForOperator/TabContentVertical/assets/opera.png +0 -0
- package/DemoForOperator/TabContentVertical/assets/sports.png +0 -0
- package/DemoForOperator/TabContentVertical/assets/tv_drama.png +0 -0
- package/DemoForOperator/TabContentVertical/assets/variety_show.png +0 -0
- package/DemoForOperator/TabContentVertical/assets/vip.png +0 -0
- package/DemoForOperator/TabContentVertical/testData.js +76 -0
- package/DemoForOperator/Vortex/Vortex/Vortex.vue +26 -0
- package/DemoForOperator/routeList.js +125 -2
- package/DemoHomepage/App.vue +74 -1
- package/DemoHomepage/components/BodyFrame.vue +5 -0
- package/DemoHomepage/components/Item.vue +11 -0
- package/DemoHomepage/components/TabFrame.vue +1 -1
- package/DemoHomepage/router.js +798 -140
- package/DemoHomepage/views/Homepage.vue +60 -2
- package/DemoHomepage/watchTest.vue +50 -0
- package/DomRenderer/App.vue +133 -0
- package/FilterDemo/AnimatePic.vue +63 -17
- package/FilterDemo/App.vue +3 -3
- package/FlexCellDemo/AI_skills_update.md +4 -0
- package/FlexCellDemo/TestFrame1.vue +12 -2
- package/FlexCellDemo/TestFrame2.vue +10 -1
- package/FlexCellDemo/TestFrame3.vue +114 -59
- package/FpsLimit/App.vue +102 -0
- package/FreeMove/App.vue +24 -279
- package/FreeMove/TestScene1.vue +260 -0
- package/FreeMove/TestScene3.vue +431 -0
- package/FreeMoveChildAttract/App.vue +18 -8
- package/FreeMoveLink/App.vue +51 -22
- package/GiftRain/components/SpriteTranslate.vue +68 -48
- package/HashHistory/App.vue +2 -2
- package/HashHistory/router.js +1 -1
- package/Hover/App.vue +144 -0
- package/HttpRequestSSE/SSEReader.js +200 -0
- package/ImpactStop/App.vue +2 -2
- package/Input/FullKeyboard.vue +3 -3
- package/Input/InputPanel.vue +63 -3
- package/JsvLine/App.vue +53 -38
- package/LatexDemo/App.vue +3 -1
- package/LatexFormula/App.vue +196 -0
- package/LongImage/App.vue +1 -1
- package/LongImage/LongImageScroll.vue +111 -46
- package/LongImage/Scroll.vue +28 -9
- package/LongText/LongTextScroll.vue +14 -1
- package/Markdown/App.vue +36 -0
- package/Markdown/Bubble.vue +109 -0
- package/Markdown/LongChat.vue +216 -0
- package/Markdown/data.js +633 -0
- package/MetroWidgetDemos/AI_skills_update.md +2 -0
- package/MetroWidgetDemos/EpgFlowListType/App.vue +206 -0
- package/MetroWidgetDemos/EpgFlowListType/components/ContentCard.vue +105 -0
- package/MetroWidgetDemos/EpgFlowListType/components/FloorSection.vue +131 -0
- package/MetroWidgetDemos/EpgFlowListType/components/LeftTabItem.vue +41 -0
- package/MetroWidgetDemos/EpgFlowListType/data.js +78 -0
- package/MetroWidgetDemos/ListExpand/ChildItem.vue +130 -0
- package/MetroWidgetDemos/ListExpand/ExpandItem.vue +375 -0
- package/MetroWidgetDemos/ListExpand/ExpandItem1.vue +403 -0
- package/MetroWidgetDemos/ListExpand/assets/arrow-down.png +0 -0
- package/MetroWidgetDemos/ListExpand/assets/up-arrow.png +0 -0
- package/MetroWidgetDemos/ListExpand/components/WidgetListHandler.vue +150 -0
- package/MetroWidgetDemos/ListExpand/index.vue +88 -0
- package/MetroWidgetDemos/ListExpand/list.js +2421 -0
- package/MetroWidgetDemos/RefreshDemo/App.vue +14 -1
- package/MetroWidgetDemos/RenderAccelerate/App.vue +142 -0
- package/MetroWidgetDemos/RenderAccelerate/AppPage.vue +78 -0
- package/MetroWidgetDemos/RenderAccelerate/AppTab.vue +62 -0
- package/MetroWidgetDemos/RenderAccelerate/ContentItem.vue +409 -0
- package/MetroWidgetDemos/{TripleWidget → RenderAccelerate}/Item.vue +6 -3
- package/MetroWidgetDemos/RenderAccelerate/TabItem.vue +100 -0
- package/MetroWidgetDemos/RenderAccelerate/ViewSwiper.vue +215 -0
- package/MetroWidgetDemos/RenderAccelerate/WidgetItem.vue +107 -0
- package/MetroWidgetDemos/SkeletonDiagram/App.vue +35 -8
- package/MetroWidgetDemos/SkeletonDiagram/Item.vue +11 -2
- package/MetroWidgetDemos/SkeletonDiagram/assets/imageList.js +245 -0
- package/MetroWidgetDemos/SkeletonDiagram/data.js +3 -3
- package/MetroWidgetDemos/SpatialNav/App.vue +177 -0
- package/MetroWidgetDemos/SpatialNav/Buttons.vue +83 -0
- package/MetroWidgetDemos/SpatialNav/CustomFocus.vue +57 -0
- package/MetroWidgetDemos/SpatialNav/Item.vue +71 -0
- package/MetroWidgetDemos/SpatialNav/SimpleFloor.vue +86 -0
- package/MetroWidgetDemos/SpatialNav/StepMw.vue +113 -0
- package/MetroWidgetDemos/SpatialNav/TabContent/TabContent.vue +185 -0
- package/MetroWidgetDemos/SpatialNav/TripleSection/TripleSection.vue +69 -0
- package/MetroWidgetDemos/SpatialNav/TripleSection/WidgetItem.vue +100 -0
- package/MetroWidgetDemos/SpatialNav/TvSection/List.vue +75 -0
- package/MetroWidgetDemos/SpatialNav/TvSection/TvSection.vue +91 -0
- package/MetroWidgetDemos/basic2/App.vue +407 -0
- package/MetroWidgetDemos/basic2/Item.vue +68 -0
- package/MetroWidgetDemos/direction/App.vue +22 -0
- package/MetroWidgetDemos/gazeFocusDiff/App.vue +126 -0
- package/MetroWidgetDemos/gazeFocusDiff/Item.vue +87 -0
- package/MetroWidgetDemos/minimalUsage/App.vue +66 -0
- package/MetroWidgetDemos/minimalUsage/Item.vue +54 -0
- package/MetroWidgetDemos/ninePatchFocusPage/App.vue +23 -7
- package/MetroWidgetDemos/ninePatchFocusPage/Item.vue +7 -5
- package/MetroWidgetDemos/ninePatchFocusPage/focusConstants.js +2 -0
- package/MetroWidgetDemos/routeList.js +229 -8
- package/MetroWidgetDemos/slideSetting/App.vue +288 -99
- package/MetroWidgetDemos/zIndex/App.vue +117 -0
- package/MetroWidgetDemos/zIndex/Item.vue +61 -0
- package/NinePatchTester/App.vue +24 -31
- package/PosterPacker/App.vue +2 -2
- package/PreDecode/App.vue +140 -0
- package/ReactiveTest/App.vue +115 -0
- package/ReactiveTest/Item.vue +92 -0
- package/ReactiveTest/assets/imageList.js +245 -0
- package/ReactiveTest/component/TestSmartDiv.vue +50 -0
- package/ReactiveTest/component/TestSmartDivSrcList.vue +74 -0
- package/ReactiveTest/component/TestSmartImage.vue +46 -0
- package/ReactiveTest/component/TestSmartImageSrcList.vue +90 -0
- package/ReactiveTest/component/TestSmartImageStyle.vue +41 -0
- package/ReactiveTest/data.js +49 -0
- package/ScreenToBlob/App.vue +250 -0
- package/ScrollBoxTest/App.vue +52 -28
- package/ScrollBoxTest/ClipBar.vue +64 -2
- package/ScrollBoxTest/NinePatchBar.vue +64 -2
- package/ScrollBoxTest/SizeDivBar.vue +64 -2
- package/SecTorTest/App.vue +9 -3
- package/SpringFestival/SpringFestivalScene/FreeMoveBuilder.js +3 -3
- package/SyncDecode/App.vue +137 -0
- package/TextSizeLimit/App.vue +211 -0
- package/TextureAnimation/App3.vue +11 -1
- package/TouchWidget/App.vue +90 -5
- package/TouchWidget/WidgetItem.vue +1 -0
- package/TransitPage/App.vue +2 -0
- package/ViewOpacity/App.vue +19 -0
- package/assets/logo.png +0 -0
- package/package.json +1 -1
- package/DashPath/DashPath.vue +0 -118
- package/DemoForOperator/Genie/geniePakcer/Genie.vue +0 -699
- package/DemoForOperator/ScalePoster/App.vue +0 -4
- package/DemoForOperator/ScalePoster/ScalePoster.vue +0 -0
- package/DivMetroPerformance/App.vue +0 -157
- package/DivMetroPerformance/Item.vue +0 -58
- package/DivMetroPerformance/assets/bg.jpg +0 -0
- package/DivMetroPerformance/assets/coupon_content.png +0 -0
- package/DivMetroPerformance/assets/coupon_left.png +0 -0
- package/DivMetroPerformance/assets/coupon_mid.png +0 -0
- package/DivMetroPerformance/assets/coupon_right.png +0 -0
- package/DivMetroPerformance/assets/focus_border.png +0 -0
- package/DivMetroPerformance/assets/holder_logo.png +0 -0
- package/DivMetroPerformance/assets/jrbm.png +0 -0
- package/DivMetroPerformance/assets/line_left.png +0 -0
- package/DivMetroPerformance/assets/line_mid.png +0 -0
- package/DivMetroPerformance/assets/line_right.png +0 -0
- package/DivMetroPerformance/assets/loading.png +0 -0
- package/DivMetroPerformance/assets/logo.png +0 -0
- package/DivMetroPerformance/assets/mcjx.png +0 -0
- package/DivMetroPerformance/assets/tao.png +0 -0
- package/DivMetroPerformance/assets/tmall.png +0 -0
- package/DivMetroPerformance/border.png +0 -0
- package/DivMetroPerformance/components/ContentItem.vue +0 -384
- package/DivMetroPerformance/components/MyTab.vue +0 -129
- package/DivMetroPerformance/data.js +0 -124
- package/DivMetroPerformance/utils/GridItem.vue +0 -28
- package/DivMetroPerformance/utils/GridPlate.vue +0 -85
- package/MediaDemo/App.vue +0 -127
- package/MediaDemo/assets/audio-poster.png +0 -0
- package/MediaDemo/components/Button.vue +0 -69
- package/MediaDemo/components/Controllor.vue +0 -286
- package/MediaDemo/components/StatusBar.vue +0 -100
- package/MediaDemo/components/frames/AudioFrame.vue +0 -39
- package/MediaDemo/components/frames/AudioPoster.vue +0 -48
- package/MediaDemo/components/frames/MediaFrame.vue +0 -153
- package/MediaDemo/components/frames/VideoFrame.vue +0 -39
- package/MetroWidgetDemos/TripleWidget/App.vue +0 -81
- package/MetroWidgetDemos/TripleWidget/SWidgetItem.vue +0 -93
- package/MetroWidgetDemos/TripleWidget/WidgetItem.vue +0 -111
- package/Parkour/App.vue +0 -13
- package/Parkour/Common/Context.js +0 -21
- package/Parkour/Common/MatchmanInfo.js +0 -62
- package/Parkour/Common/Random.js +0 -61
- package/Parkour/Common/Sound.js +0 -50
- package/Parkour/appConfig/HOW_TO_CONFIG.md +0 -20
- package/Parkour/appConfig/app.config.mjs +0 -5
- package/Parkour/appConfig/app_sign_private_key_sample.crt +0 -28
- package/Parkour/appConfig/app_sign_public_key_sample.pem +0 -9
- package/Parkour/appConfig/jsview.config.mjs +0 -39
- package/Parkour/assets/Bgimages/bg1.png +0 -0
- package/Parkour/assets/Bgimages/bg2.png +0 -0
- package/Parkour/assets/Bgimages/bg3.png +0 -0
- package/Parkour/assets/Bgimages/bg4.png +0 -0
- package/Parkour/assets/Bgimages/bg5.png +0 -0
- package/Parkour/assets/audio/jump.mp3 +0 -0
- package/Parkour/assets/audio/lose.mp3 +0 -0
- package/Parkour/assets/role_skin1/fail.json +0 -44
- package/Parkour/assets/role_skin1/fail.png +0 -0
- package/Parkour/assets/role_skin1/jump_down.json +0 -20
- package/Parkour/assets/role_skin1/jump_down.png +0 -0
- package/Parkour/assets/role_skin1/jump_up.json +0 -44
- package/Parkour/assets/role_skin1/jump_up.png +0 -0
- package/Parkour/assets/role_skin1/roll.json +0 -44
- package/Parkour/assets/role_skin1/roll.png +0 -0
- package/Parkour/assets/role_skin1/run.json +0 -52
- package/Parkour/assets/role_skin1/run.png +0 -0
- package/Parkour/components/Backdrop.vue +0 -61
- package/Parkour/components/GameSence.vue +0 -602
- package/Parkour/components/Matchman.vue +0 -85
- package/TextureAnimation/utils/FrameCanvasStore.ts +0 -68
- package/TextureAnimation/utils/RotateFrame.vue +0 -146
- package/TextureAnimation/utils/circleHaloMask.png +0 -0
- package/ThrowMoveDemo/AccelerateDemo.vue +0 -85
- package/ThrowMoveDemo/App.vue +0 -104
- package/ThrowMoveDemo/LRParabolicDemo.vue +0 -101
- package/ThrowMoveDemo/TargetDemo.vue +0 -87
- package/ThrowMoveDemo/UDParabolicDemo.vue +0 -92
- /package/{AnimPicture/assets → assets}/animated_webp.webp +0 -0
- /package/{AnimPicture/assets → assets}/ball_3.webp +0 -0
- /package/{AnimPicture/assets → assets}/girl_run.gif +0 -0
- /package/{AnimPicture/assets → assets}/quan.webp +0 -0
|
@@ -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 } from "vue";
|
|
10
|
-
|
|
11
|
-
export default {
|
|
12
|
-
props: {
|
|
13
|
-
name: String,
|
|
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: 200;
|
|
103
|
-
height: 50;
|
|
104
|
-
line-height: 50;
|
|
105
|
-
color: #444444;
|
|
106
|
-
font-size: 25;
|
|
107
|
-
text-align: center;
|
|
108
|
-
}
|
|
109
|
-
|
|
110
|
-
.text-active {
|
|
111
|
-
width: 200;
|
|
112
|
-
height: 50;
|
|
113
|
-
line-height: 50;
|
|
114
|
-
color: #ffffff;
|
|
115
|
-
font-size: 25;
|
|
116
|
-
text-align: center;
|
|
117
|
-
}
|
|
118
|
-
|
|
119
|
-
.item-focused {
|
|
120
|
-
width: 200;
|
|
121
|
-
height: 50;
|
|
122
|
-
background-color: #008080;
|
|
123
|
-
}
|
|
124
|
-
.item-normal {
|
|
125
|
-
width: 200;
|
|
126
|
-
height: 50;
|
|
127
|
-
background-color: #87CECB;
|
|
128
|
-
}
|
|
129
|
-
</style>
|
|
@@ -1,124 +0,0 @@
|
|
|
1
|
-
// const data = [
|
|
2
|
-
// {
|
|
3
|
-
// blocks: {
|
|
4
|
-
// w: 200,
|
|
5
|
-
// h: 160
|
|
6
|
-
// },
|
|
7
|
-
// focusable: true,
|
|
8
|
-
// color: "#000022",
|
|
9
|
-
// content: 0
|
|
10
|
-
// },
|
|
11
|
-
// {
|
|
12
|
-
// blocks: {
|
|
13
|
-
// w: 200,
|
|
14
|
-
// h: 160
|
|
15
|
-
// },
|
|
16
|
-
// focusable: true,
|
|
17
|
-
// color: "#003300",
|
|
18
|
-
// content: 1
|
|
19
|
-
// },
|
|
20
|
-
// {
|
|
21
|
-
// blocks: {
|
|
22
|
-
// w: 200,
|
|
23
|
-
// h: 160
|
|
24
|
-
// },
|
|
25
|
-
// focusable: true,
|
|
26
|
-
// color: "#000044",
|
|
27
|
-
// content: 2
|
|
28
|
-
// },
|
|
29
|
-
// {
|
|
30
|
-
// blocks: {
|
|
31
|
-
// w: 400,
|
|
32
|
-
// h: 320
|
|
33
|
-
// },
|
|
34
|
-
// focusable: true,
|
|
35
|
-
// color: "#000055",
|
|
36
|
-
// content: 3
|
|
37
|
-
// },
|
|
38
|
-
// {
|
|
39
|
-
// blocks: {
|
|
40
|
-
// w: 200,
|
|
41
|
-
// h: 160
|
|
42
|
-
// },
|
|
43
|
-
// focusable: true,
|
|
44
|
-
// color: "#000066",
|
|
45
|
-
// content: 4
|
|
46
|
-
// },
|
|
47
|
-
// {
|
|
48
|
-
// blocks: {
|
|
49
|
-
// w: 200,
|
|
50
|
-
// h: 160
|
|
51
|
-
// },
|
|
52
|
-
// focusable: true,
|
|
53
|
-
// color: "#0000CD",
|
|
54
|
-
// content: 5
|
|
55
|
-
// },
|
|
56
|
-
// ];
|
|
57
|
-
|
|
58
|
-
// let content = 6;
|
|
59
|
-
// for (let i = 0; i < 10; i++) {
|
|
60
|
-
// data.push({
|
|
61
|
-
// blocks: {
|
|
62
|
-
// w: 200,
|
|
63
|
-
// h: 320
|
|
64
|
-
// },
|
|
65
|
-
// focusable: true,
|
|
66
|
-
// color: "#000022",
|
|
67
|
-
// content: content++
|
|
68
|
-
// });
|
|
69
|
-
// data.push({
|
|
70
|
-
// blocks: {
|
|
71
|
-
// w: 200,
|
|
72
|
-
// h: 160
|
|
73
|
-
// },
|
|
74
|
-
// focusable: true,
|
|
75
|
-
// color: "#003300",
|
|
76
|
-
// content: content++
|
|
77
|
-
// });
|
|
78
|
-
// }
|
|
79
|
-
|
|
80
|
-
let data1 = [];
|
|
81
|
-
|
|
82
|
-
// 添加300个模拟数据
|
|
83
|
-
for (let i = 0; i < 50; i++) {
|
|
84
|
-
data1.push(Object.freeze({
|
|
85
|
-
index: i,
|
|
86
|
-
name: `商品:骆驼奶粉蛋白质粉,限时抢购,立刻发货,序号:${i}`,
|
|
87
|
-
prize: `${Math.floor(Math.random() * 200) +
|
|
88
|
-
200}` /* 测试数据要保证比最高优惠券(300左右)要高 */,
|
|
89
|
-
savePrize: `${i}`,
|
|
90
|
-
soldTotal: `${Math.floor(Math.random() * 50000)}`,
|
|
91
|
-
pictUrl:
|
|
92
|
-
"https://cdn.release.qcast.cn/JsViewFrameworkTester/JsViewVueSampleResources/DivMetroPerformance/data/O1CN01Ab4vWz1izGAyRL1Yf_!!0-item_pic.jpg",
|
|
93
|
-
}));
|
|
94
|
-
}
|
|
95
|
-
|
|
96
|
-
let data2 = [];
|
|
97
|
-
for (let i = 0; i < 49; i++) {
|
|
98
|
-
data2.push(Object.freeze({
|
|
99
|
-
index: i,
|
|
100
|
-
name: `商品:骆驼奶粉蛋白质粉,限时抢购,立刻发货,序号:${i}`,
|
|
101
|
-
prize: `${Math.floor(Math.random() * 200) +
|
|
102
|
-
200}` /* 测试数据要保证比最高优惠券(300左右)要高 */,
|
|
103
|
-
savePrize: `${i}`,
|
|
104
|
-
soldTotal: `${Math.floor(Math.random() * 50000)}`,
|
|
105
|
-
pictUrl:
|
|
106
|
-
"https://cdn.release.qcast.cn/JsViewFrameworkTester/JsViewVueSampleResources/DivMetroPerformance/data/O1CN01Ab4vWz1izGAyRL1Yf_!!0-item_pic.jpg",
|
|
107
|
-
}));
|
|
108
|
-
}
|
|
109
|
-
|
|
110
|
-
let data3 = [];
|
|
111
|
-
for (let i = 0; i < 48; i++) {
|
|
112
|
-
data3.push(Object.freeze({
|
|
113
|
-
index: i,
|
|
114
|
-
name: `商品:骆驼奶粉蛋白质粉,限时抢购,立刻发货,序号:${i}`,
|
|
115
|
-
prize: `${Math.floor(Math.random() * 200) +
|
|
116
|
-
200}` /* 测试数据要保证比最高优惠券(300左右)要高 */,
|
|
117
|
-
savePrize: `${i}`,
|
|
118
|
-
soldTotal: `${Math.floor(Math.random() * 50000)}`,
|
|
119
|
-
pictUrl:
|
|
120
|
-
"https://cdn.release.qcast.cn/JsViewFrameworkTester/JsViewVueSampleResources/DivMetroPerformance/data/O1CN01Ab4vWz1izGAyRL1Yf_!!0-item_pic.jpg",
|
|
121
|
-
}));
|
|
122
|
-
}
|
|
123
|
-
|
|
124
|
-
export { data1, data2, data3 };
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
<!--
|
|
2
|
-
* @Author: ChenChanghua
|
|
3
|
-
* @Date: 2022-01-14 18:18:00
|
|
4
|
-
* @LastEditors: ChenChanghua
|
|
5
|
-
* @LastEditTime: 2022-01-26 17:35:26
|
|
6
|
-
* @Description: file content
|
|
7
|
-
-->
|
|
8
|
-
<script>
|
|
9
|
-
export default {
|
|
10
|
-
props: ["data", "index"],
|
|
11
|
-
created() {},
|
|
12
|
-
mounted() {},
|
|
13
|
-
};
|
|
14
|
-
</script>
|
|
15
|
-
|
|
16
|
-
<template>
|
|
17
|
-
<div
|
|
18
|
-
ref="element"
|
|
19
|
-
:style="{
|
|
20
|
-
left: data.xPos,
|
|
21
|
-
top: data.yPos,
|
|
22
|
-
width: data.width,
|
|
23
|
-
height: data.height,
|
|
24
|
-
}"
|
|
25
|
-
>
|
|
26
|
-
<slot name="renderItem" :data="data.data"></slot>
|
|
27
|
-
</div>
|
|
28
|
-
</template>
|
|
@@ -1,85 +0,0 @@
|
|
|
1
|
-
<!--
|
|
2
|
-
* @Author: ChenChanghua
|
|
3
|
-
* @Date: 2021-09-22 13:47:23
|
|
4
|
-
* @LastEditors: ChenChanghua
|
|
5
|
-
* @LastEditTime: 2022-02-11 17:55:55
|
|
6
|
-
* @Description: file content
|
|
7
|
-
-->
|
|
8
|
-
<script>
|
|
9
|
-
import GridItem from "./GridItem.vue";
|
|
10
|
-
|
|
11
|
-
export default {
|
|
12
|
-
props: {
|
|
13
|
-
data: Object,
|
|
14
|
-
height: {
|
|
15
|
-
type: Number,
|
|
16
|
-
required: true,
|
|
17
|
-
},
|
|
18
|
-
width: {
|
|
19
|
-
type: Number,
|
|
20
|
-
required: true,
|
|
21
|
-
},
|
|
22
|
-
measures: {
|
|
23
|
-
type: Function,
|
|
24
|
-
required: true,
|
|
25
|
-
},
|
|
26
|
-
},
|
|
27
|
-
components: {
|
|
28
|
-
GridItem,
|
|
29
|
-
},
|
|
30
|
-
created() {
|
|
31
|
-
this.configWidth = this.width;
|
|
32
|
-
this.configHeight = this.height;
|
|
33
|
-
|
|
34
|
-
// 通过measure函数,计算item信息
|
|
35
|
-
let measure_result = this.measures();
|
|
36
|
-
let current_line_x = 0;
|
|
37
|
-
let current_line_y = 0;
|
|
38
|
-
for (let idx = 0; idx < this.data.length; idx++) {
|
|
39
|
-
if (current_line_x + measure_result.width > this.configWidth) {
|
|
40
|
-
// new line
|
|
41
|
-
current_line_x = 0;
|
|
42
|
-
current_line_y += measure_result.height;
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
this.itemData.push(
|
|
46
|
-
Object.freeze({
|
|
47
|
-
id: idx,
|
|
48
|
-
xPos: current_line_x,
|
|
49
|
-
yPos: current_line_y,
|
|
50
|
-
data: this.data[idx],
|
|
51
|
-
})
|
|
52
|
-
);
|
|
53
|
-
|
|
54
|
-
// next item x
|
|
55
|
-
current_line_x += measure_result.width;
|
|
56
|
-
}
|
|
57
|
-
},
|
|
58
|
-
setup() {
|
|
59
|
-
return {
|
|
60
|
-
configWidth: 0,
|
|
61
|
-
configHeight: 0,
|
|
62
|
-
itemData: [],
|
|
63
|
-
};
|
|
64
|
-
},
|
|
65
|
-
mounted() {},
|
|
66
|
-
updated() {},
|
|
67
|
-
};
|
|
68
|
-
</script>
|
|
69
|
-
|
|
70
|
-
<template>
|
|
71
|
-
<div
|
|
72
|
-
:style="{ width: configWidth, height: configHeight, overflow: 'hidden' }"
|
|
73
|
-
>
|
|
74
|
-
<grid-item
|
|
75
|
-
v-for="(item, index) in itemData"
|
|
76
|
-
:key="item.id"
|
|
77
|
-
:index="index"
|
|
78
|
-
:data="item"
|
|
79
|
-
>
|
|
80
|
-
<template v-slot:renderItem="slotProps">
|
|
81
|
-
<slot name="renderItem" v-bind="slotProps"></slot>
|
|
82
|
-
</template>
|
|
83
|
-
</grid-item>
|
|
84
|
-
</div>
|
|
85
|
-
</template>
|
package/MediaDemo/App.vue
DELETED
|
@@ -1,127 +0,0 @@
|
|
|
1
|
-
<script>
|
|
2
|
-
import { provide, reactive, watch } from 'vue'
|
|
3
|
-
import { Options, Vue } from "vue-class-component";
|
|
4
|
-
import AudioFrame from "./components/frames/AudioFrame";
|
|
5
|
-
import VideoFrame from "./components/frames/VideoFrame";
|
|
6
|
-
import Controllor from "./components/Controllor";
|
|
7
|
-
import StatusBar from "./components/StatusBar";
|
|
8
|
-
|
|
9
|
-
@Options({
|
|
10
|
-
components: {
|
|
11
|
-
AudioFrame,
|
|
12
|
-
VideoFrame,
|
|
13
|
-
Controllor,
|
|
14
|
-
StatusBar,
|
|
15
|
-
},
|
|
16
|
-
})
|
|
17
|
-
|
|
18
|
-
class App extends Vue {
|
|
19
|
-
constructor(props) {
|
|
20
|
-
super(props);
|
|
21
|
-
|
|
22
|
-
this.mediaCtrl = reactive({
|
|
23
|
-
type: 'video',
|
|
24
|
-
autoplay: true,
|
|
25
|
-
seek: 0,
|
|
26
|
-
loop: false,
|
|
27
|
-
mute: false,
|
|
28
|
-
volume: 0,
|
|
29
|
-
playbackRate: 1,
|
|
30
|
-
|
|
31
|
-
playTrigger: 0,
|
|
32
|
-
loadTrigger: 0,
|
|
33
|
-
})
|
|
34
|
-
this.mediaTime = reactive({
|
|
35
|
-
currentTime: 0,
|
|
36
|
-
duration: 0,
|
|
37
|
-
})
|
|
38
|
-
this.mediaStatus = reactive({
|
|
39
|
-
playState: '',
|
|
40
|
-
playbackRate: '',
|
|
41
|
-
objectFit: '',
|
|
42
|
-
volume: '',
|
|
43
|
-
playing: false,
|
|
44
|
-
})
|
|
45
|
-
this.videoCtrl = reactive({
|
|
46
|
-
layout: {},
|
|
47
|
-
objectFit: null,
|
|
48
|
-
visibility: 'visible',
|
|
49
|
-
})
|
|
50
|
-
|
|
51
|
-
const updateCaption = () => {
|
|
52
|
-
this.caption = (this.mediaCtrl.type == 'audio' ? App.Caption.audioInfo : App.Caption.videoInfo);
|
|
53
|
-
};
|
|
54
|
-
watch(() => this.mediaCtrl.type, updateCaption);
|
|
55
|
-
updateCaption();
|
|
56
|
-
|
|
57
|
-
provide('mediaCtrl', this.mediaCtrl)
|
|
58
|
-
provide('mediaTime', this.mediaTime)
|
|
59
|
-
provide('mediaStatus', this.mediaStatus)
|
|
60
|
-
provide('videoCtrl', this.videoCtrl)
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
static Caption = {
|
|
64
|
-
videoInfo: "名称: Video\n"
|
|
65
|
-
+ "功能描述:\n"
|
|
66
|
-
+ "1. 播放 / 暂停\n"
|
|
67
|
-
+ "2. 前进 / 后退\n"
|
|
68
|
-
+ "3. 时间 / 时长\n"
|
|
69
|
-
+ "4. 循环 / 静音 / 倍速\n"
|
|
70
|
-
+ "5. ObjectFit调整\n",
|
|
71
|
-
audioInfo: "名称: Audio\n"
|
|
72
|
-
+ "功能描述:\n"
|
|
73
|
-
+ "1. 播放 / 暂停\n"
|
|
74
|
-
+ "2. 前进 / 后退\n"
|
|
75
|
-
+ "3. 时间 / 时长 / 倍速\n"
|
|
76
|
-
+ "4. 循环 / 静音\n"
|
|
77
|
-
}
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
export default App;
|
|
81
|
-
</script>
|
|
82
|
-
|
|
83
|
-
<template>
|
|
84
|
-
<div
|
|
85
|
-
:style="{
|
|
86
|
-
top: 0, left: 0,
|
|
87
|
-
width: 1280, height: 720,
|
|
88
|
-
backgroundColor: 'rgb(222,211,140,0.5)'
|
|
89
|
-
}"
|
|
90
|
-
>
|
|
91
|
-
|
|
92
|
-
<AudioFrame v-if="mediaCtrl.type == 'audio'"/>
|
|
93
|
-
<VideoFrame v-else />
|
|
94
|
-
|
|
95
|
-
<!-- :key="mediaCtrl.type" => JsView bug,当mediaCtrl.type属性变化时,为了保证显示在VideoFrame前面 -->
|
|
96
|
-
<div class="caption" :key="mediaCtrl.type">
|
|
97
|
-
{{ caption }}
|
|
98
|
-
</div>
|
|
99
|
-
<Controllor class="controllor"/>
|
|
100
|
-
<StatusBar class="statusbar"/>
|
|
101
|
-
</div>
|
|
102
|
-
</template>
|
|
103
|
-
|
|
104
|
-
<style scoped>
|
|
105
|
-
.caption {
|
|
106
|
-
text-align: left;
|
|
107
|
-
font-size: 24;
|
|
108
|
-
line-height: 30;
|
|
109
|
-
color: #FFFFFF;
|
|
110
|
-
left: 40;
|
|
111
|
-
top: 20;
|
|
112
|
-
width: 300;
|
|
113
|
-
height: 210;
|
|
114
|
-
background-color: rgba(27,38,151,0.6);
|
|
115
|
-
}
|
|
116
|
-
|
|
117
|
-
.controllor {
|
|
118
|
-
left: 40;
|
|
119
|
-
top: 540;
|
|
120
|
-
}
|
|
121
|
-
|
|
122
|
-
.statusbar {
|
|
123
|
-
left: 40;
|
|
124
|
-
top: 650;
|
|
125
|
-
}
|
|
126
|
-
|
|
127
|
-
</style>
|
|
Binary file
|
|
@@ -1,69 +0,0 @@
|
|
|
1
|
-
<script>
|
|
2
|
-
import { Options, Vue } from "vue-class-component";
|
|
3
|
-
|
|
4
|
-
@Options({
|
|
5
|
-
props: {
|
|
6
|
-
style: Object,
|
|
7
|
-
autoFocus: Boolean,
|
|
8
|
-
name: String,
|
|
9
|
-
onClick: Function,
|
|
10
|
-
}
|
|
11
|
-
})
|
|
12
|
-
|
|
13
|
-
class Button extends Vue {
|
|
14
|
-
constructor(props) {
|
|
15
|
-
super(props);
|
|
16
|
-
|
|
17
|
-
this.hasFocused = false;
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
onFocus() {
|
|
21
|
-
this.hasFocused = true;
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
onBlur() {
|
|
25
|
-
this.hasFocused = false;
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
onKeyDown(ev) {
|
|
29
|
-
if(ev.keyCode === 13) { // Enter
|
|
30
|
-
this.onClick?.();
|
|
31
|
-
return true;
|
|
32
|
-
}
|
|
33
|
-
return false;
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
getAction() {
|
|
37
|
-
return {
|
|
38
|
-
onFocus: this.onFocus,
|
|
39
|
-
onBlur: this.onBlur,
|
|
40
|
-
onKeyDown: this.onKeyDown
|
|
41
|
-
}
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
export default Button;
|
|
46
|
-
</script>
|
|
47
|
-
|
|
48
|
-
<template>
|
|
49
|
-
<jsv-focus-block :name="name" :autoFocus="autoFocus?'':undefined"
|
|
50
|
-
:onAction="getAction()"
|
|
51
|
-
>
|
|
52
|
-
<div class="item"
|
|
53
|
-
:style="{
|
|
54
|
-
...style,
|
|
55
|
-
backgroundColor: hasFocused ? '#FFFF00' : '#A8A8A8',
|
|
56
|
-
}"
|
|
57
|
-
>
|
|
58
|
-
<slot/>
|
|
59
|
-
</div>
|
|
60
|
-
</jsv-focus-block>
|
|
61
|
-
</template>
|
|
62
|
-
|
|
63
|
-
<style scoped>
|
|
64
|
-
.item {
|
|
65
|
-
text-align: center;
|
|
66
|
-
font-size: 24;
|
|
67
|
-
line-height: 40;
|
|
68
|
-
}
|
|
69
|
-
</style>
|