@shijiu/jsview-vue 0.9.684 → 0.9.783

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 (154) hide show
  1. package/dom/bin/jsview-browser-debug-dom.min.js +1 -1
  2. package/dom/bin/jsview-dom.min.js +1 -1
  3. package/dom/bin/jsview-engine-js-browser.min.js +1 -1
  4. package/dom/bin/jsview-forge-define.min.js +1 -1
  5. package/dom/jsv-engine-js-browser.js +6 -0
  6. package/dom/target_core_revision.js +4 -4
  7. package/loader/loader.js +4 -0
  8. package/package.json +1 -1
  9. package/patches/node_modules/@vue/cli-service/lib/config/base.js +1 -1
  10. package/samples/AnimPicture/App.vue +5 -5
  11. package/samples/Basic/components/div/DivLayout.vue +1 -1
  12. package/samples/Basic/components/img/ImageGroup.vue +2 -2
  13. package/samples/Basic/components/img/ImgLayout.vue +79 -15
  14. package/samples/Basic/components/text/TextDirection.vue +104 -0
  15. package/samples/Basic/components/text/TextEmoji.vue +1 -1
  16. package/samples/Basic/components/text/TextGroup1.vue +1 -1
  17. package/samples/Basic/components/text/TextGroup2.vue +11 -1
  18. package/samples/BasicFocusControl/components/BaseBlock.vue +2 -2
  19. package/samples/Collision/App.vue +11 -11
  20. package/samples/DemoHomepage/App.vue +67 -8
  21. package/samples/DemoHomepage/components/TabFrame.vue +7 -0
  22. package/samples/DemoHomepage/router.js +27 -26
  23. package/samples/DemoHomepage/views/Homepage.vue +89 -98
  24. package/samples/FilterDemo/App.vue +1 -1
  25. package/samples/FlipCard/App.vue +2 -2
  26. package/samples/FlipCard/FlipCard.vue +3 -3
  27. package/samples/FocusBlockDemos/AutoFocus/App.vue +51 -0
  28. package/samples/FocusBlockDemos/AutoFocus/BaseBlock.vue +82 -0
  29. package/samples/FocusBlockDemos/AutoFocus/DialogBlock.vue +89 -0
  30. package/samples/FocusBlockDemos/AutoFocus/DialogContorls.js +42 -0
  31. package/samples/FocusBlockDemos/AutoFocus/FocusNamesDefine.js +9 -0
  32. package/samples/FocusBlockDemos/AutoFocus/PlaneBlock.vue +71 -0
  33. package/samples/FocusBlockDemos/ProgressiveFocusControl/App.vue +78 -0
  34. package/samples/FocusBlockDemos/ProgressiveFocusControl/BaseBlock.vue +77 -0
  35. package/samples/FocusBlockDemos/ProgressiveFocusControl/DownPlaneBlock.vue +83 -0
  36. package/samples/FocusBlockDemos/ProgressiveFocusControl/FocusNamesDefine.js +12 -0
  37. package/samples/FocusBlockDemos/ProgressiveFocusControl/UpPlaneBlock.vue +83 -0
  38. package/samples/GridDemo/App.vue +3 -3
  39. package/samples/GridDemo/ButtonBlock.vue +2 -2
  40. package/samples/GridDemo/FocusItem.vue +2 -2
  41. package/samples/GridDemo/Item.vue +1 -1
  42. package/samples/HashHistory/App.vue +10 -3
  43. package/samples/HashHistory/components/Item.vue +1 -1
  44. package/samples/ImpactStop/App.vue +15 -11
  45. package/samples/Input/InputPanel.vue +1 -1
  46. package/samples/LongImage/Button.vue +1 -1
  47. package/samples/LongImage/ButtonItem.vue +1 -1
  48. package/samples/LongImage/LongImageScroll.vue +2 -2
  49. package/samples/LongText/App.vue +1 -1
  50. package/samples/LongText/Button.vue +1 -1
  51. package/samples/LongText/ButtonItem.vue +1 -1
  52. package/samples/LongText/LongTextScroll.vue +3 -3
  53. package/samples/Marquee/App.vue +34 -3
  54. package/samples/Marquee/longText.js +2 -2
  55. package/samples/MetroWidgetDemos/PerformanceTest/App.vue +4 -4
  56. package/samples/MetroWidgetDemos/PerformanceTest/components/ContentItem.vue +1 -1
  57. package/samples/MetroWidgetDemos/PerformanceTest/components/MyTab.vue +3 -3
  58. package/samples/MetroWidgetDemos/PingPong/App.vue +22 -11
  59. package/samples/MetroWidgetDemos/PingPong/AppPage.vue +5 -5
  60. package/samples/MetroWidgetDemos/{Item.vue → PingPong/Item.vue} +3 -21
  61. package/samples/MetroWidgetDemos/PingPong/TabItem.vue +1 -1
  62. package/samples/MetroWidgetDemos/PingPong/ViewSwiper.vue +5 -5
  63. package/samples/MetroWidgetDemos/{WidgetItem.vue → PingPong/WidgetItem.vue} +8 -4
  64. package/samples/MetroWidgetDemos/basic/App.vue +162 -0
  65. package/samples/MetroWidgetDemos/basic/Item.vue +43 -0
  66. package/samples/MetroWidgetDemos/direction/App.vue +158 -0
  67. package/samples/MetroWidgetDemos/direction/Item.vue +45 -0
  68. package/samples/MetroWidgetDemos/focusableItemBasic/App.vue +67 -0
  69. package/samples/MetroWidgetDemos/{Advanced → focusableItemBasic}/ButtonItem.vue +17 -21
  70. package/samples/MetroWidgetDemos/focusableItemMetroWidget/App.vue +74 -0
  71. package/samples/MetroWidgetDemos/{Advanced/widgets → focusableItemMetroWidget}/Item.vue +13 -32
  72. package/samples/MetroWidgetDemos/{Advanced/widgets → focusableItemMetroWidget}/WidgetItem.vue +12 -12
  73. package/samples/MetroWidgetDemos/focusableItemMix/App.vue +88 -0
  74. package/samples/MetroWidgetDemos/focusableItemMix/ButtonItem.vue +86 -0
  75. package/samples/MetroWidgetDemos/focusableItemMix/Item.vue +43 -0
  76. package/samples/MetroWidgetDemos/index.js +6 -0
  77. package/samples/MetroWidgetDemos/layoutType/App.vue +180 -0
  78. package/samples/MetroWidgetDemos/layoutType/Item.vue +45 -0
  79. package/samples/MetroWidgetDemos/padding/App.vue +222 -0
  80. package/samples/MetroWidgetDemos/padding/Item.vue +64 -0
  81. package/samples/MetroWidgetDemos/routeList.js +64 -0
  82. package/samples/MetroWidgetDemos/slideSetting/App.vue +225 -0
  83. package/samples/MetroWidgetDemos/slideSetting/Item.vue +45 -0
  84. package/samples/NinePatchDemo/App.vue +78 -122
  85. package/samples/NinePatchDemo/Item.vue +29 -27
  86. package/samples/Preload/App.vue +1 -1
  87. package/samples/Preload/Item.vue +1 -1
  88. package/samples/QrcodeDemo/App.vue +1 -1
  89. package/samples/SoundPool/App.vue +3 -3
  90. package/samples/SpriteImage/App.vue +5 -0
  91. package/samples/Swiper/App.vue +148 -0
  92. package/samples/TextBox/App.vue +2 -1
  93. package/samples/TextureAnimation/App2.vue +1 -1
  94. package/samples/ThrowMoveDemo/LRParabolicDemo.vue +33 -47
  95. package/samples/TouchSample/MetroWidgetHorizontal.vue +1 -1
  96. package/samples/TouchSample/MetroWidgetVertical.vue +1 -1
  97. package/samples/TransitPage/App.vue +1 -1
  98. package/samples/VideoDemo/App.vue +8 -8
  99. package/samples/VideoDemo/components/Button.vue +1 -1
  100. package/samples/VideoDemo/components/Controllor.vue +1 -1
  101. package/samples/VisibleSensorDemo/App.vue +3 -3
  102. package/scripts/jsview-run-android.js +5 -4
  103. package/utils/JsViewEngineWidget/JsvFocusBlock.vue +4 -4
  104. package/utils/JsViewEngineWidget/MetroWidget/MetroWidget.vue +79 -50
  105. package/utils/JsViewEngineWidget/TemplateParser.js +144 -147
  106. package/utils/JsViewEngineWidget/WidgetCommon.js +12 -3
  107. package/utils/JsViewPlugin/BrowserPluginLoader.js +4 -2
  108. package/utils/JsViewPlugin/JsvAudio/AudioProxy.js +302 -0
  109. package/utils/JsViewPlugin/JsvAudio/CheckType.js +68 -0
  110. package/utils/JsViewPlugin/JsvAudio/Events.js +17 -0
  111. package/utils/JsViewPlugin/JsvAudio/JsvAudio.vue +176 -0
  112. package/utils/JsViewPlugin/JsvAudio/JsvAudioBridgeProxy.js +40 -0
  113. package/utils/JsViewPlugin/JsvAudio/JsvAudioBrowser.vue +46 -0
  114. package/utils/JsViewPlugin/JsvAudio/PluginLoader.js +140 -0
  115. package/utils/JsViewPlugin/JsvAudio/index.js +26 -0
  116. package/utils/JsViewPlugin/JsvAudio/version.js +24 -0
  117. package/utils/JsViewPlugin/JsvPlayer/index.js +1 -1
  118. package/utils/JsViewPlugin/JsvPlayer/version.js +5 -5
  119. package/utils/JsViewVueTools/JsvHashHistory.js +34 -8
  120. package/utils/JsViewVueTools/JsvImpactTracer.js +2 -2
  121. package/utils/JsViewVueTools/JsvRuntimeBridge.js +46 -8
  122. package/utils/JsViewVueTools/JsvStyleClass.js +9 -0
  123. package/utils/{JsViewVueWidget/utils/text.js → JsViewVueTools/JsvTextTools.js} +24 -4
  124. package/utils/JsViewVueTools/TypeCheckAndSet.js +3 -3
  125. package/utils/JsViewVueTools/index.js +2 -1
  126. package/utils/JsViewVueWidget/BrowserDebugWidget/BrowserTextureAnim.vue +5 -7
  127. package/utils/JsViewVueWidget/JsvActorMove/JsvActorMove.vue +20 -22
  128. package/utils/JsViewVueWidget/JsvApic/JsvApic.vue +4 -4
  129. package/utils/JsViewVueWidget/JsvGrid.vue +1 -9
  130. package/utils/JsViewVueWidget/JsvInput/Cursor.vue +1 -1
  131. package/utils/JsViewVueWidget/JsvMarquee.vue +91 -20
  132. package/utils/JsViewVueWidget/JsvMaskClipDiv.vue +1 -1
  133. package/utils/JsViewVueWidget/JsvNinePatch.vue +63 -53
  134. package/utils/JsViewVueWidget/JsvSpray/JsvSpray.vue +10 -5
  135. package/utils/JsViewVueWidget/JsvSpriteAnim/JsvSpriteAnim.vue +2 -2
  136. package/utils/JsViewVueWidget/JsvSwiper/JsvSwiper.vue +116 -80
  137. package/utils/JsViewVueWidget/JsvSwiper/index.js +3 -2
  138. package/utils/JsViewVueWidget/JsvSwiper3D/JsvSwiper.vue +1 -1
  139. package/utils/JsViewVueWidget/JsvTextBox.vue +11 -31
  140. package/utils/JsViewVueWidget/JsvTouchContainer.vue +2 -2
  141. package/utils/JsViewVueWidget/JsvTransparentDiv.vue +1 -1
  142. package/utils/JsViewVueWidget/JsvVisibleSensor/JsvVisibleSensor.vue +5 -5
  143. package/utils/JsViewVueWidget/index.js +8 -8
  144. package/samples/MetroWidgetDemos/Advanced/App.vue +0 -46
  145. package/samples/MetroWidgetDemos/Advanced/Buttons.vue +0 -70
  146. package/samples/MetroWidgetDemos/Advanced/Mixed.vue +0 -77
  147. package/samples/MetroWidgetDemos/Advanced/widgets/Widgets.vue +0 -116
  148. package/samples/MetroWidgetDemos/Advanced/widgets/focus1.png +0 -0
  149. package/samples/MetroWidgetDemos/Simple/AbsoluteTemplate.vue +0 -75
  150. package/samples/MetroWidgetDemos/Simple/App.vue +0 -45
  151. package/samples/MetroWidgetDemos/Simple/RelativeTemplate.vue +0 -111
  152. package/samples/MetroWidgetDemos/data.js +0 -205
  153. package/utils/JsViewVueWidget/JsvSwiper/Indicator.vue +0 -35
  154. package/utils/JsViewVueWidget/utils/index.js +0 -8
