@shijiu/jsview-vue 1.9.731 → 1.9.759

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 (217) hide show
  1. package/index.d.ts +4 -1
  2. package/index.js +4 -1
  3. package/package.json +5 -16
  4. package/samples/AnimPicture/App.vue +0 -207
  5. package/samples/AnimPicture/assets/animated_webp.webp +0 -0
  6. package/samples/AnimPicture/assets/ball_3.webp +0 -0
  7. package/samples/AnimPicture/assets/girl_run.gif +0 -0
  8. package/samples/AnimPicture/assets/quan.webp +0 -0
  9. package/samples/Basic/App.vue +0 -134
  10. package/samples/Basic/assets/border.png +0 -0
  11. package/samples/Basic/assets/border2.png +0 -0
  12. package/samples/Basic/assets/icon.png +0 -0
  13. package/samples/Basic/assets/test.jpg +0 -0
  14. package/samples/Basic/components/ContentBlock.vue +0 -38
  15. package/samples/Basic/components/FontStyle.css +0 -16
  16. package/samples/Basic/components/anim/AnimGroup.vue +0 -66
  17. package/samples/Basic/components/anim/AnimKeyframeBasic.vue +0 -119
  18. package/samples/Basic/components/anim/AnimKeyframeComposite.vue +0 -52
  19. package/samples/Basic/components/anim/AnimTransition.vue +0 -157
  20. package/samples/Basic/components/div/DivBackground.vue +0 -44
  21. package/samples/Basic/components/div/DivClip.vue +0 -159
  22. package/samples/Basic/components/div/DivCssScoped.vue +0 -20
  23. package/samples/Basic/components/div/DivCssVar.vue +0 -53
  24. package/samples/Basic/components/div/DivGroup1.vue +0 -47
  25. package/samples/Basic/components/div/DivGroup2.vue +0 -65
  26. package/samples/Basic/components/div/DivLayout.vue +0 -70
  27. package/samples/Basic/components/div/DivRadius.vue +0 -65
  28. package/samples/Basic/components/div/DivTransform.vue +0 -32
  29. package/samples/Basic/components/img/ImageGroup.vue +0 -31
  30. package/samples/Basic/components/img/ImgLayout.vue +0 -41
  31. package/samples/Basic/components/panel/Panel1.vue +0 -55
  32. package/samples/Basic/components/panel/Panel2.vue +0 -31
  33. package/samples/Basic/components/panel/TitleBar.vue +0 -29
  34. package/samples/Basic/components/text/TextAlign.vue +0 -66
  35. package/samples/Basic/components/text/TextEmoji.vue +0 -26
  36. package/samples/Basic/components/text/TextFontStyle.vue +0 -89
  37. package/samples/Basic/components/text/TextGroup1.vue +0 -49
  38. package/samples/Basic/components/text/TextGroup2.vue +0 -28
  39. package/samples/Basic/components/text/TextOverflow.vue +0 -110
  40. package/samples/BasicFocusControl/App.vue +0 -104
  41. package/samples/BasicFocusControl/components/BaseBlock.vue +0 -50
  42. package/samples/BasicFocusControl/components/MainArea.vue +0 -83
  43. package/samples/BasicFocusControl/components/MainAreaLeftBlock.vue +0 -17
  44. package/samples/BasicFocusControl/components/MainAreaRightBlock.vue +0 -27
  45. package/samples/BasicFocusControl/components/SideBar.vue +0 -58
  46. package/samples/BasicFocusControl/components/SideBarBlock.vue +0 -27
  47. package/samples/Collision/App.vue +0 -452
  48. package/samples/ColorSpace/App.vue +0 -126
  49. package/samples/DemoHomepage/App.vue +0 -27
  50. package/samples/DemoHomepage/components/BodyFrame.vue +0 -95
  51. package/samples/DemoHomepage/components/Dialog.vue +0 -94
  52. package/samples/DemoHomepage/components/Item.vue +0 -77
  53. package/samples/DemoHomepage/components/TabFrame.vue +0 -85
  54. package/samples/DemoHomepage/router.js +0 -196
  55. package/samples/DemoHomepage/views/Homepage.vue +0 -195
  56. package/samples/FilterDemo/AnimatePic.vue +0 -58
  57. package/samples/FilterDemo/App.vue +0 -159
  58. package/samples/FilterDemo/VideoLayer.vue +0 -62
  59. package/samples/FlipCard/App.vue +0 -71
  60. package/samples/FlipCard/FlipCard.vue +0 -118
  61. package/samples/FlipCard/assets/blue_egg.png +0 -0
  62. package/samples/FlipCard/assets/red_egg.png +0 -0
  63. package/samples/FlipCard/data.js +0 -13
  64. package/samples/GridDemo/App.vue +0 -215
  65. package/samples/GridDemo/ButtonBlock.vue +0 -112
  66. package/samples/GridDemo/FocusItem.vue +0 -37
  67. package/samples/GridDemo/Item.vue +0 -93
  68. package/samples/HashHistory/App.vue +0 -115
  69. package/samples/HashHistory/components/HorizontalButtonList.vue +0 -91
  70. package/samples/HashHistory/components/Item.vue +0 -60
  71. package/samples/HashHistory/router.js +0 -41
  72. package/samples/HashHistory/views/MainPage.vue +0 -57
  73. package/samples/HashHistory/views/SubPage.vue +0 -66
  74. package/samples/ImpactStop/App.vue +0 -435
  75. package/samples/Input/App.vue +0 -164
  76. package/samples/Input/FullKeyboard.vue +0 -87
  77. package/samples/Input/InputPanel.vue +0 -131
  78. package/samples/Input/KeyboardItem.vue +0 -58
  79. package/samples/LongImage/App.vue +0 -80
  80. package/samples/LongImage/Button.vue +0 -58
  81. package/samples/LongImage/ButtonItem.vue +0 -44
  82. package/samples/LongImage/LongImageScroll.vue +0 -92
  83. package/samples/LongImage/Scroll.vue +0 -14
  84. package/samples/LongImage/assets/1280x7200.jpg +0 -0
  85. package/samples/LongText/App.vue +0 -96
  86. package/samples/LongText/Button.vue +0 -51
  87. package/samples/LongText/ButtonItem.vue +0 -44
  88. package/samples/LongText/LongTextScroll.vue +0 -192
  89. package/samples/LongText/Scroll.vue +0 -14
  90. package/samples/Marquee/App.vue +0 -247
  91. package/samples/Marquee/longText.js +0 -14
  92. package/samples/MaskClip/App.vue +0 -122
  93. package/samples/MaskClip/images/mask-025/config.json +0 -29
  94. package/samples/MaskClip/images/mask-025/res/1.png +0 -0
  95. package/samples/MaskClip/images/mask-025/res/2.png +0 -0
  96. package/samples/MaskClip/images/mask-025/res/3.png +0 -0
  97. package/samples/MaskClip/images/mask-025/res/4.png +0 -0
  98. package/samples/MaskClip/images/mask-025/res/icon.png +0 -0
  99. package/samples/MaskClip/images/mask-025/res/stroke.png +0 -0
  100. package/samples/MaskClip/images/php.jpg +0 -0
  101. package/samples/MetroWidgetDemos/Advanced/App.vue +0 -46
  102. package/samples/MetroWidgetDemos/Advanced/ButtonItem.vue +0 -90
  103. package/samples/MetroWidgetDemos/Advanced/Buttons.vue +0 -70
  104. package/samples/MetroWidgetDemos/Advanced/Mixed.vue +0 -77
  105. package/samples/MetroWidgetDemos/Advanced/widgets/Item.vue +0 -83
  106. package/samples/MetroWidgetDemos/Advanced/widgets/WidgetItem.vue +0 -89
  107. package/samples/MetroWidgetDemos/Advanced/widgets/Widgets.vue +0 -116
  108. package/samples/MetroWidgetDemos/Advanced/widgets/focus1.png +0 -0
  109. package/samples/MetroWidgetDemos/Item.vue +0 -85
  110. package/samples/MetroWidgetDemos/PerformanceTest/App.vue +0 -210
  111. package/samples/MetroWidgetDemos/PerformanceTest/Item.vue +0 -90
  112. package/samples/MetroWidgetDemos/PerformanceTest/assets/bg.jpg +0 -0
  113. package/samples/MetroWidgetDemos/PerformanceTest/assets/coupon_content.png +0 -0
  114. package/samples/MetroWidgetDemos/PerformanceTest/assets/coupon_left.png +0 -0
  115. package/samples/MetroWidgetDemos/PerformanceTest/assets/coupon_mid.png +0 -0
  116. package/samples/MetroWidgetDemos/PerformanceTest/assets/coupon_right.png +0 -0
  117. package/samples/MetroWidgetDemos/PerformanceTest/assets/focus_border.png +0 -0
  118. package/samples/MetroWidgetDemos/PerformanceTest/assets/holder_logo.png +0 -0
  119. package/samples/MetroWidgetDemos/PerformanceTest/assets/jrbm.png +0 -0
  120. package/samples/MetroWidgetDemos/PerformanceTest/assets/line_left.png +0 -0
  121. package/samples/MetroWidgetDemos/PerformanceTest/assets/line_mid.png +0 -0
  122. package/samples/MetroWidgetDemos/PerformanceTest/assets/line_right.png +0 -0
  123. package/samples/MetroWidgetDemos/PerformanceTest/assets/loading.png +0 -0
  124. package/samples/MetroWidgetDemos/PerformanceTest/assets/logo.png +0 -0
  125. package/samples/MetroWidgetDemos/PerformanceTest/assets/mcjx.png +0 -0
  126. package/samples/MetroWidgetDemos/PerformanceTest/assets/tao.png +0 -0
  127. package/samples/MetroWidgetDemos/PerformanceTest/assets/tmall.png +0 -0
  128. package/samples/MetroWidgetDemos/PerformanceTest/border.png +0 -0
  129. package/samples/MetroWidgetDemos/PerformanceTest/components/ContentItem.vue +0 -386
  130. package/samples/MetroWidgetDemos/PerformanceTest/components/MyTab.vue +0 -129
  131. package/samples/MetroWidgetDemos/PerformanceTest/data.js +0 -45
  132. package/samples/MetroWidgetDemos/PingPong/App.vue +0 -135
  133. package/samples/MetroWidgetDemos/PingPong/AppPage.vue +0 -73
  134. package/samples/MetroWidgetDemos/PingPong/AppTab.vue +0 -62
  135. package/samples/MetroWidgetDemos/PingPong/TabItem.vue +0 -84
  136. package/samples/MetroWidgetDemos/PingPong/ViewSwiper.vue +0 -214
  137. package/samples/MetroWidgetDemos/Simple/AbsoluteTemplate.vue +0 -75
  138. package/samples/MetroWidgetDemos/Simple/App.vue +0 -45
  139. package/samples/MetroWidgetDemos/Simple/RelativeTemplate.vue +0 -111
  140. package/samples/MetroWidgetDemos/WidgetItem.vue +0 -89
  141. package/samples/MetroWidgetDemos/data.js +0 -205
  142. package/samples/NinePatchDemo/App.vue +0 -145
  143. package/samples/NinePatchDemo/Item.vue +0 -69
  144. package/samples/NinePatchDemo/assets/border.png +0 -0
  145. package/samples/Preload/App.vue +0 -135
  146. package/samples/Preload/Item.vue +0 -32
  147. package/samples/Preload/data.js +0 -23
  148. package/samples/Preload/images/awesomeface.png +0 -0
  149. package/samples/Preload/images/cat.jpg +0 -0
  150. package/samples/Preload/images/rank.png +0 -0
  151. package/samples/Preload/images/rank_focus.png +0 -0
  152. package/samples/Preload/images/rule.png +0 -0
  153. package/samples/Preload/images/rule_focus.png +0 -0
  154. package/samples/Preload/images/start.png +0 -0
  155. package/samples/Preload/images/start_focus.png +0 -0
  156. package/samples/QrcodeDemo/App.vue +0 -68
  157. package/samples/ScaleDownNeon/App.vue +0 -107
  158. package/samples/SoundPool/App.vue +0 -134
  159. package/samples/SoundPool/bgmusic.mp3 +0 -0
  160. package/samples/SoundPool/coin.mp3 +0 -0
  161. package/samples/SoundPool/jump.mp3 +0 -0
  162. package/samples/SoundPool/lose.mp3 +0 -0
  163. package/samples/SoundPool/run.mp3 +0 -0
  164. package/samples/SprayView/App.vue +0 -272
  165. package/samples/SprayView/assets/snow.png +0 -0
  166. package/samples/SpriteImage/App.vue +0 -173
  167. package/samples/SpriteImage/images/cat_run.png +0 -0
  168. package/samples/SpriteImage/images/egg_break.json +0 -116
  169. package/samples/SpriteImage/images/egg_break.png +0 -0
  170. package/samples/SpriteImage/images/sprite.png +0 -0
  171. package/samples/TextBox/App.vue +0 -91
  172. package/samples/TextBox/RenderCenter.vue +0 -133
  173. package/samples/TextBox/RenderLeft.vue +0 -138
  174. package/samples/TextBox/RenderOneLine.vue +0 -101
  175. package/samples/TextBox/RenderRight.vue +0 -131
  176. package/samples/TextShadowDemo/App.vue +0 -91
  177. package/samples/TextureAnimation/App.vue +0 -336
  178. package/samples/TextureAnimation/App2.vue +0 -111
  179. package/samples/TextureAnimation/assets/blackWhiteGrid.png +0 -0
  180. package/samples/TextureAnimation/assets/light.png +0 -0
  181. package/samples/TextureAnimation/assets/light2.png +0 -0
  182. package/samples/TextureAnimation/assets/mask.png +0 -0
  183. package/samples/TextureAnimation/assets/php.jpg +0 -0
  184. package/samples/TextureAnimation/assets/php2.png +0 -0
  185. package/samples/TextureAnimation/assets/swipLight.png +0 -0
  186. package/samples/TextureSize/App.vue +0 -132
  187. package/samples/TextureSize/bmpDemo.bmp +0 -0
  188. package/samples/TextureSize/jpegDemo.jpeg +0 -0
  189. package/samples/TextureSize/jpgDemo.jpg +0 -0
  190. package/samples/TextureSize/pngDemo.png +0 -0
  191. package/samples/TextureSize/pngNoAlphaDemo.png +0 -0
  192. package/samples/ThrowMoveDemo/AccelerateDemo.vue +0 -116
  193. package/samples/ThrowMoveDemo/App.vue +0 -114
  194. package/samples/ThrowMoveDemo/LRParabolicDemo.vue +0 -115
  195. package/samples/ThrowMoveDemo/TargetDemo.vue +0 -116
  196. package/samples/ThrowMoveDemo/UDParabolicDemo.vue +0 -121
  197. package/samples/TouchSample/App.vue +0 -136
  198. package/samples/TouchSample/Item.vue +0 -103
  199. package/samples/TouchSample/MetroWidgetHorizontal.vue +0 -144
  200. package/samples/TouchSample/MetroWidgetVertical.vue +0 -144
  201. package/samples/TouchSample/TouchContainerHorizontal.vue +0 -160
  202. package/samples/TouchSample/TouchContainerVertical.vue +0 -160
  203. package/samples/TouchSample/data.js +0 -81
  204. package/samples/TransitPage/App.vue +0 -29
  205. package/samples/VideoDemo/App.vue +0 -121
  206. package/samples/VideoDemo/components/Button.vue +0 -58
  207. package/samples/VideoDemo/components/Controllor.vue +0 -197
  208. package/samples/VideoDemo/components/VideoFrame.vue +0 -140
  209. package/samples/VisibleSensorDemo/App.vue +0 -234
  210. package/samples/assets/bmpDemo.bmp +0 -0
  211. package/samples/assets/jpegDemo.jpeg +0 -0
  212. package/samples/assets/pngDemo.png +0 -0
  213. package/samples/assets/pngNoAlphaDemo.png +0 -0
  214. package/samples/assets/webpDemo.webp +0 -0
  215. package/tsconfig.json +0 -47
  216. package/utils/index.d.ts +0 -3
  217. package/utils/index.js +0 -10
