@shijiu/jsview-vue-samples 1.9.887 → 1.9.915

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 +4 -4
  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 +1 -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 +20 -12
  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 +3 -3
  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
@@ -0,0 +1,124 @@
1
+ // const data = [
2
+ // {
3
+ // blocks: {
4
+ // w: 200,
5
+ // h: 160
6
+ // },
7
+ // focusable: true,
8
+ // color: "#000022",
9
+ // content: 0
10
+ // },
11
+ // {
12
+ // blocks: {
13
+ // w: 200,
14
+ // h: 160
15
+ // },
16
+ // focusable: true,
17
+ // color: "#003300",
18
+ // content: 1
19
+ // },
20
+ // {
21
+ // blocks: {
22
+ // w: 200,
23
+ // h: 160
24
+ // },
25
+ // focusable: true,
26
+ // color: "#000044",
27
+ // content: 2
28
+ // },
29
+ // {
30
+ // blocks: {
31
+ // w: 400,
32
+ // h: 320
33
+ // },
34
+ // focusable: true,
35
+ // color: "#000055",
36
+ // content: 3
37
+ // },
38
+ // {
39
+ // blocks: {
40
+ // w: 200,
41
+ // h: 160
42
+ // },
43
+ // focusable: true,
44
+ // color: "#000066",
45
+ // content: 4
46
+ // },
47
+ // {
48
+ // blocks: {
49
+ // w: 200,
50
+ // h: 160
51
+ // },
52
+ // focusable: true,
53
+ // color: "#0000CD",
54
+ // content: 5
55
+ // },
56
+ // ];
57
+
58
+ // let content = 6;
59
+ // for (let i = 0; i < 10; i++) {
60
+ // data.push({
61
+ // blocks: {
62
+ // w: 200,
63
+ // h: 320
64
+ // },
65
+ // focusable: true,
66
+ // color: "#000022",
67
+ // content: content++
68
+ // });
69
+ // data.push({
70
+ // blocks: {
71
+ // w: 200,
72
+ // h: 160
73
+ // },
74
+ // focusable: true,
75
+ // color: "#003300",
76
+ // content: content++
77
+ // });
78
+ // }
79
+
80
+ let data1 = [];
81
+
82
+ // 添加300个模拟数据
83
+ for (let i = 0; i < 50; i++) {
84
+ data1.push(Object.freeze({
85
+ index: i,
86
+ name: `商品:骆驼奶粉蛋白质粉,限时抢购,立刻发货,序号:${i}`,
87
+ prize: `${Math.floor(Math.random() * 200) +
88
+ 200}` /* 测试数据要保证比最高优惠券(300左右)要高 */,
89
+ savePrize: `${i}`,
90
+ soldTotal: `${Math.floor(Math.random() * 50000)}`,
91
+ pictUrl:
92
+ "http://img.alicdn.com/bao/uploaded/i3/2207313464483/O1CN01Ab4vWz1izGAyRL1Yf_!!0-item_pic.jpg",
93
+ }));
94
+ }
95
+
96
+ let data2 = [];
97
+ for (let i = 0; i < 49; i++) {
98
+ data2.push(Object.freeze({
99
+ index: i,
100
+ name: `商品:骆驼奶粉蛋白质粉,限时抢购,立刻发货,序号:${i}`,
101
+ prize: `${Math.floor(Math.random() * 200) +
102
+ 200}` /* 测试数据要保证比最高优惠券(300左右)要高 */,
103
+ savePrize: `${i}`,
104
+ soldTotal: `${Math.floor(Math.random() * 50000)}`,
105
+ pictUrl:
106
+ "http://img.alicdn.com/bao/uploaded/i3/2207313464483/O1CN01Ab4vWz1izGAyRL1Yf_!!0-item_pic.jpg",
107
+ }));
108
+ }
109
+
110
+ let data3 = [];
111
+ for (let i = 0; i < 48; i++) {
112
+ data3.push(Object.freeze({
113
+ index: i,
114
+ name: `商品:骆驼奶粉蛋白质粉,限时抢购,立刻发货,序号:${i}`,
115
+ prize: `${Math.floor(Math.random() * 200) +
116
+ 200}` /* 测试数据要保证比最高优惠券(300左右)要高 */,
117
+ savePrize: `${i}`,
118
+ soldTotal: `${Math.floor(Math.random() * 50000)}`,
119
+ pictUrl:
120
+ "http://img.alicdn.com/bao/uploaded/i3/2207313464483/O1CN01Ab4vWz1izGAyRL1Yf_!!0-item_pic.jpg",
121
+ }));
122
+ }
123
+
124
+ export { data1, data2, data3 };
@@ -0,0 +1,28 @@
1
+ <!--
2
+ * @Author: ChenChanghua
3
+ * @Date: 2022-01-14 18:18:00
4
+ * @LastEditors: ChenChanghua
5
+ * @LastEditTime: 2022-01-26 17:35:26
6
+ * @Description: file content
7
+ -->
8
+ <script>
9
+ export default {
10
+ props: ["data", "index"],
11
+ created() {},
12
+ mounted() {},
13
+ };
14
+ </script>
15
+
16
+ <template>
17
+ <div
18
+ ref="element"
19
+ :style="{
20
+ left: data.xPos,
21
+ top: data.yPos,
22
+ width: data.width,
23
+ height: data.height,
24
+ }"
25
+ >
26
+ <slot name="renderItem" :data="data.data"></slot>
27
+ </div>
28
+ </template>
@@ -0,0 +1,85 @@
1
+ <!--
2
+ * @Author: ChenChanghua
3
+ * @Date: 2021-09-22 13:47:23
4
+ * @LastEditors: ChenChanghua
5
+ * @LastEditTime: 2022-02-11 17:55:55
6
+ * @Description: file content
7
+ -->
8
+ <script>
9
+ import GridItem from "./GridItem.vue";
10
+
11
+ export default {
12
+ props: {
13
+ data: Object,
14
+ height: {
15
+ type: Number,
16
+ required: true,
17
+ },
18
+ width: {
19
+ type: Number,
20
+ required: true,
21
+ },
22
+ measures: {
23
+ type: Function,
24
+ required: true,
25
+ },
26
+ },
27
+ components: {
28
+ GridItem,
29
+ },
30
+ created() {
31
+ this.configWidth = this.width;
32
+ this.configHeight = this.height;
33
+
34
+ // 通过measure函数,计算item信息
35
+ let measure_result = this.measures();
36
+ let current_line_x = 0;
37
+ let current_line_y = 0;
38
+ for (let idx = 0; idx < this.data.length; idx++) {
39
+ if (current_line_x + measure_result.width > this.configWidth) {
40
+ // new line
41
+ current_line_x = 0;
42
+ current_line_y += measure_result.height;
43
+ }
44
+
45
+ this.itemData.push(
46
+ Object.freeze({
47
+ id: idx,
48
+ xPos: current_line_x,
49
+ yPos: current_line_y,
50
+ data: this.data[idx],
51
+ })
52
+ );
53
+
54
+ // next item x
55
+ current_line_x += measure_result.width;
56
+ }
57
+ },
58
+ setup() {
59
+ return {
60
+ configWidth: 0,
61
+ configHeight: 0,
62
+ itemData: [],
63
+ };
64
+ },
65
+ mounted() {},
66
+ updated() {},
67
+ };
68
+ </script>
69
+
70
+ <template>
71
+ <div
72
+ :style="{ width: configWidth, height: configHeight, overflow: 'hidden' }"
73
+ >
74
+ <grid-item
75
+ v-for="(item, index) in itemData"
76
+ :key="item.id"
77
+ :index="index"
78
+ :data="item"
79
+ >
80
+ <template v-slot:renderItem="slotProps">
81
+ <slot name="renderItem" v-bind="slotProps"></slot>
82
+ </template>
83
+ </grid-item>
84
+ </div>
85
+ </template>
@@ -39,7 +39,7 @@ const item_url =
39
39
 
