@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,14 +1,14 @@
|
|
|
1
1
|
<script setup>
|
|
2
2
|
import iconImgPath from "../../assets/icon.png";
|
|
3
3
|
const blockSize = {
|
|
4
|
-
width:
|
|
5
|
-
height:
|
|
4
|
+
width: 45,
|
|
5
|
+
height: 45,
|
|
6
6
|
};
|
|
7
|
-
const gap =
|
|
7
|
+
const gap = 3;
|
|
8
8
|
</script>
|
|
9
9
|
|
|
10
10
|
<template>
|
|
11
|
-
<div id="layout-root">
|
|
11
|
+
<div id="layout-root" :style="{ top: 2 }">
|
|
12
12
|
<div
|
|
13
13
|
class="content-font"
|
|
14
14
|
:style="{
|
|
@@ -27,7 +27,7 @@ const gap = 5;
|
|
|
27
27
|
width: blockSize.width,
|
|
28
28
|
height: blockSize.height,
|
|
29
29
|
backgroundColor: 'rgba(255, 255, 0, 1)',
|
|
30
|
-
borderRadius: '0
|
|
30
|
+
borderRadius: '0 8 12 16',
|
|
31
31
|
}"
|
|
32
32
|
>
|
|
33
33
|
各角不同
|
|
@@ -35,31 +35,113 @@ const gap = 5;
|
|
|
35
35
|
<div
|
|
36
36
|
class="content-font"
|
|
37
37
|
:style="{
|
|
38
|
-
|
|
38
|
+
left: (blockSize.width + gap) * 2,
|
|
39
39
|
width: blockSize.width,
|
|
40
40
|
height: blockSize.height,
|
|
41
|
-
|
|
42
|
-
borderRadius: '
|
|
41
|
+
backgroundColor: 'rgba(255, 255, 0, 1)',
|
|
42
|
+
borderRadius: '0 0 16 16',
|
|
43
43
|
}"
|
|
44
44
|
>
|
|
45
|
-
|
|
45
|
+
两角相同
|
|
46
46
|
</div>
|
|
47
47
|
<div
|
|
48
48
|
class="content-font"
|
|
49
49
|
:style="{
|
|
50
|
-
left: blockSize.width + gap,
|
|
51
|
-
top: blockSize.height + gap,
|
|
50
|
+
left: (blockSize.width + gap) * 3,
|
|
52
51
|
width: blockSize.width,
|
|
53
52
|
height: blockSize.height,
|
|
54
|
-
|
|
55
|
-
borderRadius: '
|
|
53
|
+
backgroundColor: 'rgba(255, 255, 0, 1)',
|
|
54
|
+
borderRadius: '16 16 16 8',
|
|
56
55
|
}"
|
|
57
56
|
>
|
|
58
|
-
|
|
57
|
+
3vs1角
|
|
58
|
+
</div>
|
|
59
|
+
<div
|
|
60
|
+
class="content-font"
|
|
61
|
+
:style="{
|
|
62
|
+
left: (blockSize.width + gap) * 4,
|
|
63
|
+
width: blockSize.width,
|
|
64
|
+
height: blockSize.height,
|
|
65
|
+
backgroundColor: 'rgba(255, 255, 0, 1)',
|
|
66
|
+
borderRadius: '0 0 0 0',
|
|
67
|
+
}"
|
|
68
|
+
>
|
|
69
|
+
各角为0
|
|
70
|
+
</div>
|
|
71
|
+
|
|
72
|
+
<!-- 第二行 -->
|
|
73
|
+
<div :style="{top: blockSize.height + gap}">
|
|
74
|
+
<div
|
|
75
|
+
class="content-font"
|
|
76
|
+
:style="{
|
|
77
|
+
width: blockSize.width,
|
|
78
|
+
height: blockSize.height,
|
|
79
|
+
backgroundColor: 'rgba(255, 255, 0, 1)',
|
|
80
|
+
borderRadius: 10,
|
|
81
|
+
}"
|
|
82
|
+
:data-jsv-img-enable-aa="true"
|
|
83
|
+
>
|
|
84
|
+
各角相同(AA)
|
|
85
|
+
</div>
|
|
86
|
+
<div
|
|
87
|
+
class="content-font"
|
|
88
|
+
:style="{
|
|
89
|
+
left: blockSize.width + gap,
|
|
90
|
+
width: blockSize.width,
|
|
91
|
+
height: blockSize.height,
|
|
92
|
+
backgroundColor: 'rgba(255, 255, 0, 1)',
|
|
93
|
+
borderRadius: '0 8 12 16',
|
|
94
|
+
}"
|
|
95
|
+
:data-jsv-img-enable-aa="true"
|
|
96
|
+
>
|
|
97
|
+
各角不同(AA)
|
|
98
|
+
</div>
|
|
99
|
+
<div
|
|
100
|
+
class="content-font"
|
|
101
|
+
:style="{
|
|
102
|
+
left: (blockSize.width + gap) * 2,
|
|
103
|
+
width: blockSize.width,
|
|
104
|
+
height: blockSize.height,
|
|
105
|
+
backgroundColor: 'rgba(255, 255, 0, 1)',
|
|
106
|
+
borderRadius: '0 0 16 16',
|
|
107
|
+
}"
|
|
108
|
+
:data-jsv-img-enable-aa="true"
|
|
109
|
+
>
|
|
110
|
+
两角相同(AA)
|
|
111
|
+
</div>
|
|
112
|
+
<div
|
|
113
|
+
class="content-font"
|
|
114
|
+
:style="{
|
|
115
|
+
left: (blockSize.width + gap) * 3,
|
|
116
|
+
width: blockSize.width,
|
|
117
|
+
height: blockSize.height,
|
|
118
|
+
backgroundColor: 'rgba(255, 255, 0, 1)',
|
|
119
|
+
borderRadius: '16 16 16 8',
|
|
120
|
+
}"
|
|
121
|
+
:data-jsv-img-enable-aa="true"
|
|
122
|
+
>
|
|
123
|
+
3vs1角(AA)
|
|
124
|
+
</div>
|
|
125
|
+
<div
|
|
126
|
+
class="content-font"
|
|
127
|
+
:style="{
|
|
128
|
+
left: (blockSize.width + gap) * 4,
|
|
129
|
+
width: blockSize.width,
|
|
130
|
+
height: blockSize.height,
|
|
131
|
+
backgroundColor: 'rgba(255, 255, 0, 1)',
|
|
132
|
+
borderRadius: '0 0 0 0',
|
|
133
|
+
}"
|
|
134
|
+
:data-jsv-img-enable-aa="true"
|
|
135
|
+
>
|
|
136
|
+
各角为0(AA)
|
|
137
|
+
</div>
|
|
59
138
|
</div>
|
|
60
139
|
</div>
|
|
61
140
|
</template>
|
|
62
141
|
|
|
63
142
|
<style>
|
|
64
|
-
|
|
143
|
+
.content-font {
|
|
144
|
+
font-family: 黑体;
|
|
145
|
+
font-size: 10;
|
|
146
|
+
}
|
|
65
147
|
</style>
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
import ContentBlock from "../ContentBlock.vue";
|
|
3
|
+
import ColorFormatTest from "./ColorFormatTest.vue";
|
|
4
|
+
|
|
5
|
+
const props = defineProps({
|
|
6
|
+
contentClass: String,
|
|
7
|
+
itemSides: Object,
|
|
8
|
+
});
|
|
9
|
+
|
|
10
|
+
const contentBlockProps = {
|
|
11
|
+
colIndex: 0,
|
|
12
|
+
itemSides: props.itemSides,
|
|
13
|
+
};
|
|
14
|
+
</script>
|
|
15
|
+
|
|
16
|
+
<template>
|
|
17
|
+
<div id="item-root">
|
|
18
|
+
<ContentBlock
|
|
19
|
+
:class="contentClass"
|
|
20
|
+
:style="{ top: itemSides.height * 0 }"
|
|
21
|
+
:="contentBlockProps"
|
|
22
|
+
:index="0"
|
|
23
|
+
title="颜色格式测试"
|
|
24
|
+
>
|
|
25
|
+
<ColorFormatTest />
|
|
26
|
+
</ContentBlock>
|
|
27
|
+
</div>
|
|
28
|
+
</template>
|
|
29
|
+
|
|
30
|
+
<style scoped></style>
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div id="item-root">
|
|
3
|
+
<ContentBlock
|
|
4
|
+
:class="props.contentClass"
|
|
5
|
+
:style="{ top: itemSides.height * 0 }"
|
|
6
|
+
:="contentBlockProps"
|
|
7
|
+
:index="0"
|
|
8
|
+
title="图片类型显示"
|
|
9
|
+
>
|
|
10
|
+
<div>
|
|
11
|
+
<div class="content-font titleStyle">
|
|
12
|
+
base64
|
|
13
|
+
</div>
|
|
14
|
+
<img :src="base64" :style="{top: 15, width: 30, height: 30 }" />
|
|
15
|
+
</div>
|
|
16
|
+
</ContentBlock>
|
|
17
|
+
</div>
|
|
18
|
+
</template>
|
|
19
|
+
|
|
20
|
+
<script setup>
|
|
21
|
+
import ContentBlock from "../ContentBlock.vue";
|
|
22
|
+
import { computed } from "vue";
|
|
23
|
+
|
|
24
|
+
const props = defineProps({
|
|
25
|
+
contentClass: String,
|
|
26
|
+
itemSides: Object,
|
|
27
|
+
});
|
|
28
|
+
const contentBlockProps = computed(() => {
|
|
29
|
+
return {
|
|
30
|
+
colIndex: 0,
|
|
31
|
+
itemSides: { ...props.itemSides, height: props.itemSides.height * 2 },
|
|
32
|
+
};
|
|
33
|
+
});
|
|
34
|
+
|
|
35
|
+
const base64 =
|
|
36
|
+
"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAAAsQAAALEBxi1JjQAAABl0RVh0U29mdHdhcmUAd3d3Lmlua3NjYXBlLm9yZ5vuPBoAAAMrSURBVEiJnZRdaBRXHMV/985uMtmETeJXpK7N1gSLiIVSP4rtg6VFEB+MLSr6UFoES/ShIiJIRUtRUUQr0lJQKVqkaiBaSg1Y1EgRRB8irKWxCWkTiYauG5PsJtnNzOxcH/bD3czMJvY83Tn//z3n3jv3HkEJqJYFryPUOpRaC4SBEL19lWiagabFKfO3o5UfF18M3vPSEO7CoXng2w9sBbSi4r+9zgm63o/Pv1nsSNyZXJIO8cvhJtAeAdsc4l5IpUKMj/2hfggeLGmgWsJfImgFUTUt4ULYtiAe/0p9X9VaSOePSF0ON2XEnbtCnwWz3oPAPBgdBCMBPTfgeZe7WTB4SDTH9+UNVGtjiLTZ6bry2rehfgOI7Gn9dz+7NAHRLuj61WkgpaIq+I5oHn6QWa1lfeMqXvEa1G98KV4IpWD2Qqh7y1mzbYGRugggM1eRT123WrcKhPPEClyg4UP3Uir1pjo9c5lE2U143ZaqN0qIZyH93jVjYrdEsMazQfimNnB9SVlY1gcSVKNnQ3JgagO7RC1tVUtgrmdD7O7UBtE/vWsq7ZcglGfD8EOIecYMWAZ0t5UwEEjgied8VcadSIDfH8whGq/M86YI0N67gm9/W8q4CnobaJohVEu4DZw/+pkR5sLAMZ4Z4Tzn99l0dyeJJ8vyXGW5yb76z1iitzsNyvWoRKlrk/lBM8Tp/rNF4gCmJYvEAcYm/Oz/5wKdqfedBn7fTYmPKxTcBRuNSwOHGUtXe23cAdMSHHx8HksVmyP8R6T4pG8AwbkcF4mv5snEommL5zCSquDn4QMviUDFI7F9KJLJAU3bC4wAdCTWvrJ4DreH1mcGUio0fRNko1l83BMF9blCpB8nXcJrmoiN12ArCYHKo2L7UCRvACA29l0dsWbvMZX+vw1sBTF98S9iR2JvjiuKytot908sr7l6qEJLeD8+D2hS8dH8Wx11Ox+uL+Rdo+r6dydXPDUafupJLl2YpjjwIn+ZRd9CQENtv7Fy5u3mTV/v+XGyVqkspO3MqXdHUzW7Yub8VaPWjOoxq7aso9OH7rMIlo/aC4LdTxsDfx9wE87hBUkjEuf/QCsMAAAAAElFTkSuQmCC";
|
|
37
|
+
</script>
|
|
38
|
+
|
|
39
|
+
<style>
|
|
40
|
+
@import "../FontStyle.css";
|
|
41
|
+
</style>
|
|
42
|
+
|
|
43
|
+
<style scoped>
|
|
44
|
+
.titleStyle {
|
|
45
|
+
width: 100;
|
|
46
|
+
height: 16;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
.imageStyle {
|
|
50
|
+
top: 2;
|
|
51
|
+
left: 2;
|
|
52
|
+
width: 100;
|
|
53
|
+
height: 50;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
.frameStyle {
|
|
57
|
+
top: 16;
|
|
58
|
+
/* titleHeight */
|
|
59
|
+
width: 104;
|
|
60
|
+
/* imageSize.width+4 */
|
|
61
|
+
height: 54;
|
|
62
|
+
/* imageSize.height+4 */
|
|
63
|
+
background-color: rgba(0, 255, 0, 1);
|
|
64
|
+
}
|
|
65
|
+
</style>
|
|
@@ -2,13 +2,15 @@
|
|
|
2
2
|
import TitleBar from "./TitleBar.vue";
|
|
3
3
|
import ImageGroup from "../img/ImageGroup.vue";
|
|
4
4
|
import AnimGroup2 from "../anim/AnimGroup2.vue";
|
|
5
|
+
import ImageType from "../img/ImageType.vue";
|
|
6
|
+
import DivTag3Group from "../div/DivTag3Group.vue";
|
|
5
7
|
|
|
6
8
|
const props = defineProps({
|
|
7
9
|
panelClass: String,
|
|
8
10
|
itemSides: Object,
|
|
9
11
|
});
|
|
10
12
|
|
|
11
|
-
const titleData = ["img标签", "div动画2"];
|
|
13
|
+
const titleData = ["img标签", "div动画2", "图片类型", "div标签3"];
|
|
12
14
|
</script>
|
|
13
15
|
|
|
14
16
|
<template>
|
|
@@ -29,6 +31,16 @@ const titleData = ["img标签", "div动画2"];
|
|
|
29
31
|
:contentClass="panelClass"
|
|
30
32
|
:itemSides="itemSides"
|
|
31
33
|
/>
|
|
34
|
+
<ImageType
|
|
35
|
+
:style="{ left: itemSides.width * 2 }"
|
|
36
|
+
:contentClass="panelClass"
|
|
37
|
+
:itemSides="itemSides"
|
|
38
|
+
/>
|
|
39
|
+
<DivTag3Group
|
|
40
|
+
:style="{ left: itemSides.width * 3 }"
|
|
41
|
+
:contentClass="panelClass"
|
|
42
|
+
:itemSides="itemSides"
|
|
43
|
+
/>
|
|
32
44
|
</div>
|
|
33
45
|
</div>
|
|
34
46
|
</template>
|
|
@@ -15,10 +15,16 @@ const blockStyle = {
|
|
|
15
15
|
<div id="layout-root">
|
|
16
16
|
<div
|
|
17
17
|
class="content-font"
|
|
18
|
-
:style="{ ...blockStyle, width: blockSize.width
|
|
18
|
+
:style="{ ...blockStyle, width: blockSize.width }"
|
|
19
19
|
>
|
|
20
20
|
左上(默认)
|
|
21
21
|
</div>
|
|
22
|
+
<div
|
|
23
|
+
class="content-font"
|
|
24
|
+
:style="{ ...blockStyle, left: blockSize.width + 5, width: blockSize.width + 50, height: blockSize.height - 18, lineHeight: blockSize.height - 18, fontSize: 18}"
|
|
25
|
+
>
|
|
26
|
+
单行居中Aa1
|
|
27
|
+
</div>
|
|
22
28
|
<div
|
|
23
29
|
class="content-font"
|
|
24
30
|
:style="{ ...blockStyle, top: blockSize.height + 5, textAlign: 'center' }"
|
|
@@ -0,0 +1,201 @@
|
|
|
1
|
+
<!--
|
|
2
|
+
* @Description: Blob加载测试用例
|
|
3
|
+
* 使用XMLHttpRequest请求blob,然后将此Blob通过响应式变量设置给img元素进行展示
|
|
4
|
+
* 注意createObjectURL的释放问题
|
|
5
|
+
-->
|
|
6
|
+
<script setup>
|
|
7
|
+
import { ref, onMounted, onBeforeUnmount } from "vue";
|
|
8
|
+
import { useRouter } from "vue-router";
|
|
9
|
+
import { BlobApi } from "jsview";
|
|
10
|
+
|
|
11
|
+
const router = useRouter();
|
|
12
|
+
|
|
13
|
+
// 图片URL - 从DemoHomepage样例中获取
|
|
14
|
+
const imageUrl = "https://cdn.release.qcast.cn/JsViewFrameworkTester/JsViewVueSampleResources/DemoHomepage/App/BackgroundLongmao.jpg";
|
|
15
|
+
|
|
16
|
+
// 响应式变量,存储blob URL
|
|
17
|
+
const blobUrl = ref(null);
|
|
18
|
+
// 加载状态
|
|
19
|
+
const loading = ref(false);
|
|
20
|
+
// 错误信息
|
|
21
|
+
const error = ref(null);
|
|
22
|
+
|
|
23
|
+
// 存储当前的object URL,用于清理
|
|
24
|
+
let currentObjectUrl = null;
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
* 使用XMLHttpRequest加载blob
|
|
28
|
+
*/
|
|
29
|
+
const loadBlob = () => {
|
|
30
|
+
loading.value = true;
|
|
31
|
+
error.value = null;
|
|
32
|
+
|
|
33
|
+
const xhr = new XMLHttpRequest();
|
|
34
|
+
xhr.open("GET", imageUrl);
|
|
35
|
+
xhr.responseType = "blob"; // 设置响应类型为blob
|
|
36
|
+
|
|
37
|
+
xhr.onload = async () => {
|
|
38
|
+
if (xhr.status === 200) {
|
|
39
|
+
// 获取blob数据
|
|
40
|
+
const blob = xhr.response;
|
|
41
|
+
|
|
42
|
+
// 释放之前的object URL(如果存在)
|
|
43
|
+
if (currentObjectUrl) {
|
|
44
|
+
BlobApi.revokeObjectURL(currentObjectUrl);
|
|
45
|
+
currentObjectUrl = null;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
// 创建新的object URL
|
|
49
|
+
currentObjectUrl = await BlobApi.createObjectURL(blob);
|
|
50
|
+
blobUrl.value = currentObjectUrl;
|
|
51
|
+
loading.value = false;
|
|
52
|
+
console.log("Blob加载成功,大小:", blob.size, "bytes");
|
|
53
|
+
} else {
|
|
54
|
+
error.value = `加载失败,状态码: ${xhr.status}`;
|
|
55
|
+
loading.value = false;
|
|
56
|
+
console.error("Blob加载失败:", xhr.status);
|
|
57
|
+
}
|
|
58
|
+
};
|
|
59
|
+
|
|
60
|
+
xhr.onerror = () => {
|
|
61
|
+
error.value = "网络错误,无法加载图片";
|
|
62
|
+
loading.value = false;
|
|
63
|
+
console.error("Blob加载网络错误");
|
|
64
|
+
};
|
|
65
|
+
|
|
66
|
+
xhr.send();
|
|
67
|
+
};
|
|
68
|
+
|
|
69
|
+
// 组件挂载时加载blob
|
|
70
|
+
onMounted(() => {
|
|
71
|
+
loadBlob();
|
|
72
|
+
});
|
|
73
|
+
|
|
74
|
+
// 组件卸载前释放object URL,防止内存泄漏
|
|
75
|
+
onBeforeUnmount(() => {
|
|
76
|
+
if (currentObjectUrl) {
|
|
77
|
+
BlobApi.revokeObjectURL(currentObjectUrl);
|
|
78
|
+
currentObjectUrl = null;
|
|
79
|
+
console.log("已释放object URL");
|
|
80
|
+
}
|
|
81
|
+
});
|
|
82
|
+
|
|
83
|
+
// 返回键处理
|
|
84
|
+
const onKeyDown = (ev) => {
|
|
85
|
+
if (ev.keyCode == 8 || ev.keyCode == 27 || ev.keyCode == 10000) {
|
|
86
|
+
router?.go(-1);
|
|
87
|
+
return true;
|
|
88
|
+
}
|
|
89
|
+
return false;
|
|
90
|
+
};
|
|
91
|
+
|
|
92
|
+
const onLoadFinished = () => {
|
|
93
|
+
console.log("图片加载完成");
|
|
94
|
+
};
|
|
95
|
+
|
|
96
|
+
const onLoadError = () => {
|
|
97
|
+
console.error("图片显示错误");
|
|
98
|
+
};
|
|
99
|
+
</script>
|
|
100
|
+
|
|
101
|
+
<template>
|
|
102
|
+
<div
|
|
103
|
+
:style="{
|
|
104
|
+
width: 1280,
|
|
105
|
+
height: 720,
|
|
106
|
+
backgroundColor: '#1a1a1a',
|
|
107
|
+
}"
|
|
108
|
+
>
|
|
109
|
+
<jsv-focus-block
|
|
110
|
+
:onAction="{
|
|
111
|
+
onKeyDown: onKeyDown,
|
|
112
|
+
}"
|
|
113
|
+
>
|
|
114
|
+
<!-- 标题 -->
|
|
115
|
+
<div
|
|
116
|
+
:style="{
|
|
117
|
+
top: 50,
|
|
118
|
+
left: 50,
|
|
119
|
+
width: 1180,
|
|
120
|
+
height: 50,
|
|
121
|
+
fontSize: 32,
|
|
122
|
+
color: '#ffffff',
|
|
123
|
+
textAlign: 'center',
|
|
124
|
+
lineHeight: 50,
|
|
125
|
+
}"
|
|
126
|
+
>
|
|
127
|
+
Blob加载测试用例
|
|
128
|
+
</div>
|
|
129
|
+
|
|
130
|
+
<!-- 加载状态提示 -->
|
|
131
|
+
<div
|
|
132
|
+
v-if="loading"
|
|
133
|
+
:style="{
|
|
134
|
+
top: 150,
|
|
135
|
+
left: 50,
|
|
136
|
+
width: 1180,
|
|
137
|
+
height: 40,
|
|
138
|
+
fontSize: 24,
|
|
139
|
+
color: '#ffff00',
|
|
140
|
+
textAlign: 'center',
|
|
141
|
+
lineHeight: 40,
|
|
142
|
+
}"
|
|
143
|
+
>
|
|
144
|
+
正在加载Blob...
|
|
145
|
+
</div>
|
|
146
|
+
|
|
147
|
+
<!-- 错误提示 -->
|
|
148
|
+
<div
|
|
149
|
+
v-if="error"
|
|
150
|
+
:style="{
|
|
151
|
+
top: 150,
|
|
152
|
+
left: 50,
|
|
153
|
+
width: 1180,
|
|
154
|
+
height: 40,
|
|
155
|
+
fontSize: 24,
|
|
156
|
+
color: '#ff0000',
|
|
157
|
+
textAlign: 'center',
|
|
158
|
+
lineHeight: 40,
|
|
159
|
+
}"
|
|
160
|
+
>
|
|
161
|
+
{{ error }}
|
|
162
|
+
</div>
|
|
163
|
+
|
|
164
|
+
<!-- 图片展示 -->
|
|
165
|
+
<div
|
|
166
|
+
v-if="blobUrl && !loading && !error"
|
|
167
|
+
:style="{
|
|
168
|
+
top: 150,
|
|
169
|
+
left: 50,
|
|
170
|
+
}"
|
|
171
|
+
>
|
|
172
|
+
<img
|
|
173
|
+
:src="blobUrl"
|
|
174
|
+
:style="{
|
|
175
|
+
width: 1180,
|
|
176
|
+
height: 450,
|
|
177
|
+
objectFit: 'contain',
|
|
178
|
+
}"
|
|
179
|
+
@load="onLoadFinished"
|
|
180
|
+
@error="onLoadError"
|
|
181
|
+
/>
|
|
182
|
+
</div>
|
|
183
|
+
|
|
184
|
+
<!-- 说明文字 -->
|
|
185
|
+
<div
|
|
186
|
+
:style="{
|
|
187
|
+
top: 670,
|
|
188
|
+
left: 50,
|
|
189
|
+
width: 1180,
|
|
190
|
+
height: 30,
|
|
191
|
+
fontSize: 18,
|
|
192
|
+
color: '#888888',
|
|
193
|
+
textAlign: 'center',
|
|
194
|
+
lineHeight: 30,
|
|
195
|
+
}"
|
|
196
|
+
>
|
|
197
|
+
使用XMLHttpRequest加载Blob,通过createObjectURL创建URL并显示
|
|
198
|
+
</div>
|
|
199
|
+
</jsv-focus-block>
|
|
200
|
+
</div>
|
|
201
|
+
</template>
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
import { JsvTextBox, TextTools } from "jsview";
|
|
3
|
+
|
|
4
|
+
//TODO left, top, width, height无法通过class传递, 待调查
|
|
5
|
+
const baseStyle = {
|
|
6
|
+
left: 50,
|
|
7
|
+
width: 1000,
|
|
8
|
+
height: 50,
|
|
9
|
+
};
|
|
10
|
+
|
|
11
|
+
//TODO 此字符串直接写在双花括号内编译出错, 待调查
|
|
12
|
+
const text = "测试\\textcolor{#FF0000}{红色并且\\textb{加粗}}文字";
|
|
13
|
+
|
|
14
|
+
const longText =
|
|
15
|
+
"测试asdfakjljblk123\\textcolor{#FF0000}{红色并且\\textb{加粗测试加粗asdf测试加粗测试加粗测试加粗测试加粗测试加粗测试加粗测试加粗测试加粗测试加粗测试加粗测试加粗测试加粗123llladf测试加粗测试加粗测试加粗测试加粗测试加粗测试加粗测试加粗测试加粗测试加粗测试加粗测试加粗测试加粗测试加粗测试加粗测试加粗测试加粗测试加粗asdfasdf测试加asdf粗测试加粗测试加粗测试加粗测试加粗测试加粗测试加粗测试加粗测试加粗asdf测试}}文字asdf测试";
|
|
16
|
+
|
|
17
|
+
const lines = TextTools.breakLines(
|
|
18
|
+
longText,
|
|
19
|
+
{
|
|
20
|
+
fontFamily: "黑体",
|
|
21
|
+
fontSize: 25,
|
|
22
|
+
fontStyle: "normal",
|
|
23
|
+
fontWeight: "normal",
|
|
24
|
+
JsvTextEmoji: 0,
|
|
25
|
+
JsvTextLatex: 1,
|
|
26
|
+
},
|
|
27
|
+
1000
|
|
28
|
+
);
|
|
29
|
+
console.log("ccht lines ", lines);
|
|
30
|
+
</script>
|
|
31
|
+
|
|
32
|
+
<template>
|
|
33
|
+
<div :style="{ width: 1920, height: 1080, backgroundColor: '#007788' }"></div>
|
|
34
|
+
|
|
35
|
+
<div
|
|
36
|
+
:style="{
|
|
37
|
+
width: 1280,
|
|
38
|
+
height: 100,
|
|
39
|
+
top: 10,
|
|
40
|
+
left: 10,
|
|
41
|
+
fontSize: 30,
|
|
42
|
+
}"
|
|
43
|
+
>
|
|
44
|
+
上方为api分行结果, 与下方对比每行的文字是否一致
|
|
45
|
+
</div>
|
|
46
|
+
<div :style="{ top: 100 }">
|
|
47
|
+
<jsv-text-box
|
|
48
|
+
v-for="(line, index) in lines"
|
|
49
|
+
:key="index"
|
|
50
|
+
:style="{
|
|
51
|
+
width: 1000,
|
|
52
|
+
height: 50,
|
|
53
|
+
left: 0,
|
|
54
|
+
top: 50 * index,
|
|
55
|
+
fontSize: 25,
|
|
56
|
+
}"
|
|
57
|
+
:enableLatex="true"
|
|
58
|
+
>
|
|
59
|
+
{{ line }}
|
|
60
|
+
</jsv-text-box>
|
|
61
|
+
</div>
|
|
62
|
+
|
|
63
|
+
<div :style="{ top: 450 }">
|
|
64
|
+
<jsv-text-box
|
|
65
|
+
:style="{
|
|
66
|
+
width: 1000,
|
|
67
|
+
left: 0,
|
|
68
|
+
fontSize: 25,
|
|
69
|
+
}"
|
|
70
|
+
:enableLatex="true"
|
|
71
|
+
>
|
|
72
|
+
{{ longText }}
|
|
73
|
+
</jsv-text-box>
|
|
74
|
+
</div>
|
|
75
|
+
</template>
|
|
76
|
+
|
|
77
|
+
<style scoped>
|
|
78
|
+
.textStyle {
|
|
79
|
+
line-height: 50;
|
|
80
|
+
font-size: 40;
|
|
81
|
+
}
|
|
82
|
+
</style>
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div
|
|
3
|
+
:style="{
|
|
4
|
+
width: 400,
|
|
5
|
+
height: 400,
|
|
6
|
+
backgroundColor: '#007788',
|
|
7
|
+
}"
|
|
8
|
+
></div>
|
|
9
|
+
<div
|
|
10
|
+
:style="{
|
|
11
|
+
width: 400,
|
|
12
|
+
height: 400,
|
|
13
|
+
backgroundImage: `url(jsvtexturestore://${sourceId})`,
|
|
14
|
+
}"
|
|
15
|
+
></div>
|
|
16
|
+
<div
|
|
17
|
+
v-for="pos in position"
|
|
18
|
+
:key="pos.x + pos.y"
|
|
19
|
+
:style="{
|
|
20
|
+
left: pos.x - 2,
|
|
21
|
+
top: pos.y - 2,
|
|
22
|
+
width: 4,
|
|
23
|
+
height: 4,
|
|
24
|
+
backgroundColor: '#00ff00aa',
|
|
25
|
+
}"
|
|
26
|
+
></div>
|
|
27
|
+
</template>
|
|
28
|
+
|
|
29
|
+
<script setup>
|
|
30
|
+
import { JsvTextureStoreApi } from "jsview";
|
|
31
|
+
import { JsvDashPath } from "jsview";
|
|
32
|
+
import { onBeforeUnmount } from "vue";
|
|
33
|
+
|
|
34
|
+
const chartHelper = JsvTextureStoreApi.getChartHelper(
|
|
35
|
+
400,
|
|
36
|
+
400,
|
|
37
|
+
[-100, 400],
|
|
38
|
+
[-100, 400]
|
|
39
|
+
);
|
|
40
|
+
const canvas = chartHelper.getCanvas();
|
|
41
|
+
|
|
42
|
+
//绘制x轴
|
|
43
|
+
const { path: xAxis } = chartHelper.linePath(
|
|
44
|
+
[
|
|
45
|
+
{ x: -100, y: 0 },
|
|
46
|
+
{ x: 400, y: 0 },
|
|
47
|
+
],
|
|
48
|
+
0,
|
|
49
|
+
0
|
|
50
|
+
);
|
|
51
|
+
xAxis.strokeWithSetting({
|
|
52
|
+
lineWidth: 1,
|
|
53
|
+
color: "#000000",
|
|
54
|
+
});
|
|
55
|
+
|
|
56
|
+
//绘制y轴
|
|
57
|
+
const { path: yAxis } = chartHelper.linePath(
|
|
58
|
+
[
|
|
59
|
+
{ x: 0, y: -100 },
|
|
60
|
+
{ x: 0, y: 400 },
|
|
61
|
+
],
|
|
62
|
+
0,
|
|
63
|
+
0
|
|
64
|
+
);
|
|
65
|
+
yAxis.strokeWithSetting({
|
|
66
|
+
lineWidth: 1,
|
|
67
|
+
color: "#000000",
|
|
68
|
+
});
|
|
69
|
+
|
|
70
|
+
//绘制数据曲线
|
|
71
|
+
const data1 = [
|
|
72
|
+
{ x: 0, y: 0 },
|
|
73
|
+
{ x: 50, y: 100 },
|
|
74
|
+
{ x: 100, y: 0 },
|
|
75
|
+
{ x: 150, y: 200 },
|
|
76
|
+
{ x: 170, y: 0 },
|
|
77
|
+
{ x: 200, y: 350 },
|
|
78
|
+
{ x: 250, y: 30 },
|
|
79
|
+
{ x: 300, y: 320 },
|
|
80
|
+
{ x: 350, y: 320 },
|
|
81
|
+
{ x: 400, y: 320 },
|
|
82
|
+
];
|
|
83
|
+
|
|
84
|
+
//绘制曲线图(闭合到x轴)
|
|
85
|
+
/**
|
|
86
|
+
* linePath参数说明
|
|
87
|
+
* @param data {Data[]} 数据点数组,每个点包含 x 和 y 坐标
|
|
88
|
+
* @param isBroken {boolean} 是否为折线
|
|
89
|
+
* @param close {number}
|
|
90
|
+
* 0: 不闭合,绘制线段用,
|
|
91
|
+
* 1: 闭合到x轴(自动绘制左右两端垂直于x轴的线段), 需要填充颜色时用
|
|
92
|
+
* 2: 闭合到y轴(自动绘制上下两端垂直于y轴的线段), 需要填充颜色时用
|
|
93
|
+
* @returns {CustomPath, Data[]} 路径对象和数据点数组,每个点包含 x 和 y 坐标
|
|
94
|
+
*/
|
|
95
|
+
const { path, position } = chartHelper.linePath(data1, false, 1);
|
|
96
|
+
//填充渐变色
|
|
97
|
+
path.fillWithLinearGradient(0, 100, 0, 400, ["#FF00FF", "#0000FF"], [0, 1]);
|
|
98
|
+
|
|
99
|
+
const sourceId = canvas.commit();
|
|
100
|
+
onBeforeUnmount(() => {
|
|
101
|
+
//注意释放资源
|
|
102
|
+
JsvTextureStoreApi.deleteTexture(sourceId);
|
|
103
|
+
});
|
|
104
|
+
</script>
|