@@ -0,0 +1,148 @@
1
+ <!--
2
+ * @Author: ChenChanghua
3
+ * @Date: 2023-02-10 14:45:39
4
+ * @Description: file content
5
+ -->
6
+ <script setup>
7
+ import { JsvSwiper, useFocusHub, EdgeDirection } from "jsview";
8
+ import { ref, onMounted } from "vue";
9
+
10
+ const focusHub = useFocusHub();
11
+
12
+ const mySwiper = ref(null);
13
+
14
+ function randomColor() {
15
+ let randomColor = Math.round(Math.random() * 2 ** 24).toString(16);
16
+ return (
17
+ "#" + new Array(6 - randomColor.length).fill("0").join("") + randomColor
18
+ );
19
+ }
20
+ let data = [];
21
+ for (let i = 0; i < 10; i++) {
22
+ data.push({
23
+ width: 400,
24
+ height: 300,
25
+ index: i,
26
+ backgroundColor: randomColor(),
27
+ });
28
+ }
29
+
30
+ const swiper1 = {
31
+ onChange: (currentId) => {
32
+ console.log("swiper1: onChange", currentId);
33
+ },
34
+ onClick: (currentId) => {
35
+ console.log("swiper1: onClick", currentId);
36
+ },
37
+ onEdge: (info) => {
38
+ if (info.direction == EdgeDirection.bottom) {
39
+ focusHub.setFocus("mySwiper2");
40
+ }
41
+ },
42
+ };
43
+
44
+ const swiper2 = {
45
+ onChange: (currentId) => {
46
+ console.log("swiper2: onChange", currentId);
47
+ },
48
+ onClick: (currentId) => {
49
+ console.log("swiper2: onClick", currentId);
50
+ },
51
+ onEdge: (info) => {
52
+ if (info.direction == EdgeDirection.top) {
53
+ focusHub.setFocus("mySwiper1");
54
+ }
55
+ },
56
+ };
57
+ onMounted(() => {
58
+ focusHub.setFocus("mySwiper1");
59
+ });
60
+ </script>
61
+
62
+ <template>
63
+ <div>
64
+ <jsv-swiper
65
+ name="mySwiper1"
66
+ ref="mySwiper1"
67
+ :totalFrame="data.length"
68
+ :layoutInfo="{
69
+ left: 50,
70
+ top: 50,
71
+ width: 400,
72
+ height: 200,
73
+ }"
74
+ :animation="{
75
+ duration: 300,
76
+ easing: 'linear',
77
+ }"
78
+ :autoplayInterval="1000"
79
+ :onChange="swiper1.onChange"
80
+ :onClick="swiper1.onClick"
81
+ :onEdge="swiper1.onEdge"
82
+ >
83
+ <template #itemView="{ dataIndex, focused }">
84
+ <div
85
+ :style="{
86
+ width: data[dataIndex].width,
87
+ height: data[dataIndex].height,
88
+ backgroundColor: data[dataIndex].backgroundColor,
89
+ fontSize: 40,
90
+ color: focused ? '#FF0000' : '#FFFFFF',
91
+ }"
92
+ >
93
+ {{ data[dataIndex].index }}
94
+ </div>
95
+ </template>
96
+ </jsv-swiper>
97
+
98
+ <jsv-swiper
99
+ name="mySwiper2"
100
+ ref="mySwiper2"
101
+ :totalFrame="data.length"
102
+ :layoutInfo="{
103
+ left: 50,
104
+ top: 300,
105
+ width: 400,
106
+ height: 200,
107
+ }"
108
+ :animation="{
109
+ duration: 300,
110
+ easing: 'linear',
111
+ }"
112
+ :autoplayInterval="1000"
113
+ :onChange="swiper2.onChange"
114
+ :onClick="swiper2.onClick"
115
+ :onEdge="swiper2.onEdge"
116
+ :reverseSwipe="true"
117
+ :dotSize="20"
118
+ :disableLoopWhenFocus="true"
119
+ >
120
+ <template #itemView="{ dataIndex, focused }">
121
+ <div
122
+ :style="{
123
+ width: data[dataIndex].width,
124
+ height: data[dataIndex].height,
125
+ backgroundColor: data[dataIndex].backgroundColor,
126
+ fontSize: 40,
127
+ color: focused ? '#FF0000' : '#FFFFFF',
128
+ }"
129
+ >
130
+ {{ data[dataIndex].index }}
131
+ </div>
132
+ </template>
133
+ <template #indicatorDot="{ dataIndex, currentIndex }">
134
+ <div
135
+ :style="{
136
+ width: 20,
137
+ height: 20,
138
+ backgroundColor:
139
+ dataIndex == currentIndex
140
+ ? 'rgba(100, 100, 100, 0.7)'
141
+ : '#ff0000',
142
+ borderRadius: '15px',
143
+ }"
144
+ ></div>
145
+ </template>
146
+ </jsv-swiper>
147
+ </div>
148
+ </template>
@@ -22,7 +22,7 @@ import RenderLeft from "./RenderLeft.vue";
22
22
  import RenderRight from "./RenderRight.vue";