40
40
  @keyframes opacityDemo_CompositeOpacity {
41
41
  from {
42
- transform: translate3d(50%, 30px, 0) scale3d(1.5, 1.5, 1)
42
+ transform: translate3d(50%, 30, 0) scale3d(1.5, 1.5, 1)
43
43
  rotate3d(1.5, 1, 0, 90deg) skew(30deg, 45deg);
44
44
  opacity: 0.1;
45
45
  }
@@ -49,10 +49,10 @@ const item_url =
49
49
 
50
50
  @keyframes opacityDemo_CompositeNoOpacity {
51
51
  from {
52
- transform: translate3d(50%, 30px, 0) scale3d(1.5, 1.5, 1)
52
+ transform: translate3d(50%, 30, 0) scale3d(1.5, 1.5, 1)
53
53
  rotate3d(1.5, 1, 0, 90deg) skew(30deg, 45deg);
54
54
  }
55
55
  to {
56
56
  }
57
- }
57
+ } ;
58
58
  </style>
@@ -6,11 +6,11 @@
6
6
  * @Description: file content
7
7
  -->
8
8
  <script setup>
9
- import { ref, shallowRef, reactive, onMounted } from "vue";
9
+ import { ref, reactive, onMounted } from "vue";
10
10
  import { useRouter } from "vue-router";
