@shijiu/jsview-vue-samples 1.9.747
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/AnimPicture/App.vue +207 -0
- package/AnimPicture/assets/animated_webp.webp +0 -0
- package/AnimPicture/assets/ball_3.webp +0 -0
- package/AnimPicture/assets/girl_run.gif +0 -0
- package/AnimPicture/assets/quan.webp +0 -0
- package/Basic/App.vue +134 -0
- package/Basic/assets/border.png +0 -0
- package/Basic/assets/border2.png +0 -0
- package/Basic/assets/icon.png +0 -0
- package/Basic/assets/test.jpg +0 -0
- package/Basic/components/ContentBlock.vue +38 -0
- package/Basic/components/FontStyle.css +16 -0
- package/Basic/components/anim/AnimGroup.vue +66 -0
- package/Basic/components/anim/AnimKeyframeBasic.vue +119 -0
- package/Basic/components/anim/AnimKeyframeComposite.vue +52 -0
- package/Basic/components/anim/AnimTransition.vue +157 -0
- package/Basic/components/div/DivBackground.vue +44 -0
- package/Basic/components/div/DivClip.vue +159 -0
- package/Basic/components/div/DivCssScoped.vue +20 -0
- package/Basic/components/div/DivCssVar.vue +53 -0
- package/Basic/components/div/DivGroup1.vue +47 -0
- package/Basic/components/div/DivGroup2.vue +65 -0
- package/Basic/components/div/DivLayout.vue +70 -0
- package/Basic/components/div/DivRadius.vue +65 -0
- package/Basic/components/div/DivTransform.vue +32 -0
- package/Basic/components/img/ImageGroup.vue +31 -0
- package/Basic/components/img/ImgLayout.vue +41 -0
- package/Basic/components/panel/Panel1.vue +55 -0
- package/Basic/components/panel/Panel2.vue +31 -0
- package/Basic/components/panel/TitleBar.vue +29 -0
- package/Basic/components/text/TextAlign.vue +66 -0
- package/Basic/components/text/TextEmoji.vue +26 -0
- package/Basic/components/text/TextFontStyle.vue +89 -0
- package/Basic/components/text/TextGroup1.vue +49 -0
- package/Basic/components/text/TextGroup2.vue +28 -0
- package/Basic/components/text/TextOverflow.vue +110 -0
- package/BasicFocusControl/App.vue +104 -0
- package/BasicFocusControl/components/BaseBlock.vue +50 -0
- package/BasicFocusControl/components/MainArea.vue +83 -0
- package/BasicFocusControl/components/MainAreaLeftBlock.vue +17 -0
- package/BasicFocusControl/components/MainAreaRightBlock.vue +27 -0
- package/BasicFocusControl/components/SideBar.vue +58 -0
- package/BasicFocusControl/components/SideBarBlock.vue +27 -0
- package/Collision/App.vue +452 -0
- package/ColorSpace/App.vue +126 -0
- package/ColorSpace/bmpDemo.bmp +0 -0
- package/ColorSpace/jpegDemo.jpeg +0 -0
- package/ColorSpace/pngDemo.png +0 -0
- package/ColorSpace/pngNoAlphaDemo.png +0 -0
- package/DemoHomepage/App.vue +27 -0
- package/DemoHomepage/components/BodyFrame.vue +95 -0
- package/DemoHomepage/components/Dialog.vue +94 -0
- package/DemoHomepage/components/Item.vue +77 -0
- package/DemoHomepage/components/TabFrame.vue +85 -0
- package/DemoHomepage/router.js +196 -0
- package/DemoHomepage/views/Homepage.vue +195 -0
- package/FilterDemo/AnimatePic.vue +58 -0
- package/FilterDemo/App.vue +159 -0
- package/FilterDemo/VideoLayer.vue +62 -0
- package/FilterDemo/jpegDemo.jpeg +0 -0
- package/FilterDemo/webpDemo.webp +0 -0
- package/FlipCard/App.vue +71 -0
- package/FlipCard/FlipCard.vue +118 -0
- package/FlipCard/assets/blue_egg.png +0 -0
- package/FlipCard/assets/red_egg.png +0 -0
- package/FlipCard/data.js +13 -0
- package/GridDemo/App.vue +215 -0
- package/GridDemo/ButtonBlock.vue +112 -0
- package/GridDemo/FocusItem.vue +37 -0
- package/GridDemo/Item.vue +93 -0
- package/HashHistory/App.vue +115 -0
- package/HashHistory/components/HorizontalButtonList.vue +91 -0
- package/HashHistory/components/Item.vue +60 -0
- package/HashHistory/router.js +41 -0
- package/HashHistory/views/MainPage.vue +57 -0
- package/HashHistory/views/SubPage.vue +66 -0
- package/ImpactStop/App.vue +435 -0
- package/Input/App.vue +164 -0
- package/Input/FullKeyboard.vue +87 -0
- package/Input/InputPanel.vue +131 -0
- package/Input/KeyboardItem.vue +58 -0
- package/LongImage/App.vue +80 -0
- package/LongImage/Button.vue +58 -0
- package/LongImage/ButtonItem.vue +44 -0
- package/LongImage/LongImageScroll.vue +92 -0
- package/LongImage/Scroll.vue +14 -0
- package/LongImage/assets/1280x7200.jpg +0 -0
- package/LongText/App.vue +96 -0
- package/LongText/Button.vue +51 -0
- package/LongText/ButtonItem.vue +44 -0
- package/LongText/LongTextScroll.vue +192 -0
- package/LongText/Scroll.vue +14 -0
- package/Marquee/App.vue +247 -0
- package/Marquee/longText.js +14 -0
- package/MaskClip/App.vue +122 -0
- package/MaskClip/images/mask-025/config.json +29 -0
- package/MaskClip/images/mask-025/res/1.png +0 -0
- package/MaskClip/images/mask-025/res/2.png +0 -0
- package/MaskClip/images/mask-025/res/3.png +0 -0
- package/MaskClip/images/mask-025/res/4.png +0 -0
- package/MaskClip/images/mask-025/res/icon.png +0 -0
- package/MaskClip/images/mask-025/res/stroke.png +0 -0
- package/MaskClip/images/php.jpg +0 -0
- package/MetroWidgetDemos/Advanced/App.vue +46 -0
- package/MetroWidgetDemos/Advanced/ButtonItem.vue +90 -0
- package/MetroWidgetDemos/Advanced/Buttons.vue +70 -0
- package/MetroWidgetDemos/Advanced/Mixed.vue +77 -0
- package/MetroWidgetDemos/Advanced/widgets/Item.vue +83 -0
- package/MetroWidgetDemos/Advanced/widgets/WidgetItem.vue +89 -0
- package/MetroWidgetDemos/Advanced/widgets/Widgets.vue +116 -0
- package/MetroWidgetDemos/Advanced/widgets/focus1.png +0 -0
- package/MetroWidgetDemos/Item.vue +85 -0
- package/MetroWidgetDemos/PerformanceTest/App.vue +210 -0
- package/MetroWidgetDemos/PerformanceTest/Item.vue +90 -0
- package/MetroWidgetDemos/PerformanceTest/assets/bg.jpg +0 -0
- package/MetroWidgetDemos/PerformanceTest/assets/coupon_content.png +0 -0
- package/MetroWidgetDemos/PerformanceTest/assets/coupon_left.png +0 -0
- package/MetroWidgetDemos/PerformanceTest/assets/coupon_mid.png +0 -0
- package/MetroWidgetDemos/PerformanceTest/assets/coupon_right.png +0 -0
- package/MetroWidgetDemos/PerformanceTest/assets/focus_border.png +0 -0
- package/MetroWidgetDemos/PerformanceTest/assets/holder_logo.png +0 -0
- package/MetroWidgetDemos/PerformanceTest/assets/jrbm.png +0 -0
- package/MetroWidgetDemos/PerformanceTest/assets/line_left.png +0 -0
- package/MetroWidgetDemos/PerformanceTest/assets/line_mid.png +0 -0
- package/MetroWidgetDemos/PerformanceTest/assets/line_right.png +0 -0
- package/MetroWidgetDemos/PerformanceTest/assets/loading.png +0 -0
- package/MetroWidgetDemos/PerformanceTest/assets/logo.png +0 -0
- package/MetroWidgetDemos/PerformanceTest/assets/mcjx.png +0 -0
- package/MetroWidgetDemos/PerformanceTest/assets/tao.png +0 -0
- package/MetroWidgetDemos/PerformanceTest/assets/tmall.png +0 -0
- package/MetroWidgetDemos/PerformanceTest/border.png +0 -0
- package/MetroWidgetDemos/PerformanceTest/components/ContentItem.vue +386 -0
- package/MetroWidgetDemos/PerformanceTest/components/MyTab.vue +129 -0
- package/MetroWidgetDemos/PerformanceTest/data.js +45 -0
- package/MetroWidgetDemos/PingPong/App.vue +135 -0
- package/MetroWidgetDemos/PingPong/AppPage.vue +73 -0
- package/MetroWidgetDemos/PingPong/AppTab.vue +62 -0
- package/MetroWidgetDemos/PingPong/TabItem.vue +84 -0
- package/MetroWidgetDemos/PingPong/ViewSwiper.vue +214 -0
- package/MetroWidgetDemos/Simple/AbsoluteTemplate.vue +75 -0
- package/MetroWidgetDemos/Simple/App.vue +45 -0
- package/MetroWidgetDemos/Simple/RelativeTemplate.vue +111 -0
- package/MetroWidgetDemos/WidgetItem.vue +89 -0
- package/MetroWidgetDemos/data.js +205 -0
- package/NinePatchDemo/App.vue +145 -0
- package/NinePatchDemo/Item.vue +69 -0
- package/NinePatchDemo/assets/border.png +0 -0
- package/Preload/App.vue +135 -0
- package/Preload/Item.vue +32 -0
- package/Preload/data.js +23 -0
- package/Preload/images/awesomeface.png +0 -0
- package/Preload/images/cat.jpg +0 -0
- package/Preload/images/rank.png +0 -0
- package/Preload/images/rank_focus.png +0 -0
- package/Preload/images/rule.png +0 -0
- package/Preload/images/rule_focus.png +0 -0
- package/Preload/images/start.png +0 -0
- package/Preload/images/start_focus.png +0 -0
- package/QrcodeDemo/App.vue +68 -0
- package/ScaleDownNeon/App.vue +107 -0
- package/SoundPool/App.vue +134 -0
- package/SoundPool/bgmusic.mp3 +0 -0
- package/SoundPool/coin.mp3 +0 -0
- package/SoundPool/jump.mp3 +0 -0
- package/SoundPool/lose.mp3 +0 -0
- package/SoundPool/run.mp3 +0 -0
- package/SprayView/App.vue +272 -0
- package/SprayView/assets/snow.png +0 -0
- package/SpriteImage/App.vue +173 -0
- package/SpriteImage/images/cat_run.png +0 -0
- package/SpriteImage/images/egg_break.json +116 -0
- package/SpriteImage/images/egg_break.png +0 -0
- package/SpriteImage/images/sprite.png +0 -0
- package/TextBox/App.vue +91 -0
- package/TextBox/RenderCenter.vue +133 -0
- package/TextBox/RenderLeft.vue +138 -0
- package/TextBox/RenderOneLine.vue +101 -0
- package/TextBox/RenderRight.vue +131 -0
- package/TextShadowDemo/App.vue +91 -0
- package/TextureAnimation/App.vue +336 -0
- package/TextureAnimation/App2.vue +111 -0
- package/TextureAnimation/assets/blackWhiteGrid.png +0 -0
- package/TextureAnimation/assets/light.png +0 -0
- package/TextureAnimation/assets/light2.png +0 -0
- package/TextureAnimation/assets/mask.png +0 -0
- package/TextureAnimation/assets/php.jpg +0 -0
- package/TextureAnimation/assets/php2.png +0 -0
- package/TextureAnimation/assets/swipLight.png +0 -0
- package/TextureSize/App.vue +132 -0
- package/TextureSize/bmpDemo.bmp +0 -0
- package/TextureSize/jpegDemo.jpeg +0 -0
- package/TextureSize/jpgDemo.jpg +0 -0
- package/TextureSize/pngDemo.png +0 -0
- package/TextureSize/pngNoAlphaDemo.png +0 -0
- package/ThrowMoveDemo/AccelerateDemo.vue +116 -0
- package/ThrowMoveDemo/App.vue +114 -0
- package/ThrowMoveDemo/LRParabolicDemo.vue +115 -0
- package/ThrowMoveDemo/TargetDemo.vue +116 -0
- package/ThrowMoveDemo/UDParabolicDemo.vue +121 -0
- package/TouchSample/App.vue +136 -0
- package/TouchSample/Item.vue +103 -0
- package/TouchSample/MetroWidgetHorizontal.vue +144 -0
- package/TouchSample/MetroWidgetVertical.vue +144 -0
- package/TouchSample/TouchContainerHorizontal.vue +160 -0
- package/TouchSample/TouchContainerVertical.vue +160 -0
- package/TouchSample/data.js +81 -0
- package/TransitPage/App.vue +29 -0
- package/VideoDemo/App.vue +121 -0
- package/VideoDemo/components/Button.vue +58 -0
- package/VideoDemo/components/Controllor.vue +197 -0
- package/VideoDemo/components/VideoFrame.vue +140 -0
- package/VisibleSensorDemo/App.vue +234 -0
- package/package.json +17 -0
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
import iconImgPath from "../../assets/icon.png";
|
|
3
|
+
|
|
4
|
+
const blockSize = {
|
|
5
|
+
width: 65,
|
|
6
|
+
height: 65,
|
|
7
|
+
};
|
|
8
|
+
|
|
9
|
+
const gap = 5;
|
|
10
|
+
</script>
|
|
11
|
+
|
|
12
|
+
<template>
|
|
13
|
+
<div id="layout-root">
|
|
14
|
+
<div
|
|
15
|
+
class="content-font"
|
|
16
|
+
:style="{
|
|
17
|
+
left: 10,
|
|
18
|
+
top: 10,
|
|
19
|
+
width: blockSize.width,
|
|
20
|
+
height: blockSize.height,
|
|
21
|
+
backgroundColor: 'rgba(255, 255, 0, 1)',
|
|
22
|
+
transform: 'rotate3d(0, 0, 1, 30deg)',
|
|
23
|
+
}"
|
|
24
|
+
>
|
|
25
|
+
rotate3d
|
|
26
|
+
</div>
|
|
27
|
+
</div>
|
|
28
|
+
</template>
|
|
29
|
+
|
|
30
|
+
<style>
|
|
31
|
+
@import "../FontStyle.css";
|
|
32
|
+
</style>
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div id='item-root'>
|
|
3
|
+
<ContentBlock :class=contentClass :style="{top:itemSides.height*0}" :=contentBlockProps :index=0 title="图片显示">
|
|
4
|
+
<ImgLayout/>
|
|
5
|
+
</ContentBlock>
|
|
6
|
+
</div>
|
|
7
|
+
</template>
|
|
8
|
+
|
|
9
|
+
<script>
|
|
10
|
+
import ContentBlock from '../ContentBlock.vue';
|
|
11
|
+
import ImgLayout from './ImgLayout.vue';
|
|
12
|
+
|
|
13
|
+
export default {
|
|
14
|
+
props: {
|
|
15
|
+
contentClass: String,
|
|
16
|
+
itemSides: Object
|
|
17
|
+
},
|
|
18
|
+
components: {
|
|
19
|
+
ContentBlock,
|
|
20
|
+
ImgLayout,
|
|
21
|
+
},
|
|
22
|
+
computed: {
|
|
23
|
+
contentBlockProps() {
|
|
24
|
+
return {
|
|
25
|
+
colIndex: 0,
|
|
26
|
+
itemSides: this.itemSides
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
</script>
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div id='layout-root'>
|
|
3
|
+
<div style="{top: 0}">
|
|
4
|
+
<div class="content-font" :style="{width: 50, height: titleHeight}">原图</div>
|
|
5
|
+
<div :style="{top: titleHeight,
|
|
6
|
+
width: imageSize.width+4, height: imageSize.height+4,
|
|
7
|
+
backgroundColor: 'rgba(0, 255, 0, 1)' }">
|
|
8
|
+
<img :style="{ left: 2, top: 2,
|
|
9
|
+
width: imageSize.width, height: imageSize.height}"
|
|
10
|
+
:src="testImgPath"/>
|
|
11
|
+
</div>
|
|
12
|
+
</div>
|
|
13
|
+
</div>
|
|
14
|
+
</template>
|
|
15
|
+
|
|
16
|
+
<script>
|
|
17
|
+
import testImgPath from '../../assets/test.jpg';
|
|
18
|
+
|
|
19
|
+
export default {
|
|
20
|
+
computed: {
|
|
21
|
+
testImgPath() {
|
|
22
|
+
return testImgPath;
|
|
23
|
+
},
|
|
24
|
+
titleHeight() {
|
|
25
|
+
return 16;
|
|
26
|
+
},
|
|
27
|
+
imageSize() {
|
|
28
|
+
return {
|
|
29
|
+
width: 80,
|
|
30
|
+
height: 64,
|
|
31
|
+
}
|
|
32
|
+
},
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
</script>
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
<style>
|
|
40
|
+
@import "../FontStyle.css";
|
|
41
|
+
</style>
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
import TitleBar from "./TitleBar.vue";
|
|
3
|
+
import DivGroup1 from "../div/DivGroup1.vue";
|
|
4
|
+
import DivGroup2 from "../div/DivGroup2.vue";
|
|
5
|
+
import TextGroup1 from "../text/TextGroup1.vue";
|
|
6
|
+
import TextGroup2 from "../text/TextGroup2.vue";
|
|
7
|
+
import AnimGroup from "../anim/AnimGroup.vue";
|
|
8
|
+
|
|
9
|
+
const props = defineProps({
|
|
10
|
+
panelClass: String,
|
|
11
|
+
itemSides: Object,
|
|
12
|
+
});
|
|
13
|
+
|
|
14
|
+
const titleData = ["div标签1", "div标签2", "div文本1", "div文本2", "div动画"];
|
|
15
|
+
</script>
|
|
16
|
+
|
|
17
|
+
<template>
|
|
18
|
+
<div :class="panelClass">
|
|
19
|
+
<TitleBar
|
|
20
|
+
:class="panelClass"
|
|
21
|
+
:itemSides="itemSides"
|
|
22
|
+
:titleData="titleData"
|
|
23
|
+
/>
|
|
24
|
+
<div :class="panelClass" :style="{ top: 20 }">
|
|
25
|
+
<DivGroup1
|
|
26
|
+
:style="{ left: itemSides.width * 0 }"
|
|
27
|
+
:contentClass="panelClass"
|
|
28
|
+
:itemSides="itemSides"
|
|
29
|
+
/>
|
|
30
|
+
<DivGroup2
|
|
31
|
+
:style="{ left: itemSides.width * 1 }"
|
|
32
|
+
:contentClass="panelClass"
|
|
33
|
+
:itemSides="itemSides"
|
|
34
|
+
/>
|
|
35
|
+
<TextGroup1
|
|
36
|
+
:style="{ left: itemSides.width * 2 }"
|
|
37
|
+
:contentClass="panelClass"
|
|
38
|
+
:itemSides="itemSides"
|
|
39
|
+
/>
|
|
40
|
+
<TextGroup2
|
|
41
|
+
:style="{ left: itemSides.width * 3 }"
|
|
42
|
+
:contentClass="panelClass"
|
|
43
|
+
:itemSides="itemSides"
|
|
44
|
+
/>
|
|
45
|
+
<AnimGroup
|
|
46
|
+
:style="{ left: itemSides.width * 4 }"
|
|
47
|
+
:contentClass="panelClass"
|
|
48
|
+
:itemSides="itemSides"
|
|
49
|
+
/>
|
|
50
|
+
</div>
|
|
51
|
+
</div>
|
|
52
|
+
</template>
|
|
53
|
+
|
|
54
|
+
<style>
|
|
55
|
+
</style>
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
import TitleBar from "./TitleBar.vue";
|
|
3
|
+
import ImageGroup from "../img/ImageGroup.vue";
|
|
4
|
+
|
|
5
|
+
const props = defineProps({
|
|
6
|
+
panelClass: String,
|
|
7
|
+
itemSides: Object,
|
|
8
|
+
});
|
|
9
|
+
|
|
10
|
+
const titleData = ["img标签"];
|
|
11
|
+
</script>
|
|
12
|
+
|
|
13
|
+
<template>
|
|
14
|
+
<div :class="panelClass">
|
|
15
|
+
<TitleBar
|
|
16
|
+
:class="panelClass"
|
|
17
|
+
:itemSides="itemSides"
|
|
18
|
+
:titleData="titleData"
|
|
19
|
+
/>
|
|
20
|
+
<div :class="panelClass" :style="{ top: 20 }">
|
|
21
|
+
<ImageGroup
|
|
22
|
+
:style="{ left: itemSides.width * 0 }"
|
|
23
|
+
:contentClass="panelClass"
|
|
24
|
+
:itemSides="itemSides"
|
|
25
|
+
/>
|
|
26
|
+
</div>
|
|
27
|
+
</div>
|
|
28
|
+
</template>
|
|
29
|
+
|
|
30
|
+
<style>
|
|
31
|
+
</style>
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
const props = defineProps({
|
|
3
|
+
itemSides: Object,
|
|
4
|
+
titleData: Array,
|
|
5
|
+
});
|
|
6
|
+
</script>
|
|
7
|
+
|
|
8
|
+
<template>
|
|
9
|
+
<div>
|
|
10
|
+
<template v-for="(title, index) in titleData" :key="index">
|
|
11
|
+
<div
|
|
12
|
+
class="title-font item-style"
|
|
13
|
+
:style="{ ...itemSides, left: itemSides.width * index }"
|
|
14
|
+
>
|
|
15
|
+
{{ title }}
|
|
16
|
+
</div>
|
|
17
|
+
</template>
|
|
18
|
+
</div>
|
|
19
|
+
</template>
|
|
20
|
+
|
|
21
|
+
<style>
|
|
22
|
+
@import "../FontStyle.css";
|
|
23
|
+
</style>
|
|
24
|
+
|
|
25
|
+
<style scoped>
|
|
26
|
+
.item-style {
|
|
27
|
+
text-align: center;
|
|
28
|
+
}
|
|
29
|
+
</style>
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
const blockSize = {
|
|
3
|
+
width: 90,
|
|
4
|
+
height: 40,
|
|
5
|
+
};
|
|
6
|
+
const blockStyle = {
|
|
7
|
+
width: blockSize.width,
|
|
8
|
+
height: blockSize.height,
|
|
9
|
+
backgroundColor: "rgba(255, 255, 0, 0.5)",
|
|
10
|
+
color: "rgba(255, 0, 0, 1)",
|
|
11
|
+
};
|
|
12
|
+
</script>
|
|
13
|
+
|
|
14
|
+
<template>
|
|
15
|
+
<div id="layout-root">
|
|
16
|
+
<div
|
|
17
|
+
class="content-font"
|
|
18
|
+
:style="{ ...blockStyle, width: blockSize.width * 1.5 }"
|
|
19
|
+
>
|
|
20
|
+
左上(默认)
|
|
21
|
+
</div>
|
|
22
|
+
<div
|
|
23
|
+
class="content-font"
|
|
24
|
+
:style="{ ...blockStyle, top: blockSize.height + 5, textAlign: 'center' }"
|
|
25
|
+
>
|
|
26
|
+
中上
|
|
27
|
+
</div>
|
|
28
|
+
<div
|
|
29
|
+
class="content-font"
|
|
30
|
+
:style="{
|
|
31
|
+
...blockStyle,
|
|
32
|
+
left: blockSize.width + 5,
|
|
33
|
+
top: blockSize.height + 5,
|
|
34
|
+
textAlign: 'right',
|
|
35
|
+
}"
|
|
36
|
+
>
|
|
37
|
+
右上
|
|
38
|
+
</div>
|
|
39
|
+
<div
|
|
40
|
+
class="content-font"
|
|
41
|
+
:style="{
|
|
42
|
+
...blockStyle,
|
|
43
|
+
top: (blockSize.height + 5) * 2,
|
|
44
|
+
lineHeight: blockSize.height,
|
|
45
|
+
}"
|
|
46
|
+
>
|
|
47
|
+
垂直中
|
|
48
|
+
</div>
|
|
49
|
+
<div
|
|
50
|
+
class="content-font"
|
|
51
|
+
:style="{
|
|
52
|
+
...blockStyle,
|
|
53
|
+
left: blockSize.width + 5,
|
|
54
|
+
top: (blockSize.height + 5) * 2,
|
|
55
|
+
lineHeight: blockSize.height,
|
|
56
|
+
textAlign: 'center',
|
|
57
|
+
}"
|
|
58
|
+
>
|
|
59
|
+
正中
|
|
60
|
+
</div>
|
|
61
|
+
</div>
|
|
62
|
+
</template>
|
|
63
|
+
|
|
64
|
+
<style>
|
|
65
|
+
@import "../FontStyle.css";
|
|
66
|
+
</style>
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div id="layout-root">
|
|
3
|
+
<div
|
|
4
|
+
:style="{
|
|
5
|
+
width: 300,
|
|
6
|
+
height: 100,
|
|
7
|
+
fontSize: 20,
|
|
8
|
+
}"
|
|
9
|
+
jsv_text_emoji="true"
|
|
10
|
+
>
|
|
11
|
+
{{ `style: 😀笑🇨🇳中国\n👨👩👧👦家庭` }}
|
|
12
|
+
</div>
|
|
13
|
+
<div class="emoji" jsv_text_emoji="true">
|
|
14
|
+
{{ `class: 😀笑🇨🇳中国\n👨👩👧👦家庭` }}
|
|
15
|
+
</div>
|
|
16
|
+
</div>
|
|
17
|
+
</template>
|
|
18
|
+
|
|
19
|
+
<style>
|
|
20
|
+
.emoji {
|
|
21
|
+
top: 100;
|
|
22
|
+
width: 300;
|
|
23
|
+
height: 100;
|
|
24
|
+
font-size: 20;
|
|
25
|
+
}
|
|
26
|
+
</style>
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
const gap = 5;
|
|
3
|
+
const blockStyle = {
|
|
4
|
+
width: 70,
|
|
5
|
+
height: 20,
|
|
6
|
+
};
|
|
7
|
+
</script>
|
|
8
|
+
|
|
9
|
+
<template>
|
|
10
|
+
<div id="layout-root">
|
|
11
|
+
<div>
|
|
12
|
+
<div class="content-font" :style="{ ...blockStyle }">[字体]</div>
|
|
13
|
+
<div
|
|
14
|
+
class="content-font"
|
|
15
|
+
:style="{ ...blockStyle, top: 25, fontFamily: '宋体' }"
|
|
16
|
+
>
|
|
17
|
+
abc宋体
|
|
18
|
+
</div>
|
|
19
|
+
<div
|
|
20
|
+
class="content-font"
|
|
21
|
+
:style="{
|
|
22
|
+
...blockStyle,
|
|
23
|
+
top: 25,
|
|
24
|
+
left: blockStyle.width + gap,
|
|
25
|
+
fontFamily: '黑体',
|
|
26
|
+
}"
|
|
27
|
+
>
|
|
28
|
+
abc黑体
|
|
29
|
+
</div>
|
|
30
|
+
<div
|
|
31
|
+
:style="{
|
|
32
|
+
top: 25,
|
|
33
|
+
left: (blockStyle.width + gap) * 2 - 10,
|
|
34
|
+
width: blockStyle.width + 30,
|
|
35
|
+
height: 28,
|
|
36
|
+
fontFamily: '黑体',
|
|
37
|
+
fontSize: '24px',
|
|
38
|
+
WebkitTextStroke: '1px rgba(255,255,0,1.0)',
|
|
39
|
+
}"
|
|
40
|
+
>
|
|
41
|
+
abc描边
|
|
42
|
+
</div>
|
|
43
|
+
|
|
44
|
+
<div
|
|
45
|
+
class="content-font"
|
|
46
|
+
:style="{ ...blockStyle, top: 50, fontWeight: 'bold' }"
|
|
47
|
+
>
|
|
48
|
+
abc粗体
|
|
49
|
+
</div>
|
|
50
|
+
<div
|
|
51
|
+
class="content-font"
|
|
52
|
+
:style="{
|
|
53
|
+
...blockStyle,
|
|
54
|
+
top: 50,
|
|
55
|
+
left: blockStyle.width + gap,
|
|
56
|
+
fontStyle: 'italic',
|
|
57
|
+
}"
|
|
58
|
+
>
|
|
59
|
+
abc斜体
|
|
60
|
+
</div>
|
|
61
|
+
</div>
|
|
62
|
+
|
|
63
|
+
<div :style="{ top: 75 }">
|
|
64
|
+
<div class="content-font" :style="{ ...blockStyle }">[其他]</div>
|
|
65
|
+
<div :style="{ top: 25, width: 130, height: 35, fontSize: '30px' }">
|
|
66
|
+
abc字号
|
|
67
|
+
</div>
|
|
68
|
+
<div
|
|
69
|
+
:style="{
|
|
70
|
+
top: 25,
|
|
71
|
+
left: 110,
|
|
72
|
+
width: 130,
|
|
73
|
+
height: 35,
|
|
74
|
+
color: 'rgba(255, 0, 0, 1)',
|
|
75
|
+
fontFamily: 'sans-serif',
|
|
76
|
+
fontSize: '30px',
|
|
77
|
+
fontStyle: 'italic',
|
|
78
|
+
fontWeight: 'bold',
|
|
79
|
+
}"
|
|
80
|
+
>
|
|
81
|
+
abc综合
|
|
82
|
+
</div>
|
|
83
|
+
</div>
|
|
84
|
+
</div>
|
|
85
|
+
</template>
|
|
86
|
+
|
|
87
|
+
<style>
|
|
88
|
+
@import "../FontStyle.css";
|
|
89
|
+
</style>
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
import ContentBlock from "../ContentBlock.vue";
|
|
3
|
+
import TextAlign from "./TextAlign.vue";
|
|
4
|
+
import TextFontStyle from "./TextFontStyle.vue";
|
|
5
|
+
import TextOverflow from "./TextOverflow.vue";
|
|
6
|
+
|
|
7
|
+
const props = defineProps({
|
|
8
|
+
contentClass: String,
|
|
9
|
+
itemSides: Object,
|
|
10
|
+
});
|
|
11
|
+
|
|
12
|
+
const contentBlockProps = {
|
|
13
|
+
colIndex: 0,
|
|
14
|
+
itemSides: props.itemSides,
|
|
15
|
+
};
|
|
16
|
+
</script>
|
|
17
|
+
|
|
18
|
+
<template>
|
|
19
|
+
<div id="item-root">
|
|
20
|
+
<ContentBlock
|
|
21
|
+
:class="contentClass"
|
|
22
|
+
:style="{ top: itemSides.height * 0 }"
|
|
23
|
+
:="contentBlockProps"
|
|
24
|
+
:index="0"
|
|
25
|
+
title="文字对齐"
|
|
26
|
+
>
|
|
27
|
+
<TextAlign />
|
|
28
|
+
</ContentBlock>
|
|
29
|
+
<ContentBlock
|
|
30
|
+
:class="contentClass"
|
|
31
|
+
:style="{ top: itemSides.height * 1 }"
|
|
32
|
+
:="contentBlockProps"
|
|
33
|
+
:index="1"
|
|
34
|
+
title="字体和字号"
|
|
35
|
+
>
|
|
36
|
+
<TextFontStyle />
|
|
37
|
+
</ContentBlock>
|
|
38
|
+
<ContentBlock
|
|
39
|
+
:class="contentClass"
|
|
40
|
+
:style="{ top: itemSides.height * 2 }"
|
|
41
|
+
:="{ ...contentBlockProps, itemSides: { ...itemSides, height: 290 } }"
|
|
42
|
+
:index="2"
|
|
43
|
+
title="文字折行"
|
|
44
|
+
>
|
|
45
|
+
<TextOverflow />
|
|
46
|
+
</ContentBlock>
|
|
47
|
+
</div>
|
|
48
|
+
</template>
|
|
49
|
+
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
import ContentBlock from "../ContentBlock.vue";
|
|
3
|
+
import TextEmoji from "./TextEmoji.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
|
+
<template>
|
|
16
|
+
<div id="item-root">
|
|
17
|
+
<ContentBlock
|
|
18
|
+
:class="contentClass"
|
|
19
|
+
:style="{ top: itemSides.height * 0 }"
|
|
20
|
+
:="contentBlockProps"
|
|
21
|
+
:index="0"
|
|
22
|
+
title="文字对齐"
|
|
23
|
+
>
|
|
24
|
+
<TextEmoji />
|
|
25
|
+
</ContentBlock>
|
|
26
|
+
</div>
|
|
27
|
+
</template>
|
|
28
|
+
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
const gap = 5;
|
|
3
|
+
const blockSize = {
|
|
4
|
+
width: 180,
|
|
5
|
+
height: 35,
|
|
6
|
+
};
|
|
7
|
+
const baseStyle = {
|
|
8
|
+
width: blockSize.width,
|
|
9
|
+
height: blockSize.height,
|
|
10
|
+
backgroundColor: "rgba(255, 255, 0, 0.5)",
|
|
11
|
+
color: "rgba(255, 0, 0, 1)",
|
|
12
|
+
};
|
|
13
|
+
const multiLineCut =
|
|
14
|
+
"多行文字(末尾截断):" +
|
|
15
|
+
'\n第一行:我末尾有个"\\n"' +
|
|
16
|
+
"\n第二行:一二三四五六七八九十,一二三四五六七八九十,一二三四五六七八九十" +
|
|
17
|
+
"\n第三行:一二三四五六七八九十,一二三四五六七八九十,一二三四五六七八九十";
|
|
18
|
+
const multiLineEllipsis =
|
|
19
|
+
"多行文字(末尾省略):" +
|
|
20
|
+
'\n第一行:我末尾有个"\\n"' +
|
|
21
|
+
"\n第二行:一二三四五六七八九十,一二三四五六七八九十,一二三四五六七八九十" +
|
|
22
|
+
"\n第三行:一二三四五六七八九十,一二三四五六七八九十,一二三四五六七八九十";
|
|
23
|
+
</script>
|
|
24
|
+
|
|
25
|
+
<template>
|
|
26
|
+
<div id="layout-root">
|
|
27
|
+
<div
|
|
28
|
+
class="content-font"
|
|
29
|
+
:style="{
|
|
30
|
+
...baseStyle,
|
|
31
|
+
whiteSpace: 'nowrap',
|
|
32
|
+
textOverflow: 'clip',
|
|
33
|
+
overflow: 'hidden',
|
|
34
|
+
}"
|
|
35
|
+
>
|
|
36
|
+
1.长文字截断,后面的文字你可能看不到
|
|
37
|
+
</div>
|
|
38
|
+
|
|
39
|
+
<div
|
|
40
|
+
class="content-font"
|
|
41
|
+
:style="{
|
|
42
|
+
...baseStyle,
|
|
43
|
+
top: blockSize.height + gap,
|
|
44
|
+
whiteSpace: 'nowrap',
|
|
45
|
+
textOverflow: 'ellipsis',
|
|
46
|
+
overflow: 'hidden',
|
|
47
|
+
}"
|
|
48
|
+
>
|
|
49
|
+
2.长文字省略,后面的文字你可能看不到
|
|
50
|
+
</div>
|
|
51
|
+
|
|
52
|
+
<div
|
|
53
|
+
class="content-font"
|
|
54
|
+
:style="{
|
|
55
|
+
...baseStyle,
|
|
56
|
+
top: (blockSize.height + gap) * 2,
|
|
57
|
+
whiteSpace: 'pre-wrap',
|
|
58
|
+
textOverflow: 'clip',
|
|
59
|
+
overflow: 'hidden',
|
|
60
|
+
}"
|
|
61
|
+
>
|
|
62
|
+
3.长文字折行+截断,后面的文字你可能看不到,与PC效果有区别,一二三四五六七八九十
|
|
63
|
+
</div>
|
|
64
|
+
|
|
65
|
+
<div
|
|
66
|
+
class="content-font"
|
|
67
|
+
:style="{
|
|
68
|
+
...baseStyle,
|
|
69
|
+
top: (blockSize.height + gap) * 3,
|
|
70
|
+
whiteSpace: 'pre-wrap',
|
|
71
|
+
textOverflow: 'ellipsis',
|
|
72
|
+
overflow: 'hidden',
|
|
73
|
+
}"
|
|
74
|
+
>
|
|
75
|
+
4.长文字折行+省略,后面的文字你可能看不到,与PC效果有区别,一二三四五六七八九十
|
|
76
|
+
</div>
|
|
77
|
+
|
|
78
|
+
<div
|
|
79
|
+
class="content-font"
|
|
80
|
+
:style="{
|
|
81
|
+
...baseStyle,
|
|
82
|
+
top: (blockSize.height + gap) * 4,
|
|
83
|
+
height: 65,
|
|
84
|
+
whiteSpace: 'pre-wrap',
|
|
85
|
+
textOverflow: 'clip',
|
|
86
|
+
overflow: 'hidden',
|
|
87
|
+
}"
|
|
88
|
+
>
|
|
89
|
+
5.{{ multiLineCut }}
|
|
90
|
+
</div>
|
|
91
|
+
|
|
92
|
+
<div
|
|
93
|
+
class="content-font"
|
|
94
|
+
:style="{
|
|
95
|
+
...baseStyle,
|
|
96
|
+
top: (blockSize.height + gap) * 4 + 67,
|
|
97
|
+
height: 65,
|
|
98
|
+
whiteSpace: 'pre-wrap',
|
|
99
|
+
textOverflow: 'ellipsis',
|
|
100
|
+
overflow: 'hidden',
|
|
101
|
+
}"
|
|
102
|
+
>
|
|
103
|
+
6.{{ multiLineEllipsis }}
|
|
104
|
+
</div>
|
|
105
|
+
</div>
|
|
106
|
+
</template>
|
|
107
|
+
|
|
108
|
+
<style>
|
|
109
|
+
@import "../FontStyle.css";
|
|
110
|
+
</style>
|