@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.
Files changed (213) hide show
  1. package/AnimPicture/App.vue +207 -0
  2. package/AnimPicture/assets/animated_webp.webp +0 -0
  3. package/AnimPicture/assets/ball_3.webp +0 -0
  4. package/AnimPicture/assets/girl_run.gif +0 -0
  5. package/AnimPicture/assets/quan.webp +0 -0
  6. package/Basic/App.vue +134 -0
  7. package/Basic/assets/border.png +0 -0
  8. package/Basic/assets/border2.png +0 -0
  9. package/Basic/assets/icon.png +0 -0
  10. package/Basic/assets/test.jpg +0 -0
  11. package/Basic/components/ContentBlock.vue +38 -0
  12. package/Basic/components/FontStyle.css +16 -0
  13. package/Basic/components/anim/AnimGroup.vue +66 -0
  14. package/Basic/components/anim/AnimKeyframeBasic.vue +119 -0
  15. package/Basic/components/anim/AnimKeyframeComposite.vue +52 -0
  16. package/Basic/components/anim/AnimTransition.vue +157 -0
  17. package/Basic/components/div/DivBackground.vue +44 -0
  18. package/Basic/components/div/DivClip.vue +159 -0
  19. package/Basic/components/div/DivCssScoped.vue +20 -0
  20. package/Basic/components/div/DivCssVar.vue +53 -0
  21. package/Basic/components/div/DivGroup1.vue +47 -0
  22. package/Basic/components/div/DivGroup2.vue +65 -0
  23. package/Basic/components/div/DivLayout.vue +70 -0
  24. package/Basic/components/div/DivRadius.vue +65 -0
  25. package/Basic/components/div/DivTransform.vue +32 -0
  26. package/Basic/components/img/ImageGroup.vue +31 -0
  27. package/Basic/components/img/ImgLayout.vue +41 -0
  28. package/Basic/components/panel/Panel1.vue +55 -0
  29. package/Basic/components/panel/Panel2.vue +31 -0
  30. package/Basic/components/panel/TitleBar.vue +29 -0
  31. package/Basic/components/text/TextAlign.vue +66 -0
  32. package/Basic/components/text/TextEmoji.vue +26 -0
  33. package/Basic/components/text/TextFontStyle.vue +89 -0
  34. package/Basic/components/text/TextGroup1.vue +49 -0
  35. package/Basic/components/text/TextGroup2.vue +28 -0
  36. package/Basic/components/text/TextOverflow.vue +110 -0
  37. package/BasicFocusControl/App.vue +104 -0
  38. package/BasicFocusControl/components/BaseBlock.vue +50 -0
  39. package/BasicFocusControl/components/MainArea.vue +83 -0
  40. package/BasicFocusControl/components/MainAreaLeftBlock.vue +17 -0
  41. package/BasicFocusControl/components/MainAreaRightBlock.vue +27 -0
  42. package/BasicFocusControl/components/SideBar.vue +58 -0
  43. package/BasicFocusControl/components/SideBarBlock.vue +27 -0
  44. package/Collision/App.vue +452 -0
  45. package/ColorSpace/App.vue +126 -0
  46. package/ColorSpace/bmpDemo.bmp +0 -0
  47. package/ColorSpace/jpegDemo.jpeg +0 -0
  48. package/ColorSpace/pngDemo.png +0 -0
  49. package/ColorSpace/pngNoAlphaDemo.png +0 -0
  50. package/DemoHomepage/App.vue +27 -0
  51. package/DemoHomepage/components/BodyFrame.vue +95 -0
  52. package/DemoHomepage/components/Dialog.vue +94 -0
  53. package/DemoHomepage/components/Item.vue +77 -0
  54. package/DemoHomepage/components/TabFrame.vue +85 -0
  55. package/DemoHomepage/router.js +196 -0
  56. package/DemoHomepage/views/Homepage.vue +195 -0
  57. package/FilterDemo/AnimatePic.vue +58 -0
  58. package/FilterDemo/App.vue +159 -0
  59. package/FilterDemo/VideoLayer.vue +62 -0
  60. package/FilterDemo/jpegDemo.jpeg +0 -0
  61. package/FilterDemo/webpDemo.webp +0 -0
  62. package/FlipCard/App.vue +71 -0
  63. package/FlipCard/FlipCard.vue +118 -0
  64. package/FlipCard/assets/blue_egg.png +0 -0
  65. package/FlipCard/assets/red_egg.png +0 -0
  66. package/FlipCard/data.js +13 -0
  67. package/GridDemo/App.vue +215 -0
  68. package/GridDemo/ButtonBlock.vue +112 -0
  69. package/GridDemo/FocusItem.vue +37 -0
  70. package/GridDemo/Item.vue +93 -0
  71. package/HashHistory/App.vue +115 -0
  72. package/HashHistory/components/HorizontalButtonList.vue +91 -0
  73. package/HashHistory/components/Item.vue +60 -0
  74. package/HashHistory/router.js +41 -0
  75. package/HashHistory/views/MainPage.vue +57 -0
  76. package/HashHistory/views/SubPage.vue +66 -0
  77. package/ImpactStop/App.vue +435 -0
  78. package/Input/App.vue +164 -0
  79. package/Input/FullKeyboard.vue +87 -0
  80. package/Input/InputPanel.vue +131 -0
  81. package/Input/KeyboardItem.vue +58 -0
  82. package/LongImage/App.vue +80 -0
  83. package/LongImage/Button.vue +58 -0
  84. package/LongImage/ButtonItem.vue +44 -0
  85. package/LongImage/LongImageScroll.vue +92 -0
  86. package/LongImage/Scroll.vue +14 -0
  87. package/LongImage/assets/1280x7200.jpg +0 -0
  88. package/LongText/App.vue +96 -0
  89. package/LongText/Button.vue +51 -0
  90. package/LongText/ButtonItem.vue +44 -0
  91. package/LongText/LongTextScroll.vue +192 -0
  92. package/LongText/Scroll.vue +14 -0
  93. package/Marquee/App.vue +247 -0
  94. package/Marquee/longText.js +14 -0
  95. package/MaskClip/App.vue +122 -0
  96. package/MaskClip/images/mask-025/config.json +29 -0
  97. package/MaskClip/images/mask-025/res/1.png +0 -0
  98. package/MaskClip/images/mask-025/res/2.png +0 -0
  99. package/MaskClip/images/mask-025/res/3.png +0 -0
  100. package/MaskClip/images/mask-025/res/4.png +0 -0
  101. package/MaskClip/images/mask-025/res/icon.png +0 -0
  102. package/MaskClip/images/mask-025/res/stroke.png +0 -0
  103. package/MaskClip/images/php.jpg +0 -0
  104. package/MetroWidgetDemos/Advanced/App.vue +46 -0
  105. package/MetroWidgetDemos/Advanced/ButtonItem.vue +90 -0
  106. package/MetroWidgetDemos/Advanced/Buttons.vue +70 -0
  107. package/MetroWidgetDemos/Advanced/Mixed.vue +77 -0
  108. package/MetroWidgetDemos/Advanced/widgets/Item.vue +83 -0
  109. package/MetroWidgetDemos/Advanced/widgets/WidgetItem.vue +89 -0
  110. package/MetroWidgetDemos/Advanced/widgets/Widgets.vue +116 -0
  111. package/MetroWidgetDemos/Advanced/widgets/focus1.png +0 -0
  112. package/MetroWidgetDemos/Item.vue +85 -0
  113. package/MetroWidgetDemos/PerformanceTest/App.vue +210 -0
  114. package/MetroWidgetDemos/PerformanceTest/Item.vue +90 -0
  115. package/MetroWidgetDemos/PerformanceTest/assets/bg.jpg +0 -0
  116. package/MetroWidgetDemos/PerformanceTest/assets/coupon_content.png +0 -0
  117. package/MetroWidgetDemos/PerformanceTest/assets/coupon_left.png +0 -0
  118. package/MetroWidgetDemos/PerformanceTest/assets/coupon_mid.png +0 -0
  119. package/MetroWidgetDemos/PerformanceTest/assets/coupon_right.png +0 -0
  120. package/MetroWidgetDemos/PerformanceTest/assets/focus_border.png +0 -0
  121. package/MetroWidgetDemos/PerformanceTest/assets/holder_logo.png +0 -0
  122. package/MetroWidgetDemos/PerformanceTest/assets/jrbm.png +0 -0
  123. package/MetroWidgetDemos/PerformanceTest/assets/line_left.png +0 -0
  124. package/MetroWidgetDemos/PerformanceTest/assets/line_mid.png +0 -0
  125. package/MetroWidgetDemos/PerformanceTest/assets/line_right.png +0 -0
  126. package/MetroWidgetDemos/PerformanceTest/assets/loading.png +0 -0
  127. package/MetroWidgetDemos/PerformanceTest/assets/logo.png +0 -0
  128. package/MetroWidgetDemos/PerformanceTest/assets/mcjx.png +0 -0
  129. package/MetroWidgetDemos/PerformanceTest/assets/tao.png +0 -0
  130. package/MetroWidgetDemos/PerformanceTest/assets/tmall.png +0 -0
  131. package/MetroWidgetDemos/PerformanceTest/border.png +0 -0
  132. package/MetroWidgetDemos/PerformanceTest/components/ContentItem.vue +386 -0
  133. package/MetroWidgetDemos/PerformanceTest/components/MyTab.vue +129 -0
  134. package/MetroWidgetDemos/PerformanceTest/data.js +45 -0
  135. package/MetroWidgetDemos/PingPong/App.vue +135 -0
  136. package/MetroWidgetDemos/PingPong/AppPage.vue +73 -0
  137. package/MetroWidgetDemos/PingPong/AppTab.vue +62 -0
  138. package/MetroWidgetDemos/PingPong/TabItem.vue +84 -0
  139. package/MetroWidgetDemos/PingPong/ViewSwiper.vue +214 -0
  140. package/MetroWidgetDemos/Simple/AbsoluteTemplate.vue +75 -0
  141. package/MetroWidgetDemos/Simple/App.vue +45 -0
  142. package/MetroWidgetDemos/Simple/RelativeTemplate.vue +111 -0
  143. package/MetroWidgetDemos/WidgetItem.vue +89 -0
  144. package/MetroWidgetDemos/data.js +205 -0
  145. package/NinePatchDemo/App.vue +145 -0
  146. package/NinePatchDemo/Item.vue +69 -0
  147. package/NinePatchDemo/assets/border.png +0 -0
  148. package/Preload/App.vue +135 -0
  149. package/Preload/Item.vue +32 -0
  150. package/Preload/data.js +23 -0
  151. package/Preload/images/awesomeface.png +0 -0
  152. package/Preload/images/cat.jpg +0 -0
  153. package/Preload/images/rank.png +0 -0
  154. package/Preload/images/rank_focus.png +0 -0
  155. package/Preload/images/rule.png +0 -0
  156. package/Preload/images/rule_focus.png +0 -0
  157. package/Preload/images/start.png +0 -0
  158. package/Preload/images/start_focus.png +0 -0
  159. package/QrcodeDemo/App.vue +68 -0
  160. package/ScaleDownNeon/App.vue +107 -0
  161. package/SoundPool/App.vue +134 -0
  162. package/SoundPool/bgmusic.mp3 +0 -0
  163. package/SoundPool/coin.mp3 +0 -0
  164. package/SoundPool/jump.mp3 +0 -0
  165. package/SoundPool/lose.mp3 +0 -0
  166. package/SoundPool/run.mp3 +0 -0
  167. package/SprayView/App.vue +272 -0
  168. package/SprayView/assets/snow.png +0 -0
  169. package/SpriteImage/App.vue +173 -0
  170. package/SpriteImage/images/cat_run.png +0 -0
  171. package/SpriteImage/images/egg_break.json +116 -0
  172. package/SpriteImage/images/egg_break.png +0 -0
  173. package/SpriteImage/images/sprite.png +0 -0
  174. package/TextBox/App.vue +91 -0
  175. package/TextBox/RenderCenter.vue +133 -0
  176. package/TextBox/RenderLeft.vue +138 -0
  177. package/TextBox/RenderOneLine.vue +101 -0
  178. package/TextBox/RenderRight.vue +131 -0
  179. package/TextShadowDemo/App.vue +91 -0
  180. package/TextureAnimation/App.vue +336 -0
  181. package/TextureAnimation/App2.vue +111 -0
  182. package/TextureAnimation/assets/blackWhiteGrid.png +0 -0
  183. package/TextureAnimation/assets/light.png +0 -0
  184. package/TextureAnimation/assets/light2.png +0 -0
  185. package/TextureAnimation/assets/mask.png +0 -0
  186. package/TextureAnimation/assets/php.jpg +0 -0
  187. package/TextureAnimation/assets/php2.png +0 -0
  188. package/TextureAnimation/assets/swipLight.png +0 -0
  189. package/TextureSize/App.vue +132 -0
  190. package/TextureSize/bmpDemo.bmp +0 -0
  191. package/TextureSize/jpegDemo.jpeg +0 -0
  192. package/TextureSize/jpgDemo.jpg +0 -0
  193. package/TextureSize/pngDemo.png +0 -0
  194. package/TextureSize/pngNoAlphaDemo.png +0 -0
  195. package/ThrowMoveDemo/AccelerateDemo.vue +116 -0
  196. package/ThrowMoveDemo/App.vue +114 -0
  197. package/ThrowMoveDemo/LRParabolicDemo.vue +115 -0
  198. package/ThrowMoveDemo/TargetDemo.vue +116 -0
  199. package/ThrowMoveDemo/UDParabolicDemo.vue +121 -0
  200. package/TouchSample/App.vue +136 -0
  201. package/TouchSample/Item.vue +103 -0
  202. package/TouchSample/MetroWidgetHorizontal.vue +144 -0
  203. package/TouchSample/MetroWidgetVertical.vue +144 -0
  204. package/TouchSample/TouchContainerHorizontal.vue +160 -0
  205. package/TouchSample/TouchContainerVertical.vue +160 -0
  206. package/TouchSample/data.js +81 -0
  207. package/TransitPage/App.vue +29 -0
  208. package/VideoDemo/App.vue +121 -0
  209. package/VideoDemo/components/Button.vue +58 -0
  210. package/VideoDemo/components/Controllor.vue +197 -0
  211. package/VideoDemo/components/VideoFrame.vue +140 -0
  212. package/VisibleSensorDemo/App.vue +234 -0
  213. 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>