23
23
  import RenderCenter from "./RenderCenter.vue";
24
24
  import RenderOneLine from "./RenderOneLine.vue";
25
- import { ref } from "vue";
25
+ import { ref, shallowRef } from "vue";
26
26
  import { useRouter } from "vue-router";
27
27
 
28
28
  const router = useRouter();
@@ -80,6 +80,7 @@ const onBlur = () => {
80
80
  onBlur: onBlur,
81
81
  }"
82
82
  >
83
+ <div :style="{width:1280, height:720, backgroundColor:'#000000'}"/>
83
84
  <div :style="{ top: offsetY, left: offsetX }">
84
85
  <RenderLeft :text="text" :moveCount="moveCount" />
85
86
  <RenderRight :text="text" />
@@ -1,5 +1,5 @@
1
1
  <script setup>
2
- import { ref, reactive } from "vue";
2
+ import { ref, shallowRef, reactive } from "vue";
3
3
  import { useRouter } from "vue-router";
4
4
  import {
5
5
  jJsvRuntimeBridge,
@@ -5,56 +5,42 @@
5
5
  * @LastEditTime: 2021-10-21 14:01:59
6
6
  * @Description: file content
7
7
  -->
8
- <script>
8
+ <script setup>
9
9
  import { JsvActorMoveControl, JsvActorMove } from "jsview";
10
+ import { shallowRef } from "vue";
10
11
 
11
- export default {
12
- components: {
13
- JsvActorMove,
14
- },
15
- props: {
16
- name: String,
17
- },
18
- data() {
19
- return {
20
- direction: 1,
21
- };
22
- },
23
- setup() {
24
- let throwControl = new JsvActorMoveControl(); // 抛物运动体控制器
25
- let moveControl = new JsvActorMoveControl(); // 平移运动体控制器
12
+ const props = defineProps({
13
+ name: String,
14
+ });
26
15
 
27
- return {
28
- throwControl,
29
- moveControl,
30
- };
31
- },
32
- methods: {
33
- onKeyDown(ev) {
34
- switch (ev.keyCode) {
35
- case 13:
36
- this.direction = -this.direction;
16
+ let throwControl = new JsvActorMoveControl(); // 抛物运动体控制器
17
+ let moveControl = new JsvActorMoveControl(); // 平移运动体控制器
37
18
 
38
- this.moveControl.moveToX(195 * this.direction, 250, (x, y) => {
39
- console.log(`Move end with x=${x} y=${y}`);
40
- });
41
- this.throwControl.throwAlongY(
42
- -500,
43
- 750,
44
- { type: "catch", position: 0, direction: 1 },
45
- (x, y) => {
46
- console.log(`Throw end with x=${x} y=${y}`);
47
- },
48
- () => {
49
- console.log("Get to the pole...");
50
- }
51
- );
52
- return true;
53
- }
54
- return false;
55
- },
56
- },
57
- };
19
+ let direction = shallowRef(1);
20
+
21
+ function onKeyDown(ev) {
22
+ switch (ev.keyCode) {
23
+ case 13:
24
+ direction.value = -direction.value;
25
+
26
+ moveControl.moveToX(195 * direction.value, 250, (x, y) => {
27
+ console.log(`Move end with x=${x} y=${y}`);
28
+ });
29
+ throwControl.throwAlongY(
30
+ -500,
31
+ 750,
32
+ { type: "catch", position: 0, direction: 1 },
33
+ (x, y) => {
34
+ console.log(`Throw end with x=${x} y=${y}`);
35
+ },
36
+ () => {
37
+ console.log("Get to the pole...");
38
+ }
39
+ );
40
+ return true;
41
+ }
42
+ return false;
43
+ }
58
44
  </script>
59
45
 
60
46
  <template>
@@ -112,4 +98,4 @@ export default {
112
98
  text-overflow: ellipsis;
113
99
  text-align: center;
114
100
  }
115
- </style>
101
+ </style>
@@ -10,7 +10,7 @@ import {
10
10
  import Item from "./Item.vue";
11
11
 
12
12
  import { metroWidgetH, measures } from "./data.js";
13
- import { ref } from "vue";
13
+ import { ref, shallowRef } from "vue";
14
14
 
15
15
  export default {
16
16
  components: {
@@ -10,7 +10,7 @@ import {
10
10
  import Item from "./Item.vue";
11
11
 
12
12
  import { metroWidgetV, measures } from "./data.js";
13
- import { ref } from "vue";
13
+ import { ref, shallowRef } from "vue";
14
14
 
15
15
  export default {
16
16
  components: {
@@ -2,7 +2,7 @@
2
2
  import DemoApp from "../DemoHomepage/App.vue";
3
3
  import ActivityApp from "../MetroWidgetDemos/PerformanceTest/App.vue"; // TODO
4
4
  import { jJsvRuntimeBridge } from "jsview";
5
- import { ref, onMounted } from "vue";
5
+ import { ref, shallowRef, onMounted } from "vue";
6
6
 
7
7
  const getShowMode = () => {
8
8
  let showMode = 0;
@@ -1,5 +1,5 @@
1
1
  <script setup>
2
- import { provide, reactive, ref, watch } from "vue";
2
+ import { provide, reactive, ref, shallowRef, watch } from "vue";
3
3
  import Controllor from "./components/Controllor";
4
4
  import VideoFrame from "./components/VideoFrame";
5
5
 
@@ -18,20 +18,20 @@ const Caption = {
18
18
  "2.支持ObjectFit调整\n",
19
19
  };
20
20
 
21
- let caption = ref(null);
22
- let useTexture = ref(null);
21
+ let caption = shallowRef(null);
22
+ let useTexture = shallowRef(null);
23
23
  let videoTime = reactive({
24
24
  currentTime: 0,
25
25
  duration: 0,
26
26
  });
27
- let objectFitTitle = ref(null);
27
+ let objectFitTitle = shallowRef(null);
28
28
  let playStatus = ref("");
29
29
  provide("useTexture", useTexture);
30
- provide("objectFit", ref(null));
30
+ provide("objectFit", shallowRef(null));
31
31
  provide("videoRect", ref({}));
32
- provide("playVideo", ref(null));
33
- provide("seekVideo", ref(null));
34
- provide("enableAnimation", ref(null));
32
+ provide("playVideo", shallowRef(null));
33
+ provide("seekVideo", shallowRef(null));
34
+ provide("enableAnimation", shallowRef(null));
35
35
  provide("videoTime", videoTime);
36
36
  provide("objectFitTitle", objectFitTitle);
37
37
  provide("playStatus", playStatus);
@@ -1,5 +1,5 @@
1
1
  <script setup>
2
- import { ref } from "vue";
2
+ import { ref, shallowRef } from "vue";
3
3
  const props = defineProps({
4
4
  style: Object,
5
5
  autoFocus: Boolean,
@@ -173,7 +173,7 @@ enableAnimation.value = false;
173
173
 
174
174
  <template>
175
175
  <div :style="style" :key="useTexture" :set="(leftOffset = 0)">
176
- <jsv-focus-block :namespace="controllor" :onKeyDown="onKeyDown">
176
+ <jsv-focus-block :onKeyDown="onKeyDown">
177
177
  <Button
178
178
  v-for="(item, index) in getButtonData()"
179
179
  :key="index"
@@ -1,5 +1,5 @@
1
1
  <script setup>
2
- import { watch, reactive, onMounted, ref } from "vue";
2
+ import { watch, reactive, onMounted, ref, shallowRef } from "vue";
3
3
  import { useRouter } from "vue-router";
4
4
  import { jJsvRuntimeBridge, JsvVisibleSensor } from "jsview";
5
5
 
@@ -10,8 +10,8 @@ const VISIBLE_RANGE = 0.25;
10
10
 
11
11
  const router = useRouter();
12
12
 
13
- const containerRef = ref(null);
14
- let case_config = ref(null);
13
+ const containerRef = shallowRef(null);
14
+ let case_config = shallowRef(null);
15
15
  let status_text = reactive({
16
16
  oldH: "false",
17
17
  newH: "false",
@@ -5,7 +5,7 @@ const path = require('path');
5
5
 
6
6
  function getOptions() {
7
7
  const options = {
8
- androidPackage: "com.qcode.jsview.sample_demo/com.qcode.jsview.sample.SingleActivity",
8
+ androidPackage: "com.tvcode.sjcenter/com.tvcode.chmarket.MainActivity",
9
9
  coreRevision: null,
10
10
  jseUrl: null,
11
11
  homepageUrl: null,
@@ -16,16 +16,16 @@ function getOptions() {
16
16
  }
17
17
 
18
18
  const rootDir = process.cwd();
19
- const jsviewDir = path.resolve(rootDir, 'jsview');
19
+ const jsviewDir = path.resolve(rootDir, 'node_modules/@shijiu/jsview-vue');
20
20
  const jsveiwVersionFile = path.resolve(jsviewDir, 'dom/target_core_revision.js');
21
21
  const jsviewTargetVersion = require(jsveiwVersionFile);
22
- options.coreRevision = jsviewTargetVersion.CoreRevision;
22
+ options.coreRevision = jsviewTargetVersion.CoreRevisionAndBranch;
23
23
  options.jseUrl = jsviewTargetVersion.JseUrl;
24
24
 
25
25
  const homepageUrlFile = path.resolve(rootDir, 'node_modules/.cache/jsview/network');
26
26
  let homepageUrl = require(homepageUrlFile);
27
27
  homepageUrl = homepageUrl.replace(/\u001b\[.*?m/g, '')
28
- options.homepageUrl = homepageUrl + "js/main.jsv.js";
28
+ options.homepageUrl = homepageUrl + "/js/main.jsv.js";
29
29
 
30
30
  return options;
31
31
  }
@@ -45,6 +45,7 @@ function androidStartActivity(options) {
45
45
  cmdline += ` --es COREVERSIONRANGE "${options.coreRevision}"`;
46
46
  cmdline += ` --es ENGINE "${options.jseUrl}"`;
47
47
  cmdline += ` --es URL "${options.homepageUrl}"`;
48
+ cmdline += ` --es DEBUG "1"`;
48
49
  console.log(`Run command: ${cmdline}\n`);
49
50
  try {
50
51
  childProcess.execSync(cmdline, {stdio: [0, 1, 2]});
@@ -30,7 +30,7 @@
30
30
 
31
31
  <script setup>
32
32
  /* eslint-disable */
33
- import { onMounted, onBeforeUnmount, ref, toRaw } from "vue";
33
+ import { onMounted, onBeforeUnmount, ref, shallowRef, toRaw } from "vue";
34
34
  const props = defineProps({
35
35
  name: String,
36
36
  namespace: String,
@@ -65,7 +65,7 @@ if (props.name && props.name.indexOf(".") >= 0) {
65
65
  );
66
66
  }
67
67
  let actionCallback = {};
68
- let fDivRef = ref(null);
68
+ let fDivRef = shallowRef(null);
69
69
 
70
70
  //methods
71
71
  const getName = () => {
@@ -158,14 +158,14 @@ const _mountToFocusSystem = () => {
158
158
  }
159
159
  // 建立父子关系链
160
160
  let self = toRaw(fDivRef.value);
161
- let parent = self.parentElement;
161
+ let parent = self.parentNode;
162
162
  while (parent) {
163
163
  if (self.FocusNodeRef.GetParentPage()) {
164
164
  break;
165
165
  }
166
166
 
167
167
  if (parent.tagName !== "FDIV") {
168
- parent = parent.parentElement;
168
+ parent = parent.parentNode;
169
169
  continue;
170
170
  }
171
171