@shijiu/jsview-vue 0.9.684 → 0.9.766
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.
- package/dom/bin/jsview-browser-debug-dom.min.js +1 -1
- package/dom/bin/jsview-dom.min.js +1 -1
- package/dom/bin/jsview-engine-js-browser.min.js +1 -1
- package/dom/bin/jsview-forge-define.min.js +1 -1
- package/dom/jsv-engine-js-browser.js +6 -0
- package/dom/target_core_revision.js +4 -4
- package/loader/loader.js +4 -0
- package/package.json +1 -1
- package/patches/node_modules/@vue/cli-service/lib/config/base.js +1 -1
- package/samples/AnimPicture/App.vue +5 -5
- package/samples/Basic/components/div/DivLayout.vue +1 -1
- package/samples/Basic/components/img/ImageGroup.vue +2 -2
- package/samples/Basic/components/img/ImgLayout.vue +79 -15
- package/samples/Basic/components/text/TextDirection.vue +104 -0
- package/samples/Basic/components/text/TextEmoji.vue +1 -1
- package/samples/Basic/components/text/TextGroup1.vue +1 -1
- package/samples/Basic/components/text/TextGroup2.vue +11 -1
- package/samples/BasicFocusControl/components/BaseBlock.vue +2 -2
- package/samples/Collision/App.vue +11 -11
- package/samples/DemoHomepage/App.vue +43 -8
- package/samples/DemoHomepage/router.js +13 -10
- package/samples/DemoHomepage/views/Homepage.vue +83 -96
- package/samples/FilterDemo/App.vue +1 -1
- package/samples/FlipCard/App.vue +2 -2
- package/samples/FlipCard/FlipCard.vue +3 -3
- package/samples/GridDemo/App.vue +3 -3
- package/samples/GridDemo/ButtonBlock.vue +2 -2
- package/samples/GridDemo/FocusItem.vue +2 -2
- package/samples/GridDemo/Item.vue +1 -1
- package/samples/HashHistory/App.vue +10 -3
- package/samples/HashHistory/components/Item.vue +1 -1
- package/samples/ImpactStop/App.vue +15 -11
- package/samples/Input/InputPanel.vue +1 -1
- package/samples/LongImage/Button.vue +1 -1
- package/samples/LongImage/ButtonItem.vue +1 -1
- package/samples/LongImage/LongImageScroll.vue +2 -2
- package/samples/LongText/App.vue +1 -1
- package/samples/LongText/Button.vue +1 -1
- package/samples/LongText/ButtonItem.vue +1 -1
- package/samples/LongText/LongTextScroll.vue +3 -3
- package/samples/Marquee/longText.js +2 -2
- package/samples/MetroWidgetDemos/Advanced/ButtonItem.vue +4 -4
- package/samples/MetroWidgetDemos/Advanced/widgets/Item.vue +3 -4
- package/samples/MetroWidgetDemos/Advanced/widgets/WidgetItem.vue +2 -3
- package/samples/MetroWidgetDemos/Advanced/widgets/Widgets.vue +1 -1
- package/samples/MetroWidgetDemos/Item.vue +3 -19
- package/samples/MetroWidgetDemos/PerformanceTest/App.vue +4 -4
- package/samples/MetroWidgetDemos/PerformanceTest/components/ContentItem.vue +1 -1
- package/samples/MetroWidgetDemos/PerformanceTest/components/MyTab.vue +3 -3
- package/samples/MetroWidgetDemos/PingPong/AppPage.vue +2 -2
- package/samples/MetroWidgetDemos/PingPong/TabItem.vue +1 -1
- package/samples/MetroWidgetDemos/PingPong/ViewSwiper.vue +3 -3
- package/samples/MetroWidgetDemos/Simple/RelativeTemplate.vue +2 -2
- package/samples/MetroWidgetDemos/WidgetItem.vue +2 -3
- package/samples/NinePatchDemo/App.vue +2 -2
- package/samples/NinePatchDemo/Item.vue +2 -2
- package/samples/Preload/App.vue +1 -1
- package/samples/Preload/Item.vue +1 -1
- package/samples/QrcodeDemo/App.vue +1 -1
- package/samples/SoundPool/App.vue +3 -3
- package/samples/SpriteImage/App.vue +5 -0
- package/samples/TextBox/App.vue +2 -1
- package/samples/TextureAnimation/App2.vue +1 -1
- package/samples/ThrowMoveDemo/LRParabolicDemo.vue +33 -47
- package/samples/TouchSample/MetroWidgetHorizontal.vue +1 -1
- package/samples/TouchSample/MetroWidgetVertical.vue +1 -1
- package/samples/TransitPage/App.vue +1 -1
- package/samples/VideoDemo/App.vue +8 -8
- package/samples/VideoDemo/components/Button.vue +1 -1
- package/samples/VideoDemo/components/Controllor.vue +1 -1
- package/samples/VisibleSensorDemo/App.vue +3 -3
- package/scripts/jsview-run-android.js +5 -4
- package/utils/JsViewEngineWidget/JsvFocusBlock.vue +4 -4
- package/utils/JsViewEngineWidget/MetroWidget/MetroWidget.vue +65 -39
- package/utils/JsViewEngineWidget/TemplateParser.js +138 -146
- package/utils/JsViewEngineWidget/WidgetCommon.js +12 -3
- package/utils/JsViewPlugin/BrowserPluginLoader.js +4 -2
- package/utils/JsViewPlugin/JsvAudio/AudioProxy.js +302 -0
- package/utils/JsViewPlugin/JsvAudio/CheckType.js +68 -0
- package/utils/JsViewPlugin/JsvAudio/Events.js +17 -0
- package/utils/JsViewPlugin/JsvAudio/JsvAudio.vue +176 -0
- package/utils/JsViewPlugin/JsvAudio/JsvAudioBridgeProxy.js +40 -0
- package/utils/JsViewPlugin/JsvAudio/JsvAudioBrowser.vue +46 -0
- package/utils/JsViewPlugin/JsvAudio/PluginLoader.js +140 -0
- package/utils/JsViewPlugin/JsvAudio/index.js +26 -0
- package/utils/JsViewPlugin/JsvAudio/version.js +24 -0
- package/utils/JsViewPlugin/JsvPlayer/index.js +1 -1
- package/utils/JsViewPlugin/JsvPlayer/version.js +5 -5
- package/utils/JsViewVueTools/JsvHashHistory.js +34 -8
- package/utils/JsViewVueTools/JsvImpactTracer.js +2 -2
- package/utils/JsViewVueTools/JsvRuntimeBridge.js +46 -8
- package/utils/JsViewVueTools/JsvStyleClass.js +9 -0
- package/utils/{JsViewVueWidget/utils/text.js → JsViewVueTools/JsvTextTools.js} +3 -4
- package/utils/JsViewVueTools/TypeCheckAndSet.js +3 -3
- package/utils/JsViewVueTools/index.js +2 -1
- package/utils/JsViewVueWidget/BrowserDebugWidget/BrowserTextureAnim.vue +5 -7
- package/utils/JsViewVueWidget/JsvActorMove/JsvActorMove.vue +20 -22
- package/utils/JsViewVueWidget/JsvApic/JsvApic.vue +4 -4
- package/utils/JsViewVueWidget/JsvGrid.vue +1 -9
- package/utils/JsViewVueWidget/JsvInput/Cursor.vue +1 -1
- package/utils/JsViewVueWidget/JsvMarquee.vue +22 -12
- package/utils/JsViewVueWidget/JsvMaskClipDiv.vue +1 -1
- package/utils/JsViewVueWidget/JsvNinePatch.vue +63 -53
- package/utils/JsViewVueWidget/JsvSpray/JsvSpray.vue +10 -5
- package/utils/JsViewVueWidget/JsvSpriteAnim/JsvSpriteAnim.vue +2 -2
- package/utils/JsViewVueWidget/JsvSwiper/JsvSwiper.vue +3 -3
- package/utils/JsViewVueWidget/JsvSwiper3D/JsvSwiper.vue +1 -1
- package/utils/JsViewVueWidget/JsvTextBox.vue +11 -31
- package/utils/JsViewVueWidget/JsvTouchContainer.vue +2 -2
- package/utils/JsViewVueWidget/JsvTransparentDiv.vue +1 -1
- package/utils/JsViewVueWidget/JsvVisibleSensor/JsvVisibleSensor.vue +5 -5
- package/utils/JsViewVueWidget/index.js +8 -8
- package/utils/JsViewVueWidget/utils/index.js +0 -8
|
@@ -2,11 +2,11 @@
|
|
|
2
2
|
* @Author: ChenChanghua
|
|
3
3
|
* @Date: 2022-05-10 15:21:24
|
|
4
4
|
* @LastEditors: ChenChanghua
|
|
5
|
-
* @LastEditTime: 2022-
|
|
5
|
+
* @LastEditTime: 2022-12-02 16:12:43
|
|
6
6
|
* @Description: file content
|
|
7
7
|
-->
|
|
8
8
|
<script setup>
|
|
9
|
-
import { ref, inject } from "vue";
|
|
9
|
+
import { ref, shallowRef, inject } from "vue";
|
|
10
10
|
|
|
11
11
|
const props = defineProps({
|
|
12
12
|
data: Object,
|
|
@@ -14,28 +14,12 @@ const props = defineProps({
|
|
|
14
14
|
onAction: Object,
|
|
15
15
|
});
|
|
16
16
|
|
|
17
|
-
const divRef =
|
|
17
|
+
const divRef = shallowRef(null);
|
|
18
18
|
const focused = ref(false);
|
|
19
19
|
|
|
20
|
-
const focusSize = inject("focusSize");
|
|
21
|
-
|
|
22
20
|
// 自身的焦点状态自己记录, 通过回调来改变
|
|
23
21
|
const onFocus = () => {
|
|
24
22
|
focused.value = true;
|
|
25
|
-
if (focusSize) {
|
|
26
|
-
divRef.value?.getBoundingClientRect().then(
|
|
27
|
-
(data) => {
|
|
28
|
-
console.log("testtest focus size", data)
|
|
29
|
-
focusSize.width = data.width;
|
|
30
|
-
focusSize.height = data.height;
|
|
31
|
-
focusSize.left = data.left;
|
|
32
|
-
focusSize.top = data.top;
|
|
33
|
-
},
|
|
34
|
-
(error) => {
|
|
35
|
-
console.log("testtest abs failed", error);
|
|
36
|
-
}
|
|
37
|
-
);
|
|
38
|
-
}
|
|
39
23
|
};
|
|
40
24
|
const onBlur = () => {
|
|
41
25
|
focused.value = false;
|
|
@@ -76,7 +76,7 @@ import { data1, data2, data3 } from "./data";
|
|
|
76
76
|
import borderImgPath from "./border.png";
|
|
77
77
|
import Item from "./components/ContentItem.vue";
|
|
78
78
|
import MyTab from "./components/MyTab.vue";
|
|
79
|
-
import { ref, onMounted, onBeforeUnmount } from "vue";
|
|
79
|
+
import { ref, shallowRef, onMounted, onBeforeUnmount } from "vue";
|
|
80
80
|
import { useRouter } from "vue-router";
|
|
81
81
|
import {
|
|
82
82
|
VERTICAL,
|
|
@@ -90,7 +90,7 @@ const router = useRouter();
|
|
|
90
90
|
const focusHub = useFocusHub();
|
|
91
91
|
let contentData = data1;
|
|
92
92
|
let requestDataTime = 0;
|
|
93
|
-
const mwRef =
|
|
93
|
+
const mwRef = shallowRef(null);
|
|
94
94
|
|
|
95
95
|
const onKeyDown = (ev) => {
|
|
96
96
|
// 8:Backspace, 27:Escape, 10000:盒子返回键
|
|
@@ -127,7 +127,7 @@ const onItemFocus = (id) => {
|
|
|
127
127
|
clearTimeout(requestDataTime);
|
|
128
128
|
requestDataTime = 0;
|
|
129
129
|
}
|
|
130
|
-
requestDataTime = setTimeout(() => {
|
|
130
|
+
// requestDataTime = setTimeout(() => {
|
|
131
131
|
switch (id) {
|
|
132
132
|
case 0:
|
|
133
133
|
contentData = data1;
|
|
@@ -140,7 +140,7 @@ const onItemFocus = (id) => {
|
|
|
140
140
|
break;
|
|
141
141
|
}
|
|
142
142
|
mwRef.value?.refreshData(true);
|
|
143
|
-
}, 0);
|
|
143
|
+
// }, 0);
|
|
144
144
|
};
|
|
145
145
|
|
|
146
146
|
onBeforeUnmount(() => {
|
|
@@ -13,7 +13,7 @@ import couponMid from "../assets/coupon_mid.png";
|
|
|
13
13
|
import borderLeft from "../assets/line_left.png";
|
|
14
14
|
import borderMid from "../assets/line_mid.png";
|
|
15
15
|
import borderRight from "../assets/line_right.png";
|
|
16
|
-
import { ref, computed } from "vue";
|
|
16
|
+
import { ref, shallowRef, computed } from "vue";
|
|
17
17
|
|
|
18
18
|
const props = defineProps({
|
|
19
19
|
data: Object,
|
|
@@ -2,15 +2,15 @@
|
|
|
2
2
|
* @Author: ChenChanghua
|
|
3
3
|
* @Date: 2021-09-29 16:13:35
|
|
4
4
|
* @LastEditors: ChenChanghua
|
|
5
|
-
* @LastEditTime:
|
|
5
|
+
* @LastEditTime: 2022-12-02 16:14:11
|
|
6
6
|
* @Description: file content
|
|
7
7
|
-->
|
|
8
8
|
<script>
|
|
9
|
-
import { ref } from "vue";
|
|
9
|
+
import { ref, shallowRef } from "vue";
|
|
10
10
|
|
|
11
11
|
export default {
|
|
12
12
|
props: {
|
|
13
|
-
name:
|
|
13
|
+
name: String,
|
|
14
14
|
onEdgeDown: Function,
|
|
15
15
|
onItemFocus: Function,
|
|
16
16
|
},
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
<script setup>
|
|
9
9
|
import { VERTICAL, MetroWidget } from "jsview";
|
|
10
10
|
import WidgetItem from "../WidgetItem.vue";
|
|
11
|
-
import { ref, watch, onBeforeUnmount } from "vue";
|
|
11
|
+
import { ref, shallowRef, watch, onBeforeUnmount } from "vue";
|
|
12
12
|
|
|
13
13
|
const props = defineProps({
|
|
14
14
|
data: {
|
|
@@ -24,7 +24,7 @@ const props = defineProps({
|
|
|
24
24
|
},
|
|
25
25
|
});
|
|
26
26
|
|
|
27
|
-
const widgetRef =
|
|
27
|
+
const widgetRef = shallowRef(null);
|
|
28
28
|
|
|
29
29
|
const provideData = () => {
|
|
30
30
|
return props.data.data;
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
<script>
|
|
9
9
|
import AppPage from "./AppPage.vue";
|
|
10
10
|
import { getKeyFramesGroup } from "jsview";
|
|
11
|
-
import { reactive, ref } from "vue";
|
|
11
|
+
import { reactive, ref, shallowRef } from "vue";
|
|
12
12
|
|
|
13
13
|
export default {
|
|
14
14
|
components: {
|
|
@@ -187,7 +187,7 @@ export default {
|
|
|
187
187
|
animation: page0Anim.anim,
|
|
188
188
|
animationFillMode: 'forwards',
|
|
189
189
|
}"
|
|
190
|
-
|
|
190
|
+
@animationend="page0Anim.onend"
|
|
191
191
|
>
|
|
192
192
|
<app-page
|
|
193
193
|
v-if="page0Show"
|
|
@@ -201,7 +201,7 @@ export default {
|
|
|
201
201
|
animation: page1Anim.anim,
|
|
202
202
|
animationFillMode: 'forwards',
|
|
203
203
|
}"
|
|
204
|
-
|
|
204
|
+
@animationend="page1Anim.onend"
|
|
205
205
|
>
|
|
206
206
|
<app-page
|
|
207
207
|
v-if="page1Show"
|
|
@@ -7,13 +7,13 @@
|
|
|
7
7
|
-->
|
|
8
8
|
<script setup>
|
|
9
9
|
import { MetroWidget, WholePageSlide, HORIZONTAL, EdgeDirection } from "jsview";
|
|
10
|
-
import { ref } from "vue";
|
|
10
|
+
import { ref, shallowRef } from "vue";
|
|
11
11
|
import { useFocusHub } from "jsview";
|
|
12
12
|
import { simpleData } from "../data";
|
|
13
13
|
import Item from "../Item.vue";
|
|
14
14
|
|
|
15
15
|
const focusHub = useFocusHub();
|
|
16
|
-
const mwRef =
|
|
16
|
+
const mwRef = shallowRef(null);
|
|
17
17
|
|
|
18
18
|
const wholePageSlide = new WholePageSlide();
|
|
19
19
|
let innerData = simpleData.concat();
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
|
|
2
2
|
<script setup>
|
|
3
3
|
import { HORIZONTAL, MetroWidget, useFocusHub } from "jsview";
|
|
4
|
-
import { ref } from "vue";
|
|
4
|
+
import { ref, shallowRef } from "vue";
|
|
5
5
|
import Item from "./Item.vue";
|
|
6
6
|
|
|
7
7
|
const props = defineProps({
|
|
@@ -11,7 +11,7 @@ const props = defineProps({
|
|
|
11
11
|
onAction: Object,
|
|
12
12
|
});
|
|
13
13
|
const focusHub = useFocusHub();
|
|
14
|
-
const mwRef =
|
|
14
|
+
const mwRef = shallowRef(null);
|
|
15
15
|
|
|
16
16
|
const measures = (item) => {
|
|
17
17
|
return item;
|
|
@@ -78,7 +78,6 @@ props.onAction.register("onBlur", onBlur);
|
|
|
78
78
|
bottom: 10,
|
|
79
79
|
}"
|
|
80
80
|
:measures="measures"
|
|
81
|
-
:slideSetting="seamlessSlide"
|
|
82
81
|
:onEdge="onItemEdge"
|
|
83
82
|
:sendFocusRectEvent="true"
|
|
84
83
|
>
|
|
@@ -7,7 +7,7 @@ import {
|
|
|
7
7
|
} from "jsview";
|
|
8
8
|
import Item from "./Item.vue";
|
|
9
9
|
import borderImageUrl from "./assets/border.png";
|
|
10
|
-
import { ref, onMounted } from "vue";
|
|
10
|
+
import { ref, shallowRef, onMounted } from "vue";
|
|
11
11
|
import { useRouter, useRoute } from "vue-router";
|
|
12
12
|
|
|
13
13
|
const router = useRouter();
|
|
@@ -77,7 +77,7 @@ const _onKeyDown = (ev) => {
|
|
|
77
77
|
return false;
|
|
78
78
|
};
|
|
79
79
|
|
|
80
|
-
const myFocusWidget =
|
|
80
|
+
const myFocusWidget = shallowRef(null);
|
|
81
81
|
|
|
82
82
|
onMounted(() => {
|
|
83
83
|
myFocusWidget.value.getFocusBlockRef().requestFocus();
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<script setup>
|
|
2
|
-
import { ref, computed } from "vue";
|
|
2
|
+
import { ref, shallowRef, computed } from "vue";
|
|
3
3
|
|
|
4
4
|
const props = defineProps({
|
|
5
5
|
data: Object,
|
|
@@ -50,7 +50,7 @@ props.onAction.register("onClick", onClicked);
|
|
|
50
50
|
|
|
51
51
|
<template>
|
|
52
52
|
<div :class="focused ? 'focus' : 'blur'" :style="styleValue">
|
|
53
|
-
{{
|
|
53
|
+
{{ data.content }}
|
|
54
54
|
</div>
|
|
55
55
|
</template>
|
|
56
56
|
|
package/samples/Preload/App.vue
CHANGED
|
@@ -11,7 +11,7 @@ import awesome from "./images/awesomeface.png";
|
|
|
11
11
|
import cat from "./images/cat.jpg";
|
|
12
12
|
import { data } from "./data.js";
|
|
13
13
|
import Item from "./Item.vue";
|
|
14
|
-
import { ref } from "vue";
|
|
14
|
+
import { ref, shallowRef } from "vue";
|
|
15
15
|
import { useRouter } from "vue-router";
|
|
16
16
|
|
|
17
17
|
const name = "/preload";
|
package/samples/Preload/Item.vue
CHANGED
|
@@ -10,7 +10,7 @@ import coin from "./coin.mp3";
|
|
|
10
10
|
import lose from "./lose.mp3";
|
|
11
11
|
import bgmusic from "./bgmusic.mp3";
|
|
12
12
|
import { JsvSoundPool, jJsvRuntimeBridge } from "jsview";
|
|
13
|
-
import { onMounted, onBeforeUnmount,
|
|
13
|
+
import { onMounted, onBeforeUnmount, shallowRef } from "vue";
|
|
14
14
|
import { useRouter } from "vue-router";
|
|
15
15
|
|
|
16
16
|
const router = useRouter();
|
|
@@ -19,7 +19,7 @@ let coinController1 = null;
|
|
|
19
19
|
let coinController2 = null;
|
|
20
20
|
let loseController1 = null;
|
|
21
21
|
let loseController2 = null;
|
|
22
|
-
let bgm =
|
|
22
|
+
let bgm = shallowRef(null);
|
|
23
23
|
const _onKeyDown = (ev) => {
|
|
24
24
|
if (ev.keyCode == 8 || ev.keyCode == 27 || ev.keyCode == 10000) {
|
|
25
25
|
router.go(-1); // 有router时,是从DemoHomepage进入,回退
|
|
@@ -128,7 +128,7 @@ onBeforeUnmount(() => {
|
|
|
128
128
|
`[确定]: 播放背景音乐\n[左]: 播放失败音乐1\n[右]: 播放失败音乐2\n[上]: 播放硬币音乐1\n[下]: 播放硬币音乐2`
|
|
129
129
|
}}
|
|
130
130
|
</div>
|
|
131
|
-
<audiotrack ref="bgm" :src="bgmusic" loop="loop" />
|
|
131
|
+
<jsv-audiotrack ref="bgm" :src="bgmusic" loop="loop" />
|
|
132
132
|
</div>
|
|
133
133
|
</jsv-focus-block>
|
|
134
134
|
</template>
|
package/samples/TextBox/App.vue
CHANGED
|
@@ -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" />
|
|
@@ -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
|
-
|
|
12
|
-
|
|
13
|
-
|
|
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
|
-
|
|
28
|
-
|
|
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
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
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>
|
|
@@ -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 =
|
|
22
|
-
let useTexture =
|
|
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 =
|
|
27
|
+
let objectFitTitle = shallowRef(null);
|
|
28
28
|
let playStatus = ref("");
|
|
29
29
|
provide("useTexture", useTexture);
|
|
30
|
-
provide("objectFit",
|
|
30
|
+
provide("objectFit", shallowRef(null));
|
|
31
31
|
provide("videoRect", ref({}));
|
|
32
|
-
provide("playVideo",
|
|
33
|
-
provide("seekVideo",
|
|
34
|
-
provide("enableAnimation",
|
|
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);
|
|
@@ -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 :
|
|
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 =
|
|
14
|
-
let case_config =
|
|
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.
|
|
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.
|
|
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 =
|
|
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.
|
|
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.
|
|
168
|
+
parent = parent.parentNode;
|
|
169
169
|
continue;
|
|
170
170
|
}
|
|
171
171
|
|