@shijiu/jsview-vue-samples 1.9.888 → 1.9.931

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 (185) hide show
  1. package/AnimPicture/App.vue +10 -10
  2. package/Basic/App.vue +1 -1
  3. package/Basic/components/FontStyle.css +3 -3
  4. package/Basic/components/anim/AnimKeyframeBasic.vue +1 -1
  5. package/Basic/components/anim/AnimKeyframeComposite.vue +2 -2
  6. package/Basic/components/anim/AnimTransition.vue +4 -4
  7. package/Basic/components/div/DivClip.vue +0 -39
  8. package/Basic/components/div/DivCssScoped.vue +1 -1
  9. package/Basic/components/div/DivLayout.vue +6 -1
  10. package/Basic/components/div/DivRadius.vue +4 -4
  11. package/Basic/components/img/ImageGroup.vue +2 -2
  12. package/Basic/components/img/ImgLayout.vue +78 -14
  13. package/Basic/components/text/TextDirection.vue +9 -9
  14. package/Basic/components/text/TextEmoji.vue +7 -2
  15. package/Basic/components/text/TextFontStyle.vue +4 -4
  16. package/Basic/components/text/TextGroup1.vue +1 -1
  17. package/Basic/components/text/TextGroup2.vue +2 -2
  18. package/BasicFocusControl/App.vue +2 -2
  19. package/BasicFocusControl/components/BaseBlock.vue +2 -2
  20. package/BasicFocusControl/components/MainArea.vue +2 -2
  21. package/BasicFocusControl/components/SideBar.vue +2 -2
  22. package/Collision/App.vue +16 -16
  23. package/ColorSpace/App.vue +11 -11
  24. package/CssPreprocessor/App.vue +70 -0
  25. package/CssPreprocessor/Less/App.vue +32 -0
  26. package/CssPreprocessor/Less/PanelData.js +51 -0
  27. package/CssPreprocessor/Less/components/less-group1/LessComments.vue +34 -0
  28. package/CssPreprocessor/Less/components/less-group1/LessConditionals.vue +32 -0
  29. package/CssPreprocessor/Less/components/less-group1/LessOperations.vue +24 -0
  30. package/CssPreprocessor/Less/components/less-group1/LessVariables.vue +48 -0
  31. package/CssPreprocessor/Less/components/less-group2/LessIteration.vue +32 -0
  32. package/CssPreprocessor/Less/components/less-group2/LessMethods.vue +27 -0
  33. package/CssPreprocessor/Less/components/less-group3/LessExtends.vue +32 -0
  34. package/CssPreprocessor/Less/components/less-group3/LessNesting.vue +63 -0
  35. package/CssPreprocessor/Less/components/less-group4/LessKeyframes.vue +40 -0
  36. package/CssPreprocessor/Less/components/less-group4/LessMaps.vue +33 -0
  37. package/CssPreprocessor/Less/components/less-group4/LessMixins.vue +33 -0
  38. package/CssPreprocessor/Less/components/less-group5/LessImporting.vue +34 -0
  39. package/CssPreprocessor/Less/components/less-group5/TextSettings.less +4 -0
  40. package/CssPreprocessor/Scss/App.vue +32 -0
  41. package/CssPreprocessor/Scss/PanelData.js +51 -0
  42. package/CssPreprocessor/Scss/components/scss-group1/ScssComments.vue +34 -0
  43. package/CssPreprocessor/Scss/components/scss-group1/ScssConditionals.vue +36 -0
  44. package/CssPreprocessor/Scss/components/scss-group1/ScssOperations.vue +30 -0
  45. package/CssPreprocessor/Scss/components/scss-group1/ScssVariables.vue +48 -0
  46. package/CssPreprocessor/Scss/components/scss-group2/ScssIteration.vue +36 -0
  47. package/CssPreprocessor/Scss/components/scss-group2/ScssMethods.vue +84 -0
  48. package/CssPreprocessor/Scss/components/scss-group3/ScssExtends.vue +34 -0
  49. package/CssPreprocessor/Scss/components/scss-group3/ScssNesting.vue +75 -0
  50. package/CssPreprocessor/Scss/components/scss-group4/ScssKeyframes.vue +40 -0
  51. package/CssPreprocessor/Scss/components/scss-group4/ScssMaps.vue +35 -0
  52. package/CssPreprocessor/Scss/components/scss-group4/ScssMixins.vue +33 -0
  53. package/CssPreprocessor/Scss/components/scss-group5/ScssImporting.vue +34 -0
  54. package/CssPreprocessor/Scss/components/scss-group5/TextSettings.scss +4 -0
  55. package/CssPreprocessor/Stylus/App.vue +32 -0
  56. package/CssPreprocessor/Stylus/PanelData.js +51 -0
  57. package/CssPreprocessor/Stylus/components/stylus-group1/StylusComments.vue +34 -0
  58. package/CssPreprocessor/Stylus/components/stylus-group1/StylusConditionals.vue +36 -0
  59. package/CssPreprocessor/Stylus/components/stylus-group1/StylusOperations.vue +30 -0
  60. package/CssPreprocessor/Stylus/components/stylus-group1/StylusVariables.vue +47 -0
  61. package/CssPreprocessor/Stylus/components/stylus-group2/StylusIteration.vue +34 -0
  62. package/CssPreprocessor/Stylus/components/stylus-group2/StylusMethods.vue +78 -0
  63. package/CssPreprocessor/Stylus/components/stylus-group3/StylusExtends.vue +34 -0
  64. package/CssPreprocessor/Stylus/components/stylus-group3/StylusNesting.vue +63 -0
  65. package/CssPreprocessor/Stylus/components/stylus-group4/StylusKeyframes.vue +40 -0
  66. package/CssPreprocessor/Stylus/components/stylus-group4/StylusMaps.vue +33 -0
  67. package/CssPreprocessor/Stylus/components/stylus-group4/StylusMixins.vue +33 -0
  68. package/CssPreprocessor/Stylus/components/stylus-group5/StylusImporting.vue +34 -0
  69. package/CssPreprocessor/Stylus/components/stylus-group5/TextSettings.styl +4 -0
  70. package/CssPreprocessor/utils/ContentBlock.vue +43 -0
  71. package/CssPreprocessor/utils/ContentList.vue +34 -0
  72. package/CssPreprocessor/utils/FontStyle.css +19 -0
  73. package/CssPreprocessor/utils/Panel.vue +49 -0
  74. package/CssPreprocessor/utils/TitleBar.vue +29 -0
  75. package/DemoHomepage/App.vue +46 -11
  76. package/DemoHomepage/components/Dialog.vue +15 -15
  77. package/DemoHomepage/router.js +21 -13
  78. package/DemoHomepage/views/Homepage.vue +90 -102
  79. package/DivMetroPerformance/App.vue +150 -0
  80. package/DivMetroPerformance/Item.vue +58 -0
  81. package/DivMetroPerformance/assets/bg.jpg +0 -0
  82. package/DivMetroPerformance/assets/coupon_content.png +0 -0
  83. package/DivMetroPerformance/assets/coupon_left.png +0 -0
  84. package/DivMetroPerformance/assets/coupon_mid.png +0 -0
  85. package/DivMetroPerformance/assets/coupon_right.png +0 -0
  86. package/DivMetroPerformance/assets/focus_border.png +0 -0
  87. package/DivMetroPerformance/assets/holder_logo.png +0 -0
  88. package/DivMetroPerformance/assets/jrbm.png +0 -0
  89. package/DivMetroPerformance/assets/line_left.png +0 -0
  90. package/DivMetroPerformance/assets/line_mid.png +0 -0
  91. package/DivMetroPerformance/assets/line_right.png +0 -0
  92. package/DivMetroPerformance/assets/loading.png +0 -0
  93. package/DivMetroPerformance/assets/logo.png +0 -0
  94. package/DivMetroPerformance/assets/mcjx.png +0 -0
  95. package/DivMetroPerformance/assets/tao.png +0 -0
  96. package/DivMetroPerformance/assets/tmall.png +0 -0
  97. package/DivMetroPerformance/border.png +0 -0
  98. package/DivMetroPerformance/components/ContentItem.vue +385 -0
  99. package/DivMetroPerformance/components/MyTab.vue +129 -0
  100. package/DivMetroPerformance/data.js +124 -0
  101. package/DivMetroPerformance/utils/GridItem.vue +28 -0
  102. package/DivMetroPerformance/utils/GridPlate.vue +85 -0
  103. package/FilterDemo/AnimatePic.vue +2 -2
  104. package/FilterDemo/App.vue +3 -3
  105. package/FlipCard/App.vue +2 -2
  106. package/FlipCard/FlipCard.vue +2 -2
  107. package/GridDemo/Item.vue +13 -13
  108. package/HashHistory/App.vue +0 -1
  109. package/HashHistory/components/Item.vue +2 -2
  110. package/HashHistory/views/MainPage.vue +1 -1
  111. package/HashHistory/views/SubPage.vue +2 -2
  112. package/ImpactStop/App.vue +9 -11
  113. package/Input/InputPanel.vue +2 -4
  114. package/LongImage/App.vue +2 -2
  115. package/LongImage/Button.vue +1 -1
  116. package/LongImage/ButtonItem.vue +1 -1
  117. package/LongText/App.vue +3 -3
  118. package/LongText/Button.vue +1 -1
  119. package/LongText/ButtonItem.vue +1 -1
  120. package/LongText/LongTextScroll.vue +4 -4
  121. package/Marquee/longText.js +0 -2
  122. package/MaskClip/App.vue +4 -4
  123. package/MediaDemo/App.vue +127 -0
  124. package/MediaDemo/assets/audio-poster.png +0 -0
  125. package/MediaDemo/components/Button.vue +69 -0
  126. package/MediaDemo/components/Controllor.vue +279 -0
  127. package/MediaDemo/components/StatusBar.vue +100 -0
  128. package/MediaDemo/components/frames/AudioFrame.vue +39 -0
  129. package/MediaDemo/components/frames/AudioPoster.vue +48 -0
  130. package/MediaDemo/components/frames/MediaFrame.vue +153 -0
  131. package/MediaDemo/components/frames/VideoFrame.vue +39 -0
  132. package/MetroWidgetDemos/Advanced/ButtonItem.vue +4 -4
  133. package/MetroWidgetDemos/Advanced/widgets/Item.vue +5 -5
  134. package/MetroWidgetDemos/Advanced/widgets/WidgetItem.vue +2 -2
  135. package/MetroWidgetDemos/Advanced/widgets/Widgets.vue +57 -56
  136. package/MetroWidgetDemos/Item.vue +4 -5
  137. package/MetroWidgetDemos/PerformanceTest/App.vue +3 -3
  138. package/MetroWidgetDemos/PerformanceTest/components/ContentItem.vue +26 -26
  139. package/MetroWidgetDemos/PerformanceTest/components/MyTab.vue +15 -15
  140. package/MetroWidgetDemos/PingPong/AppPage.vue +2 -2
  141. package/MetroWidgetDemos/PingPong/TabItem.vue +2 -2
  142. package/MetroWidgetDemos/PingPong/ViewSwiper.vue +9 -9
  143. package/MetroWidgetDemos/Simple/RelativeTemplate.vue +2 -2
  144. package/MetroWidgetDemos/WidgetItem.vue +2 -2
  145. package/NinePatchDemo/App.vue +3 -3
  146. package/NinePatchDemo/Item.vue +5 -5
  147. package/Preload/App.vue +5 -5
  148. package/Preload/Item.vue +1 -1
  149. package/QrcodeDemo/App.vue +3 -3
  150. package/ScaleDownNeon/App.vue +9 -9
  151. package/SoundPool/App.vue +6 -9
  152. package/SprayView/App.vue +22 -22
  153. package/SpriteImage/App.vue +4 -4
  154. package/Swiper/App.vue +2 -8
  155. package/TextBox/App.vue +1 -2
  156. package/TextBox/RenderCenter.vue +16 -16
  157. package/TextBox/RenderLeft.vue +16 -16
  158. package/TextBox/RenderOneLine.vue +12 -12
  159. package/TextBox/RenderRight.vue +16 -16
  160. package/TextShadowDemo/App.vue +4 -4
  161. package/TextureAnimation/App.vue +1 -17
  162. package/TextureAnimation/App2.vue +3 -3
  163. package/TextureSize/App.vue +8 -8
  164. package/ThrowMoveDemo/AccelerateDemo.vue +4 -4
  165. package/ThrowMoveDemo/LRParabolicDemo.vue +4 -4
  166. package/ThrowMoveDemo/TargetDemo.vue +4 -4
  167. package/ThrowMoveDemo/UDParabolicDemo.vue +4 -4
  168. package/TouchSample/App.vue +2 -2
  169. package/TouchSample/Item.vue +2 -2
  170. package/TouchSample/MetroWidgetHorizontal.vue +3 -3
  171. package/TouchSample/MetroWidgetVertical.vue +3 -3
  172. package/TouchSample/TouchContainerHorizontal.vue +2 -2
  173. package/TouchSample/TouchContainerVertical.vue +2 -2
  174. package/TransitPage/App.vue +1 -1
  175. package/VideoDemo/App.vue +4 -4
  176. package/VideoDemo/components/Button.vue +1 -1
  177. package/VideoDemo/components/Controllor.vue +2 -2
  178. package/VideoDemo/components/VideoFrame.vue +1 -1
  179. package/VisibleSensorDemo/App.vue +7 -7
  180. package/assets/bmpDemo.bmp +0 -0
  181. package/assets/jpegDemo.jpeg +0 -0
  182. package/assets/pngDemo.png +0 -0
  183. package/assets/pngNoAlphaDemo.png +0 -0
  184. package/assets/webpDemo.webp +0 -0
  185. package/package.json +6 -1
