@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
|
@@ -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
|
|
|
@@ -2,13 +2,13 @@
|
|
|
2
2
|
* @Author: ChenChanghua
|
|
3
3
|
* @Date: 2022-11-10 15:08:28
|
|
4
4
|
* @LastEditors: ChenChanghua
|
|
5
|
-
* @LastEditTime: 2022-11-
|
|
5
|
+
* @LastEditTime: 2022-11-21 17:47:57
|
|
6
6
|
* @Description: file content
|
|
7
7
|
*/
|
|
8
8
|
const longLongText =
|
|
9
9
|
"艾因小萌班用户服务协议及隐私权保护政策特别提示:欢迎您使用“艾因小萌班”。本用户服务协议及隐私权保护政策(下称“本协议”)是您与运营方之间订立的具有法律效力的合同。请您仔细阅读并充分理解本协议各条款内容,特别是涉及免除或者限制责任的条款、权利许可和信息使用的条款、同意开通和使用特殊单项服务的条款、法律适用和争议解决条款等。其中,免除或者限制责任条款等重要内容可能以下划线/加粗进行提示您,您应重点阅读。未成年人用户请在法定监护人陪同下仔细阅读并充分理解本协议,并征得法定监护人的同意后使用“艾因小萌班”。除非您完全接受本协议的全部内容,否则您无权下载、注册、登录、使用(以下统称“使用”)“艾因小萌班”,或者通过任何方式使用“艾因小萌班”服务,或者获得“艾因小萌班”提供的任何服务(本协议中统称“使用”)。若您使用“艾因小萌班”及相关服务,则视为您已充分理解本协议并承诺作为本协议的一方当事人接受协议的约束,您不得以未仔细阅读、未充分理解等理由拒绝接受本协议的约束。本协议内容或不能保证完全符合未来业务发展需求。为此,您同意运营方保留随时修改本协议的权利。本协议条款修改后,运营方将及时公布,您同意予以密切关注。如果您继续使用艾因小萌班,即视为您完全接受修改后的协议。如果您不接受修改后的协议,请立即停止使用艾因小萌班。关于艾因小萌班的使用您使用“艾因小萌班”及相关服务,登录后,系统将为您自动匹配一个不可更改的用户ID,您应妥善保管该用户ID并对以您用户ID所进行的所有活动负法律责任。";
|
|
10
10
|
|
|
11
11
|
const rtlLongLongText =
|
|
12
|
-
"
|
|
12
|
+
"نحن لا نضع أي فرضيات مسبقة عن التكنولوجيا الأخرى التي تستخدمها، فلهذا يمكنك تطوير ميزات و إضافات باستخدام دون الحاجة الى إعادة كتابة أي شيفرة مكتوبة سابقاً الواجهات المُعرّفة (التصريحية)، تجعل الشيفرة الخاصة بالبرنامج سهلة التوقع عند تنفيذها و سهلة التصحيح في حالة وجود أخطاء للغاية، ﻻ يجب عليك سوى أن تصمم واجهة بسيطة لكل حالة من حالات التطبيق و بعدها React يتكفل وبفاعلية بتحديث و إعادة رسم المكّون المعني بالتحديث فقط عند تغيُّر البيانات تُدير حالتها الخاصّة، ومن ثمّ تُركِّب هذه المكوّنات مع بعضها لإنشاء واجهات مستخدم مُعقّدة نحن لا نضع أي فرضيات مسبقة عن التكنولوجيا الأخرى التي تستخدمها، فلهذا يمكنك تطوير ميزات و إضافات باستخدام";
|
|
13
13
|
|
|
14
14
|
export { longLongText, rtlLongLongText };
|
|
@@ -2,16 +2,16 @@
|
|
|
2
2
|
* @Author: ChenChanghua
|
|
3
3
|
* @Date: 2022-07-11 13:26:24
|
|
4
4
|
* @LastEditors: ChenChanghua
|
|
5
|
-
* @LastEditTime: 2022-
|
|
5
|
+
* @LastEditTime: 2022-12-02 16:10:16
|
|
6
6
|
* @Description: file content
|
|
7
7
|
-->
|
|
8
8
|
<script setup>
|
|
9
|
-
import { ref } from "vue";
|
|
9
|
+
import { ref, shallowRef } from "vue";
|
|
10
10
|
import { useFocusHub } from "jsview";
|
|
11
11
|
|
|
12
12
|
const props = defineProps({
|
|
13
13
|
data: Object,
|
|
14
|
-
query:
|
|
14
|
+
query: Object,
|
|
15
15
|
onAction: Object,
|
|
16
16
|
onItemEdge: Function,
|
|
17
17
|
});
|
|
@@ -19,7 +19,7 @@ const focusHub = useFocusHub();
|
|
|
19
19
|
|
|
20
20
|
let focusIndex = ref(0);
|
|
21
21
|
let focused = ref(false);
|
|
22
|
-
let focusBlock =
|
|
22
|
+
let focusBlock = shallowRef(null);
|
|
23
23
|
|
|
24
24
|
const onFocus = () => {
|
|
25
25
|
//onFocus时, 获得焦点, 以处理自己内部的焦点逻辑
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* @Author: ChenChanghua
|
|
3
3
|
* @Date: 2022-11-01 15:30:14
|
|
4
4
|
* @LastEditors: ChenChanghua
|
|
5
|
-
* @LastEditTime: 2022-
|
|
5
|
+
* @LastEditTime: 2022-12-02 16:11:54
|
|
6
6
|
* @Description: file content
|
|
7
7
|
-->
|
|
8
8
|
<!--
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
* @Description: file content
|
|
14
14
|
-->
|
|
15
15
|
<script setup>
|
|
16
|
-
import { ref, inject } from "vue";
|
|
16
|
+
import { ref, shallowRef, inject } from "vue";
|
|
17
17
|
|
|
18
18
|
const props = defineProps({
|
|
19
19
|
data: Object,
|
|
@@ -21,7 +21,7 @@ const props = defineProps({
|
|
|
21
21
|
onAction: Object,
|
|
22
22
|
});
|
|
23
23
|
|
|
24
|
-
const divRef =
|
|
24
|
+
const divRef = shallowRef(null);
|
|
25
25
|
const focused = ref(false);
|
|
26
26
|
|
|
27
27
|
const focusSize = inject("focusSize");
|
|
@@ -74,7 +74,6 @@ props.onAction.register("onClick", onClick);
|
|
|
74
74
|
color: '#FFFFFF',
|
|
75
75
|
backgroundColor: data.color,
|
|
76
76
|
borderRadius: '10px',
|
|
77
|
-
animation: animation,
|
|
78
77
|
}"
|
|
79
78
|
>
|
|
80
79
|
{{ data.content }}
|
|
@@ -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
|
>
|
|
@@ -16,7 +16,7 @@ import {
|
|
|
16
16
|
import { advanceMetroWidget } from "../../data";
|
|
17
17
|
import WidgetItem from "../widgets/WidgetItem.vue";
|
|
18
18
|
import focusImg from "./focus1.png";
|
|
19
|
-
import { ref, reactive, provide } from "vue";
|
|
19
|
+
import { ref, shallowRef, reactive, provide } from "vue";
|
|
20
20
|
|
|
21
21
|
const focusHub = useFocusHub();
|
|
22
22
|
const showFocus = ref(false);
|