11
11
  import { jJsvRuntimeBridge, JsvFilterView } from "jsview";
12
- import sample from "./jpegDemo.jpeg";
13
- import webpSample from "./webpDemo.webp";
12
+ import sample from "../assets/jpegDemo.jpeg";
13
+ import webpSample from "../assets/webpDemo.webp";
14
14
  import AnimatePic from "./AnimatePic.vue";
15
15
  import VideoLayer from "./VideoLayer.vue";
16
16
 
package/FlipCard/App.vue CHANGED
@@ -1,6 +1,6 @@
1
1
  <script setup>
2
2
  import { useRouter } from "vue-router";
3
- import { ref, shallowRef } from "vue";
3
+ import { ref } from "vue";
4
4
  import { HORIZONTAL, MetroWidget } from "jsview";
5
5
  import FlipCard from "./FlipCard.vue";
6
6
  import { data } from "./data.js";
@@ -8,7 +8,7 @@ import redEgg from "./assets/red_egg.png";
8
8
  import blueEgg from "./assets/blue_egg.png";
9
9
 
10
10
  const name = "/flipCard";
11
- const focusNode = shallowRef(null);
11
+ const focusNode = ref(null);
12
12
  const router = useRouter();
13
13
 
14
14
  const onKeyDown = (ev) => {
@@ -1,5 +1,5 @@
1
1
  <script setup>
2
- import { ref, shallowRef } from "vue";
2
+ import { ref } from "vue";
3
3
  const props = defineProps({
4
4
  initFlipped: Boolean,
5
5
  width: Number,
@@ -18,7 +18,7 @@ let flipAnim = ref("");
18
18
  let flipped = ref(props.initFlipped);
19
19
  let focused = ref(false);
20
20
  let keyLocked = false;
21
- let focusNode = shallowRef(null);
21
+ let focusNode = ref(null);
22
22
 
23
23
  const onFocus = () => {
24
24
  focused.value = true;
package/GridDemo/Item.vue CHANGED
@@ -1,12 +1,12 @@
1
1
  <!--
2
2
  * @Author: ChenChanghua
3
3
  * @Date: 2022-05-10 15:21:24
4
- * @LastEditors: ChenChanghua
5
- * @LastEditTime: 2022-07-08 11:48:32
4
+ * @LastEditors: Please set LastEditors
5
+ * @LastEditTime: 2023-02-16 16:25:06
6
6
  * @Description: file content
7
7
  -->
8
8
  <script setup>
9
- import { ref, shallowRef, onUpdated, onMounted } from "vue";
9
+ import { ref, onUpdated, onMounted } from "vue";
10
10
 
11
11
  const props = defineProps({
12
12
  userData: Object,
@@ -24,16 +24,16 @@ const divNumber = new Array(50);
24
24
  const blurAction = false;
25
25
 
26
26
  const onFocus = () => {
27
- console.log("item onfocus", props.userData);
27
+ // console.log("item onfocus", props.userData);
28
28
  focused.value = true;
29
29
  };
30
30
  const onBlur = () => {
31
- console.log(
32
- "item onblur",
33
- props.userData,
34
- props.widgetData.getCurrentFocusId(),
35
- props.widgetData.dataIndex
36
- );
31
+ // console.log(
32
+ // "item onblur",
33
+ // props.userData,
34
+ // props.widgetData.getCurrentFocusId(),
35
+ // props.widgetData.dataIndex
36
+ // );
37
37
  focused.value = false;
38
38
  };
39
39
  const onClick = () => {
@@ -45,10 +45,10 @@ props.onAction.register("onBlur", onBlur);
45
45
  props.onAction.register("onClick", onClick);
46
46
 
47
47
  onUpdated(() => {
48
- console.log("item updated", props.userData, props.widgetData);
48
+ // console.log("item updated", props.userData, props.widgetData);
49
49
  });
50
50
  onMounted(() => {
51
- console.log("item mounted", props.userData, props.widgetData);
51
+ // console.log("item mounted", props.userData, props.widgetData);
52
52
  });
53
53
  </script>
54
54
 
@@ -67,7 +67,7 @@ onMounted(() => {
67
67
  :style="{
68
68
  width: 100,
69
69
  height: 50,
70
- fontSize: '30px',
70
+ fontSize: 30,
71
71
  color: '#FFFFFF',
72
72
  }"
73
73
  >
@@ -7,7 +7,6 @@ export default {
7
7
 
8
8
  <script setup>
9
9
  import { jJsvRuntimeBridge } from "jsview";
10
- import { router, routeList } from "./router.js";
11
10
  import { useRouter, useRoute } from "vue-router";
12
11
  import { onMounted, ref, shallowRef } from "vue";
13
12
 
@@ -1,5 +1,5 @@
1
1
  <script setup>
2
- import { ref, shallowRef } from "vue";
2
+ import { ref } from "vue";
3
3
  const props = defineProps({
4
4
  style: Object,
5
5
  name: String,
@@ -25,7 +25,7 @@ const itemStyle = {
25
25
  height: props.style.height,
26
26
  backgroundColor: "#0FF000",
27
27
  lineHeight: props.style.height,
28
- fontSize: `${Math.floor(props.style.height * 0.55)}px`,
28
+ fontSize: Math.floor(props.style.height * 0.55),
29
29
  };
30
30
  </script>
31
31
 
@@ -50,7 +50,7 @@ const onBack = () => {
50
50
  top: 100;
51
51
  width: 1280;
52
52
  height: 100;
53
- line-height: 100px;
53
+ line-height: 100;
54
54
  text-align: center;
55
55
  font-size: 55;
56
56
  }
@@ -50,7 +50,7 @@ const onBack = () => {
50
50
  top: 100;
51
51
  width: 1280;
52
52
  height: 100;
53
- line-height: 100px;
53
+ line-height: 100;
54
54
  text-align: center;
55
55
  font-size: 55;
56
56
  }
@@ -59,7 +59,7 @@ const onBack = () => {
59
59
  top: 330;
60
60
  width: 1280;
61
61
  height: 100;
62
- line-height: 100px;
62
+ line-height: 100;
63
63
  text-align: center;
64
64
  font-size: 30;
65
65
  }
@@ -6,7 +6,6 @@
6
6
  * @Description: file content
7
7
  -->
8
8
  <script setup>
9
- import { jJsvRuntimeBridge } from "@shijiu/jsview-vue/utils/JsViewVueTools/JsvRuntimeBridge";
10
9
  import {
11
10
  JsvActorMoveControl,
12
11
  JsvActorMove,
@@ -14,7 +13,7 @@ import {
14
13
  createImpactCallback,
15
14
  createImpactAutoFroze,
16
15
  } from "jsview";
17
- import { ref, shallowRef, computed, onMounted, onBeforeUnmount } from "vue";
16
+ import { shallowRef, computed, onMounted, onBeforeUnmount } from "vue";
18
17
  import { useRouter } from "vue-router";
19
18
  const router = useRouter();
20
19
  const CONST_BOARD_LEFT = 0;
@@ -26,6 +25,7 @@ const CONST_BOX_HEIGHT = 30;
26
25
 
27
26
  const horizontalControl = new JsvActorMoveControl();
28
27
  const verticalControl = new JsvActorMoveControl();
28
+
29
29
  const boxLeft = shallowRef(null);
30
30
  const boxMid = shallowRef(null);
31
31
  const boxRight = shallowRef(null);
@@ -42,9 +42,9 @@ const actorState = {
42
42
  jumping: false,
43
43
  hMoving: false,
44
44
  };
45
- const showPrecisionGuild = ref(true);
46
- const direction = ref(1);
47
- const bodyState = ref(0);
45
+ const showPrecisionGuild = shallowRef(true);
46
+ const direction = shallowRef(1);
47
+ const bodyState = shallowRef(0);
48
48
  const isJsView = Boolean(window.JsView);
49
49
 
50
50
  const actorColor = computed(() => {
@@ -238,8 +238,6 @@ onMounted(() => {
238
238
  );
239
239
 
240
240
  reset();
241
-
242
- jJsvRuntimeBridge.notifyPageLoaded();
243
241
  });
244
242
 
245
243
  onBeforeUnmount(() => {
@@ -263,8 +261,8 @@ onBeforeUnmount(() => {
263
261
  v-if="isJsView"
264
262
  :style="{
265
263
  textAlign: 'center',
266
- fontSize: '30px',
267
- lineHeight: '50px',
264
+ fontSize: 30,
265
+ lineHeight: 50,
268
266
  color: '#ffffff',
269
267
  left: 100,
270
268
  top: 20,
@@ -428,9 +426,9 @@ onBeforeUnmount(() => {
428
426
  }
429
427
 
430
428
  .text {
431
- font-size: 30px;
429
+ font-size: 30;
432
430
  color: #73665c;
433
- line-height: 40px;
431
+ line-height: 40;
434
432
  overflow: hidden;
435
433
  white-space: nowrap;
436
434
  text-overflow: ellipsis;
@@ -1,14 +1,13 @@
1
1
  <!--
2
2
  * @Author: ChenChanghua
3
3
  * @Date: 2022-01-25 10:33:07
4
- * @LastEditors: ChenChanghua
5
- * @LastEditTime: 2022-09-02 13:44:41
4
+ * @LastEditTime: 2023-02-01 13:46:07
6
5
  * @Description: file content
7
6
  -->
8
7
  <script>
9
8
  import FullKeyboard from "./FullKeyboard.vue";
10
9
  import { EdgeDirection, JsvInput, useFocusHub } from "jsview";
11
- import { ref, shallowRef } from "vue";
10
+ import { ref } from "vue";
12
11
 
13
12
  const blurColor = "#AAAAAA";
14
13
  const focusColor = "#FFFF00";
@@ -39,7 +38,6 @@ export default {
39
38
  this.focusHub.setFocus(`${this.name}/keyboard`);
40
39
  },
41
40
  _onBlur() {
42
- console.log("testtest onblur");
43
41
  this.showCursor = false;
44
42
  this.cursorColor = blurColor;
45
43
  },
package/LongImage/App.vue CHANGED
@@ -43,8 +43,8 @@ const onKeyDown = (ev) => {
43
43
  <div
44
44
  :style="{
45
45
  textAlign: 'center',
46
- fontSize: '30px',
47
- lineHeight: '50px',
46
+ fontSize: 30,
47
+ lineHeight: 50,
48
48
  color: '#ffffff',
49
49
  left: 100,
50
50
  top: 20,
@@ -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 { HORIZONTAL, MetroWidget, EdgeDirection, useFocusHub } from "jsview";
11
11
  import ButtonItem from "./ButtonItem.vue";
12
12
 
@@ -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
 
11
11
  const props = defineProps({
12
12
  data: Object,
package/LongText/App.vue CHANGED
@@ -27,7 +27,7 @@
27
27
  import LongTextScroll from "./LongTextScroll.vue";
28
28
  import Button from "./Button.vue";
29
29
  import { jJsvRuntimeBridge } from "jsview";
30
- import { onMounted, ref, shallowRef } from "vue";
30
+ import { onMounted, ref } from "vue";
31
31
  import { useRouter } from "vue-router";
32
32
 
33
33
  const router = useRouter();
@@ -55,8 +55,8 @@ onMounted(() => {
55
55
  <div
56
56
  :style="{
57
57
  textAlign: 'center',
58
- fontSize: '30px',
59
- lineHeight: '50px',
58
+ fontSize: 30,
59
+ lineHeight: 50,
60
60
  color: '#ffffff',
61
61
  left: 140,
62
62
  top: 20,
@@ -1,5 +1,5 @@
1
1
  <script setup>
2
- import { ref, shallowRef } from "vue";
2
+ import { ref } from "vue";
3
3
  import { HORIZONTAL, MetroWidget, EdgeDirection, useFocusHub } from "jsview";
4
4
  import ButtonItem from "./ButtonItem.vue";
5
5
 
@@ -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
 
11
11
  const props = defineProps({
12
12
  data: Object,
@@ -1,6 +1,6 @@
1
1
  <script setup>
2
2
  import Scroll from "./Scroll.vue";
3
- import { ref, shallowRef, onMounted } from "vue";
3
+ import { ref, onMounted } from "vue";
4
4
 
5
5
  const props = defineProps({
6
6
  step: Number,
@@ -10,8 +10,8 @@ const props = defineProps({
10
10
  textStyle: Object,
11
11
  });
12
12
 
13
- const rootRef = shallowRef(null);
14
- const element = shallowRef(null);
13
+ const rootRef = ref(null);
14
+ const element = ref(null);
15
15
  const scrollY = ref(0);
16
16
  const textY = ref(0);
17
17
 
@@ -77,7 +77,7 @@ onMounted(() => {
77
77
  name="longTextScroll"
78
78
  :onAction="onAction"
79
79
  >
80
- <div :style="{ clipPath: 'inset(0px 0px 0px 0px)', ...style }">
80
+ <div :style="{ overflow: 'hidden', ...style }">
81
81
  <div
82
82
  ref="element"
83
83
  :style="{ top: textY, width: style.width, ...textStyle }"
@@ -1,8 +1,6 @@
1
1
  /*
2
2
  * @Author: ChenChanghua
3
3
  * @Date: 2022-11-10 15:08:28
4
- * @LastEditors: ChenChanghua
5
- * @LastEditTime: 2022-11-21 17:47:57
6
4
  * @Description: file content
7
5
  */
8
6
  const longLongText =
package/MaskClip/App.vue CHANGED
@@ -45,7 +45,7 @@ onMounted(() => {
45
45
  width: 1200,
46
46
  height: 100,
47
47
  color: '#FFFFFF',
48
- fontSize: '30px',
48
+ fontSize: 30,
49
49
  }"
50
50
  >
51
51
  原始图片通过四个拼图形状的遮罩切成四种形状以形成拼图效果
@@ -53,8 +53,8 @@ onMounted(() => {
53
53
  <div
54
54
  :style="{
55
55
  textAlign: 'center',
56
- fontSize: '30px',
57
- lineHeight: '50px',
56
+ fontSize: 30,
57
+ lineHeight: 50,
58
58
  color: '#ffffff',
59
59
  left: 10,
60
60
  top: 100,
@@ -119,4 +119,4 @@ onMounted(() => {
119
119
  </div>
120
120
  </div>
121
121
  </jsv-focus-block>
122
- </template>
122
+ </template>