@shijiu/jsview-vue 0.9.500 → 0.9.602
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/target_core_revision.js +4 -3
- package/index.js +10 -0
- package/package.json +8 -1
- package/patches/node_modules/@vue/runtime-core/dist/runtime-core.esm-bundler.js +16 -5
- package/samples/AnimPicture/App.vue +89 -106
- package/samples/Basic/App.vue +65 -68
- package/samples/Basic/components/ContentBlock.vue +31 -36
- package/samples/Basic/components/anim/AnimGroup.vue +61 -75
- package/samples/Basic/components/anim/AnimKeyframeBasic.vue +54 -43
- package/samples/Basic/components/anim/AnimKeyframeComposite.vue +25 -31
- package/samples/Basic/components/anim/AnimTransition.vue +142 -105
- package/samples/Basic/components/div/DivBackground.vue +38 -16
- package/samples/Basic/components/div/DivClip.vue +143 -78
- package/samples/Basic/components/div/DivCssScoped.vue +10 -10
- package/samples/Basic/components/div/DivCssVar.vue +40 -42
- package/samples/Basic/components/div/DivGroup1.vue +45 -39
- package/samples/Basic/components/div/DivGroup2.vue +56 -45
- package/samples/Basic/components/div/DivLayout.vue +63 -5
- package/samples/Basic/components/div/DivRadius.vue +51 -42
- package/samples/Basic/components/div/DivTransform.vue +21 -16
- package/samples/Basic/components/panel/Panel1.vue +46 -44
- package/samples/Basic/components/panel/Panel2.vue +22 -26
- package/samples/Basic/components/panel/TitleBar.vue +12 -12
- package/samples/Basic/components/text/TextAlign.vue +54 -44
- package/samples/Basic/components/text/TextEmoji.vue +16 -20
- package/samples/Basic/components/text/TextFontStyle.vue +77 -53
- package/samples/Basic/components/text/TextGroup1.vue +46 -38
- package/samples/Basic/components/text/TextGroup2.vue +25 -28
- package/samples/Basic/components/text/TextOverflow.vue +76 -57
- package/samples/BasicFocusControl/App.vue +22 -43
- package/samples/BasicFocusControl/components/BaseBlock.vue +42 -43
- package/samples/BasicFocusControl/components/MainArea.vue +55 -70
- package/samples/BasicFocusControl/components/MainAreaLeftBlock.vue +11 -15
- package/samples/BasicFocusControl/components/MainAreaRightBlock.vue +21 -24
- package/samples/BasicFocusControl/components/SideBar.vue +32 -47
- package/samples/BasicFocusControl/components/SideBarBlock.vue +20 -23
- package/samples/ColorSpace/App.vue +15 -24
- package/samples/DemoHomepage/App.vue +7 -11
- package/samples/DemoHomepage/components/BodyFrame.vue +19 -9
- package/samples/DemoHomepage/components/TabFrame.vue +7 -8
- package/samples/DemoHomepage/router.js +33 -34
- package/samples/DemoHomepage/views/Homepage.vue +24 -8
- package/samples/FilterDemo/AnimatePic.vue +58 -0
- package/samples/FilterDemo/App.vue +99 -61
- package/samples/FilterDemo/VideoLayer.vue +62 -0
- package/samples/FlipCard/App.vue +32 -41
- package/samples/FlipCard/FlipCard.vue +48 -54
- package/samples/GridDemo/App.vue +109 -77
- package/samples/GridDemo/ButtonBlock.vue +50 -49
- package/samples/GridDemo/FocusItem.vue +19 -38
- package/samples/GridDemo/Item.vue +46 -54
- package/samples/HashHistory/App.vue +63 -79
- package/samples/HashHistory/components/HorizontalButtonList.vue +72 -95
- package/samples/HashHistory/components/Item.vue +42 -56
- package/samples/HashHistory/router.js +23 -12
- package/samples/HashHistory/views/MainPage.vue +35 -46
- package/samples/HashHistory/views/SubPage.vue +34 -47
- package/samples/Input/App.vue +2 -3
- package/samples/Input/FullKeyboard.vue +2 -6
- package/samples/Input/InputPanel.vue +2 -3
- package/samples/Input/KeyboardItem.vue +1 -1
- package/samples/LongImage/App.vue +11 -27
- package/samples/LongImage/Button.vue +50 -145
- package/samples/LongImage/ButtonItem.vue +44 -0
- package/samples/LongImage/LongImageScroll.vue +71 -106
- package/samples/LongImage/Scroll.vue +7 -9
- package/samples/LongText/App.vue +13 -28
- package/samples/LongText/Button.vue +43 -145
- package/samples/LongText/ButtonItem.vue +44 -0
- package/samples/LongText/LongTextScroll.vue +68 -101
- package/samples/LongText/Scroll.vue +7 -9
- package/samples/Marquee/App.vue +34 -37
- package/samples/MaskClip/App.vue +17 -30
- package/samples/MetroWidgetDemos/Advanced/App.vue +47 -0
- package/samples/MetroWidgetDemos/Advanced/ButtonItem.vue +90 -0
- package/samples/MetroWidgetDemos/Advanced/Buttons.vue +70 -0
- package/samples/MetroWidgetDemos/Advanced/Mixed.vue +77 -0
- package/samples/MetroWidgetDemos/Advanced/Widgets.vue +71 -0
- package/samples/MetroWidgetDemos/Item.vue +67 -0
- package/samples/{SimpleWidgetDemo → MetroWidgetDemos/PerformanceTest}/App.vue +80 -104
- package/samples/{SimpleWidgetDemo → MetroWidgetDemos/PerformanceTest}/Item.vue +7 -0
- package/samples/{ClassNameDemo → MetroWidgetDemos/PerformanceTest}/assets/bg.jpg +0 -0
- package/samples/{ClassNameDemo → MetroWidgetDemos/PerformanceTest}/assets/coupon_content.png +0 -0
- package/samples/{ClassNameDemo → MetroWidgetDemos/PerformanceTest}/assets/coupon_left.png +0 -0
- package/samples/{ClassNameDemo → MetroWidgetDemos/PerformanceTest}/assets/coupon_mid.png +0 -0
- package/samples/{ClassNameDemo → MetroWidgetDemos/PerformanceTest}/assets/coupon_right.png +0 -0
- package/samples/{ClassNameDemo → MetroWidgetDemos/PerformanceTest}/assets/focus_border.png +0 -0
- package/samples/{ClassNameDemo → MetroWidgetDemos/PerformanceTest}/assets/holder_logo.png +0 -0
- package/samples/{ClassNameDemo → MetroWidgetDemos/PerformanceTest}/assets/jrbm.png +0 -0
- package/samples/{ClassNameDemo → MetroWidgetDemos/PerformanceTest}/assets/line_left.png +0 -0
- package/samples/{ClassNameDemo → MetroWidgetDemos/PerformanceTest}/assets/line_mid.png +0 -0
- package/samples/{ClassNameDemo → MetroWidgetDemos/PerformanceTest}/assets/line_right.png +0 -0
- package/samples/{ClassNameDemo → MetroWidgetDemos/PerformanceTest}/assets/loading.png +0 -0
- package/samples/{ClassNameDemo → MetroWidgetDemos/PerformanceTest}/assets/logo.png +0 -0
- package/samples/{ClassNameDemo → MetroWidgetDemos/PerformanceTest}/assets/mcjx.png +0 -0
- package/samples/{ClassNameDemo → MetroWidgetDemos/PerformanceTest}/assets/tao.png +0 -0
- package/samples/{ClassNameDemo → MetroWidgetDemos/PerformanceTest}/assets/tmall.png +0 -0
- package/samples/{SimpleWidgetDemo → MetroWidgetDemos/PerformanceTest}/border.png +0 -0
- package/samples/{SimpleWidgetDemo → MetroWidgetDemos/PerformanceTest}/components/ContentItem.vue +60 -86
- package/samples/{SimpleWidgetDemo → MetroWidgetDemos/PerformanceTest}/components/MyTab.vue +0 -0
- package/samples/MetroWidgetDemos/PerformanceTest/data.js +45 -0
- package/samples/MetroWidgetDemos/PingPong/App.vue +135 -0
- package/samples/MetroWidgetDemos/PingPong/AppPage.vue +58 -0
- package/samples/MetroWidgetDemos/PingPong/AppTab.vue +69 -0
- package/samples/MetroWidgetDemos/PingPong/Item.vue +92 -0
- package/samples/MetroWidgetDemos/PingPong/ViewSwiper.vue +214 -0
- package/samples/MetroWidgetDemos/Simple/AbsoluteTemplate.vue +75 -0
- package/samples/MetroWidgetDemos/Simple/App.vue +45 -0
- package/samples/MetroWidgetDemos/Simple/RelativeTemplate.vue +111 -0
- package/samples/MetroWidgetDemos/WidgetItem.vue +89 -0
- package/samples/MetroWidgetDemos/data.js +204 -0
- package/samples/NinePatchDemo/App.vue +114 -115
- package/samples/NinePatchDemo/Item.vue +7 -8
- package/samples/Preload/App.vue +61 -63
- package/samples/Preload/Item.vue +21 -29
- package/samples/QrcodeDemo/App.vue +24 -29
- package/samples/SoundPool/App.vue +77 -106
- package/samples/SprayView/App.vue +10 -8
- package/samples/SpriteImage/App.vue +1 -2
- package/samples/TextBox/App.vue +86 -101
- package/samples/TextBox/RenderCenter.vue +1 -1
- package/samples/TextBox/RenderLeft.vue +1 -1
- package/samples/TextBox/RenderOneLine.vue +1 -1
- package/samples/TextBox/RenderRight.vue +1 -1
- package/samples/TextShadowDemo/App.vue +1 -2
- package/samples/TextureAnimation/App.vue +16 -13
- package/samples/TextureSize/App.vue +15 -25
- package/samples/ThrowMoveDemo/AccelerateDemo.vue +2 -4
- package/samples/ThrowMoveDemo/LRParabolicDemo.vue +2 -3
- package/samples/ThrowMoveDemo/TargetDemo.vue +3 -4
- package/samples/ThrowMoveDemo/UDParabolicDemo.vue +2 -3
- package/samples/TouchSample/App.vue +2 -3
- package/samples/TouchSample/Item.vue +15 -13
- package/samples/TouchSample/MetroWidgetHorizontal.vue +2 -2
- package/samples/TouchSample/MetroWidgetVertical.vue +1 -1
- package/samples/TouchSample/TouchContainerHorizontal.vue +4 -3
- package/samples/TouchSample/TouchContainerVertical.vue +3 -2
- package/samples/TransitPage/App.vue +20 -32
- package/samples/VideoDemo/App.vue +65 -81
- package/samples/VideoDemo/components/Button.vue +41 -52
- package/samples/VideoDemo/components/Controllor.vue +171 -169
- package/samples/VideoDemo/components/VideoFrame.vue +87 -99
- package/samples/VisibleSensorDemo/App.vue +167 -0
- package/scripts/jsview-jsmap-serve.js +42 -0
- package/scripts/jsview-post-install.js +1 -1
- package/tsconfig.json +3 -0
- package/utils/JsViewEngineWidget/JsvFocusBlock.vue +204 -193
- package/utils/JsViewEngineWidget/JsvFocusManager.js +30 -17
- package/utils/JsViewEngineWidget/MetroWidget/MetroWidget.vue +1561 -1656
- package/utils/JsViewEngineWidget/MetroWidget/PageUpdater.js +136 -0
- package/utils/JsViewEngineWidget/MetroWidget/ToolFunctions.js +18 -0
- package/utils/JsViewEngineWidget/TemplateParser.js +111 -1
- package/utils/JsViewEngineWidget/WidgetCommon.js +8 -2
- package/utils/JsViewEngineWidget/index.js +4 -4
- package/utils/JsViewPlugin/JsvPlayer/GetVersion.js +1 -1
- package/utils/JsViewPlugin/JsvPlayer/JsvMedia.js +266 -57
- package/utils/JsViewPlugin/JsvPlayer/JsvPlayer.vue +5 -1
- package/utils/JsViewPlugin/JsvPlayer/version.js +5 -5
- package/utils/JsViewVueTools/JsvRefTaker.js +35 -0
- package/utils/JsViewVueTools/index.js +19 -0
- package/utils/JsViewVueWidget/BrowserDebugWidget/BrowserQrcode.vue +8 -4
- package/utils/JsViewVueWidget/JsvApic/JsvApic.vue +2 -2
- package/utils/JsViewVueWidget/JsvFilterView.vue +59 -51
- package/utils/JsViewVueWidget/JsvGrid.vue +139 -41
- package/utils/JsViewVueWidget/JsvMaskClipDiv.vue +3 -1
- package/utils/JsViewVueWidget/JsvNativeSharedDiv.vue +8 -17
- package/utils/JsViewVueWidget/JsvNinePatch.vue +1 -1
- package/utils/JsViewVueWidget/JsvPosterDiv.vue +37 -7
- package/utils/JsViewVueWidget/JsvPosterImage.vue +34 -13
- package/utils/JsViewVueWidget/JsvPreload/JsvPreload.vue +2 -12
- package/utils/JsViewVueWidget/JsvQrcode/JsvQrcode.vue +1 -1
- package/utils/JsViewVueWidget/JsvSpray/JsvSpray.vue +13 -10
- package/utils/JsViewVueWidget/JsvSpriteAnim/index.js +2 -3
- package/utils/JsViewVueWidget/JsvSwiper/JsvSwiper.vue +6 -1
- package/utils/JsViewVueWidget/JsvSwiper3D/JsvSwiper.vue +6 -1
- package/utils/JsViewVueWidget/JsvTextureAnim/JsvTextureAnim.vue +25 -21
- package/utils/JsViewVueWidget/JsvTransparentDiv.vue +7 -8
- package/utils/JsViewVueWidget/JsvVisibleSensor/JsvVisibleSensor.vue +141 -0
- package/utils/JsViewVueWidget/JsvVisibleSensor/index.js +9 -0
- package/utils/JsViewVueWidget/index.js +42 -0
- package/samples/AdvanceMetroWidget/App.vue +0 -123
- package/samples/AdvanceMetroWidget/Frame.vue +0 -102
- package/samples/AdvanceMetroWidget/Item.vue +0 -63
- package/samples/AdvanceMetroWidget/data.js +0 -137
- package/samples/ClassNameDemo/App.vue +0 -119
- package/samples/ClassNameDemo/components/ContentItem.vue +0 -253
- package/samples/ClassNameDemo/components/LoadingView.vue +0 -43
- package/samples/ClassNameDemo/components/TitleView.vue +0 -24
- package/samples/ClassNameDemo/data.js +0 -24
- package/samples/FlowMultiWidget/App.vue +0 -91
- package/samples/FlowMultiWidget/assets/nine_patch_focus.png +0 -0
- package/samples/FlowMultiWidget/components/Block.vue +0 -107
- package/samples/FlowMultiWidget/components/FlowPage.vue +0 -60
- package/samples/FlowMultiWidget/components/Item.vue +0 -103
- package/samples/FlowMultiWidget/components/MenuItem.vue +0 -72
- package/samples/FlowMultiWidget/components/MyMenu.vue +0 -90
- package/samples/FlowMultiWidget/data.js +0 -446
- package/samples/HashHistory/views/BasePage.vue +0 -19
- package/samples/HashHistory/views/SubPageFirst.vue +0 -10
- package/samples/HashHistory/views/SubPageSecond.vue +0 -10
- 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/data.js +0 -124
- package/utils/JsViewEngineWidget/MetroWidget/ContentView.vue +0 -63
- package/utils/JsViewEngineWidget/MetroWidget/DivWrapper.vue +0 -51
- package/utils/JsViewEngineWidget/MetroWidget/ItemView.vue +0 -213
- package/utils/JsViewEngineWidget/MetroWidget/RootView.vue +0 -154
|
@@ -2,46 +2,43 @@
|
|
|
2
2
|
* @Author: ChenChanghua
|
|
3
3
|
* @Date: 2022-04-20 21:05:26
|
|
4
4
|
* @LastEditors: ChenChanghua
|
|
5
|
-
* @LastEditTime: 2022-
|
|
5
|
+
* @LastEditTime: 2022-07-08 11:16:52
|
|
6
6
|
* @Description: file content
|
|
7
7
|
-->
|
|
8
|
-
<script>
|
|
9
|
-
import { ref } from "vue";
|
|
10
|
-
import {
|
|
11
|
-
import JsvFilterView from "jsview
|
|
8
|
+
<script setup>
|
|
9
|
+
import { ref, reactive, onMounted } from "vue";
|
|
10
|
+
import { useRouter } from "vue-router";
|
|
11
|
+
import { jJsvRuntimeBridge, JsvFilterView } from "jsview";
|
|
12
12
|
import sample from "../assets/jpegDemo.jpeg";
|
|
13
13
|
import webpSample from "../assets/webpDemo.webp";
|
|
14
|
+
import AnimatePic from "./AnimatePic.vue";
|
|
15
|
+
import VideoLayer from "./VideoLayer.vue";
|
|
14
16
|
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
this.$router?.go(-1); // 有router时,是从DemoHomepage进入,回退
|
|
17
|
+
let viewId = -1;
|
|
18
|
+
let enableFilter = ref(true);
|
|
19
|
+
let filterType = reactive({
|
|
20
|
+
type: "gray-down",
|
|
21
|
+
});
|
|
22
|
+
|
|
23
|
+
const router = useRouter();
|
|
24
|
+
|
|
25
|
+
const _onKeyDown = (ev) => {
|
|
26
|
+
if (ev.keyCode == 8 || ev.keyCode == 27 || ev.keyCode == 10000) {
|
|
27
|
+
router.go(-1); // 有router时,是从DemoHomepage进入,回退
|
|
28
|
+
} else {
|
|
29
|
+
if (ev.keyCode == 13) {
|
|
30
|
+
if (filterType.type == null) {
|
|
31
|
+
filterType.type = "gray-down";
|
|
31
32
|
} else {
|
|
32
|
-
|
|
33
|
-
this.enableFilter = !this.enableFilter;
|
|
34
|
-
this.$refs.filter1?.enableFilter(this.enableFilter);
|
|
35
|
-
this.$refs.filter2?.enableFilter(this.enableFilter);
|
|
36
|
-
}
|
|
33
|
+
filterType.type = null;
|
|
37
34
|
}
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
mounted() {
|
|
42
|
-
jJsvRuntimeBridge.notifyPageLoaded();
|
|
43
|
-
},
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
return true;
|
|
44
38
|
};
|
|
39
|
+
onMounted(() => {
|
|
40
|
+
jJsvRuntimeBridge.notifyPageLoaded();
|
|
41
|
+
});
|
|
45
42
|
</script>
|
|
46
43
|
|
|
47
44
|
<template>
|
|
@@ -56,60 +53,101 @@ export default {
|
|
|
56
53
|
backgroundColor: '#007788',
|
|
57
54
|
}"
|
|
58
55
|
>
|
|
59
|
-
<
|
|
56
|
+
<div
|
|
57
|
+
id="main-test"
|
|
58
|
+
:style="{
|
|
59
|
+
left: 400,
|
|
60
|
+
}"
|
|
61
|
+
>
|
|
62
|
+
<jsv-filter-view
|
|
63
|
+
:width="501"
|
|
64
|
+
:height="401"
|
|
65
|
+
ref="filter1"
|
|
66
|
+
:filterType="this.filterType.type"
|
|
67
|
+
>
|
|
68
|
+
<div
|
|
69
|
+
:style="{
|
|
70
|
+
left: 0,
|
|
71
|
+
top: 0,
|
|
72
|
+
width: 400,
|
|
73
|
+
height: 350,
|
|
74
|
+
backgroundImage: `url(${sample})`,
|
|
75
|
+
}"
|
|
76
|
+
></div>
|
|
77
|
+
<!-- 测试双层FBO (FilterView + opacity变化) 的透过处理(video播放) -->
|
|
78
|
+
<video-layer :top="20" :left="45" :width="310" :height="310" />
|
|
79
|
+
</jsv-filter-view>
|
|
60
80
|
<div
|
|
61
81
|
:style="{
|
|
62
|
-
left:
|
|
82
|
+
left: 450,
|
|
63
83
|
top: 0,
|
|
64
|
-
width:
|
|
65
|
-
height:
|
|
84
|
+
width: 400,
|
|
85
|
+
height: 350,
|
|
66
86
|
backgroundImage: `url(${sample})`,
|
|
67
87
|
}"
|
|
68
88
|
></div>
|
|
69
|
-
</jsv-filter-view>
|
|
70
|
-
<div
|
|
71
|
-
:style="{
|
|
72
|
-
left: 400,
|
|
73
|
-
top: 0,
|
|
74
|
-
width: 300,
|
|
75
|
-
height: 300,
|
|
76
|
-
backgroundImage: `url(${sample})`,
|
|
77
|
-
}"
|
|
78
|
-
></div>
|
|
79
89
|
|
|
80
|
-
|
|
90
|
+
<jsv-filter-view
|
|
91
|
+
:top="400"
|
|
92
|
+
:width="402"
|
|
93
|
+
:height="402"
|
|
94
|
+
ref="filter2"
|
|
95
|
+
:filterType="this.filterType.type"
|
|
96
|
+
>
|
|
97
|
+
<div
|
|
98
|
+
:style="{
|
|
99
|
+
width: 300,
|
|
100
|
+
height: 300,
|
|
101
|
+
backgroundImage: `url(${webpSample})`,
|
|
102
|
+
}"
|
|
103
|
+
></div>
|
|
104
|
+
<!-- 测试FBO + 形变效果 -->
|
|
105
|
+
<animate-pic />
|
|
106
|
+
</jsv-filter-view>
|
|
81
107
|
<div
|
|
82
108
|
:style="{
|
|
109
|
+
left: 450,
|
|
110
|
+
top: 400,
|
|
83
111
|
width: 300,
|
|
84
112
|
height: 300,
|
|
85
113
|
backgroundImage: `url(${webpSample})`,
|
|
86
114
|
}"
|
|
87
115
|
></div>
|
|
88
|
-
</
|
|
89
|
-
<div
|
|
90
|
-
:style="{
|
|
91
|
-
left: 400,
|
|
92
|
-
top: 350,
|
|
93
|
-
width: 300,
|
|
94
|
-
height: 300,
|
|
95
|
-
backgroundImage: `url(${webpSample})`,
|
|
96
|
-
}"
|
|
97
|
-
></div>
|
|
116
|
+
</div>
|
|
98
117
|
</jsv-focus-block>
|
|
99
118
|
<div
|
|
119
|
+
className="guideText"
|
|
100
120
|
:style="{
|
|
101
|
-
left:
|
|
121
|
+
left: 10,
|
|
122
|
+
top: 30,
|
|
102
123
|
width: 400,
|
|
103
124
|
height: 200,
|
|
104
|
-
color: '#FFFFFF',
|
|
105
|
-
fontSize: '30px',
|
|
106
125
|
}"
|
|
107
126
|
>
|
|
108
|
-
|
|
127
|
+
{{
|
|
128
|
+
`1. 布局说明: \n\
|
|
129
|
+
第1行第1列为黑白图(含透明动画+video),第2列为原图\n\
|
|
130
|
+
第2行第1列为黑白图(透明+变形动画),第2列为原图\n\
|
|
131
|
+
\n\
|
|
132
|
+
2. 操作说明
|
|
133
|
+
按OK键关闭/开启第1列的黑白滤镜\n\
|
|
134
|
+
\n\
|
|
135
|
+
3. 观测内容\n\
|
|
136
|
+
A. 第1列是否正常切换黑白/彩色效果\n\
|
|
137
|
+
B. 第1列的上下两个区域是否都含有淡出的动画
|
|
138
|
+
C. 第1行第1列是否看到视频(彩色)\n\
|
|
139
|
+
`
|
|
140
|
+
}}
|
|
109
141
|
</div>
|
|
110
142
|
</template>
|
|
111
143
|
|
|
112
144
|
<style scoped>
|
|
145
|
+
.guideText {
|
|
146
|
+
color: #ffffff;
|
|
147
|
+
font-size: 16;
|
|
148
|
+
line-height: 18;
|
|
149
|
+
}
|
|
150
|
+
|
|
113
151
|
@keyframes rotate {
|
|
114
152
|
from {
|
|
115
153
|
transform: rotate3d(0, 0, 1, 0);
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
import { JsvVideo } from "jsview";
|
|
3
|
+
|
|
4
|
+
const props = defineProps({
|
|
5
|
+
top: {
|
|
6
|
+
type: Number,
|
|
7
|
+
default: 0,
|
|
8
|
+
},
|
|
9
|
+
left: {
|
|
10
|
+
type: Number,
|
|
11
|
+
default: 0,
|
|
12
|
+
},
|
|
13
|
+
width: {
|
|
14
|
+
type: Number,
|
|
15
|
+
require: true,
|
|
16
|
+
},
|
|
17
|
+
height: {
|
|
18
|
+
type: Number,
|
|
19
|
+
require: true,
|
|
20
|
+
},
|
|
21
|
+
});
|
|
22
|
+
|
|
23
|
+
// const video_url = "http://qcast-image.oss-cn-qingdao.aliyuncs.com/homepage/20210207/52fae4231350c85fec605b47bbe479c5.mp4";
|
|
24
|
+
const video_url =
|
|
25
|
+
"http://qcast-image.oss-cn-qingdao.aliyuncs.com/homepage/20190726/4cc4e6a8fd7d9d9c707ed4c4da27ca9d.mp4";
|
|
26
|
+
</script>
|
|
27
|
+
|
|
28
|
+
<style scoped>
|
|
29
|
+
@keyframes opacityVideoDemo_CompositeOpacity {
|
|
30
|
+
from {
|
|
31
|
+
opacity: 0.1;
|
|
32
|
+
}
|
|
33
|
+
to {
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
</style>
|
|
37
|
+
|
|
38
|
+
<template>
|
|
39
|
+
<div
|
|
40
|
+
className="blockStyle"
|
|
41
|
+
:style="{
|
|
42
|
+
top: props.top,
|
|
43
|
+
left: props.left,
|
|
44
|
+
width: props.width,
|
|
45
|
+
height: props.height,
|
|
46
|
+
backgroundColor: '#0000FF',
|
|
47
|
+
animation: 'opacityVideoDemo_CompositeOpacity 3s infinite',
|
|
48
|
+
}"
|
|
49
|
+
>
|
|
50
|
+
<jsv-video
|
|
51
|
+
:src="video_url"
|
|
52
|
+
autoplay="autoplay"
|
|
53
|
+
loop="loop"
|
|
54
|
+
:style="{
|
|
55
|
+
top: 5,
|
|
56
|
+
left: 5,
|
|
57
|
+
width: props.width - 10,
|
|
58
|
+
height: props.height - 10,
|
|
59
|
+
}"
|
|
60
|
+
/>
|
|
61
|
+
</div>
|
|
62
|
+
</template>
|
package/samples/FlipCard/App.vue
CHANGED
|
@@ -1,47 +1,38 @@
|
|
|
1
|
-
<script>
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
} from "jsview/utils/JsViewEngineWidget";
|
|
1
|
+
<script setup>
|
|
2
|
+
import { useRouter } from "vue-router";
|
|
3
|
+
import { ref } from "vue";
|
|
4
|
+
import { HORIZONTAL, MetroWidget } from "jsview";
|
|
6
5
|
import FlipCard from "./FlipCard.vue";
|
|
7
6
|
import { data } from "./data.js";
|
|
8
7
|
import redEgg from "./assets/red_egg.png";
|
|
9
8
|
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
9
|
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
10
|
+
const name = "/flipCard";
|
|
11
|
+
const focusNode = ref(null);
|
|
12
|
+
const router = useRouter();
|
|
13
|
+
|
|
14
|
+
const onKeyDown = (ev) => {
|
|
15
|
+
// 8:Backspace, 27:Escape, 10000:盒子返回键
|
|
16
|
+
if (ev.keyCode == 8 || ev.keyCode == 27 || ev.keyCode == 10000) {
|
|
17
|
+
router.go(-1); // 有router时,是从DemoHomepage进入,回退
|
|
18
|
+
return true;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
return false;
|
|
22
|
+
};
|
|
23
|
+
const measures = (item) => {
|
|
24
|
+
return {
|
|
25
|
+
width: item.blocks.w,
|
|
26
|
+
height: item.blocks.h,
|
|
27
|
+
focusable: item.focusable,
|
|
28
|
+
hasSub: item.hasSub,
|
|
29
|
+
};
|
|
30
|
+
};
|
|
31
|
+
const onFocus = () => {
|
|
32
|
+
focusNode.value.findBlockByName(name).requestFocus();
|
|
43
33
|
};
|
|
44
34
|
</script>
|
|
35
|
+
|
|
45
36
|
<template>
|
|
46
37
|
<jsv-focus-block
|
|
47
38
|
ref="focusNode"
|
|
@@ -51,13 +42,13 @@ export default {
|
|
|
51
42
|
onFocus: onFocus,
|
|
52
43
|
}"
|
|
53
44
|
>
|
|
54
|
-
<
|
|
45
|
+
<metro-widget
|
|
55
46
|
:name="name"
|
|
56
47
|
:width="1280"
|
|
57
48
|
:height="720"
|
|
58
49
|
:padding="{ left: 50, top: 100, right: 20, bottom: 20 }"
|
|
59
|
-
:data="
|
|
60
|
-
:direction="
|
|
50
|
+
:data="data"
|
|
51
|
+
:direction="HORIZONTAL"
|
|
61
52
|
:measures="measures"
|
|
62
53
|
>
|
|
63
54
|
<template #renderItem="{ data, query, onEdge, onAction }">
|
|
@@ -75,6 +66,6 @@ export default {
|
|
|
75
66
|
:name="name + '/' + data.id"
|
|
76
67
|
/>
|
|
77
68
|
</template>
|
|
78
|
-
</
|
|
69
|
+
</metro-widget>
|
|
79
70
|
</jsv-focus-block>
|
|
80
71
|
</template>
|
|
@@ -1,59 +1,53 @@
|
|
|
1
|
-
<script>
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
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
|
-
},
|
|
1
|
+
<script setup>
|
|
2
|
+
import { ref } from "vue";
|
|
3
|
+
const props = defineProps({
|
|
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
|
+
|
|
17
|
+
let flipAnim = ref("");
|
|
18
|
+
let flipped = ref(props.initFlipped);
|
|
19
|
+
let focused = ref(false);
|
|
20
|
+
let keyLocked = false;
|
|
21
|
+
let focusNode = ref(null);
|
|
22
|
+
|
|
23
|
+
const onFocus = () => {
|
|
24
|
+
focused.value = true;
|
|
25
|
+
focusNode.value.findBlockByName(props.name).requestFocus();
|
|
26
|
+
};
|
|
27
|
+
const onBlur = () => {
|
|
28
|
+
focused.value = false;
|
|
29
|
+
};
|
|
30
|
+
const onClick = () => {};
|
|
31
|
+
const onFlipped = () => {
|
|
32
|
+
flipped.value = !flipped.value;
|
|
33
|
+
keyLocked = false;
|
|
55
34
|
};
|
|
35
|
+
const onKeyDown = (ev) => {
|
|
36
|
+
if (keyLocked) {
|
|
37
|
+
return true;
|
|
38
|
+
} else {
|
|
39
|
+
if (ev.keyCode === 13) {
|
|
40
|
+
flipAnim.value = flipped.value ? "flip 1s" : "flipBack 1s";
|
|
41
|
+
return true;
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
return false;
|
|
45
|
+
};
|
|
46
|
+
props.onAction.register("onFocus", onFocus);
|
|
47
|
+
props.onAction.register("onBlur", onBlur);
|
|
48
|
+
props.onAction.register("onClick", onClick);
|
|
56
49
|
</script>
|
|
50
|
+
|
|
57
51
|
<template>
|
|
58
52
|
<jsv-focus-block
|
|
59
53
|
ref="focusNode"
|
package/samples/GridDemo/App.vue
CHANGED
|
@@ -2,82 +2,66 @@
|
|
|
2
2
|
* @Author: ChenChanghua
|
|
3
3
|
* @Date: 2022-05-06 19:32:53
|
|
4
4
|
* @LastEditors: ChenChanghua
|
|
5
|
-
* @LastEditTime: 2022-
|
|
5
|
+
* @LastEditTime: 2022-07-08 11:39:09
|
|
6
6
|
* @Description: file content
|
|
7
7
|
-->
|
|
8
|
-
<script>
|
|
9
|
-
import { jJsvRuntimeBridge } from "jsview
|
|
10
|
-
import { reactive, ref } from "vue";
|
|
11
|
-
import
|
|
12
|
-
import
|
|
8
|
+
<script setup>
|
|
9
|
+
import { jJsvRuntimeBridge, JsvGrid, LineType, EdgeDirection } from "jsview";
|
|
10
|
+
import { reactive, ref, onMounted } from "vue";
|
|
11
|
+
import { useRouter } from "vue-router";
|
|
12
|
+
import ItemVue from "./Item.vue";
|
|
13
13
|
import FocusItem from "./FocusItem.vue";
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
name: i + "_D",
|
|
43
|
-
baseColor: i,
|
|
44
|
-
});
|
|
45
|
-
}
|
|
46
|
-
return data2;
|
|
47
|
-
},
|
|
14
|
+
const lineType = new LineType(1, 3);
|
|
15
|
+
const name1 = "updatePage1";
|
|
16
|
+
const name2 = "updatePage2";
|
|
17
|
+
const widget1 = ref(null);
|
|
18
|
+
const widget2 = ref(null);
|
|
19
|
+
const router = useRouter();
|
|
20
|
+
const _provideData1 = () => {
|
|
21
|
+
let data = [];
|
|
22
|
+
for (let i = 0; i < 113; i++) {
|
|
23
|
+
data.push({
|
|
24
|
+
content: i + "_CCCCCCCCCCCCCCCCCCCCCCC",
|
|
25
|
+
});
|
|
26
|
+
}
|
|
27
|
+
return data;
|
|
28
|
+
};
|
|
29
|
+
const _provideData2 = () => {
|
|
30
|
+
let data2 = [];
|
|
31
|
+
for (let i = 0; i < 113; i++) {
|
|
32
|
+
data2.push({
|
|
33
|
+
name: i + "_D",
|
|
34
|
+
baseColor: i,
|
|
35
|
+
});
|
|
36
|
+
}
|
|
37
|
+
return data2;
|
|
38
|
+
};
|
|
39
|
+
const _provideData3 = () => {
|
|
40
|
+
return [];
|
|
41
|
+
};
|
|
48
42
|
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
.findBlockByName(this.name2)
|
|
54
|
-
.requestFocus();
|
|
55
|
-
}
|
|
56
|
-
},
|
|
57
|
-
_onEdge2(info) {
|
|
58
|
-
if (info.direction == EdgeDirection.left) {
|
|
59
|
-
this.$refs.widget1
|
|
60
|
-
.getFocusBlockRef()
|
|
61
|
-
.findBlockByName(this.name1)
|
|
62
|
-
.requestFocus();
|
|
63
|
-
}
|
|
64
|
-
},
|
|
65
|
-
_onKeyDown(ev) {
|
|
66
|
-
console.log("app onkeydown");
|
|
67
|
-
if (ev.keyCode == 8 || ev.keyCode == 27 || ev.keyCode == 10000) {
|
|
68
|
-
this.$router?.go(-1); // 有router时,是从DemoHomepage进入,回退
|
|
69
|
-
}
|
|
70
|
-
return true;
|
|
71
|
-
},
|
|
72
|
-
},
|
|
73
|
-
mounted() {
|
|
74
|
-
jJsvRuntimeBridge.notifyPageLoaded();
|
|
75
|
-
this.$refs.widget1
|
|
76
|
-
.getFocusBlockRef()
|
|
77
|
-
?.findBlockByName(this.name1)
|
|
78
|
-
.requestFocus();
|
|
79
|
-
},
|
|
43
|
+
const _onEdge1 = (info) => {
|
|
44
|
+
if (info.direction == EdgeDirection.right) {
|
|
45
|
+
widget2.value.getFocusBlockRef().findBlockByName(name2).requestFocus();
|
|
46
|
+
}
|
|
80
47
|
};
|
|
48
|
+
const _onEdge2 = (info) => {
|
|
49
|
+
if (info.direction == EdgeDirection.left) {
|
|
50
|
+
widget1.value.getFocusBlockRef().findBlockByName(name1).requestFocus();
|
|
51
|
+
}
|
|
52
|
+
};
|
|
53
|
+
const _onKeyDown = (ev) => {
|
|
54
|
+
console.log("app onkeydown");
|
|
55
|
+
if (ev.keyCode == 8 || ev.keyCode == 27 || ev.keyCode == 10000) {
|
|
56
|
+
router.go(-1); // 有router时,是从DemoHomepage进入,回退
|
|
57
|
+
}
|
|
58
|
+
return true;
|
|
59
|
+
};
|
|
60
|
+
|
|
61
|
+
onMounted(() => {
|
|
62
|
+
jJsvRuntimeBridge.notifyPageLoaded();
|
|
63
|
+
widget2.value.getFocusBlockRef()?.findBlockByName(name2).requestFocus();
|
|
64
|
+
});
|
|
81
65
|
</script>
|
|
82
66
|
|
|
83
67
|
<template>
|
|
@@ -111,13 +95,13 @@ export default {
|
|
|
111
95
|
:columnFirst="true"
|
|
112
96
|
:onEdge="_onEdge1"
|
|
113
97
|
:initFocusId="21"
|
|
98
|
+
:loopUpdate="true"
|
|
114
99
|
>
|
|
115
|
-
<template #renderItem="{ userData, widgetData, onAction
|
|
116
|
-
<item
|
|
100
|
+
<template #renderItem="{ userData, widgetData, onAction }">
|
|
101
|
+
<item-vue
|
|
117
102
|
:userData="userData"
|
|
118
103
|
:widgetData="widgetData"
|
|
119
104
|
:onAction="onAction"
|
|
120
|
-
:query="query"
|
|
121
105
|
/>
|
|
122
106
|
</template>
|
|
123
107
|
</jsv-grid>
|
|
@@ -157,7 +141,7 @@ export default {
|
|
|
157
141
|
:columnFirst="true"
|
|
158
142
|
:onEdge="_onEdge2"
|
|
159
143
|
:updateType="lineType"
|
|
160
|
-
:initFocusId="
|
|
144
|
+
:initFocusId="0"
|
|
161
145
|
>
|
|
162
146
|
<template #renderItem="{ userData, widgetData, onAction }">
|
|
163
147
|
<focus-item
|
|
@@ -178,6 +162,54 @@ export default {
|
|
|
178
162
|
>
|
|
179
163
|
横向排布, 逐行刷新
|
|
180
164
|
</div>
|
|
181
|
-
</div
|
|
182
|
-
|
|
165
|
+
</div>
|
|
166
|
+
|
|
167
|
+
<div
|
|
168
|
+
:style="{
|
|
169
|
+
top: 500,
|
|
170
|
+
}"
|
|
171
|
+
>
|
|
172
|
+
<jsv-grid
|
|
173
|
+
ref="widget3"
|
|
174
|
+
name="empty"
|
|
175
|
+
:left="50"
|
|
176
|
+
:top="50"
|
|
177
|
+
:provideData="_provideData3"
|
|
178
|
+
:row="4"
|
|
179
|
+
:column="5"
|
|
180
|
+
:itemSize="{
|
|
181
|
+
width: 100,
|
|
182
|
+
height: 50,
|
|
183
|
+
}"
|
|
184
|
+
:gapInfo="{
|
|
185
|
+
row: 10,
|
|
186
|
+
column: 10,
|
|
187
|
+
}"
|
|
188
|
+
:verticalUpdate="false"
|
|
189
|
+
:columnFirst="true"
|
|
190
|
+
:onEdge="_onEdge2"
|
|
191
|
+
:updateType="lineType"
|
|
192
|
+
:initFocusId="0"
|
|
193
|
+
>
|
|
194
|
+
<template #renderItem="{ userData, widgetData, onAction }">
|
|
195
|
+
<item-vue
|
|
196
|
+
:userData="userData"
|
|
197
|
+
:widgetData="widgetData"
|
|
198
|
+
:onAction="onAction"
|
|
199
|
+
/>
|
|
200
|
+
</template>
|
|
201
|
+
</jsv-grid>
|
|
202
|
+
<div
|
|
203
|
+
:style="{
|
|
204
|
+
left: 100,
|
|
205
|
+
top: 300,
|
|
206
|
+
width: 300,
|
|
207
|
+
height: 50,
|
|
208
|
+
fontSize: 30,
|
|
209
|
+
}"
|
|
210
|
+
>
|
|
211
|
+
空数据
|
|
212
|
+
</div>
|
|
213
|
+
</div>
|
|
214
|
+
</jsv-focus-block>
|
|
183
215
|
</template>
|