@@ -6,7 +6,7 @@
6
6
  * @Description: file content
7
7
  -->
8
8
  <script setup>
9
- import { ref, shallowRef } from "vue";
9
+ import { ref } from "vue";
10
10
  import { useRouter, useRoute } from "vue-router";
11
11
  import { LoopType, JsvApic } from "jsview";
12
12
  import catRun from "./assets/animated_webp.webp";
@@ -53,10 +53,10 @@ const ballCallback = {
53
53
  ballPlay.value = false;
54
54
  },
55
55
  };
56
- let catRunRef = shallowRef(null);
57
- let girlRunRef = shallowRef(null);
58
- let quanRef = shallowRef(null);
59
- let ballRef = shallowRef(null);
56
+ let catRunRef = ref(null);
57
+ let girlRunRef = ref(null);
58
+ let quanRef = ref(null);
59
+ let ballRef = ref(null);
60
60
 
61
61
  const onKeyDown = (ev) => {
62
62
  if (ev.keyCode == 8 || ev.keyCode == 27 || ev.keyCode == 10000) {
@@ -187,7 +187,7 @@ const onKeyDown = (ev) => {
187
187
  width: 1180,
188
188
  textAlign: 'center',
189
189
  color: '#000000',
190
- fontSize: '30px',
190
+ fontSize: 30,
191
191
  }"
192
192
  >
193
193
  {{ `(按键可进行停止/重播操作)` }}
@@ -198,10 +198,10 @@ const onKeyDown = (ev) => {
198
198
 
199
199
  <style scoped>
200
200
  .text {
201
- font-size: 25px;
202
- height: 68px;
203
- line-height: 34px;
201
+ font-size: 25;
202
+ height: 68;
203
+ line-height: 34;
204
204
  color: #000000;
205
205
  text-align: center;
206
206
  }
207
- </style>
207
+ </style>
package/Basic/App.vue CHANGED
@@ -15,7 +15,7 @@
15
15
  * <div style={{width:200, height:200, backgroundColor: 'rgba(255, 255, 0, 1)'}}>
16
16
  * 描绘图片时,通过backgroundImage来设置,例如
17
17
  * <div style={{width:200, height:200, backgroundColor:`url(${iconImgPath})`}}>
18
- * 注意,不设置width和height的情况是默认尺寸为0px * 0px,不会展示图片
18
+ * 注意,不设置width和height的情况是默认尺寸为0 * 0,不会展示图片
19
19
  *
20
20
  * Q: 如何对图片进行剪切,只展示图片的局部内容?
21
21
  * A: 参照div/DivClip,使用style中的overflow:"hidden"属性进行裁剪,或者使用style中clipPath属性进行裁剪
@@ -1,16 +1,16 @@
1
1
 
2
2
  .title-font {
3
3
  font-family: 黑体;
4
- font-size: 16px;
4
+ font-size: 16;
5
5
  }
6
6
 
7
7
  .container-font {
8
8
  color: #FFFFFF;
9
9
  font-family: 黑体;
10
- font-size: 16px;
10
+ font-size: 16;
11
11
  }
12
12
 
13
13
  .content-font {
14
14
  font-family: 黑体;
15
- font-size: 12px;
15
+ font-size: 12;
16
16
  }
@@ -65,7 +65,7 @@ const itemStyle = {
65
65
  <style>
66
66
  @keyframes AnimTranslate {
67
67
  from {
68
- transform: translate3d(50%, 50px, 0);
68
+ transform: translate3d(50%, 50, 0);
69
69
  }
70
70
  to {
71
71
  transform: translate3d(0, 0, 0);
@@ -33,7 +33,7 @@ const itemStyle = {
33
33
  <style>
34
34
  @keyframes AnimComposite1 {
35
35
  from {
36
- transform: translate3d(50%, 30px, 0) scale3d(1.5, 1.5, 1)
36
+ transform: translate3d(50%, 30, 0) scale3d(1.5, 1.5, 1)
37
37
  rotate3d(1.5, 1, 1, 90deg) skew(30deg, 45deg);
38
38
  }
39
39
  to {
@@ -42,7 +42,7 @@ const itemStyle = {
42
42
 
43
43
  @keyframes AnimComposite2 {
44
44
  from {
45
- transform: translate3d(50%, 30px, 0) scale3d(1.5, 1.5, 1)
45
+ transform: translate3d(50%, 30, 0) scale3d(1.5, 1.5, 1)
46
46
  rotate3d(1.5, 1, 0, 90deg) skew(30deg, 45deg);
47
47
  opacity: 0.1;
48
48
  }
@@ -28,19 +28,19 @@ const changeState = () => {
28
28
  setTimeout(() => {
29
29
  // 状态变更
30
30
  state.transform =
31
- "translate3d(80px,0px,0) scale3d(2,2,1.0) rotate3d(0, 0, 1, 360deg)";
31
+ "translate3d(80,0,0) scale3d(2,2,1.0) rotate3d(0, 0, 1, 360deg)";
32
32
  state.transformOrigin = "center center";
33
33
  state.transformScale = "scale3d(0.2,0.2,1.0)";
34
34
  state.transformRotate = "rotate3d(0, 0, 1.0, 360deg)";
35
- state.transformTranslate = "translate3d(180px,0px,0)";
35
+ state.transformTranslate = "translate3d(180,0,0)";
36
36
  // 状态变更
37
37
  setTimeout(() => {
38
38
  state.transform =
39
- "translate3d(30px,0px,0) scale3d(0.2,0.2,1.0) rotate3d(0, 0, 1, -360deg)";
39
+ "translate3d(30,0,0) scale3d(0.2,0.2,1.0) rotate3d(0, 0, 1, -360deg)";
40
40
  state.transformOrigin = "center center";
41
41
  state.transformScale = "scale3d(1.2,1.2,1.0)";
42
42
  state.transformRotate = "rotate3d(0, 0, 1.0, -360deg)";
43
- state.transformTranslate = "translate3d(-80px,0px,0)";
43
+ state.transformTranslate = "translate3d(-80,0,0)";
44
44
  }, 3000);
45
45
  }, 3000);
46
46
  };
@@ -112,45 +112,6 @@ const clipSize = {
112
112
  </div>
113
113
  </div>
114
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
115
  </div>
155
116
  </template>
156
117
 
@@ -7,7 +7,7 @@ defineProps({
7
7
  <template>
8
8
  <div>
9
9
  <div>
10
- <div :class="jsvclass" jsv-inherit-class="2">
10
+ <div :class="jsvclass" data-jsv-extend-class-attr="2">
11
11
  Scoped CSS穿透, 此处的属性是Container设进来的.
12
12
  </div>
13
13
  </div>
@@ -3,6 +3,7 @@
3
3
  <div
4
4
  class="content-font"
5
5
  :style="{ width: 70, height: 25, backgroundColor: 'rgba(0, 255, 0, 1)' }"
6
+ @load.jsvoption="onJsvEventCallback"
6
7
  >
7
8
  坐标未设
8
9
  </div>
@@ -51,7 +52,7 @@
51
52
  </template>
52
53
 
53
54
  <script setup>
54
- import { ref, shallowRef, onUnmounted } from 'vue'
55
+ import { ref, onUnmounted } from 'vue'
55
56
 
56
57
  // v-show 控制
57
58
  let vShow = ref(false);
@@ -63,6 +64,10 @@ onUnmounted(() => {
63
64
  clearInterval(loopVShow);
64
65
  });
65
66
 
67
+ function onJsvEventCallback() {
68
+ console.error('Event jsview options example of writing, never be called.');
69
+ }
70
+
66
71
  </script>
67
72
 
68
73
  <style>
@@ -15,7 +15,7 @@ const gap = 5;
15
15
  width: blockSize.width,
16
16
  height: blockSize.height,
17
17
  backgroundColor: 'rgba(255, 255, 0, 1)',
18
- borderRadius: '10px',
18
+ borderRadius: 10,
19
19
  }"
20
20
  >
21
21
  各角相同
@@ -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 10px 20px 30px',
30
+ borderRadius: '0 10 20 30',
31
31
  }"
32
32
  >
33
33
  各角不同
@@ -39,7 +39,7 @@ const gap = 5;
39
39
  width: blockSize.width,
40
40
  height: blockSize.height,
41
41
  backgroundImage: `url(${iconImgPath})`,
42
- borderRadius: '10px',
42
+ borderRadius: 10,
43
43
  }"
44
44
  >
45
45
  各角相同
@@ -52,7 +52,7 @@ const gap = 5;
52
52
  width: blockSize.width,
53
53
  height: blockSize.height,
54
54
  backgroundImage: `url(${iconImgPath})`,
55
- borderRadius: '0 10px 20px 30px',
55
+ borderRadius: '0 10 20 30',
56
56
  }"
57
57
  >
58
58
  各角不同
@@ -1,6 +1,6 @@
1
1
  <template>
2
2
  <div id='item-root'>
3
- <ContentBlock :class=contentClass :style="{top:itemSides.height*0}" :=contentBlockProps :index=0 title="图片显示">
3
+ <ContentBlock :class=contentClass :style="{top:itemSides.height*0}" :=contentBlockProps :index=0 title="img标签ObjectFit">
4
4
  <ImgLayout/>
5
5
  </ContentBlock>
6
6
  </div>
@@ -23,7 +23,7 @@ export default {
23
23
  contentBlockProps() {
24
24
  return {
25
25
  colIndex: 0,
26
- itemSides: this.itemSides
26
+ itemSides:{...this.itemSides, height: this.itemSides.height * 2}
27
27
  }
28
28
  }
29
29
  }
@@ -1,13 +1,54 @@
1
1
  <template>
2
2
  <div id='layout-root'>
3
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"/>
4
+ <div id="0列0行" :style="{left: coloumWidth * 0, top: tabLineHeight * 0}">
5
+ <div class="content-font titleStyle"> fill(缩放变形)</div>
6
+ <div class="frameStyle">
7
+ <img class="imageStyle" :style="{ objectFit: 'fill' }"
8
+ :src="testImgPath"/>
9
+ </div>
10
+ </div>
11
+ <div id="1列0行" :style="{left: coloumWidth * 1, top: tabLineHeight * 0}">
12
+ <div class="content-font titleStyle">contain</div>
13
+ <div class="frameStyle">
14
+ <img class="imageStyle" :style="{ objectFit: 'contain' }"
15
+ :src="testImgPath"/>
16
+ </div>
17
+ </div>
18
+ <div id="0列1行" :style="{left: coloumWidth * 0, top: tabLineHeight * 1}">
19
+ <div class="content-font titleStyle">none</div>
20
+ <div class="frameStyle">
21
+ <img class="imageStyle" :style="{ objectFit: 'none' }"
22
+ :src="testImgPath"/>
23
+ </div>
24
+ </div>
25
+ <div id="1列1行" :style="{left: coloumWidth * 1, top: tabLineHeight * 1}">
26
+ <div class="content-font titleStyle">scale-down</div>
27
+ <div class="frameStyle">
28
+ <img class="imageStyle" :style="{ objectFit: 'scale-down' }"
29
+ :src="testImgPath"/>
30
+ </div>
31
+ </div>
32
+ <div id="0列2行" :style="{left: coloumWidth * 0, top: tabLineHeight * 2}">
33
+ <div class="content-font titleStyle">cover</div>
34
+ <div class="frameStyle">
35
+ <img class="imageStyle" :style="{ objectFit: 'cover' }"
36
+ :src="testImgPath"/>
37
+ </div>
38
+ </div>
39
+ <div id="1列2行" :style="{left: coloumWidth * 1, top: tabLineHeight * 2}">
40
+ <div class="content-font titleStyle">none(小图)</div>
41
+ <div class="frameStyle">
42
+ <img class="imageStyle" :style="{ objectFit: 'none' }"
43
+ :src="tinyImgPath"/>
44
+ </div>
45
+ </div>
46
+ <div id="0列3行" :style="{left: coloumWidth * 0, top: tabLineHeight * 3}">
47
+ <div class="content-font titleStyle">scale-down(小图)</div>
48
+ <div class="frameStyle">
49
+ <img class="imageStyle" :style="{ objectFit: 'scale-down' }"
50
+ :src="tinyImgPath"/>
51
+ </div>
11
52
  </div>
12
53
  </div>
13
54
  </div>
@@ -15,21 +56,22 @@
15
56
 
16
57
  <script>
17
58
  import testImgPath from '../../assets/test.jpg';
59
+ import tinyImgPath from '../../assets/icon.png';
18
60
 
19
61
  export default {
20
62
  computed: {
21
63
  testImgPath() {
22
64
  return testImgPath;
23
65
  },
24
- titleHeight() {
25
- return 16;
66
+ tinyImgPath() {
67
+ return tinyImgPath;
26
68
  },
27
- imageSize() {
28
- return {
29
- width: 80,
30
- height: 64,
31
- }
69
+ coloumWidth() {
70
+ return 120;
32
71
  },
72
+ tabLineHeight() {
73
+ return 76; // imageSize.height + 26
74
+ }
33
75
  }
34
76
  }
35
77
 
@@ -38,4 +80,26 @@ export default {
38
80
 
39
81
  <style>
40
82
  @import "../FontStyle.css";
83
+ </style>
84
+
85
+ <style scoped>
86
+ .titleStyle {
87
+ width: 100;
88
+ height: 16;
89
+ }
90
+
91
+ .imageStyle {
92
+ top: 2;
93
+ left: 2;
94
+ width: 100;
95
+ height: 50;
96
+ }
97
+
98
+ .frameStyle {
99
+ top: 16; /* titleHeight */
100
+ width: 104; /* imageSize.width+4 */
101
+ height: 54; /* imageSize.height+4 */
102
+ background-color: rgba(0, 255, 0, 1)
103
+ }
104
+
41
105
  </style>
@@ -82,23 +82,23 @@ const rtlText = "شلؤيثبلاهتنمةىخحضقسفعررصءغئا";
82
82
  @import "../FontStyle.css";
83
83
 
84
84
  .base {
85
- top: 25px;
86
- width: 180px;
87
- height: 30px;
88
- line-height: 30px;
85
+ top: 25;
86
+ width: 180;
87
+ height: 30;
88
+ line-height: 30;
89
89
  background-color: rgba(255, 255, 0, 0.5);
90
90
  color: #ff0000;
91
- font-size: 25px;
91
+ font-size: 25;
92
92
  white-space: nowrap;
93
93
  text-overflow: ellipsis;
94
94
  overflow: hidden;
95
95
  }
96
96
 
97
97
  .explain {
98
- width: 180px;
99
- height: 20px;
100
- line-height: 20px;
101
- font-size: 15px;
98
+ width: 180;
99
+ height: 20;
100
+ line-height: 20;
101
+ font-size: 15;
102
102
  color: #000000;
103
103
  }
104
104
  </style>
@@ -5,12 +5,17 @@
5
5
  width: 300,
6
6
  height: 100,
7
7
  fontSize: 20,
8
+ JsvTextEmoji: 1,
8
9
  }"
9
- jsv_text_emoji="true"
10
10
  >
11
11
  {{ `style: 😀笑🇨🇳中国\n👨‍👩‍👧‍👦家庭` }}
12
12
  </div>
13
- <div class="emoji" jsv_text_emoji="true">
13
+ <div
14
+ class="emoji"
15
+ :style="{
16
+ JsvTextEmoji: 1,
17
+ }"
18
+ >
14
19
  {{ `class: 😀笑🇨🇳中国\n👨‍👩‍👧‍👦家庭` }}
15
20
  </div>
16
21
  </div>
@@ -34,8 +34,8 @@ const blockStyle = {
34
34
  width: blockStyle.width + 30,
35
35
  height: 28,
36
36
  fontFamily: '黑体',
37
- fontSize: '24px',
38
- WebkitTextStroke: '1px rgba(255,255,0,1.0)',
37
+ fontSize: 24,
38
+ WebkitTextStroke: '1 rgba(255,255,0,1.0)',
39
39
  }"
40
40
  >
41
41
  abc描边
@@ -62,7 +62,7 @@ const blockStyle = {
62
62
 
63
63
  <div :style="{ top: 75 }">
64
64
  <div class="content-font" :style="{ ...blockStyle }">[其他]</div>
65
- <div :style="{ top: 25, width: 130, height: 35, fontSize: '30px' }">
65
+ <div :style="{ top: 25, width: 130, height: 35, fontSize: 30 }">
66
66
  abc字号
67
67
  </div>
68
68
  <div
@@ -73,7 +73,7 @@ const blockStyle = {
73
73
  height: 35,
74
74
  color: 'rgba(255, 0, 0, 1)',
75
75
  fontFamily: 'sans-serif',
76
- fontSize: '30px',
76
+ fontSize: 30,
77
77
  fontStyle: 'italic',
78
78
  fontWeight: 'bold',
79
79
  }"
@@ -38,7 +38,7 @@ const contentBlockProps = {
38
38
  <ContentBlock
39
39
  :class="contentClass"
40
40
  :style="{ top: itemSides.height * 2 }"
41
- :="{ ...contentBlockProps, itemSides: { ...itemSides, height: 320 } }"
41
+ :="{ ...contentBlockProps, itemSides: { ...itemSides, height: 290 } }"
42
42
  :index="2"
43
43
  title="文字折行"
44
44
  >
@@ -1,7 +1,7 @@
1
1
  <script setup>
2
2
  import ContentBlock from "../ContentBlock.vue";
3
3
  import TextEmoji from "./TextEmoji.vue";
4
- import TextDirection from "./TextDirection.vue";
4
+ import TextDirection from "./TextDirection.vue"
5
5
 
6
6
  const props = defineProps({
7
7
  contentClass: String,
@@ -20,7 +20,7 @@ const contentBlockProps = {
20
20
  :style="{ top: itemSides.height * 0 }"
21
21
  :="contentBlockProps"
22
22
  :index="0"
23
- title="emoji"
23
+ title="文字对齐"
24
24
  >
25
25
  <TextEmoji />
26
26
  </ContentBlock>
@@ -87,8 +87,8 @@ const onKeyDown = (ev) => {
87
87
  <style scoped>
88
88
  .title {
89
89
  text-align: center;
90
- font-size: 30px;
91
- line-height: 50px;
90
+ font-size: 30;
91
+ line-height: 50;
92
92
  color: #ffffff;
93
93
  left: 100;
94
94
  top: 50;
@@ -1,5 +1,5 @@
1
1
  <script setup>
2
- import { ref, shallowRef, onMounted } from "vue";
2
+ import { ref, onMounted } from "vue";
3
3
  const props = defineProps({
4
4
  name: String,
5
5
  style: {
@@ -12,7 +12,7 @@ const props = defineProps({
12
12
  });
13
13
 
14
14
  const fullName = ref("");
15
- const blockRef = shallowRef(null);
15
+ const blockRef = ref(null);
16
16
  const hasFocused = ref(false);
17
17
 
18
18
  onMounted(() => {
@@ -66,8 +66,8 @@ const onFocus = () => {
66
66
  <style scoped>
67
67
  .title {
68
68
  text-align: center;
69
- font-size: 30px;
70
- line-height: 50px;
69
+ font-size: 30;
70
+ line-height: 50;
71
71
  color: #ffffff;
72
72
  left: 100;
73
73
  top: 50;
@@ -41,8 +41,8 @@ const onKeyDown = (ev) => {
41
41
  <style scoped>
42
42
  .title {
43
43
  text-align: center;
44
- font-size: 30px;
45
- line-height: 50px;
44
+ font-size: 30;
45
+ line-height: 50;
46
46
  color: #ffffff;
47
47
  left: 100;
48
48
  top: 50;
package/Collision/App.vue CHANGED
@@ -7,21 +7,21 @@
7
7
  -->
8
8
  <script setup>
9
9
  import { createImpactTracer, createImpactCallback } from "jsview";
10
- import { ref, shallowRef, onMounted, onBeforeUnmount } from "vue";
10
+ import { ref, onMounted, onBeforeUnmount } from "vue";
11
11
  import { useRouter } from "vue-router";
12
12
 
13
13
  const router = useRouter();
14
14
 
15
- const transEle1 = shallowRef(null),
16
- transEle2 = shallowRef(null),
17
- rotateEle1 = shallowRef(null),
18
- rotateEle2 = shallowRef(null),
19
- rotateEle3 = shallowRef(null),
20
- rotateEle4 = shallowRef(null),
21
- scaleEle1 = shallowRef(null),
22
- scaleEle2 = shallowRef(null),
23
- skewEle1 = shallowRef(null),
24
- skewEle2 = shallowRef(null);
15
+ const transEle1 = ref(null),
16
+ transEle2 = ref(null),
17
+ rotateEle1 = ref(null),
18
+ rotateEle2 = ref(null),
19
+ rotateEle3 = ref(null),
20
+ rotateEle4 = ref(null),
21
+ scaleEle1 = ref(null),
22
+ scaleEle2 = ref(null),
23
+ skewEle1 = ref(null),
24
+ skewEle2 = ref(null);
25
25
 
26
26
  let sensors = [];
27
27
 
@@ -164,8 +164,8 @@ onBeforeUnmount(() => {
164
164
  <div
165
165
  :style="{
166
166
  textAlign: 'center',
167
- fontSize: '30px',
168
- lineHeight: '50px',
167
+ fontSize: 30,
168
+ lineHeight: 50,
169
169
  color: '#ffffff',
170
170
  left: 100,
171
171
  top: 20,
@@ -348,7 +348,7 @@ onBeforeUnmount(() => {
348
348
  transform: translate3d(0, 0, 0) scale3d(0.5, 0.5, 1);
349
349
  }
350
350
  to {
351
- transform: translate3d(-300px, 0, 0) scale3d(1.5, 1.5, 1);
351
+ transform: translate3d(-300, 0, 0) scale3d(1.5, 1.5, 1);
352
352
  }
353
353
  }
354
354
 
@@ -357,7 +357,7 @@ onBeforeUnmount(() => {
357
357
  transform: translate3d(0, 0, 0) scale3d(0.5, 0.5, 1);
358
358
  }
359
359
  to {
360
- transform: translate3d(300px, 0, 0) scale3d(1.5, 1.5, 1);
360
+ transform: translate3d(300, 0, 0) scale3d(1.5, 1.5, 1);
361
361
  }
362
362
  }
363
363
 
@@ -449,4 +449,4 @@ onBeforeUnmount(() => {
449
449
  transform-origin: center center;
450
450
  }
451
451
  }
452
- </style>
452
+ </style>