@shijiu/jsview-vue 0.0.1-beta.0
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/docs/IMPORT_CHANGE_LOG.txt +3 -0
- package/docs/git_commit.md +15 -0
- package/docs/test_version_up.txt +1 -0
- package/dom/bin/jsview-dom-1.0.313.tgz +0 -0
- package/dom/browser-root-style.css +21 -0
- package/dom/jsv-browser-debug-dom.js +8 -0
- package/dom/jsv-dom.js +6 -0
- package/dom/jsv-forge-define.js +6 -0
- package/dom/target_core_revision.js +14 -0
- package/load/header_script_loader.js +134 -0
- package/load/jsview-main.js +42 -0
- package/load/jsview.config.default.js +37 -0
- package/load/jsview.default.config.js +37 -0
- package/load/loader.js +172 -0
- package/load/loader_webkit.js +40 -0
- package/package.json +27 -0
- package/patch/node_modules/@babel/preset-env/lib/available-plugins.js +219 -0
- package/patch/node_modules/@vue/cli-plugin-typescript/index.js +100 -0
- package/patch/node_modules/@vue/cli-service/lib/commands/serve.js +395 -0
- package/patch/node_modules/@vue/cli-service/lib/config/app.js +272 -0
- package/patch/node_modules/@vue/cli-service/lib/config/assets.js +70 -0
- package/patch/node_modules/@vue/cli-service/lib/config/base.js +212 -0
- package/patch/node_modules/@vue/compiler-sfc/dist/compiler-sfc.cjs.js +2566 -0
- package/patch/node_modules/@vue/compiler-sfc/dist/jsview-css-to-js.js +274 -0
- package/patch/node_modules/@vue/runtime-dom/dist/runtime-dom.esm-bundler.js +1596 -0
- package/patch/node_modules/postcss-js/objectifier.js +90 -0
- package/patch/node_modules/vue-loader/dist/resolveScript.js +70 -0
- package/patch/package-lock.json +30051 -0
- package/samples/AdvanceMetroWidget/App.vue +123 -0
- package/samples/AdvanceMetroWidget/Frame.vue +101 -0
- package/samples/AdvanceMetroWidget/Item.vue +58 -0
- package/samples/AdvanceMetroWidget/data.js +137 -0
- package/samples/AnimPicture/App.vue +224 -0
- package/samples/AnimPicture/assets/animated_webp.webp +0 -0
- package/samples/AnimPicture/assets/ball_3.webp +0 -0
- package/samples/AnimPicture/assets/girl_run.gif +0 -0
- package/samples/AnimPicture/assets/quan.webp +0 -0
- package/samples/Basic/App.vue +129 -0
- package/samples/Basic/assets/border.png +0 -0
- package/samples/Basic/assets/border2.png +0 -0
- package/samples/Basic/assets/icon.png +0 -0
- package/samples/Basic/assets/test.jpg +0 -0
- package/samples/Basic/components/ContentBlock.vue +36 -0
- package/samples/Basic/components/FontStyle.css +10 -0
- package/samples/Basic/components/TitleBar.vue +29 -0
- package/samples/Basic/components/anim/AnimGroup.vue +68 -0
- package/samples/Basic/components/anim/AnimKeyframeBasic.vue +102 -0
- package/samples/Basic/components/anim/AnimKeyframeComposite.vue +53 -0
- package/samples/Basic/components/anim/AnimTransition.vue +116 -0
- package/samples/Basic/components/div/DivBackground.vue +15 -0
- package/samples/Basic/components/div/DivClip.vue +81 -0
- package/samples/Basic/components/div/DivCssScoped.vue +27 -0
- package/samples/Basic/components/div/DivCssVar.vue +50 -0
- package/samples/Basic/components/div/DivGroup1.vue +33 -0
- package/samples/Basic/components/div/DivGroup2.vue +41 -0
- package/samples/Basic/components/div/DivLayout.vue +12 -0
- package/samples/Basic/components/div/DivRadius.vue +47 -0
- package/samples/Basic/components/text/TextAlign.vue +48 -0
- package/samples/Basic/components/text/TextFontStyle.vue +58 -0
- package/samples/Basic/components/text/TextGroup.vue +32 -0
- package/samples/Basic/components/text/TextOverflow.vue +78 -0
- package/samples/BasicFocusControl/App.vue +125 -0
- package/samples/BasicFocusControl/components/BaseBlock.vue +51 -0
- package/samples/BasicFocusControl/components/MainArea.vue +98 -0
- package/samples/BasicFocusControl/components/MainAreaLeftBlock.vue +21 -0
- package/samples/BasicFocusControl/components/MainAreaRightBlock.vue +30 -0
- package/samples/BasicFocusControl/components/SideBar.vue +73 -0
- package/samples/BasicFocusControl/components/SideBarBlock.vue +30 -0
- package/samples/ClassNameDemo/App.vue +119 -0
- package/samples/ClassNameDemo/assets/bg.jpg +0 -0
- package/samples/ClassNameDemo/assets/coupon_content.png +0 -0
- package/samples/ClassNameDemo/assets/coupon_left.png +0 -0
- package/samples/ClassNameDemo/assets/coupon_mid.png +0 -0
- package/samples/ClassNameDemo/assets/coupon_right.png +0 -0
- package/samples/ClassNameDemo/assets/focus_border.png +0 -0
- package/samples/ClassNameDemo/assets/holder_logo.png +0 -0
- package/samples/ClassNameDemo/assets/jrbm.png +0 -0
- package/samples/ClassNameDemo/assets/line_left.png +0 -0
- package/samples/ClassNameDemo/assets/line_mid.png +0 -0
- package/samples/ClassNameDemo/assets/line_right.png +0 -0
- package/samples/ClassNameDemo/assets/loading.png +0 -0
- package/samples/ClassNameDemo/assets/logo.png +0 -0
- package/samples/ClassNameDemo/assets/mcjx.png +0 -0
- package/samples/ClassNameDemo/assets/tao.png +0 -0
- package/samples/ClassNameDemo/assets/tmall.png +0 -0
- package/samples/ClassNameDemo/components/ContentItem.vue +253 -0
- package/samples/ClassNameDemo/components/LoadingView.vue +43 -0
- package/samples/ClassNameDemo/components/TitleView.vue +24 -0
- package/samples/ClassNameDemo/data.js +24 -0
- package/samples/ColorSpace/App.vue +135 -0
- package/samples/ColorSpace/bmpDemo.bmp +0 -0
- package/samples/ColorSpace/jpegDemo.jpeg +0 -0
- package/samples/ColorSpace/pngDemo.png +0 -0
- package/samples/ColorSpace/pngNoAlphaDemo.png +0 -0
- package/samples/DemoHomepage/App.vue +31 -0
- package/samples/DemoHomepage/components/BodyFrame.vue +82 -0
- package/samples/DemoHomepage/components/Dialog.vue +94 -0
- package/samples/DemoHomepage/components/Item.vue +77 -0
- package/samples/DemoHomepage/components/TabFrame.vue +86 -0
- package/samples/DemoHomepage/router.js +132 -0
- package/samples/DemoHomepage/views/Homepage.vue +186 -0
- package/samples/FlipCard/App.vue +80 -0
- package/samples/FlipCard/FlipCard.vue +124 -0
- package/samples/FlipCard/assets/blue_egg.png +0 -0
- package/samples/FlipCard/assets/red_egg.png +0 -0
- package/samples/FlipCard/data.js +13 -0
- package/samples/FlowMultiWidget/App.vue +91 -0
- package/samples/FlowMultiWidget/assets/nine_patch_focus.png +0 -0
- package/samples/FlowMultiWidget/components/Block.vue +107 -0
- package/samples/FlowMultiWidget/components/FlowPage.vue +60 -0
- package/samples/FlowMultiWidget/components/Item.vue +103 -0
- package/samples/FlowMultiWidget/components/MenuItem.vue +72 -0
- package/samples/FlowMultiWidget/components/MyMenu.vue +90 -0
- package/samples/FlowMultiWidget/data.js +446 -0
- package/samples/HashHistory/App.vue +124 -0
- package/samples/HashHistory/components/HorizontalButtonList.vue +114 -0
- package/samples/HashHistory/components/Item.vue +74 -0
- package/samples/HashHistory/router.js +30 -0
- package/samples/HashHistory/views/BasePage.vue +19 -0
- package/samples/HashHistory/views/MainPage.vue +68 -0
- package/samples/HashHistory/views/SubPage.vue +79 -0
- package/samples/HashHistory/views/SubPageFirst.vue +10 -0
- package/samples/HashHistory/views/SubPageSecond.vue +10 -0
- package/samples/LongImage/App.vue +96 -0
- package/samples/LongImage/Button.vue +153 -0
- package/samples/LongImage/LongImageScroll.vue +127 -0
- package/samples/LongImage/Scroll.vue +16 -0
- package/samples/LongImage/assets/1280x7200.jpg +0 -0
- package/samples/LongText/App.vue +111 -0
- package/samples/LongText/Button.vue +153 -0
- package/samples/LongText/LongTextScroll.vue +225 -0
- package/samples/LongText/Scroll.vue +16 -0
- package/samples/Preload/App.vue +146 -0
- package/samples/Preload/data.js +23 -0
- package/samples/Preload/images/awesomeface.png +0 -0
- package/samples/Preload/images/cat.jpg +0 -0
- package/samples/Preload/images/rank.png +0 -0
- package/samples/Preload/images/rank_focus.png +0 -0
- package/samples/Preload/images/rule.png +0 -0
- package/samples/Preload/images/rule_focus.png +0 -0
- package/samples/Preload/images/start.png +0 -0
- package/samples/Preload/images/start_focus.png +0 -0
- package/samples/Preload/preloadItem.vue +22 -0
- package/samples/QrcodeDemo/App.vue +73 -0
- package/samples/SimpleWidgetDemo/App.vue +204 -0
- package/samples/SimpleWidgetDemo/Item.vue +83 -0
- package/samples/SimpleWidgetDemo/assets/bg.jpg +0 -0
- package/samples/SimpleWidgetDemo/assets/coupon_content.png +0 -0
- package/samples/SimpleWidgetDemo/assets/coupon_left.png +0 -0
- package/samples/SimpleWidgetDemo/assets/coupon_mid.png +0 -0
- package/samples/SimpleWidgetDemo/assets/coupon_right.png +0 -0
- package/samples/SimpleWidgetDemo/assets/focus_border.png +0 -0
- package/samples/SimpleWidgetDemo/assets/holder_logo.png +0 -0
- package/samples/SimpleWidgetDemo/assets/jrbm.png +0 -0
- package/samples/SimpleWidgetDemo/assets/line_left.png +0 -0
- package/samples/SimpleWidgetDemo/assets/line_mid.png +0 -0
- package/samples/SimpleWidgetDemo/assets/line_right.png +0 -0
- package/samples/SimpleWidgetDemo/assets/loading.png +0 -0
- package/samples/SimpleWidgetDemo/assets/logo.png +0 -0
- package/samples/SimpleWidgetDemo/assets/mcjx.png +0 -0
- package/samples/SimpleWidgetDemo/assets/tao.png +0 -0
- package/samples/SimpleWidgetDemo/assets/tmall.png +0 -0
- package/samples/SimpleWidgetDemo/border.png +0 -0
- package/samples/SimpleWidgetDemo/components/ContentItem.vue +412 -0
- package/samples/SimpleWidgetDemo/components/MyTab.vue +117 -0
- package/samples/SimpleWidgetDemo/data.js +110 -0
- package/samples/SprayView/App.vue +270 -0
- package/samples/SprayView/assets/snow.png +0 -0
- package/samples/SpriteImage/App.vue +174 -0
- package/samples/SpriteImage/images/cat_run.png +0 -0
- package/samples/SpriteImage/images/egg_break.json +116 -0
- package/samples/SpriteImage/images/egg_break.png +0 -0
- package/samples/SpriteImage/images/sprite.png +0 -0
- package/samples/TextBox/App.vue +179 -0
- package/samples/TextBox/RenderCenter.vue +109 -0
- package/samples/TextBox/RenderLeft.vue +109 -0
- package/samples/TextBox/RenderOneLine.vue +120 -0
- package/samples/TextBox/RenderRight.vue +107 -0
- package/samples/TextShadowDemo/App.vue +98 -0
- package/samples/TextureSize/App.vue +142 -0
- package/samples/TextureSize/bmpDemo.bmp +0 -0
- package/samples/TextureSize/jpegDemo.jpeg +0 -0
- package/samples/TextureSize/jpgDemo.jpg +0 -0
- package/samples/TextureSize/pngDemo.png +0 -0
- package/samples/TextureSize/pngNoAlphaDemo.png +0 -0
- package/samples/ThrowMoveDemo/AccelerateDemo.vue +118 -0
- package/samples/ThrowMoveDemo/App.vue +114 -0
- package/samples/ThrowMoveDemo/LRParabolicDemo.vue +116 -0
- package/samples/ThrowMoveDemo/TargetDemo.vue +117 -0
- package/samples/ThrowMoveDemo/UDParabolicDemo.vue +122 -0
- package/samples/TransitPage/App.vue +41 -0
- package/samples/VideoDemo/App.vue +137 -0
- package/samples/VideoDemo/components/Button.vue +69 -0
- package/samples/VideoDemo/components/Controllor.vue +195 -0
- package/samples/VideoDemo/components/VideoFrame.vue +152 -0
- package/scripts/git-commit-empty.js +21 -0
- package/scripts/install-local-packages.js +121 -0
- package/scripts/make-js.sh +181 -0
- package/scripts/post-build.js +132 -0
- package/scripts/post-install.js +127 -0
- package/scripts/pre-pack.js +2 -0
- package/scripts/run-android.js +64 -0
- package/utils/JsViewEngineWidget/bin/shijiu-jsview-vue-widget-1.0.1.tgz +0 -0
- package/utils/JsViewEngineWidget/index.d.ts +32 -0
- package/utils/JsViewEngineWidget/index.js +6 -0
- package/utils/JsViewVueTools/DebugContentShellJBridge.js +16 -0
- package/utils/JsViewVueTools/DebugTool.js +21 -0
- package/utils/JsViewVueTools/DefaultKeyMap.js +12 -0
- package/utils/JsViewVueTools/JsvDynamicCssStyle.js +73 -0
- package/utils/JsViewVueTools/JsvDynamicKeyFrames.js +128 -0
- package/utils/JsViewVueTools/JsvHashHistory.js +112 -0
- package/utils/JsViewVueTools/JsvRuntimeBridge.js +417 -0
- package/utils/JsViewVueTools/JsvStyleClass.js +290 -0
- package/utils/JsViewVueWidget/BrowserDebugWidget/BrowserPreload.vue +80 -0
- package/utils/JsViewVueWidget/BrowserDebugWidget/BrowserQrcode.vue +148 -0
- package/utils/JsViewVueWidget/BrowserDebugWidget/BrowserSpray.vue +55 -0
- package/utils/JsViewVueWidget/BrowserDebugWidget/JsvApic/ApicDataBase.js +29 -0
- package/utils/JsViewVueWidget/BrowserDebugWidget/JsvApic/BrowserApic.vue +124 -0
- package/utils/JsViewVueWidget/BrowserDebugWidget/JsvApic/GifData.js +83 -0
- package/utils/JsViewVueWidget/BrowserDebugWidget/JsvApic/LoopToolBase.js +25 -0
- package/utils/JsViewVueWidget/BrowserDebugWidget/JsvApic/NormalLoopTool.js +61 -0
- package/utils/JsViewVueWidget/BrowserDebugWidget/JsvApic/PartLoopTool.js +119 -0
- package/utils/JsViewVueWidget/BrowserDebugWidget/JsvApic/Viewer.js +106 -0
- package/utils/JsViewVueWidget/BrowserDebugWidget/JsvApic/WebpData.js +141 -0
- package/utils/JsViewVueWidget/BrowserDebugWidget/WidgetLoader.js +20 -0
- package/utils/JsViewVueWidget/BrowserDebugWidget/WidgetWrapper.js +11 -0
- package/utils/JsViewVueWidget/JsvActorMove/ActorControlBase.js +204 -0
- package/utils/JsViewVueWidget/JsvActorMove/JsvActorMove.vue +64 -0
- package/utils/JsViewVueWidget/JsvActorMove/JsvActorMoveControl.js +427 -0
- package/utils/JsViewVueWidget/JsvActorMove/index.js +12 -0
- package/utils/JsViewVueWidget/JsvApic/JsvApic.vue +179 -0
- package/utils/JsViewVueWidget/JsvApic/index.js +17 -0
- package/utils/JsViewVueWidget/JsvMarquee.vue +197 -0
- package/utils/JsViewVueWidget/JsvNativeSharedDiv.vue +92 -0
- package/utils/JsViewVueWidget/JsvNinePatch.vue +76 -0
- package/utils/JsViewVueWidget/JsvPreload/JsvPreload.vue +351 -0
- package/utils/JsViewVueWidget/JsvPreload/index.js +21 -0
- package/utils/JsViewVueWidget/JsvQrcode/JsvQrcode.vue +140 -0
- package/utils/JsViewVueWidget/JsvQrcode/index.js +18 -0
- package/utils/JsViewVueWidget/JsvSpray/JsvSpray.vue +140 -0
- package/utils/JsViewVueWidget/JsvSpray/index.js +15 -0
- package/utils/JsViewVueWidget/JsvSpriteAnim/JsvSpriteAnim.vue +448 -0
- package/utils/JsViewVueWidget/JsvSpriteAnim/SpriteController.js +57 -0
- package/utils/JsViewVueWidget/JsvSpriteAnim/index.js +6 -0
- package/utils/JsViewVueWidget/JsvSwiper/Indicator.vue +35 -0
- package/utils/JsViewVueWidget/JsvSwiper/JsvSwiper.vue +495 -0
- package/utils/JsViewVueWidget/JsvSwiper/index.js +10 -0
- package/utils/JsViewVueWidget/JsvSwiper3D/Indicator.vue +35 -0
- package/utils/JsViewVueWidget/JsvSwiper3D/JsvSwiper.vue +404 -0
- package/utils/JsViewVueWidget/JsvSwiper3D/index.js +10 -0
- package/utils/JsViewVueWidget/JsvTextBox.vue +111 -0
- package/utils/JsViewVueWidget/JsvVideo.vue +36 -0
|
@@ -0,0 +1,186 @@
|
|
|
1
|
+
<script>
|
|
2
|
+
import { jJsvRuntimeBridge } from "jsview/utils/JsViewVueTools/JsvRuntimeBridge";
|
|
3
|
+
import { EdgeDirection } from "jsview/utils/JsViewEngineWidget";
|
|
4
|
+
import TabFrame from "../components/TabFrame.vue";
|
|
5
|
+
import BodyFrame from "../components/BodyFrame.vue";
|
|
6
|
+
import Dialog from "../components/Dialog.vue";
|
|
7
|
+
import { routeList } from "../router.js";
|
|
8
|
+
|
|
9
|
+
const colorTemplete = ["#89BEB2", "#C9BA83", "#DED38C", "#DE9C53"];
|
|
10
|
+
|
|
11
|
+
const featureData = [];
|
|
12
|
+
const sceneData = [];
|
|
13
|
+
for (let item of routeList) {
|
|
14
|
+
let obj = {
|
|
15
|
+
name: item.name,
|
|
16
|
+
path: item.path,
|
|
17
|
+
width: 300,
|
|
18
|
+
height: 100,
|
|
19
|
+
focusable: true,
|
|
20
|
+
};
|
|
21
|
+
if (item.path.indexOf("feature") >= 0) {
|
|
22
|
+
obj.backgroundColor = colorTemplete[featureData.length % 4];
|
|
23
|
+
featureData.push(obj);
|
|
24
|
+
} else if (item.path.indexOf("scene") >= 0) {
|
|
25
|
+
obj.backgroundColor = colorTemplete[sceneData.length % 4];
|
|
26
|
+
sceneData.push(obj);
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
const dataList = [featureData, sceneData];
|
|
30
|
+
|
|
31
|
+
export default {
|
|
32
|
+
components: {
|
|
33
|
+
TabFrame,
|
|
34
|
+
Dialog,
|
|
35
|
+
BodyFrame,
|
|
36
|
+
},
|
|
37
|
+
data() {
|
|
38
|
+
return {
|
|
39
|
+
showExitDialog: false,
|
|
40
|
+
contentData: dataList[0],
|
|
41
|
+
tabId: 0,
|
|
42
|
+
preFocusName: "",
|
|
43
|
+
curFocusName: "",
|
|
44
|
+
};
|
|
45
|
+
},
|
|
46
|
+
setup() {
|
|
47
|
+
return {
|
|
48
|
+
name: "/home",
|
|
49
|
+
};
|
|
50
|
+
},
|
|
51
|
+
computed: {
|
|
52
|
+
address() {
|
|
53
|
+
return window.localStorage.href;
|
|
54
|
+
},
|
|
55
|
+
},
|
|
56
|
+
methods: {
|
|
57
|
+
onFocus() {
|
|
58
|
+
this.changeFocus(this.name + "/bodyFrame");
|
|
59
|
+
},
|
|
60
|
+
onKeyDown(ev) {
|
|
61
|
+
// 处理返回键
|
|
62
|
+
if (
|
|
63
|
+
ev.keyCode == 8 || // Backspace
|
|
64
|
+
ev.keyCode == 27 || // Escape
|
|
65
|
+
ev.keyCode == 10000 // 盒子返回键
|
|
66
|
+
) {
|
|
67
|
+
this.showExitDialog = !this.showExitDialog;
|
|
68
|
+
if (!this.showExitDialog) {
|
|
69
|
+
this.changeFocus(this.preFocusName);
|
|
70
|
+
} else {
|
|
71
|
+
this.preFocusName = this.curFocusName;
|
|
72
|
+
this.curFocusName = this.name + "/exitDialog";
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
return true;
|
|
76
|
+
},
|
|
77
|
+
changeFocus(name) {
|
|
78
|
+
this.preFocusName = this.curFocusName;
|
|
79
|
+
this.curFocusName = name;
|
|
80
|
+
this.$refs.rootNode.findBlockByName(name).requestFocus();
|
|
81
|
+
},
|
|
82
|
+
onTabEdge(edgeInfo) {
|
|
83
|
+
if (edgeInfo.direction === EdgeDirection.bottom) {
|
|
84
|
+
this.changeFocus(this.name + "/bodyFrame");
|
|
85
|
+
}
|
|
86
|
+
},
|
|
87
|
+
onContentEdge(edgeInfo) {
|
|
88
|
+
if (edgeInfo.direction === EdgeDirection.top) {
|
|
89
|
+
this.changeFocus(this.name + "/tabFrame");
|
|
90
|
+
}
|
|
91
|
+
},
|
|
92
|
+
tabItemFocus(data) {
|
|
93
|
+
if (data.id != this.tabId) {
|
|
94
|
+
this.tabId = data.id;
|
|
95
|
+
this.contentData = dataList[this.tabId];
|
|
96
|
+
}
|
|
97
|
+
},
|
|
98
|
+
onDialogAction(msg) {
|
|
99
|
+
console.log("cchtes dialog onaction", msg);
|
|
100
|
+
this.showExitDialog = false;
|
|
101
|
+
this.changeFocus(this.preFocusName);
|
|
102
|
+
switch (msg) {
|
|
103
|
+
case "ok":
|
|
104
|
+
jJsvRuntimeBridge.closePage();
|
|
105
|
+
// if (!window.JsView) {
|
|
106
|
+
// // 浏览器调试
|
|
107
|
+
// window.location.href = "about:blank";
|
|
108
|
+
// }
|
|
109
|
+
break;
|
|
110
|
+
case "back":
|
|
111
|
+
case "cancel":
|
|
112
|
+
break;
|
|
113
|
+
}
|
|
114
|
+
},
|
|
115
|
+
},
|
|
116
|
+
};
|
|
117
|
+
</script>
|
|
118
|
+
|
|
119
|
+
<template>
|
|
120
|
+
<div class="rootSize">
|
|
121
|
+
<div class="address">
|
|
122
|
+
{{ address }}
|
|
123
|
+
</div>
|
|
124
|
+
<div class="logo">JsView-Vue3</div>
|
|
125
|
+
|
|
126
|
+
<jsv-focus-block
|
|
127
|
+
autoFocus
|
|
128
|
+
ref="rootNode"
|
|
129
|
+
:onAction="{
|
|
130
|
+
onKeyDown: onKeyDown,
|
|
131
|
+
onFocus: onFocus,
|
|
132
|
+
}"
|
|
133
|
+
>
|
|
134
|
+
<div :style="{ left: 10 }">
|
|
135
|
+
<tab-frame
|
|
136
|
+
:name="name + '/tabFrame'"
|
|
137
|
+
:onEdge="onTabEdge"
|
|
138
|
+
:itemFocus="tabItemFocus"
|
|
139
|
+
/>
|
|
140
|
+
</div>
|
|
141
|
+
|
|
142
|
+
<div
|
|
143
|
+
:style="{
|
|
144
|
+
left: 10,
|
|
145
|
+
top: 100,
|
|
146
|
+
}"
|
|
147
|
+
>
|
|
148
|
+
<body-frame
|
|
149
|
+
:data="contentData"
|
|
150
|
+
:name="name + '/bodyFrame'"
|
|
151
|
+
:onEdge="onContentEdge"
|
|
152
|
+
/>
|
|
153
|
+
</div>
|
|
154
|
+
|
|
155
|
+
<Dialog
|
|
156
|
+
v-if="showExitDialog"
|
|
157
|
+
:name="name + '/exitDialog'"
|
|
158
|
+
:onAction="onDialogAction"
|
|
159
|
+
/>
|
|
160
|
+
</jsv-focus-block>
|
|
161
|
+
</div>
|
|
162
|
+
</template>
|
|
163
|
+
|
|
164
|
+
<style scoped>
|
|
165
|
+
.rootSize {
|
|
166
|
+
width: 1920;
|
|
167
|
+
height: 1080;
|
|
168
|
+
background-color: #334c4c;
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
.address {
|
|
172
|
+
width: 1280;
|
|
173
|
+
height: 30;
|
|
174
|
+
color: #ffffff;
|
|
175
|
+
font-size: 20px;
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
.logo {
|
|
179
|
+
width: 1280;
|
|
180
|
+
height: 30;
|
|
181
|
+
color: #00ff00;
|
|
182
|
+
font-size: 20px;
|
|
183
|
+
font-weight: bold;
|
|
184
|
+
text-align: right;
|
|
185
|
+
}
|
|
186
|
+
</style>
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
<script>
|
|
2
|
+
import {
|
|
3
|
+
HORIZONTAL,
|
|
4
|
+
SimpleWidget,
|
|
5
|
+
} from "jsview/utils/JsViewEngineWidget";
|
|
6
|
+
import FlipCard from "./FlipCard.vue";
|
|
7
|
+
import { data } from "./data.js";
|
|
8
|
+
import redEgg from "./assets/red_egg.png";
|
|
9
|
+
import blueEgg from "./assets/blue_egg.png";
|
|
10
|
+
export default {
|
|
11
|
+
components: { SimpleWidget, FlipCard },
|
|
12
|
+
setup() {
|
|
13
|
+
return {
|
|
14
|
+
name: "/flipCard",
|
|
15
|
+
flipCardData: data,
|
|
16
|
+
direction: HORIZONTAL,
|
|
17
|
+
redEgg,
|
|
18
|
+
blueEgg,
|
|
19
|
+
};
|
|
20
|
+
},
|
|
21
|
+
methods: {
|
|
22
|
+
onKeyDown(ev) {
|
|
23
|
+
// 8:Backspace, 27:Escape, 10000:盒子返回键
|
|
24
|
+
if (ev.keyCode == 8 || ev.keyCode == 27 || ev.keyCode == 10000) {
|
|
25
|
+
this.$router?.go(-1); // 有router时,是从DemoHomepage进入,回退
|
|
26
|
+
return true;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
return false;
|
|
30
|
+
},
|
|
31
|
+
measures(item) {
|
|
32
|
+
return {
|
|
33
|
+
width: item.blocks.w,
|
|
34
|
+
height: item.blocks.h,
|
|
35
|
+
focusable: item.focusable,
|
|
36
|
+
hasSub: item.hasSub,
|
|
37
|
+
};
|
|
38
|
+
},
|
|
39
|
+
onFocus() {
|
|
40
|
+
this.$refs.focusNode.findBlockByName(this.name).requestFocus();
|
|
41
|
+
},
|
|
42
|
+
},
|
|
43
|
+
};
|
|
44
|
+
</script>
|
|
45
|
+
<template>
|
|
46
|
+
<jsv-focus-block
|
|
47
|
+
ref="focusNode"
|
|
48
|
+
autoFocus
|
|
49
|
+
:onAction="{
|
|
50
|
+
onKeyDown: onKeyDown,
|
|
51
|
+
onFocus: onFocus,
|
|
52
|
+
}"
|
|
53
|
+
>
|
|
54
|
+
<simple-widget
|
|
55
|
+
:name="name"
|
|
56
|
+
:width="1280"
|
|
57
|
+
:height="720"
|
|
58
|
+
:padding="{ left: 50, top: 100, right: 20, bottom: 20 }"
|
|
59
|
+
:data="flipCardData"
|
|
60
|
+
:direction="direction"
|
|
61
|
+
:measures="measures"
|
|
62
|
+
>
|
|
63
|
+
<template #renderItem="{ data, query, onEdge, onAction }">
|
|
64
|
+
<FlipCard
|
|
65
|
+
:data="data"
|
|
66
|
+
:query="query"
|
|
67
|
+
:onEdge="onEdge"
|
|
68
|
+
:onAction="onAction"
|
|
69
|
+
:width="191"
|
|
70
|
+
:height="252"
|
|
71
|
+
:backImg="redEgg"
|
|
72
|
+
:foreImg="blueEgg"
|
|
73
|
+
:perspective="300"
|
|
74
|
+
:initFlipped="false"
|
|
75
|
+
:name="name + '/' + data.id"
|
|
76
|
+
/>
|
|
77
|
+
</template>
|
|
78
|
+
</simple-widget>
|
|
79
|
+
</jsv-focus-block>
|
|
80
|
+
</template>
|
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
<script>
|
|
2
|
+
export default {
|
|
3
|
+
props: {
|
|
4
|
+
initFlipped: Boolean,
|
|
5
|
+
width: Number,
|
|
6
|
+
height: Number,
|
|
7
|
+
backImg: String,
|
|
8
|
+
foreImg: String,
|
|
9
|
+
perspective: Number,
|
|
10
|
+
data: Object,
|
|
11
|
+
query: Object,
|
|
12
|
+
onEdge: Function,
|
|
13
|
+
onAction: Object,
|
|
14
|
+
name: String,
|
|
15
|
+
},
|
|
16
|
+
data() {
|
|
17
|
+
return {
|
|
18
|
+
flipAnim: "",
|
|
19
|
+
flipped: this.initFlipped,
|
|
20
|
+
focused: false,
|
|
21
|
+
keyLocked: false,
|
|
22
|
+
};
|
|
23
|
+
},
|
|
24
|
+
methods: {
|
|
25
|
+
onFocus() {
|
|
26
|
+
this.focused = true;
|
|
27
|
+
this.$refs.focusNode.findBlockByName(this.name).requestFocus();
|
|
28
|
+
},
|
|
29
|
+
onBlur() {
|
|
30
|
+
this.focused = false;
|
|
31
|
+
},
|
|
32
|
+
onClick() {},
|
|
33
|
+
onFlipped() {
|
|
34
|
+
this.flipped = !this.flipped;
|
|
35
|
+
this.keyLocked = false;
|
|
36
|
+
},
|
|
37
|
+
onKeyDown(ev) {
|
|
38
|
+
if (this.keyLocked) {
|
|
39
|
+
return true;
|
|
40
|
+
} else {
|
|
41
|
+
if (ev.keyCode === 13) {
|
|
42
|
+
// this.keyLocked = true;
|
|
43
|
+
this.flipAnim = this.flipped ? "flip 1s" : "flipBack 1s";
|
|
44
|
+
return true;
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
return false;
|
|
48
|
+
},
|
|
49
|
+
},
|
|
50
|
+
created() {
|
|
51
|
+
this.onAction.register("onFocus", this.onFocus);
|
|
52
|
+
this.onAction.register("onBlur", this.onBlur);
|
|
53
|
+
this.onAction.register("onClick", this.onClick);
|
|
54
|
+
},
|
|
55
|
+
};
|
|
56
|
+
</script>
|
|
57
|
+
<template>
|
|
58
|
+
<jsv-focus-block
|
|
59
|
+
ref="focusNode"
|
|
60
|
+
:name="name"
|
|
61
|
+
:onAction="{
|
|
62
|
+
onKeyDown: onKeyDown,
|
|
63
|
+
}"
|
|
64
|
+
>
|
|
65
|
+
<div :style="{ width, height, perspective }">
|
|
66
|
+
<div
|
|
67
|
+
:style="{
|
|
68
|
+
width,
|
|
69
|
+
height,
|
|
70
|
+
animation: flipAnim,
|
|
71
|
+
transformStyle: 'preserve-3d',
|
|
72
|
+
backgroundColor: '#FFFF00',
|
|
73
|
+
}"
|
|
74
|
+
:onAnimationEnd="onFlipped"
|
|
75
|
+
>
|
|
76
|
+
<div
|
|
77
|
+
:style="{
|
|
78
|
+
width,
|
|
79
|
+
height,
|
|
80
|
+
backgroundImage: backImg,
|
|
81
|
+
backfaceVisibility: 'hidden',
|
|
82
|
+
transform: flipped ? '' : 'rotate3d(0,1,0,180deg)',
|
|
83
|
+
}"
|
|
84
|
+
></div>
|
|
85
|
+
<div
|
|
86
|
+
:style="{
|
|
87
|
+
width,
|
|
88
|
+
height,
|
|
89
|
+
backgroundImage: foreImg,
|
|
90
|
+
backfaceVisibility: 'hidden',
|
|
91
|
+
transform: flipped ? 'rotate3d(0,1,0,-180deg)' : '',
|
|
92
|
+
}"
|
|
93
|
+
></div>
|
|
94
|
+
</div>
|
|
95
|
+
</div>
|
|
96
|
+
<div
|
|
97
|
+
v-if="focused"
|
|
98
|
+
:style="{ width: 20, height: 20, backgroundColor: '#FF0000' }"
|
|
99
|
+
></div>
|
|
100
|
+
</jsv-focus-block>
|
|
101
|
+
</template>
|
|
102
|
+
<style>
|
|
103
|
+
@keyframes flip {
|
|
104
|
+
from {
|
|
105
|
+
transform: rotate3d(0, 1, 0, 0deg);
|
|
106
|
+
transform-origin: center center;
|
|
107
|
+
}
|
|
108
|
+
to {
|
|
109
|
+
transform: rotate3d(0, 1, 0, 180deg);
|
|
110
|
+
transform-origin: center center;
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
@keyframes flipBack {
|
|
115
|
+
from {
|
|
116
|
+
transform: rotate3d(0, 1, 0, 0deg);
|
|
117
|
+
transform-origin: center center;
|
|
118
|
+
}
|
|
119
|
+
to {
|
|
120
|
+
transform: rotate3d(0, 1, 0, -180deg);
|
|
121
|
+
transform-origin: center center;
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
</style>
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
<!--
|
|
2
|
+
* @Author: ChenChanghua
|
|
3
|
+
* @Date: 2021-09-27 13:49:00
|
|
4
|
+
* @LastEditors: ChenChanghua
|
|
5
|
+
* @LastEditTime: 2021-10-15 14:31:05
|
|
6
|
+
* @Description: file content
|
|
7
|
+
-->
|
|
8
|
+
<script>
|
|
9
|
+
import { menuData, contentData } from "./data.js";
|
|
10
|
+
import FlowPage from "./components/FlowPage.vue";
|
|
11
|
+
import borderImg from "./assets/nine_patch_focus.png";
|
|
12
|
+
import MyMenu from "./components/MyMenu.vue";
|
|
13
|
+
import { ref } from "vue";
|
|
14
|
+
|
|
15
|
+
export default {
|
|
16
|
+
components: {
|
|
17
|
+
FlowPage,
|
|
18
|
+
MyMenu,
|
|
19
|
+
},
|
|
20
|
+
setup() {
|
|
21
|
+
let showMenu = ref(false);
|
|
22
|
+
return {
|
|
23
|
+
menuData,
|
|
24
|
+
contentData,
|
|
25
|
+
borderImg,
|
|
26
|
+
showMenu,
|
|
27
|
+
};
|
|
28
|
+
},
|
|
29
|
+
methods: {
|
|
30
|
+
onFocus() {
|
|
31
|
+
this.$refs.rootNode.findBlockByName("/flow").requestFocus();
|
|
32
|
+
},
|
|
33
|
+
onKeyDown(ev) {
|
|
34
|
+
if (ev.keyCode == 8 || ev.keyCode == 27 || ev.keyCode == 10000) {
|
|
35
|
+
if (this.showMenu) {
|
|
36
|
+
this.showMenu = false;
|
|
37
|
+
this.$refs.rootNode.findBlockByName("/flow").requestFocus();
|
|
38
|
+
} else {
|
|
39
|
+
this.$router?.go(-1); // 有router时,是从DemoHomepage进入,回退
|
|
40
|
+
}
|
|
41
|
+
return true;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
switch (ev.keyCode) {
|
|
45
|
+
case 10001:
|
|
46
|
+
case 77:
|
|
47
|
+
//menu key or M
|
|
48
|
+
this.showMenu = true;
|
|
49
|
+
//menu自动获得焦点
|
|
50
|
+
break;
|
|
51
|
+
case 10000:
|
|
52
|
+
case 82:
|
|
53
|
+
//back key or R
|
|
54
|
+
if (this.showMenu) {
|
|
55
|
+
this.showMenu = false;
|
|
56
|
+
this.$refs.rootNode.findBlockByName("/flow").requestFocus();
|
|
57
|
+
}
|
|
58
|
+
break;
|
|
59
|
+
}
|
|
60
|
+
return true;
|
|
61
|
+
},
|
|
62
|
+
},
|
|
63
|
+
};
|
|
64
|
+
</script>
|
|
65
|
+
|
|
66
|
+
<template>
|
|
67
|
+
<div
|
|
68
|
+
:style="{
|
|
69
|
+
width: 1920,
|
|
70
|
+
height: 1080,
|
|
71
|
+
backgroundColor: '#123f80',
|
|
72
|
+
}"
|
|
73
|
+
>
|
|
74
|
+
<div
|
|
75
|
+
:style="{
|
|
76
|
+
top: 50,
|
|
77
|
+
left: 50,
|
|
78
|
+
}"
|
|
79
|
+
>
|
|
80
|
+
<jsv-focus-block
|
|
81
|
+
ref="rootNode"
|
|
82
|
+
autoFocus
|
|
83
|
+
:onKeyDown="onKeyDown"
|
|
84
|
+
:onFocus="onFocus"
|
|
85
|
+
>
|
|
86
|
+
<flow-page name="/flow" :data="contentData" />
|
|
87
|
+
<my-menu v-if="showMenu" :data="menuData" name="/menu" />
|
|
88
|
+
</jsv-focus-block>
|
|
89
|
+
</div>
|
|
90
|
+
</div>
|
|
91
|
+
</template>
|
|
Binary file
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
<!--
|
|
2
|
+
* @Author: ChenChanghua
|
|
3
|
+
* @Date: 2021-09-27 13:49:54
|
|
4
|
+
* @LastEditors: ChenChanghua
|
|
5
|
+
* @LastEditTime: 2021-10-15 11:02:22
|
|
6
|
+
* @Description: file content
|
|
7
|
+
-->
|
|
8
|
+
<script>
|
|
9
|
+
import {
|
|
10
|
+
HORIZONTAL,
|
|
11
|
+
SimpleWidget,
|
|
12
|
+
SWidgetDispatcher,
|
|
13
|
+
} from "jsview/utils/JsViewEngineWidget";
|
|
14
|
+
import Item from "./Item.vue";
|
|
15
|
+
|
|
16
|
+
export default {
|
|
17
|
+
components: {
|
|
18
|
+
SimpleWidget,
|
|
19
|
+
Item,
|
|
20
|
+
},
|
|
21
|
+
props: {
|
|
22
|
+
data: Object,
|
|
23
|
+
query: Object,
|
|
24
|
+
onEdge: Function,
|
|
25
|
+
onAction: Object,
|
|
26
|
+
name: String,
|
|
27
|
+
},
|
|
28
|
+
setup() {
|
|
29
|
+
let measures = () => {
|
|
30
|
+
return {
|
|
31
|
+
width: 105,
|
|
32
|
+
height: 162,
|
|
33
|
+
focusable: true,
|
|
34
|
+
hasSub: false,
|
|
35
|
+
};
|
|
36
|
+
};
|
|
37
|
+
let dispatcher = new SWidgetDispatcher();
|
|
38
|
+
return {
|
|
39
|
+
direction: HORIZONTAL,
|
|
40
|
+
measures,
|
|
41
|
+
dispatcher,
|
|
42
|
+
};
|
|
43
|
+
},
|
|
44
|
+
methods: {
|
|
45
|
+
onFocus(enterRect) {
|
|
46
|
+
if (enterRect) {
|
|
47
|
+
const foucsInfo = {
|
|
48
|
+
type: SWidgetDispatcher.Type.setFocusRect,
|
|
49
|
+
data: enterRect,
|
|
50
|
+
};
|
|
51
|
+
this.dispatcher.dispatch(foucsInfo);
|
|
52
|
+
}
|
|
53
|
+
this.$refs.focusNode.findBlockByName(this.name).requestFocus();
|
|
54
|
+
},
|
|
55
|
+
onBlur() {
|
|
56
|
+
},
|
|
57
|
+
onClick() {
|
|
58
|
+
},
|
|
59
|
+
},
|
|
60
|
+
created() {
|
|
61
|
+
this.onAction.register("onFocus", this.onFocus);
|
|
62
|
+
this.onAction.register("onBlur", this.onBlur);
|
|
63
|
+
this.onAction.register("onClick", this.onClick);
|
|
64
|
+
},
|
|
65
|
+
};
|
|
66
|
+
</script>
|
|
67
|
+
|
|
68
|
+
<template>
|
|
69
|
+
<div class="text">
|
|
70
|
+
{{ data.title }}
|
|
71
|
+
</div>
|
|
72
|
+
<div :style="{ top: 50 }">
|
|
73
|
+
<jsv-focus-block ref="focusNode">
|
|
74
|
+
<simple-widget
|
|
75
|
+
:name="name"
|
|
76
|
+
:width="data.blocks.w"
|
|
77
|
+
:height="data.blocks.h"
|
|
78
|
+
:direction="direction"
|
|
79
|
+
:padding="{ left: 10, top: 10 }"
|
|
80
|
+
:data="data.data"
|
|
81
|
+
:measures="measures"
|
|
82
|
+
:onEdge="onEdge"
|
|
83
|
+
:dispatcher="dispatcher"
|
|
84
|
+
>
|
|
85
|
+
<template #renderItem="{ data, query, onEdge, onAction }">
|
|
86
|
+
<item
|
|
87
|
+
:data="data"
|
|
88
|
+
:query="query"
|
|
89
|
+
:onEdge="onEdge"
|
|
90
|
+
:onAction="onAction"
|
|
91
|
+
/>
|
|
92
|
+
</template>
|
|
93
|
+
</simple-widget>
|
|
94
|
+
</jsv-focus-block>
|
|
95
|
+
</div>
|
|
96
|
+
</template>
|
|
97
|
+
|
|
98
|
+
|
|
99
|
+
<style scoped>
|
|
100
|
+
.text {
|
|
101
|
+
width: 105px;
|
|
102
|
+
height: 50px;
|
|
103
|
+
color: #ffffff;
|
|
104
|
+
font-size: 25px;
|
|
105
|
+
line-height: 50px;
|
|
106
|
+
}
|
|
107
|
+
</style>
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
<!--
|
|
2
|
+
* @Author: ChenChanghua
|
|
3
|
+
* @Date: 2021-09-27 13:50:40
|
|
4
|
+
* @LastEditors: ChenChanghua
|
|
5
|
+
* @LastEditTime: 2021-09-28 14:38:05
|
|
6
|
+
* @Description: file content
|
|
7
|
+
-->
|
|
8
|
+
<script>
|
|
9
|
+
import {
|
|
10
|
+
VERTICAL,
|
|
11
|
+
SimpleWidget,
|
|
12
|
+
} from "jsview/utils/JsViewEngineWidget";
|
|
13
|
+
import Block from "./Block.vue";
|
|
14
|
+
|
|
15
|
+
export default {
|
|
16
|
+
components: {
|
|
17
|
+
Block,
|
|
18
|
+
SimpleWidget,
|
|
19
|
+
},
|
|
20
|
+
props: {
|
|
21
|
+
data: Object,
|
|
22
|
+
name: String,
|
|
23
|
+
},
|
|
24
|
+
setup() {
|
|
25
|
+
let measures = () => {
|
|
26
|
+
return {
|
|
27
|
+
width: 800,
|
|
28
|
+
height: 200,
|
|
29
|
+
focusable: true,
|
|
30
|
+
hasSub: false,
|
|
31
|
+
};
|
|
32
|
+
};
|
|
33
|
+
return {
|
|
34
|
+
direction: VERTICAL,
|
|
35
|
+
measures,
|
|
36
|
+
};
|
|
37
|
+
},
|
|
38
|
+
};
|
|
39
|
+
</script>
|
|
40
|
+
|
|
41
|
+
<template>
|
|
42
|
+
<simple-widget
|
|
43
|
+
:name="name"
|
|
44
|
+
:width="800"
|
|
45
|
+
:height="600"
|
|
46
|
+
:direction="direction"
|
|
47
|
+
:data="data"
|
|
48
|
+
:measures="measures"
|
|
49
|
+
>
|
|
50
|
+
<template #renderItem="{ data, query, onEdge, onAction }">
|
|
51
|
+
<block
|
|
52
|
+
:name="name + '/block_' + query.id"
|
|
53
|
+
:data="data"
|
|
54
|
+
:query="query"
|
|
55
|
+
:onEdge="onEdge"
|
|
56
|
+
:onAction="onAction"
|
|
57
|
+
/>
|
|
58
|
+
</template>
|
|
59
|
+
</simple-widget>
|
|
60
|
+
</template>
|