@@ -1,52 +0,0 @@
1
- <script setup>
2
- const titleStyle = {
3
- width: 100,
4
- height: 20,
5
- textAlign: "center",
6
- lineHeight: 20,
7
- };
8
- const itemStyle = {
9
- top: 20,
10
- width: 50,
11
- height: 50,
12
- backgroundColor: "rgba(255, 0, 0, 1)",
13
- };
14
- </script>
15
-
16
- <template>
17
- <div id="layout-root">
18
- <div>
19
- <div class="content-font" :style="{ ...titleStyle }">四种变形动画</div>
20
- <div :style="{ ...itemStyle, animation: 'AnimComposite1 3s infinite' }" />
21
- </div>
22
- <div :style="{ left: 100 }">
23
- <div class="content-font" :style="{ ...titleStyle }">变形+透明动画</div>
24
- <div :style="{ ...itemStyle, animation: 'AnimComposite2 3s infinite' }" />
25
- </div>
26
- </div>
27
- </template>
28
-
29
- <style>
30
- @import "../FontStyle.css";
31
- </style>
32
-
33
- <style>
34
- @keyframes AnimComposite1 {
35
- from {
36
- transform: translate3d(50%, 30px, 0) scale3d(1.5, 1.5, 1)
37
- rotate3d(1.5, 1, 1, 90deg) skew(30deg, 45deg);
38
- }
39
- to {
40
- }
41
- }
42
-
43
- @keyframes AnimComposite2 {
44
- from {
45
- transform: translate3d(50%, 30px, 0) scale3d(1.5, 1.5, 1)
46
- rotate3d(1.5, 1, 0, 90deg) skew(30deg, 45deg);
47
- opacity: 0.1;
48
- }
49
- to {
50
- }
51
- }
52
- </style>
@@ -1,157 +0,0 @@
1
- <script setup>
2
- import { reactive, onMounted, onBeforeUnmount } from "vue";
3
- const props = defineProps({
4
- timeCount: Number,
5
- });
6
- const titleStyle = {
7
- width: 100,
8
- height: 20,
9
- textAlign: "left",
10
- lineHeight: 20,
11
- };
12
- const itemStyle = {
13
- top: 20,
14
- width: 50,
15
- height: 50,
16
- whiteSpace: "pre-wrap",
17
- backgroundColor: "rgba(255, 0, 0, 1)",
18
- };
19
- let timerId = -1;
20
- const state = reactive({
21
- transform: null,
22
- transformOrigin: null,
23
- transformTranslate: null,
24
- transformRotate: null,
25
- transformScale: null,
26
- });
27
- const changeState = () => {
28
- setTimeout(() => {
29
- // 状态变更
30
- state.transform =
31
- "translate3d(80px,0px,0) scale3d(2,2,1.0) rotate3d(0, 0, 1, 360deg)";
32
- state.transformOrigin = "center center";
33
- state.transformScale = "scale3d(0.2,0.2,1.0)";
34
- state.transformRotate = "rotate3d(0, 0, 1.0, 360deg)";
35
- state.transformTranslate = "translate3d(180px,0px,0)";
36
- // 状态变更
37
- setTimeout(() => {
38
- state.transform =
39
- "translate3d(30px,0px,0) scale3d(0.2,0.2,1.0) rotate3d(0, 0, 1, -360deg)";
40
- state.transformOrigin = "center center";
41
- state.transformScale = "scale3d(1.2,1.2,1.0)";
42
- state.transformRotate = "rotate3d(0, 0, 1.0, -360deg)";
43
- state.transformTranslate = "translate3d(-80px,0px,0)";
44
- }, 3000);
45
- }, 3000);
46
- };
47
-
48
- onMounted(() => {
49
- changeState();
50
- timerId = setInterval(() => {
51
- changeState();
52
- }, 6000);
53
- });
54
-
55
- onBeforeUnmount(() => {
56
- if (timerId >= 0) {
57
- clearInterval(timerId);
58
- }
59
- timerId = -1;
60
- });
61
- </script>
62
-
63
- <template>
64
- <div id="layout-root">
65
- <div>
66
- <div class="content-font" :style="{ ...titleStyle }">坐标变化</div>
67
- <div
68
- class="content-font"
69
- :style="{
70
- ...itemStyle,
71
- left: (timeCount * 10) % 200,
72
- transition: 'left 1s linear',
73
- }"
74
- />
75
- </div>
76
- <div :style="{ top: 70 }">
77
- <div class="content-font" :style="{ ...titleStyle }">坐标和尺寸变化</div>
78
- <div
79
- class="content-font"
80
- :style="{
81
- ...itemStyle,
82
- left: (timeCount * 10) % 200,
83
- width: ((timeCount * 10) % 100) + 10,
84
- transition: 'left 0.5s linear, width 1s linear 1s',
85
- }"
86
- />
87
- </div>
88
-
89
- <div
90
- :style="{
91
- top: 140,
92
- width: 240,
93
- height: 160,
94
- backgroundColor: 'rgba(0, 0, 255, 0.5)',
95
- }"
96
- >
97
- <div :style="{ ...titleStyle }">transform</div>
98
- <div
99
- class="content-font"
100
- :style="{
101
- ...itemStyle,
102
- top: 20,
103
- transition: 'transform 2.5s linear 0.5s',
104
- transform: state.transform,
105
- transformOrigin: state.transformOrigin,
106
- }"
107
- >
108
- 移动缩放旋转
109
- </div>
110
- <div
111
- class="content-font"
112
- :style="{
113
- ...itemStyle,
114
- top: 100,
115
- transition: 'transform 2.5s linear 0.5s',
116
- transformOrigin: 'center center',
117
- transform: state.transformTranslate,
118
- }"
119
- >
120
- 移动
121
- </div>
122
- <div
123
- class="content-font"
124
- :style="{
125
- ...itemStyle,
126
- left: 140,
127
- top: 20,
128
- transition: 'transform 2.5s linear 0.5s',
129
- transformOrigin: 'center center',
130
- transform: state.transformScale,
131
- }"
132
- >
133
- 缩放
134
- </div>
135
- <div
136
- class="content-font"
137
- :style="{
138
- ...itemStyle,
139
- top: 75,
140
- left: 140,
141
- transition: 'transform 2.5s linear 0.5s',
142
- transformOrigin: 'center center',
143
- transform: state.transformRotate,
144
- }"
145
- >
146
- 旋转
147
- </div>
148
- </div>
149
- </div>
150
- </template>
151
-
152
- <style>
153
- @import "../FontStyle.css";
154
- </style>
155
-
156
- <style>
157
- </style>
@@ -1,44 +0,0 @@
1
- <script setup>
2
- import iconImgPath from "../../assets/icon.png";
3
- </script>
4
-
5
- <template>
6
- <div id="layout-root">
7
- <div
8
- class="content-font"
9
- :style="{
10
- width: 180,
11
- height: 40,
12
- backgroundColor: 'rgba(255, 255, 0, 1)',
13
- }"
14
- >
15
- style.backgroundColor
16
- </div>
17
- <div
18
- class="content-font"
19
- :style="{
20
- top: 50,
21
- width: 180,
22
- height: 40,
23
- backgroundImage: `url(${iconImgPath})`,
24
- }"
25
- >
26
- style.backgroundImage(url)
27
- </div>
28
- <div
29
- class="content-font"
30
- :style="{
31
- top: 100,
32
- width: 180,
33
- height: 40,
34
- backgroundImage: 'linear-gradient(#FF0000, #00FF00)',
35
- }"
36
- >
37
- style.backgroundImage(gradient)
38
- </div>
39
- </div>
40
- </template>
41
-
42
- <style>
43
- @import "../FontStyle.css";
44
- </style>
@@ -1,159 +0,0 @@
1
- <script setup>
2
- import testImgPath from "../../assets/test.jpg";
3
-
4
- const titleHeight = 16;
5
- const imageSize = {
6
- width: 80,
7
- height: 64,
8
- };
9
-
10
- const clipSize = {
11
- width: 50,
12
- height: 40,
13
- };
14
- </script>
15
-
16
- <template>
17
- <div id="layout-root">
18
- <div
19
- style="
20
- {
21
- top: 0;
22
- }
23
- "
24
- >
25
- <div class="content-font" :style="{ width: 50, height: titleHeight }">
26
- 原图
27
- </div>
28
- <div
29
- :style="{
30
- top: titleHeight,
31
- width: imageSize.width + 4,
32
- height: imageSize.height + 4,
33
- backgroundColor: 'rgba(0, 255, 0, 1)',
34
- }"
35
- >
36
- <div
37
- :style="{
38
- left: 2,
39
- top: 2,
40
- width: imageSize.width,
41
- height: imageSize.height,
42
- backgroundImage: `url(${testImgPath})`,
43
- }"
44
- />
45
- </div>
46
- </div>
47
-
48
- <div :style="{ top: imageSize.height + titleHeight + 4 }">
49
- <div class="content-font" :style="{ width: 120, height: titleHeight }">
50
- 左上Overflow
51
- </div>
52
- <div
53
- :style="{
54
- top: titleHeight,
55
- width: imageSize.width + 4,
56
- height: imageSize.height + 4,
57
- backgroundColor: 'rgba(0, 255, 0, 1)',
58
- }"
59
- >
60
- <div
61
- key="clipArea"
62
- :style="{
63
- left: 2,
64
- top: 2,
65
- width: clipSize.width,
66
- height: clipSize.height,
67
- overflow: 'hidden',
68
- }"
69
- >
70
- <div
71
- :style="{
72
- width: imageSize.width,
73
- height: imageSize.height,
74
- backgroundImage: `url(${testImgPath})`,
75
- }"
76
- />
77
- </div>
78
- </div>
79
- </div>
80
-
81
- <div :style="{ top: (imageSize.height + titleHeight + 4) * 2 }">
82
- <div class="content-font" :style="{ width: 120, height: titleHeight }">
83
- 右下Overflow
84
- </div>
85
- <div
86
- :style="{
87
- top: titleHeight,
88
- width: imageSize.width + 4,
89
- height: imageSize.height + 4,
90
- backgroundColor: 'rgba(0, 255, 0, 1)',
91
- }"
92
- >
93
- <div
94
- key="clipArea"
95
- :style="{
96
- top: 2 + (imageSize.height - clipSize.height),
97
- left: 2 + (imageSize.width - clipSize.width),
98
- width: clipSize.width,
99
- height: clipSize.height,
100
- overflow: 'hidden',
101
- }"
102
- >
103
- <div
104
- :style="{
105
- top: -(imageSize.height - clipSize.height),
106
- left: -(imageSize.width - clipSize.width),
107
- width: imageSize.width,
108
- height: imageSize.height,
109
- backgroundImage: `url(${testImgPath})`,
110
- }"
111
- />
112
- </div>
113
- </div>
114
- </div>
115
-
116
- <div
117
- :style="{
118
- top: imageSize.height + titleHeight + 4,
119
- left: imageSize.width + 16,
120
- }"
121
- >
122
- <div class="content-font" :style="{ width: 100, height: titleHeight }">
123
- ClipPath
124
- </div>
125
- <div
126
- :style="{
127
- top: titleHeight,
128
- width: imageSize.width + 4,
129
- height: imageSize.height + 4,
130
- backgroundColor: 'rgba(0, 255, 0, 1)',
131
- }"
132
- >
133
- <div
134
- key="clipArea"
135
- :style="{
136
- left: 2,
137
- top: 2,
138
- width: imageSize.width,
139
- height: imageSize.height,
140
- clipPath:
141
- 'inset(5px 10px 15px 20px)' /* margin of top, right, bottom, left */,
142
- }"
143
- >
144
- <div
145
- :style="{
146
- width: imageSize.width,
147
- height: imageSize.height,
148
- backgroundImage: `url(${testImgPath})`,
149
- }"
150
- />
151
- </div>
152
- </div>
153
- </div>
154
- </div>
155
- </template>
156
-
157
- <style>
158
- @import "../FontStyle.css";
159
- </style>
@@ -1,20 +0,0 @@
1
- <script setup>
2
- defineProps({
3
- jsvclass: String,
4
- });
5
- </script>
6
-
7
- <template>
8
- <div>
9
- <div>
10
- <div :class="jsvclass" jsv-inherit-class="2">
11
- Scoped CSS穿透, 此处的属性是Container设进来的.
12
- </div>
13
- </div>
14
- </div>
15
- </template>
16
-
17
-
18
-
19
- <style scoped>
20
- </style>
@@ -1,53 +0,0 @@
1
- <script setup>
2
- import { reactive, onMounted, onBeforeUnmount } from "vue";
3
- let timerId = -1;
4
- let state = reactive({
5
- foreColor: "#FF0000",
6
- backColor: "#00FF00",
7
- });
8
- onMounted(() => {
9
- timerId = setInterval(() => {
10
- if (state.foreColor == "#00FF00") {
11
- state.foreColor = "#FF0000";
12
- state.backColor = "#00FF00";
13
- } else {
14
- state.foreColor = "#00FF00";
15
- state.backColor = "#FF0000";
16
- }
17
- }, 3000);
18
- });
19
- onBeforeUnmount(() => {
20
- {
21
- if (timerId >= 0) {
22
- clearInterval(timerId);
23
- }
24
- timerId = -1;
25
- }
26
- });
27
- </script>
28
-
29
- <template>
30
- <div class="block">顶级元素的CSS class中包含变量 (不推荐)</div>
31
-
32
- <div
33
- :style="{
34
- left: 70,
35
- width: 65,
36
- height: 65,
37
- color: state.foreColor,
38
- backgroundColor: state.backColor,
39
- }"
40
- >
41
- 子级元素CSS class中包含变量
42
- </div>
43
- </template>
44
-
45
- <style scoped>
46
- .block {
47
- width: 65;
48
- height: 65;
49
- /* word-wrap: break-word; */
50
- color: v-bind(state.foreColor);
51
- background-color: v-bind(state.backColor);
52
- }
53
- </style>
@@ -1,47 +0,0 @@
1
- <script setup>
2
- import ContentBlock from "../ContentBlock.vue";
3
- import DivBackground from "./DivBackground.vue";
4
- import DivClip from "./DivClip.vue";
5
- import DivLayout from "./DivLayout.vue";
6
-
7
- const props = defineProps({
8
- contentClass: String,
9
- itemSides: Object,
10
- });
11
- const contentBlockProps = {
12
- colIndex: 0,
13
- itemSides: props.itemSides,
14
- };
15
- </script>
16
-
17
- <template>
18
- <div id="item-root">
19
- <ContentBlock
20
- :class="contentClass"
21
- :style="{ top: itemSides.height * 0 }"
22
- :="contentBlockProps"
23
- :index="0"
24
- title="Layout(布局定位)"
25
- >
26
- <DivLayout />
27
- </ContentBlock>
28
- <ContentBlock
29
- :class="contentClass"
30
- :style="{ top: itemSides.height * 1 }"
31
- :="contentBlockProps"
32
- :index="1"
33
- title="Background(加载图片)"
34
- >
35
- <DivBackground />
36
- </ContentBlock>
37
- <ContentBlock
38
- :class="contentClass"
39
- :style="{ top: itemSides.height * 2 }"
40
- :="{ ...contentBlockProps, itemSides: { ...itemSides, height: 290 } }"
41
- :index="2"
42
- title="Clip(裁剪)"
43
- >
44
- <DivClip />
45
- </ContentBlock>
46
- </div>
47
- </template>
@@ -1,65 +0,0 @@
1
- <script setup>
2
- import ContentBlock from "../ContentBlock.vue";
3
- import DivCssScoped from "./DivCssScoped.vue";
4
- import DivCssVar from "./DivCssVar.vue";
5
- import DivRadius from "./DivRadius.vue";
6
- import DivTransform from "./DivTransform.vue";
7
-
8
- const props = defineProps({
9
- contentClass: String,
10
- itemSides: Object,
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="1"
25
- title="Radius(实现圆角)"
26
- >
27
- <DivRadius />
28
- </ContentBlock>
29
- <ContentBlock
30
- :class="contentClass"
31
- :style="{ top: itemSides.height * 1 }"
32
- :="contentBlockProps"
33
- :index="1"
34
- title="Transform"
35
- >
36
- <DivTransform />
37
- </ContentBlock>
38
- <ContentBlock
39
- :class="contentClass"
40
- :style="{ top: itemSides.height * 2 }"
41
- :="contentBlockProps"
42
- :index="2"
43
- title="CSS Var"
44
- >
45
- <DivCssVar />
46
- </ContentBlock>
47
- <ContentBlock
48
- :class="contentClass"
49
- :style="{ top: itemSides.height * 3 }"
50
- :="contentBlockProps"
51
- :index="3"
52
- title="CSS Scoped"
53
- >
54
- <DivCssScoped jsvclass="block" />
55
- </ContentBlock>
56
- </div>
57
- </template>
58
-
59
- <style scoped>
60
- .block {
61
- width: 80;
62
- height: 65;
63
- color: #00ff00;
64
- }
65
- </style>
@@ -1,70 +0,0 @@
1
- <template>
2
- <div id="layout-root">
3
- <div
4
- class="content-font"
5
- :style="{ width: 70, height: 25, backgroundColor: 'rgba(0, 255, 0, 1)' }"
6
- >
7
- 坐标未设
8
- </div>
9
- <!-- <div class="content-font" :style="{ top: 0, left: 75, backgroundColor: 'rgba(0, 255, 0, 1)' }">宽高未设</div> -->
10
- <div
11
- class="content-font"
12
- :style="{
13
- top: 30 * 1,
14
- left: 0,
15
- width: 70,
16
- height: 25,
17
- backgroundColor: 'rgba(0, 200, 0, 1)',
18
- visibility: 'hidden',
19
- }"
20
- >
21
- (X)不可视
22
- </div>
23
- <div
24
- class="content-font"
25
- :style="{
26
- top: 30 * 1,
27
- left: 75,
28
- width: 70,
29
- height: 25,
30
- backgroundColor: 'rgba(0, 200, 0, 1)',
31
- visibility: 'visible',
32
- }"
33
- >
34
- 可视属性
35
- </div>
36
- <div
37
- v-show="vShow"
38
- class="content-font"
39
- :style="{
40
- top: 30 * 2,
41
- left: 75,
42
- width: 70,
43
- height: 25,
44
- backgroundColor: 'rgba(0, 200, 0, 1)',
45
- visibility: 'visible',
46
- }"
47
- >
48
- v-show
49
- </div>
50
- </div>
51
- </template>
52
-
53
- <script setup>
54
- import { ref, shallowRef, onUnmounted } from 'vue'
55
-
56
- // v-show 控制
57
- let vShow = ref(false);
58
- let loopVShow = setInterval(() => {
59
- vShow.value = !vShow.value;
60
- }, 1000);
61
-
62
- onUnmounted(() => {
63
- clearInterval(loopVShow);
64
- });
65
-
66
- </script>
67
-
68
- <style>
69
- @import "../FontStyle.css";
70
- </style>