@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
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
import LongChat from "./LongChat.vue";
|
|
3
|
+
</script>
|
|
4
|
+
|
|
5
|
+
<template>
|
|
6
|
+
<div
|
|
7
|
+
:style="{
|
|
8
|
+
width: 1280,
|
|
9
|
+
height: 720,
|
|
10
|
+
backgroundColor: '#666',
|
|
11
|
+
}"
|
|
12
|
+
>
|
|
13
|
+
<div :style="{
|
|
14
|
+
width: 1280,
|
|
15
|
+
height: 30,
|
|
16
|
+
left: 50,
|
|
17
|
+
top: 10,
|
|
18
|
+
backgroundColor: '#666',
|
|
19
|
+
fontSize: 20,
|
|
20
|
+
color: '#fff',
|
|
21
|
+
}">
|
|
22
|
+
按ok键添加对话框,按上下键滚动
|
|
23
|
+
</div>
|
|
24
|
+
<div
|
|
25
|
+
:style="{
|
|
26
|
+
top: 70,
|
|
27
|
+
left: 50,
|
|
28
|
+
width: 1280,
|
|
29
|
+
height: 600,
|
|
30
|
+
overflow: 'hidden',
|
|
31
|
+
}"
|
|
32
|
+
>
|
|
33
|
+
<LongChat />
|
|
34
|
+
</div>
|
|
35
|
+
</div>
|
|
36
|
+
</template>
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div
|
|
3
|
+
:style="{
|
|
4
|
+
top: -markdownTop,
|
|
5
|
+
width: visibleRect.width,
|
|
6
|
+
height: markdownHeight,
|
|
7
|
+
backgroundColor: backgroundColor,
|
|
8
|
+
}"
|
|
9
|
+
></div>
|
|
10
|
+
<Markdown
|
|
11
|
+
ref="markdownRef"
|
|
12
|
+
:visibleRect="{ width: visibleRect.width, height: visibleRect.height }"
|
|
13
|
+
:content="''"
|
|
14
|
+
:enableLatex="false"
|
|
15
|
+
@sizechange="onSizeChange"
|
|
16
|
+
/>
|
|
17
|
+
</template>
|
|
18
|
+
|
|
19
|
+
<script setup>
|
|
20
|
+
import { ref, shallowRef, onBeforeUnmount, onMounted } from "vue";
|
|
21
|
+
import { Markdown } from "@shijiu/jsview-vue-plus";
|
|
22
|
+
|
|
23
|
+
const text = ref("")
|
|
24
|
+
|
|
25
|
+
const emit = defineEmits(["sizechange"]);
|
|
26
|
+
const props = defineProps({
|
|
27
|
+
messages: Array,
|
|
28
|
+
onDone: Function,
|
|
29
|
+
left: Number,
|
|
30
|
+
visibleRect: Object,
|
|
31
|
+
backgroundColor: String,
|
|
32
|
+
});
|
|
33
|
+
|
|
34
|
+
//fake data generator
|
|
35
|
+
const generateList = props.messages;
|
|
36
|
+
|
|
37
|
+
function* testMessageGenerator() {
|
|
38
|
+
for (const chunk of generateList) {
|
|
39
|
+
yield chunk;
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
const messageGen = testMessageGenerator();
|
|
43
|
+
|
|
44
|
+
const addText = () => {
|
|
45
|
+
const result = messageGen.next();
|
|
46
|
+
if (result.done) {
|
|
47
|
+
console.log("所有文本已写入完成");
|
|
48
|
+
markdownRef.value.writeDone();
|
|
49
|
+
props.onDone?.();
|
|
50
|
+
return false;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
text.value += result.value;
|
|
54
|
+
|
|
55
|
+
const chunk =
|
|
56
|
+
typeof result.value === "string"
|
|
57
|
+
? result.value
|
|
58
|
+
: String(result.value ?? "");
|
|
59
|
+
markdownRef.value.write(chunk);
|
|
60
|
+
return true;
|
|
61
|
+
};
|
|
62
|
+
|
|
63
|
+
let timeoutHandle = -1;
|
|
64
|
+
const startTestMessage = () => {
|
|
65
|
+
const tick = () => {
|
|
66
|
+
if (!addText()) {
|
|
67
|
+
timeoutHandle = -1;
|
|
68
|
+
return;
|
|
69
|
+
}
|
|
70
|
+
timeoutHandle = setTimeout(() => {
|
|
71
|
+
tick();
|
|
72
|
+
}, 80);
|
|
73
|
+
};
|
|
74
|
+
tick();
|
|
75
|
+
};
|
|
76
|
+
|
|
77
|
+
const stopTestMessage = () => {
|
|
78
|
+
clearTimeout(timeoutHandle);
|
|
79
|
+
timeoutHandle = -1;
|
|
80
|
+
};
|
|
81
|
+
|
|
82
|
+
const markdownRef = shallowRef();
|
|
83
|
+
const markdownHeight = ref(0);
|
|
84
|
+
const markdownTop = ref(0);
|
|
85
|
+
let autoSlide = true;
|
|
86
|
+
const onSizeChange = (width, height) => {
|
|
87
|
+
emit("sizechange", height);
|
|
88
|
+
markdownHeight.value = height;
|
|
89
|
+
};
|
|
90
|
+
|
|
91
|
+
onBeforeUnmount(() => {
|
|
92
|
+
stopTestMessage();
|
|
93
|
+
});
|
|
94
|
+
|
|
95
|
+
onMounted(() => {
|
|
96
|
+
startTestMessage();
|
|
97
|
+
});
|
|
98
|
+
|
|
99
|
+
function show() {
|
|
100
|
+
markdownRef.value?.show();
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
function hide() {
|
|
104
|
+
markdownRef.value?.hide();
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
function setVisibleRectStart(distance) {
|
|
108
|
+
markdownRef.value?.setVisibleStart(distance);
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
defineExpose({
|
|
112
|
+
show,
|
|
113
|
+
hide,
|
|
114
|
+
setVisibleRectStart,
|
|
115
|
+
});
|
|
116
|
+
</script>
|
|
@@ -0,0 +1,204 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
import { ref, reactive } from "vue";
|
|
3
|
+
import {
|
|
4
|
+
data1,
|
|
5
|
+
data2,
|
|
6
|
+
data3,
|
|
7
|
+
} from "./testData.js";
|
|
8
|
+
import Bubble from "./Bubble.vue";
|
|
9
|
+
|
|
10
|
+
//可视范围的位置
|
|
11
|
+
let visibleStart = ref(0);
|
|
12
|
+
|
|
13
|
+
//聊天泡泡的消息列表
|
|
14
|
+
let messageList = [];
|
|
15
|
+
let renderList = reactive([]);
|
|
16
|
+
let totalHeight = 0;
|
|
17
|
+
let generating = false;
|
|
18
|
+
|
|
19
|
+
function createMessageItem(
|
|
20
|
+
key,
|
|
21
|
+
data,
|
|
22
|
+
left,
|
|
23
|
+
top,
|
|
24
|
+
width,
|
|
25
|
+
height,
|
|
26
|
+
backgroundColor
|
|
27
|
+
) {
|
|
28
|
+
let item = {
|
|
29
|
+
key,
|
|
30
|
+
data,
|
|
31
|
+
left: ref(left),
|
|
32
|
+
top: ref(top),
|
|
33
|
+
width: ref(width ?? 0),
|
|
34
|
+
height: ref(height ?? 0),
|
|
35
|
+
ref: null,
|
|
36
|
+
backgroundColor: backgroundColor,
|
|
37
|
+
onDone() {
|
|
38
|
+
generating = false;
|
|
39
|
+
console.log("onDone");
|
|
40
|
+
},
|
|
41
|
+
onSizeChange(height) {
|
|
42
|
+
this.height.value = height;
|
|
43
|
+
arrangeLayout();
|
|
44
|
+
updateRenderList();
|
|
45
|
+
},
|
|
46
|
+
onRef(ref) {
|
|
47
|
+
this.ref = ref;
|
|
48
|
+
},
|
|
49
|
+
show() {
|
|
50
|
+
this.ref?.show();
|
|
51
|
+
},
|
|
52
|
+
hide() {
|
|
53
|
+
this.ref?.hide();
|
|
54
|
+
},
|
|
55
|
+
};
|
|
56
|
+
item.onDone = item.onDone.bind(item);
|
|
57
|
+
item.onSizeChange = item.onSizeChange.bind(item);
|
|
58
|
+
item.onRef = item.onRef.bind(item);
|
|
59
|
+
item.show = item.show.bind(item);
|
|
60
|
+
item.hide = item.hide.bind(item);
|
|
61
|
+
return item;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
function arrangeLayout() {
|
|
65
|
+
//更新item的布局
|
|
66
|
+
totalHeight = 0;
|
|
67
|
+
for (let i = 0; i < messageList.length; i++) {
|
|
68
|
+
const item = messageList[i];
|
|
69
|
+
item.top.value = totalHeight;
|
|
70
|
+
totalHeight += item.height.value;
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
const viewWidth = 400;
|
|
74
|
+
const viewHeight = 600;
|
|
75
|
+
|
|
76
|
+
function updateRenderList() {
|
|
77
|
+
renderList.length = 0;
|
|
78
|
+
if (autoSlideMode) {
|
|
79
|
+
//自动保持一行模式, 根据总高度和可视范围的高度, 计算出可视范围的开始位置
|
|
80
|
+
visibleStart.value =
|
|
81
|
+
totalHeight > viewHeight ? totalHeight - viewHeight : 0;
|
|
82
|
+
}
|
|
83
|
+
for (let i = 0; i < messageList.length; i++) {
|
|
84
|
+
const item = messageList[i];
|
|
85
|
+
renderList.push(item);
|
|
86
|
+
if (
|
|
87
|
+
item.top.value + item.height.value >= visibleStart.value &&
|
|
88
|
+
item.top.value <= visibleStart.value + viewHeight
|
|
89
|
+
) {
|
|
90
|
+
//可见的泡泡, 显示
|
|
91
|
+
item.show();
|
|
92
|
+
//此处要设置虚拟列表的可视范围的开始位置, 注意是转化为相对这个item的偏移量
|
|
93
|
+
item.ref?.setVisibleRectStart(visibleStart.value - item.top.value);
|
|
94
|
+
} else {
|
|
95
|
+
//不可见的泡泡, 隐藏
|
|
96
|
+
item.hide();
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
const messages = [data1, data2, data3];
|
|
102
|
+
function addData(message) {
|
|
103
|
+
const lastItem = messageList[messageList.length - 1];
|
|
104
|
+
const item = createMessageItem(
|
|
105
|
+
messageList.length,
|
|
106
|
+
message,
|
|
107
|
+
messageList.length % 2 == 0 ? 0 : 400,
|
|
108
|
+
lastItem ? lastItem.top.value + lastItem.height.value : 0,
|
|
109
|
+
800,
|
|
110
|
+
100,
|
|
111
|
+
messageList.length % 2 ? "#339933" : "#993333"
|
|
112
|
+
);
|
|
113
|
+
messageList.push(item);
|
|
114
|
+
updateRenderList();
|
|
115
|
+
generating = true;
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
function normalizeSlidePos(pos) {
|
|
119
|
+
return Math.max(Math.min(pos, totalHeight - viewHeight), 0);
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
let autoSlideMode = true;
|
|
123
|
+
const onKeyDown = (ev) => {
|
|
124
|
+
switch (ev.keyCode) {
|
|
125
|
+
case 38:
|
|
126
|
+
autoSlideMode = false;
|
|
127
|
+
visibleStart.value = normalizeSlidePos(visibleStart.value - 100);
|
|
128
|
+
updateRenderList();
|
|
129
|
+
return true;
|
|
130
|
+
case 40:
|
|
131
|
+
visibleStart.value = normalizeSlidePos(visibleStart.value + 100);
|
|
132
|
+
if (visibleStart.value != totalHeight - viewHeight) {
|
|
133
|
+
autoSlideMode = false;
|
|
134
|
+
} else {
|
|
135
|
+
autoSlideMode = true;
|
|
136
|
+
}
|
|
137
|
+
updateRenderList();
|
|
138
|
+
return true;
|
|
139
|
+
case 49:
|
|
140
|
+
if (!generating) {
|
|
141
|
+
addData(messages[0]);
|
|
142
|
+
}
|
|
143
|
+
return true;
|
|
144
|
+
case 50:
|
|
145
|
+
if (!generating) {
|
|
146
|
+
addData(messages[1]);
|
|
147
|
+
}
|
|
148
|
+
return true;
|
|
149
|
+
case 51:
|
|
150
|
+
if (!generating) {
|
|
151
|
+
addData(messages[2]);
|
|
152
|
+
}
|
|
153
|
+
return true;
|
|
154
|
+
}
|
|
155
|
+
return false;
|
|
156
|
+
};
|
|
157
|
+
</script>
|
|
158
|
+
|
|
159
|
+
<template>
|
|
160
|
+
<jsv-focus-block
|
|
161
|
+
autoFocus
|
|
162
|
+
:onAction="{
|
|
163
|
+
onKeyDown,
|
|
164
|
+
}"
|
|
165
|
+
></jsv-focus-block>
|
|
166
|
+
<div
|
|
167
|
+
:style="{
|
|
168
|
+
top: -visibleStart,
|
|
169
|
+
}"
|
|
170
|
+
>
|
|
171
|
+
<template v-for="item in renderList">
|
|
172
|
+
<div
|
|
173
|
+
:style="{
|
|
174
|
+
left: item.left,
|
|
175
|
+
top: item.top,
|
|
176
|
+
width: item.width,
|
|
177
|
+
height: item.height,
|
|
178
|
+
// backgroundColor: '#99999999',
|
|
179
|
+
}"
|
|
180
|
+
>
|
|
181
|
+
<bubble
|
|
182
|
+
:messages="item.data"
|
|
183
|
+
:onDone="item.onDone"
|
|
184
|
+
:left="0"
|
|
185
|
+
:backgroundColor="item.backgroundColor"
|
|
186
|
+
:visibleRect="{
|
|
187
|
+
width: viewWidth,
|
|
188
|
+
height: viewHeight,
|
|
189
|
+
}"
|
|
190
|
+
@sizechange="item.onSizeChange"
|
|
191
|
+
:ref="item.onRef"
|
|
192
|
+
></bubble>
|
|
193
|
+
</div>
|
|
194
|
+
</template>
|
|
195
|
+
</div>
|
|
196
|
+
<div :style="{
|
|
197
|
+
top: 10,
|
|
198
|
+
left: 900,
|
|
199
|
+
width: 250,
|
|
200
|
+
height: 300,
|
|
201
|
+
color: '#fff',
|
|
202
|
+
fontSize: 20,
|
|
203
|
+
}">{{ "1键: 长文本\n2键: 中文本\n3键: 短文本" }}</div>
|
|
204
|
+
</template>
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export let data1 = [
|
|
2
|
+
"<think>", "\n", "嗯", ",", "用户", "</think>",
|
|
3
|
+
"\n\n", "五一", "假期", "来", "广州", "游玩", ",", "可以", "结合", "城市", "特色", "和", "季节", "特点", "安排", "行程", "。", "以下是", "精心", "整理的", "推荐", ",", "涵盖", "不同", "主题", "和", "人群", "需求", ":\n\n", "###", " ", "一", "、", "城市", "地", "标", "与", "自然", "景观", "\n", "1", ".", " **", "广州", "塔", "+", "珠江", "夜", "游", "**", "(", "夜景", "必", "打卡", ")\n", "-", " ", "推荐", "玩法", ":", "下午", "登", "塔", "体验", "云端", "观", "景", "(", "488", "米", "观", "景", "台", "),", "傍晚", "在", "塔", "顶", "摩", "天", "轮", "看", "日落", ",", "晚上", "搭配", "珠江", "夜", "游", "(", "建议", "选", "露天", "顶层", "座位", ")。\n", "-", " ", "贴", "士", ":", "提前", "2", "天", "预约", "夜", "游", "船", "票", ",", "海", "心", "沙", "码头", "人", "流量", "较少", "。\n\n", "2", ".", " **", "白云", "山", "轻", "徒步", "**", "(", "避开", "人", "潮", "路线", ")\n", "-", " ", "小众", "路线", ":", "西门", "进", "→", "明珠", "楼", "→", "黄", "婆", "洞", "水库", "→", "摩", "星", "岭", "(", "看", "城市", "天际", "线", "),", "下山", "可", "坐", "缆", "车", "。\n", "-", " ", "特色", "体验", ":", "山", "脚", "云", "台", "花园", "的", "玫瑰", "园", "正值", "花期", ",", "适合", "拍照", "。\n\n", "###", " ", "二", "、", "文化", "深度", "体验", "\n", "1", ".", " **", "永", "庆", "坊", "+", "粤", "剧", "艺术", "博物馆", "**", "(", "西", "关", "风情", ")\n", "-", " ", "新", "玩法", ":", "参加", "非遗", "工作", "坊", "(", "广", "彩", "、", "榄", "雕", "体验", "),", "晚上", "在", "月亮", "桥", "拍", "倒", "影", ",", "周末", "有", "创意", "市", "集", "。\n", "-", " ", "隐藏", "景点", ":", "李", "小龙", "祖", "居", "的", "互动", "展览", "适合", "带孩子", "体验", "。\n\n", "2", ".", " **", "沙", "面", "岛", "+", "沿", "江西", "路", "**", "(", "复古", "摄影", "路线", ")\n", "-", " ", "拍摄", "点", ":", "沙", "面", "薄荷", "色", "洋", "房", "群", "、", "人民", "桥", "日落", "、", "爱", "群", "大厦", "复古", "街", "拍", "。\n", "-", "[DONE]",
|
|
4
|
+
"<think>", "\n", "嗯", ",", "用户", "问", "的是", "广州", "五一", "有什么", "好", "玩的", "。", "首先", ",", "我需要", "考虑", "用户", "可能的", "背景", "。", "五一", "假期", "通常是", "三天", ",", "加上", "调", "休", "可能有", "五天", ",", "所以", "用户", "可能有", "短", "途", "旅", "行的", "计划", ",", "或者", "想", "留在", "广州", "本地", "游玩", "。", "用户", "可能是", "本地", "居民", ",", "也可能是", "外地", "游客", ",", "但", "问题", "里", "提到", "广州", ",", "所以", "更", "可能是", "来", "广州", "旅游", "的人", ",", "或者", "本地", "人", "想", "找", "活动", "。", "\n\n", "接下来", ",", "我需要", "确定", "用户", "的需求", "。", "他们", "可能", "想要", "知道", "五一", "期间", "广州", "的特色", "活动", "、", "景点", "推荐", "、", "美食", "地点", "或者", "适合", "家庭", "、", "情侣", "的不同", "去处", "。", "需要", "涵盖", "自然", "景观", "、", "文化", "景点", "、", "美食", "体验", "、", "亲子", "活动", "等", "不同", "方面", ",", "以满足", "不同", "人群", "的需求", "。\n\n", "然后", ",", "考虑", "五一", "假", "期的", "特点", "。", "五一", "期间", "人", "流量", "大", ",", "热门", "景点", "可能会", "比较", "拥挤", ",", "所以", "可能需要", "推荐", "一些", "相对", "人", "少", "但", "有趣", "的地方", ",", "或者", "提醒", "用户", "提前", "预约", "。", "另外", ",", "五一", "期间", "广州", "的", "天气", "已经开始", "热", "了", ",", "建议", "用户", "注意", "防晒", "和", "补水", "。\n\n", "用户", "可能", "没有", "明确", "说明", "他们的", "兴趣", "点", ",", "所以", "需要", "全面", "覆盖", "。", "比如", ",", "喜欢", "自然的", "可以去", "白云", "山", "、", "越", "秀", "公园", ";", "喜欢", "文化的", "可以去", "陈家", "祠", "、", "沙", "面", "岛", ";", "带", "孩子的", "可以考虑", "长", "隆", "旅游", "度假", "区", ";", "喜欢", "购", "物的", "可以去", "北京", "路", "、", "天河", "城", ";", "对", "历史", "感兴趣的", "可以", "参观", "黄埔", "军校", "旧址", "等", "。\n\n", "还要", "考虑", "五一", "期间", "是否有", "特别", "的活动", ",", "比如", "展览", "、", "市", "集", "、", "灯光", "秀", "等", "。", "例如", ",", "广州", "塔", "可能有", "灯光", "秀", ",", "永", "庆", "坊", "有", "非遗", "体验", ",", "这些", "信息", "需要", "更新", "到", "最新", ",", "确保", "准确性", "。\n\n", "另外", ",", "美食", "是", "广州", "的一大", "特色", ",", "用户", "可能", "想", "体验", "地", "道的", "早", "茶", "、", "小吃", ",", "所以", "推荐", "一些", "老", "字", "号的", "餐厅", ",", "如", "陶", "陶", "居", "、", "点", "都", "德", ",", "以及", "上下", "九", "、", "西", "华", "路", "等", "美食", "街", "。\n\n", "最后", ",", "需要", "提醒", "用户", "注意", "出行", "安全", ",", "提前", "预约", ",", "避开", "高峰", "时段", ",", "以及", "疫情防控", "措施", ",", "如果有", "的话", "。", "但", "根据", "当前", "情况", ",", "可能", "不需要", "特别", "强调", "疫情", ",", "但", "还是要", "提醒", "注意", "安全", "。\n\n", "总结", "下来", ",", "回答", "需要", "结构", "清晰", ",", "分", "门", "别", "类", ",", "涵盖", "景点", "、", "活动", "、", "美食", "、", "亲子", "、", "文化", "等", ",", "同时", "提供", "实用", "建议", ",", "帮助", "用户", "规划", "行程", "。\n", "</think>",
|
|
5
|
+
"\n\n", "五一", "假期", "来", "广州", "游玩", ",", "可以", "结合", "城市", "特色", "和", "季节", "特点", "安排", "行程", "。", "以下是", "精心", "整理的", "推荐", ",", "涵盖", "不同", "主题", "和", "人群", "需求", ":\n\n", "###", " ", "一", "、", "城市", "地", "标", "与", "自然", "景观", "\n", "1", ".", " **", "广州", "塔", "+", "珠江", "夜", "游", "**", "(", "夜景", "必", "打卡", ")\n", "-", " ", "推荐", "玩法", ":", "下午", "登", "塔", "体验", "云端", "观", "景", "(", "488", "米", "观", "景", "台", "),", "傍晚", "在", "塔", "顶", "摩", "天", "轮", "看", "日落", ",", "晚上", "搭配", "珠江", "夜", "游", "(", "建议", "选", "露天", "顶层", "座位", ")。\n", "-", " ", "贴", "士", ":", "提前", "2", "天", "预约", "夜", "游", "船", "票", ",", "海", "心", "沙", "码头", "人", "流量", "较少", "。\n\n", "2", ".", " **", "白云", "山", "轻", "徒步", "**", "(", "避开", "人", "潮", "路线", ")\n", "-", " ", "小众", "路线", ":", "西门", "进", "→", "明珠", "楼", "→", "黄", "婆", "洞", "水库", "→", "摩", "星", "岭", "(", "看", "城市", "天际", "线", "),", "下山", "可", "坐", "缆", "车", "。\n", "-", " ", "特色", "体验", ":", "山", "脚", "云", "台", "花园", "的", "玫瑰", "园", "正值", "花期", ",", "适合", "拍照", "。\n\n", "###", " ", "二", "、", "文化", "深度", "体验", "\n", "1", ".", " **", "永", "庆", "坊", "+", "粤", "剧", "艺术", "博物馆", "**", "(", "西", "关", "风情", ")\n", "-", " ", "新", "玩法", ":", "参加", "非遗", "工作", "坊", "(", "广", "彩", "、", "榄", "雕", "体验", "),", "晚上", "在", "月亮", "桥", "拍", "倒", "影", ",", "周末", "有", "创意", "市", "集", "。\n", "-", " ", "隐藏", "景点", ":", "李", "小龙", "祖", "居", "的", "互动", "展览", "适合", "带孩子", "体验", "。\n\n", "2", ".", " **", "沙", "面", "岛", "+", "沿", "江西", "路", "**", "(", "复古", "摄影", "路线", ")\n", "-", " ", "拍摄", "点", ":", "沙", "面", "薄荷", "色", "洋", "房", "群", "、", "人民", "桥", "日落", "、", "爱", "群", "大厦", "复古", "街", "拍", "。\n", "-", "[DONE]",
|
|
6
|
+
];
|
|
7
|
+
|
|
8
|
+
export const data2 = ["中国","航天","事业","是新中国成立以来最具","代表性的科技成就","之一,它不仅","体现了国家综合实力的","提升,也承载","着中华民族探索宇宙","的梦想。从无","到有、从小","到大,中国","航天在几代","人的努力下取得了","举世瞩目的","辉煌成就。\n\n###"," **起步阶段:","艰难中的希望**\n","1956","年,中国航天","事业正式起步。","当时,在百废","待兴的情况下,","一批以钱学","森为代表的科学家毅然","回国,为新","中国的航天发展奠定了","基础。19","70年4","月24日",",中国第一颗","人造卫星“东方","红一号”成功","发射升空,","这标志着中国成为","世界上第五个能够","独立研制并发射","人造卫星的国家","。“东方红一号","”的成功拉开了","中国航天探索的新","篇章。\n\n### **","载人航天:","迈向星辰大海**\n","进入21世纪","后,中国航天","进入了快速发展的新时期","。200","3年10","月15日",",神舟五","号飞船成功将","中国首位航天员","杨利伟送","入太空,使","中国成为继苏联","和美国之后第三个","实现载人航天","飞行的国家。","此后,中国陆续","开展了多次载人","航天任务,包括","空间出舱活动","(神舟七","号)、天宫","系列目标飞行器","对接实验以及长期","驻留任务(","天宫二号","与神舟十一","号)。这些任务","为中国建设自己的空间","站积累了宝贵经验","。\n\n### **探","月工程:“嫦","娥”奔月","**\n除了载人","航天外,中国的","深空探测同样","取得了重大突破。","自200","7年起,“嫦","娥工程”正式启动",",旨在实现对","月球的全面","探测。嫦娥","一号和嫦娥","二号完成了绕","月探测任务;","嫦娥三号","实现了中国首次月","面软着陆",";而嫦娥","四号则开创","性地降落在","月球背面,","这是人类历史上第一次","。此外,嫦","娥五号成功","带回了约1",".7公斤的","月壤样本,","标志着中国具备了","从其他天体","采集样本的能力。\n\n",
|
|
9
|
+
|
|
10
|
+
"### **火星探测",":走向更远","的未知**\n2","021年","5月15","日,天问","一号探测器成功","着陆于火星","乌托邦平原","南部预选着","陆区,成为中国","首个成功登陆火星","的探测器。","祝融号火星","车随后开始巡视","探测工作,拍摄","大量珍贵照片,并","获取了丰富的科学","数据。这次任务","不仅彰显了中国","在行星际探测","领域的实力,也为","未来进一步探索太阳","系奠定了坚实基础","。\n\n### **北斗","导航:服务全球","**\n北斗卫星导航","系统是中国自主研发的","全球卫星定位系统","。经过二十多年的","建设与发展,北斗","三号全球组","网于20","20年7","月全面建成并开通","服务。如今,","北斗系统已广泛","应用于交通运输、农业","、林业、渔业","等多个领域,同时","向世界提供高","精度定位服务,","成为与GPS并","驾齐驱的重要","基础设施。\n\n### **","未来展望:星辰","大海永不止步","**\n当前,中国","正在稳步推进新一代重型","运载火箭研发","工作,并计划实施","更多深空探测","项目,如小","行星采样返回","、木星系","探测等。同时",",中国空间站","天宫号即将","全面建成,将成为国际","上最重要的近地","轨道科研平台之一","。可以预见,在","不远的将来,","中国航天将继续书写","属于自己的传奇故事",",为全人类","认识宇宙贡献智慧","与力量。\n\n中国","航天的发展历程是一部","充满挑战与荣耀","的历史,它凝聚","了几代航天人的","智慧与汗水,","同时也激励着无数","年轻人投身科技创新的伟大","事业中。\n\n","\n","为","您","推","荐","这","些","好","看","的","影","视"]
|
|
11
|
+
|
|
12
|
+
export let data3= [
|
|
13
|
+
"五一", "假期", "来", "广州", "游玩", ",", "可以", "结合", "城市", "特色", "和", "季节", "特点", "安排", "行程", "。", "以下是", "精心", "整理的", "推荐", ",", "涵盖", "不同", "主题", "和", "人群", "需求", ":\n\n", "###", " ", "一", "、", "城市", "地", "标", "与", "自然", "景观"
|
|
14
|
+
]
|
|
@@ -48,23 +48,51 @@ import { JsvSpray } from "jsview";
|
|
|
48
48
|
import { ref, onBeforeUnmount, onMounted } from "vue";
|
|
49
49
|
|
|
50
50
|
const props = defineProps({
|
|
51
|
+
/**
|
|
52
|
+
* 粒子图片资源URL列表
|
|
53
|
+
* @type {Array}
|
|
54
|
+
* @required
|
|
55
|
+
*/
|
|
51
56
|
urlList: {
|
|
52
57
|
type: Array,
|
|
53
58
|
required: true,
|
|
54
59
|
},
|
|
60
|
+
/**
|
|
61
|
+
* 是否自动开始动画
|
|
62
|
+
* @type {Boolean}
|
|
63
|
+
* @default true
|
|
64
|
+
*/
|
|
55
65
|
autoStart: {
|
|
56
66
|
type: Boolean,
|
|
57
67
|
default: true,
|
|
58
68
|
},
|
|
69
|
+
/**
|
|
70
|
+
* 粒子容器布局配置
|
|
71
|
+
* @type {Object}
|
|
72
|
+
* @required
|
|
73
|
+
* @property {string} left - CSS left值
|
|
74
|
+
* @property {string} top - CSS top值
|
|
75
|
+
* @property {string} width - 容器宽度
|
|
76
|
+
* @property {string} height - 容器高度
|
|
77
|
+
*/
|
|
59
78
|
layout: {
|
|
60
79
|
type: Object,
|
|
61
80
|
required: true,
|
|
62
81
|
},
|
|
63
|
-
|
|
82
|
+
/**
|
|
83
|
+
* 粒子数量级别
|
|
84
|
+
* @type {'low'|'middle'|'high'}
|
|
85
|
+
* @default 'middle'
|
|
86
|
+
*/
|
|
64
87
|
numLevel: {
|
|
65
88
|
type: String,
|
|
66
89
|
default: "middle",
|
|
67
90
|
},
|
|
91
|
+
/**
|
|
92
|
+
* 粒子生成速度级别
|
|
93
|
+
* @type {'low'|'middle'|'high'}
|
|
94
|
+
* @default 'middle'
|
|
95
|
+
*/
|
|
68
96
|
sprayLevel: {
|
|
69
97
|
type: String,
|
|
70
98
|
default: "middle",
|
|
@@ -150,6 +178,10 @@ let list3 = sprayInfos.slice(3);
|
|
|
150
178
|
|
|
151
179
|
let show = ref(false);
|
|
152
180
|
let timeoutHandler = -1;
|
|
181
|
+
/**
|
|
182
|
+
* 启动粒子动画
|
|
183
|
+
* @expose 通过defineExpose暴露给父组件调用
|
|
184
|
+
*/
|
|
153
185
|
function start() {
|
|
154
186
|
show.value = true;
|
|
155
187
|
timeoutHandler = setTimeout(() => {
|
|
@@ -25,14 +25,31 @@ import { JsvSpray } from "jsview";
|
|
|
25
25
|
import { shallowRef, computed } from "vue";
|
|
26
26
|
|
|
27
27
|
const props = defineProps({
|
|
28
|
+
/**
|
|
29
|
+
* 粒子容器的布局配置
|
|
30
|
+
* @type {Object}
|
|
31
|
+
* @property {string} left - 左定位(带单位)
|
|
32
|
+
* @property {string} top - 上定位(带单位)
|
|
33
|
+
* @property {number} width - 容器宽度
|
|
34
|
+
* @property {number} height - 容器高度
|
|
35
|
+
*/
|
|
28
36
|
layout: {
|
|
29
37
|
type: Object,
|
|
30
|
-
|
|
38
|
+
required: true,
|
|
31
39
|
},
|
|
40
|
+
/**
|
|
41
|
+
* 粒子图片URL列表
|
|
42
|
+
* @type {Array<string>}
|
|
43
|
+
*/
|
|
32
44
|
urlList: {
|
|
33
45
|
type: Array,
|
|
34
46
|
required: true,
|
|
35
47
|
},
|
|
48
|
+
/**
|
|
49
|
+
* 粒子密度级别
|
|
50
|
+
* @type {'low'|'middle'|'high'}
|
|
51
|
+
* @default 'middle'
|
|
52
|
+
*/
|
|
36
53
|
numLevel: {
|
|
37
54
|
type: String,
|
|
38
55
|
default: "middle",
|
|
@@ -53,7 +70,7 @@ function getTotalParticleNum() {
|
|
|
53
70
|
case "high":
|
|
54
71
|
return 150;
|
|
55
72
|
default:
|
|
56
|
-
400;
|
|
73
|
+
return 400;
|
|
57
74
|
}
|
|
58
75
|
}
|
|
59
76
|
|
|
@@ -92,6 +109,10 @@ let sprayStyle = {
|
|
|
92
109
|
};
|
|
93
110
|
|
|
94
111
|
defineExpose({
|
|
112
|
+
/**
|
|
113
|
+
* 触发粒子动画开始
|
|
114
|
+
* @description 通过改变token值强制重新渲染组件来启动动画
|
|
115
|
+
*/
|
|
95
116
|
start() {
|
|
96
117
|
++token.value;
|
|
97
118
|
},
|
|
@@ -5,6 +5,27 @@ const scaleLevel = [1.03, 1.07, 1.1];
|
|
|
5
5
|
const shaleLevel = [1, 3, 5];
|
|
6
6
|
|
|
7
7
|
let styleSheet = null;
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* 获取海报动画配置
|
|
11
|
+
* @param {string} type - 动画类型,可选值:
|
|
12
|
+
* 'bounce-left' - 向左弹跳
|
|
13
|
+
* 'bounce-bottom' - 向下弹跳
|
|
14
|
+
* 'bounce-right' - 向右弹跳
|
|
15
|
+
* 'bounce-top' - 向上弹跳
|
|
16
|
+
* 'shake' - 摇晃
|
|
17
|
+
* 'scale' - 缩放
|
|
18
|
+
* 'breath' - 呼吸效果
|
|
19
|
+
* @param {Object} params - 动画参数
|
|
20
|
+
* @param {'low'|'middle'|'high'} params.level - 动画幅度级别
|
|
21
|
+
* @param {number} [params.scale0] - scale动画的起始缩放值
|
|
22
|
+
* @param {number} [params.scale1] - scale动画的中间缩放值
|
|
23
|
+
* @param {number} [params.scale] - breath动画的缩放值
|
|
24
|
+
* @returns {Object} 动画配置对象
|
|
25
|
+
* @property {string} name - 动画名称
|
|
26
|
+
* @property {Function} release - 释放动画资源的函数
|
|
27
|
+
*/
|
|
28
|
+
|
|
8
29
|
export function getPosterAnim(type, params) {
|
|
9
30
|
if (!styleSheet) {
|
|
10
31
|
styleSheet = getKeyFramesGroup();
|
|
@@ -7,16 +7,32 @@
|
|
|
7
7
|
|
|
8
8
|
<script setup>
|
|
9
9
|
import { ref, watchEffect, computed } from "vue";
|
|
10
|
+
|
|
10
11
|
const props = defineProps({
|
|
12
|
+
/**
|
|
13
|
+
* 控制图片显示类型
|
|
14
|
+
* @type {'small' | 'large'}
|
|
15
|
+
*/
|
|
11
16
|
showType: {
|
|
12
17
|
type: String,
|
|
13
18
|
},
|
|
19
|
+
/**
|
|
20
|
+
* 大图位置样式配置对象
|
|
21
|
+
* @type {Object}
|
|
22
|
+
* @property {string} position - 定位方式
|
|
23
|
+
* @property {string} width - 宽度
|
|
24
|
+
* @property {string} height - 高度
|
|
25
|
+
* @property {string} left - 左侧位置
|
|
26
|
+
* @property {string} top - 顶部位置
|
|
27
|
+
*/
|
|
14
28
|
largePos: {
|
|
15
29
|
type: Object,
|
|
16
30
|
},
|
|
17
31
|
});
|
|
18
32
|
|
|
19
33
|
const imgType = ref("small");
|
|
34
|
+
|
|
35
|
+
// 监听showType变化更新图片类型
|
|
20
36
|
watchEffect(() => {
|
|
21
37
|
imgType.value = props.showType;
|
|
22
38
|
});
|