@shijiu/jsview-vue 0.9.631 → 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 -0
- 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/Basic/components/text/TextOverflow.vue +8 -3
- 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 +18 -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/App.vue +176 -40
- package/samples/Marquee/longText.js +14 -0
- package/samples/MetroWidgetDemos/Advanced/App.vue +5 -6
- package/samples/MetroWidgetDemos/Advanced/ButtonItem.vue +4 -4
- package/samples/MetroWidgetDemos/Advanced/Buttons.vue +5 -5
- package/samples/MetroWidgetDemos/Advanced/Mixed.vue +4 -4
- package/samples/MetroWidgetDemos/Advanced/widgets/Item.vue +82 -0
- package/samples/MetroWidgetDemos/Advanced/widgets/WidgetItem.vue +88 -0
- package/samples/MetroWidgetDemos/Advanced/{Widgets.vue → widgets/Widgets.vue} +56 -11
- package/samples/MetroWidgetDemos/Advanced/widgets/focus1.png +0 -0
- package/samples/MetroWidgetDemos/Item.vue +4 -2
- 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/AbsoluteTemplate.vue +2 -2
- package/samples/MetroWidgetDemos/Simple/App.vue +2 -2
- package/samples/MetroWidgetDemos/Simple/RelativeTemplate.vue +6 -6
- package/samples/MetroWidgetDemos/WidgetItem.vue +2 -3
- package/samples/MetroWidgetDemos/data.js +2 -1
- 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/ScaleDownNeon/App.vue +107 -0
- package/samples/SoundPool/App.vue +3 -3
- package/samples/SpriteImage/App.vue +5 -0
- package/samples/TextBox/App.vue +9 -82
- package/samples/TextBox/RenderCenter.vue +40 -16
- package/samples/TextBox/RenderLeft.vue +48 -19
- package/samples/TextBox/RenderOneLine.vue +30 -49
- package/samples/TextBox/RenderRight.vue +40 -16
- package/samples/TextShadowDemo/App.vue +11 -17
- package/samples/TextureAnimation/App2.vue +1 -1
- package/samples/TextureSize/App.vue +3 -3
- 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/Const.js +11 -0
- package/utils/JsViewEngineWidget/MetroWidget/MetroWidget.vue +245 -111
- package/utils/JsViewEngineWidget/TemplateParser.js +227 -178
- package/utils/JsViewEngineWidget/WidgetCommon.js +14 -6
- package/utils/JsViewEngineWidget/index.js +3 -2
- 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/JsvMedia.js +61 -12
- package/utils/JsViewPlugin/JsvPlayer/JsvPlayer.vue +8 -1
- package/utils/JsViewPlugin/JsvPlayer/index.js +14 -0
- 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/JsViewVueTools/JsvTextTools.js +18 -0
- 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 +188 -205
- package/utils/JsViewVueWidget/JsvMaskClipDiv.vue +1 -1
- package/utils/JsViewVueWidget/JsvNativeSharedDiv.vue +35 -27
- package/utils/JsViewVueWidget/JsvNinePatch.vue +63 -54
- package/utils/JsViewVueWidget/JsvSpray/JsvSpray.vue +10 -5
- package/utils/JsViewVueWidget/JsvSpriteAnim/JsvSpriteAnim.vue +2 -2
- package/utils/JsViewVueWidget/JsvSwiper/JsvSwiper.vue +21 -5
- package/utils/JsViewVueWidget/JsvSwiper3D/JsvSwiper.vue +23 -3
- package/utils/JsViewVueWidget/JsvTextBox.vue +27 -84
- package/utils/JsViewVueWidget/JsvTouchContainer.vue +5 -6
- package/utils/JsViewVueWidget/JsvTransparentDiv.vue +1 -1
- package/utils/JsViewVueWidget/JsvVisibleSensor/JsvVisibleSensor.vue +5 -5
- package/utils/JsViewVueWidget/index.js +8 -8
- package/utils/JsViewEngineWidget/MetroPage.js +0 -2128
- package/utils/JsViewEngineWidget/SimpleWidget/ContentView.vue +0 -51
- package/utils/JsViewEngineWidget/SimpleWidget/Dispatcher.js +0 -19
- package/utils/JsViewEngineWidget/SimpleWidget/DivWrapper.vue +0 -53
- package/utils/JsViewEngineWidget/SimpleWidget/ItemView.vue +0 -142
- package/utils/JsViewEngineWidget/SimpleWidget/RootView.vue +0 -140
- package/utils/JsViewEngineWidget/SimpleWidget/SimpleWidget.vue +0 -1629
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
<script>
|
|
2
|
-
import {
|
|
1
|
+
<script setup>
|
|
2
|
+
import { computed, shallowRef, onActivated } from "vue";
|
|
3
|
+
import { jJsvRuntimeBridge, EdgeDirection, useFocusHub } from "jsview";
|
|
3
4
|
import TabFrame from "../components/TabFrame.vue";
|
|
4
5
|
import BodyFrame from "../components/BodyFrame.vue";
|
|
5
6
|
import Dialog from "../components/Dialog.vue";
|
|
@@ -27,100 +28,88 @@ for (let item of routeList) {
|
|
|
27
28
|
}
|
|
28
29
|
const dataList = [featureData, metroWidgetData];
|
|
29
30
|
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
if (
|
|
62
|
-
ev.keyCode == 8 || // Backspace
|
|
63
|
-
ev.keyCode == 27 || // Escape
|
|
64
|
-
ev.keyCode == 10000 // 盒子返回键
|
|
65
|
-
) {
|
|
66
|
-
this.showExitDialog = !this.showExitDialog;
|
|
67
|
-
if (!this.showExitDialog) {
|
|
68
|
-
this.changeFocus(this.preFocusName);
|
|
69
|
-
} else {
|
|
70
|
-
this.preFocusName = this.curFocusName;
|
|
71
|
-
this.curFocusName = this.name + "/exitDialog";
|
|
72
|
-
}
|
|
73
|
-
}
|
|
74
|
-
return true;
|
|
75
|
-
},
|
|
76
|
-
changeFocus(name) {
|
|
77
|
-
this.preFocusName = this.curFocusName;
|
|
78
|
-
this.curFocusName = name;
|
|
79
|
-
this.$refs.rootNode.findBlockByName(name).requestFocus();
|
|
80
|
-
},
|
|
81
|
-
onTabEdge(edgeInfo) {
|
|
82
|
-
if (edgeInfo.direction === EdgeDirection.bottom) {
|
|
83
|
-
this.changeFocus(this.name + "/bodyFrame");
|
|
84
|
-
}
|
|
85
|
-
},
|
|
86
|
-
onContentEdge(edgeInfo) {
|
|
87
|
-
if (edgeInfo.direction === EdgeDirection.top) {
|
|
88
|
-
this.changeFocus(this.name + "/tabFrame");
|
|
89
|
-
}
|
|
90
|
-
},
|
|
91
|
-
tabItemFocus(data) {
|
|
92
|
-
if (data.id != this.tabId) {
|
|
93
|
-
this.tabId = data.id;
|
|
94
|
-
this.contentData = dataList[this.tabId];
|
|
95
|
-
}
|
|
96
|
-
},
|
|
97
|
-
onDialogAction(msg) {
|
|
98
|
-
this.showExitDialog = false;
|
|
99
|
-
this.changeFocus(this.preFocusName);
|
|
100
|
-
switch (msg) {
|
|
101
|
-
case "ok":
|
|
102
|
-
jJsvRuntimeBridge.closePage();
|
|
103
|
-
// if (!window.JsView) {
|
|
104
|
-
// // 浏览器调试
|
|
105
|
-
// window.location.href = "about:blank";
|
|
106
|
-
// }
|
|
107
|
-
break;
|
|
108
|
-
case "back":
|
|
109
|
-
case "cancel":
|
|
110
|
-
break;
|
|
111
|
-
}
|
|
112
|
-
},
|
|
113
|
-
},
|
|
114
|
-
created() {
|
|
115
|
-
if (typeof localStorage.curTab !== "undefined") {
|
|
116
|
-
this.tabId = parseInt(localStorage.curTab);
|
|
31
|
+
let showExitDialog = shallowRef(false);
|
|
32
|
+
let contentData = shallowRef(dataList[0]);
|
|
33
|
+
let tabId = shallowRef(0);
|
|
34
|
+
|
|
35
|
+
let preFocusName = "";
|
|
36
|
+
let curFocusName = "";
|
|
37
|
+
let name = "/home";
|
|
38
|
+
|
|
39
|
+
let focusHub = useFocusHub();
|
|
40
|
+
|
|
41
|
+
let address = computed(() => {
|
|
42
|
+
return window.localStorage.href;
|
|
43
|
+
});
|
|
44
|
+
|
|
45
|
+
let onFocus = () => {
|
|
46
|
+
changeFocus(name + "/bodyFrame");
|
|
47
|
+
};
|
|
48
|
+
|
|
49
|
+
let onKeyDown = (ev) => {
|
|
50
|
+
// 处理返回键
|
|
51
|
+
if (
|
|
52
|
+
ev.keyCode == 8 || // Backspace
|
|
53
|
+
ev.keyCode == 27 || // Escape
|
|
54
|
+
ev.keyCode == 10000 // 盒子返回键
|
|
55
|
+
) {
|
|
56
|
+
showExitDialog.value = !showExitDialog.value;
|
|
57
|
+
if (!showExitDialog.value) {
|
|
58
|
+
changeFocus(preFocusName);
|
|
59
|
+
} else {
|
|
60
|
+
preFocusName = curFocusName;
|
|
61
|
+
curFocusName = name + "/exitDialog";
|
|
117
62
|
}
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
63
|
+
}
|
|
64
|
+
return true;
|
|
65
|
+
};
|
|
66
|
+
|
|
67
|
+
let changeFocus = (name) => {
|
|
68
|
+
preFocusName = curFocusName;
|
|
69
|
+
curFocusName = name;
|
|
70
|
+
focusHub.setFocus(name);
|
|
71
|
+
};
|
|
72
|
+
|
|
73
|
+
let onTabEdge = (edgeInfo) => {
|
|
74
|
+
if (edgeInfo.direction === EdgeDirection.bottom) {
|
|
75
|
+
changeFocus(name + "/bodyFrame");
|
|
76
|
+
}
|
|
77
|
+
};
|
|
78
|
+
|
|
79
|
+
let onContentEdge = (edgeInfo) => {
|
|
80
|
+
if (edgeInfo.direction === EdgeDirection.top) {
|
|
81
|
+
changeFocus(name + "/tabFrame");
|
|
82
|
+
}
|
|
123
83
|
};
|
|
84
|
+
|
|
85
|
+
let tabItemFocus = (data) => {
|
|
86
|
+
if (data.id != tabId.value) {
|
|
87
|
+
tabId.value = data.id;
|
|
88
|
+
contentData.value = dataList[data.id];
|
|
89
|
+
}
|
|
90
|
+
};
|
|
91
|
+
|
|
92
|
+
let onDialogAction = (msg) => {
|
|
93
|
+
showExitDialog.value = false;
|
|
94
|
+
changeFocus(preFocusName);
|
|
95
|
+
switch (msg) {
|
|
96
|
+
case "ok":
|
|
97
|
+
jJsvRuntimeBridge.closePage();
|
|
98
|
+
// if (!window.JsView) {
|
|
99
|
+
// // 浏览器调试
|
|
100
|
+
// window.location.href = "about:blank";
|
|
101
|
+
// }
|
|
102
|
+
break;
|
|
103
|
+
case "back":
|
|
104
|
+
case "cancel":
|
|
105
|
+
break;
|
|
106
|
+
}
|
|
107
|
+
};
|
|
108
|
+
|
|
109
|
+
// keep-alive后 router 返回本页面时要激活一下focus
|
|
110
|
+
onActivated(() => {
|
|
111
|
+
onFocus();
|
|
112
|
+
});
|
|
124
113
|
</script>
|
|
125
114
|
|
|
126
115
|
<template>
|
|
@@ -132,7 +121,6 @@ export default {
|
|
|
132
121
|
|
|
133
122
|
<jsv-focus-block
|
|
134
123
|
autoFocus
|
|
135
|
-
ref="rootNode"
|
|
136
124
|
:onAction="{
|
|
137
125
|
onKeyDown: onKeyDown,
|
|
138
126
|
onFocus: onFocus,
|
|
@@ -174,7 +162,6 @@ export default {
|
|
|
174
162
|
.rootSize {
|
|
175
163
|
width: 1920;
|
|
176
164
|
height: 1080;
|
|
177
|
-
background-color: #334c4c;
|
|
178
165
|
}
|
|
179
166
|
|
|
180
167
|
.address {
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
* @Description: file content
|
|
7
7
|
-->
|
|
8
8
|
<script setup>
|
|
9
|
-
import { ref, reactive, onMounted } from "vue";
|
|
9
|
+
import { ref, shallowRef, reactive, onMounted } from "vue";
|
|
10
10
|
import { useRouter } from "vue-router";
|
|
11
11
|
import { jJsvRuntimeBridge, JsvFilterView } from "jsview";
|
|
12
12
|
import sample from "../assets/jpegDemo.jpeg";
|
package/samples/FlipCard/App.vue
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<script setup>
|
|
2
2
|
import { useRouter } from "vue-router";
|
|
3
|
-
import { ref } from "vue";
|
|
3
|
+
import { ref, shallowRef } 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 =
|
|
11
|
+
const focusNode = shallowRef(null);
|
|
12
12
|
const router = useRouter();
|
|
13
13
|
|
|
14
14
|
const onKeyDown = (ev) => {
|
|
@@ -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
|
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 =
|
|
21
|
+
let focusNode = shallowRef(null);
|
|
22
22
|
|
|
23
23
|
const onFocus = () => {
|
|
24
24
|
focused.value = true;
|
|
@@ -65,7 +65,7 @@ props.onAction.register("onClick", onClick);
|
|
|
65
65
|
transformStyle: 'preserve-3d',
|
|
66
66
|
backgroundColor: '#FFFF00',
|
|
67
67
|
}"
|
|
68
|
-
|
|
68
|
+
@animationend="onFlipped"
|
|
69
69
|
>
|
|
70
70
|
<div
|
|
71
71
|
:style="{
|
package/samples/GridDemo/App.vue
CHANGED
|
@@ -7,15 +7,15 @@
|
|
|
7
7
|
-->
|
|
8
8
|
<script setup>
|
|
9
9
|
import { jJsvRuntimeBridge, JsvGrid, LineType, EdgeDirection } from "jsview";
|
|
10
|
-
import { reactive, ref, onMounted } from "vue";
|
|
10
|
+
import { reactive, ref, shallowRef, onMounted } from "vue";
|
|
11
11
|
import { useRouter } from "vue-router";
|
|
12
12
|
import ItemVue from "./Item.vue";
|
|
13
13
|
import FocusItem from "./FocusItem.vue";
|
|
14
14
|
const lineType = new LineType(1, 3);
|
|
15
15
|
const name1 = "updatePage1";
|
|
16
16
|
const name2 = "updatePage2";
|
|
17
|
-
const widget1 =
|
|
18
|
-
const widget2 =
|
|
17
|
+
const widget1 = shallowRef(null);
|
|
18
|
+
const widget2 = shallowRef(null);
|
|
19
19
|
const router = useRouter();
|
|
20
20
|
const _provideData1 = () => {
|
|
21
21
|
let data = [];
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
* @Description: file content
|
|
7
7
|
-->
|
|
8
8
|
<script setup>
|
|
9
|
-
import { ref } from "vue";
|
|
9
|
+
import { ref, shallowRef } from "vue";
|
|
10
10
|
const props = defineProps({
|
|
11
11
|
userData: Object,
|
|
12
12
|
name: String,
|
|
@@ -15,7 +15,7 @@ const props = defineProps({
|
|
|
15
15
|
let focusIndex = ref(0);
|
|
16
16
|
let focused = ref(false);
|
|
17
17
|
let divNumber = new Array(25);
|
|
18
|
-
let focusBlock =
|
|
18
|
+
let focusBlock = shallowRef(null);
|
|
19
19
|
|
|
20
20
|
const _onFocus = () => {
|
|
21
21
|
console.log("button onfocus", props.userData);
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
-->
|
|
8
8
|
<script setup>
|
|
9
9
|
import ButtonBlock from "./ButtonBlock.vue";
|
|
10
|
-
import { ref } from "vue";
|
|
10
|
+
import { ref, shallowRef } from "vue";
|
|
11
11
|
|
|
12
12
|
const props = defineProps({
|
|
13
13
|
userData: Object,
|
|
@@ -16,7 +16,7 @@ const props = defineProps({
|
|
|
16
16
|
});
|
|
17
17
|
const focused = ref(false);
|
|
18
18
|
const divNumber = new Array(50);
|
|
19
|
-
const button =
|
|
19
|
+
const button = shallowRef(null);
|
|
20
20
|
const onFocus = () => {
|
|
21
21
|
button.value
|
|
22
22
|
.getFocusBlock()
|
|
@@ -1,16 +1,23 @@
|
|
|
1
|
+
<script>
|
|
2
|
+
import { router, routeList } from "./router.js";
|
|
3
|
+
export default {
|
|
4
|
+
Router: router,
|
|
5
|
+
};
|
|
6
|
+
</script>
|
|
7
|
+
|
|
1
8
|
<script setup>
|
|
2
9
|
import { jJsvRuntimeBridge } from "jsview";
|
|
3
10
|
import { router, routeList } from "./router.js";
|
|
4
11
|
import { useRouter, useRoute } from "vue-router";
|
|
5
|
-
import { onMounted, ref } from "vue";
|
|
12
|
+
import { onMounted, ref, shallowRef } from "vue";
|
|
6
13
|
|
|
7
14
|
const props = defineProps({
|
|
8
15
|
routePath: String,
|
|
9
16
|
});
|
|
10
17
|
|
|
11
18
|
const displayUrl = ref("");
|
|
12
|
-
let topRef =
|
|
13
|
-
let routePage =
|
|
19
|
+
let topRef = shallowRef(null);
|
|
20
|
+
let routePage = shallowRef(null);
|
|
14
21
|
let currentRouter;
|
|
15
22
|
if (props.routePath) {
|
|
16
23
|
const currentRoute = useRoute();
|
|
@@ -6,6 +6,7 @@
|
|
|
6
6
|
* @Description: file content
|
|
7
7
|
-->
|
|
8
8
|
<script setup>
|
|
9
|
+
import { jJsvRuntimeBridge } from "@shijiu/jsview-vue/utils/JsViewVueTools/JsvRuntimeBridge";
|
|
9
10
|
import {
|
|
10
11
|
JsvActorMoveControl,
|
|
11
12
|
JsvActorMove,
|
|
@@ -13,7 +14,7 @@ import {
|
|
|
13
14
|
createImpactCallback,
|
|
14
15
|
createImpactAutoFroze,
|
|
15
16
|
} from "jsview";
|
|
16
|
-
import { ref, computed, onMounted, onBeforeUnmount } from "vue";
|
|
17
|
+
import { ref, shallowRef, computed, onMounted, onBeforeUnmount } from "vue";
|
|
17
18
|
import { useRouter } from "vue-router";
|
|
18
19
|
const router = useRouter();
|
|
19
20
|
const CONST_BOARD_LEFT = 0;
|
|
@@ -25,12 +26,13 @@ const CONST_BOX_HEIGHT = 30;
|
|
|
25
26
|
|
|
26
27
|
const horizontalControl = new JsvActorMoveControl();
|
|
27
28
|
const verticalControl = new JsvActorMoveControl();
|
|
28
|
-
const boxLeft =
|
|
29
|
-
const boxMid =
|
|
30
|
-
const boxRight =
|
|
31
|
-
const
|
|
32
|
-
|
|
33
|
-
|
|
29
|
+
const boxLeft = shallowRef(null);
|
|
30
|
+
const boxMid = shallowRef(null);
|
|
31
|
+
const boxRight = shallowRef(null);
|
|
32
|
+
const actor = shallowRef(null);
|
|
33
|
+
|
|
34
|
+
let actorVertical = shallowRef(null);
|
|
35
|
+
let actorHorizontal = shallowRef(null);
|
|
34
36
|
|
|
35
37
|
let viewsAutoFroze = null;
|
|
36
38
|
let sensorList = [];
|
|
@@ -195,7 +197,7 @@ onMounted(() => {
|
|
|
195
197
|
|
|
196
198
|
/* 将碰撞发生后要停止动画的元素打包 */
|
|
197
199
|
viewsAutoFroze = createImpactAutoFroze(
|
|
198
|
-
[actorVertical.
|
|
200
|
+
[actorVertical.value.mainDiv, actorHorizontal.value.mainDiv],
|
|
199
201
|
null
|
|
200
202
|
); // 此句柄最好保留,未来可以通过此句柄统一进行views list更新
|
|
201
203
|
|
|
@@ -236,6 +238,8 @@ onMounted(() => {
|
|
|
236
238
|
);
|
|
237
239
|
|
|
238
240
|
reset();
|
|
241
|
+
|
|
242
|
+
jJsvRuntimeBridge.notifyPageLoaded();
|
|
239
243
|
});
|
|
240
244
|
|
|
241
245
|
onBeforeUnmount(() => {
|
|
@@ -379,12 +383,12 @@ onBeforeUnmount(() => {
|
|
|
379
383
|
<div key="actor" :style="{ top: 520 - CONST_BOX_HEIGHT - 2, left: 40 }">
|
|
380
384
|
<jsv-actor-move
|
|
381
385
|
key="horizontal"
|
|
382
|
-
|
|
386
|
+
ref="actorHorizontal"
|
|
383
387
|
:control="horizontalControl"
|
|
384
388
|
>
|
|
385
389
|
<jsv-actor-move
|
|
386
390
|
key="vertical"
|
|
387
|
-
|
|
391
|
+
ref="actorVertical"
|
|
388
392
|
:control="verticalControl"
|
|
389
393
|
>
|
|
390
394
|
<div
|
|
@@ -432,4 +436,4 @@ onBeforeUnmount(() => {
|
|
|
432
436
|
text-overflow: ellipsis;
|
|
433
437
|
text-align: center;
|
|
434
438
|
}
|
|
435
|
-
</style>
|
|
439
|
+
</style>
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
<script>
|
|
9
9
|
import FullKeyboard from "./FullKeyboard.vue";
|
|
10
10
|
import { EdgeDirection, JsvInput, useFocusHub } from "jsview";
|
|
11
|
-
import { ref } from "vue";
|
|
11
|
+
import { ref, shallowRef } from "vue";
|
|
12
12
|
|
|
13
13
|
const blurColor = "#AAAAAA";
|
|
14
14
|
const focusColor = "#FFFF00";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<script setup>
|
|
2
2
|
import Scroll from "./Scroll.vue";
|
|
3
|
-
import { ref, onMounted } from "vue";
|
|
3
|
+
import { ref, shallowRef, onMounted } from "vue";
|
|
4
4
|
import { useFocusHub } from "jsview";
|
|
5
5
|
|
|
6
6
|
const props = defineProps({
|
|
@@ -12,7 +12,7 @@ const props = defineProps({
|
|
|
12
12
|
});
|
|
13
13
|
|
|
14
14
|
const focusHub = useFocusHub();
|
|
15
|
-
const element =
|
|
15
|
+
const element = shallowRef(null);
|
|
16
16
|
const scrollY = ref(0);
|
|
17
17
|
const textY = ref(0);
|
|
18
18
|
const onAction = {
|
package/samples/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 } from "vue";
|
|
30
|
+
import { onMounted, ref, shallowRef } from "vue";
|
|
31
31
|
import { useRouter } from "vue-router";
|
|
32
32
|
|
|
33
33
|
const router = useRouter();
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<script setup>
|
|
2
2
|
import Scroll from "./Scroll.vue";
|
|
3
|
-
import { ref, onMounted } from "vue";
|
|
3
|
+
import { ref, shallowRef, 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 =
|
|
14
|
-
const element =
|
|
13
|
+
const rootRef = shallowRef(null);
|
|
14
|
+
const element = shallowRef(null);
|
|
15
15
|
const scrollY = ref(0);
|
|
16
16
|
const textY = ref(0);
|
|
17
17
|
|