@shijiu/jsview-vue 0.9.502 → 0.9.631
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 +78 -59
- 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/Collision/App.vue +452 -0
- package/samples/ColorSpace/App.vue +15 -24
- package/samples/DemoHomepage/App.vue +7 -11
- package/samples/DemoHomepage/components/BodyFrame.vue +21 -9
- package/samples/DemoHomepage/components/TabFrame.vue +7 -8
- package/samples/DemoHomepage/router.js +52 -33
- package/samples/DemoHomepage/views/Homepage.vue +18 -9
- 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/ImpactStop/App.vue +435 -0
- package/samples/Input/App.vue +8 -18
- package/samples/Input/FullKeyboard.vue +2 -6
- package/samples/Input/InputPanel.vue +18 -12
- 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 +73 -0
- package/samples/MetroWidgetDemos/PingPong/AppTab.vue +62 -0
- package/samples/MetroWidgetDemos/PingPong/TabItem.vue +84 -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 +67 -64
- 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/TextureAnimation/App2.vue +111 -0
- package/samples/TextureAnimation/assets/blackWhiteGrid.png +0 -0
- package/samples/TextureAnimation/assets/light.png +0 -0
- package/samples/TextureAnimation/assets/light2.png +0 -0
- package/samples/TextureAnimation/assets/mask.png +0 -0
- 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 +234 -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 +301 -58
- package/utils/JsViewPlugin/JsvPlayer/JsvPlayer.vue +22 -3
- package/utils/JsViewPlugin/JsvPlayer/index.js +8 -1
- package/utils/JsViewPlugin/JsvPlayer/version.js +5 -5
- package/utils/JsViewVueTools/JsvImpactTracer.js +113 -0
- package/utils/JsViewVueTools/JsvRefTaker.js +35 -0
- package/utils/JsViewVueTools/index.js +20 -0
- package/utils/JsViewVueWidget/BrowserDebugWidget/BrowserPreload.vue +11 -1
- package/utils/JsViewVueWidget/BrowserDebugWidget/BrowserQrcode.vue +8 -4
- package/utils/JsViewVueWidget/BrowserDebugWidget/BrowserTextureAnim.vue +203 -14
- package/utils/JsViewVueWidget/JsvActorMove/JsvActorMove.vue +2 -2
- 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/JsvInput/Cursor.vue +4 -2
- package/utils/JsViewVueWidget/JsvInput/JsvInput.vue +13 -12
- 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 +39 -53
- package/utils/JsViewVueWidget/JsvQrcode/JsvQrcode.vue +1 -1
- package/utils/JsViewVueWidget/JsvSpray/JsvSpray.vue +13 -10
- package/utils/JsViewVueWidget/JsvSpriteAnim/JsvSpriteAnim.vue +282 -285
- 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 +142 -61
- package/utils/JsViewVueWidget/JsvTextureAnim/index.js +9 -5
- package/utils/JsViewVueWidget/JsvTransparentDiv.vue +7 -8
- package/utils/JsViewVueWidget/JsvVideo.vue +9 -12
- 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,23 +2,19 @@
|
|
|
2
2
|
* @Author: ChenChanghua
|
|
3
3
|
* @Date: 2021-06-02 13:31:00
|
|
4
4
|
* @LastEditors: ChenChanghua
|
|
5
|
-
* @LastEditTime:
|
|
5
|
+
* @LastEditTime: 2022-07-12 13:40:15
|
|
6
6
|
* @Description: file content
|
|
7
7
|
-->
|
|
8
|
-
<script
|
|
9
|
-
import { Vue } from "vue-class-component";
|
|
8
|
+
<script>
|
|
10
9
|
import { router } from "./router.js";
|
|
11
|
-
import { jJsvRuntimeBridge } from "jsview
|
|
12
|
-
|
|
13
|
-
class App extends Vue {
|
|
14
|
-
static Router = router;
|
|
10
|
+
import { jJsvRuntimeBridge } from "jsview";
|
|
15
11
|
|
|
12
|
+
export default {
|
|
13
|
+
Router: router,
|
|
16
14
|
mounted() {
|
|
17
15
|
jJsvRuntimeBridge.notifyPageLoaded();
|
|
18
|
-
}
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
export default App;
|
|
16
|
+
},
|
|
17
|
+
};
|
|
22
18
|
</script>
|
|
23
19
|
|
|
24
20
|
<template>
|
|
@@ -1,26 +1,25 @@
|
|
|
1
1
|
<script>
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
VERTICAL,
|
|
5
|
-
} from "jsview/utils/JsViewEngineWidget";
|
|
2
|
+
import { watch } from "vue";
|
|
3
|
+
import { MetroWidget, VERTICAL } from "jsview";
|
|
6
4
|
import Item from "./Item.vue";
|
|
7
5
|
|
|
8
6
|
export default {
|
|
9
7
|
components: {
|
|
10
8
|
Item,
|
|
11
|
-
|
|
9
|
+
MetroWidget,
|
|
12
10
|
},
|
|
13
11
|
props: {
|
|
14
12
|
data: Array,
|
|
15
13
|
name: String,
|
|
16
14
|
onEdge: Function,
|
|
15
|
+
tabId: Number,
|
|
17
16
|
},
|
|
18
17
|
setup() {
|
|
19
18
|
return {
|
|
20
19
|
direction: VERTICAL,
|
|
21
20
|
width: 1280,
|
|
22
21
|
height: 600,
|
|
23
|
-
|
|
22
|
+
initFocusId: 0,
|
|
24
23
|
};
|
|
25
24
|
},
|
|
26
25
|
methods: {
|
|
@@ -38,6 +37,10 @@ export default {
|
|
|
38
37
|
}
|
|
39
38
|
this.$router.push(data.path);
|
|
40
39
|
localStorage.curFocusId = index;
|
|
40
|
+
localStorage.curTab = this.tabId;
|
|
41
|
+
},
|
|
42
|
+
_provideData() {
|
|
43
|
+
return this.data;
|
|
41
44
|
},
|
|
42
45
|
},
|
|
43
46
|
beforeCreate() {
|
|
@@ -45,17 +48,26 @@ export default {
|
|
|
45
48
|
this.initFocusId = parseInt(localStorage.curFocusId);
|
|
46
49
|
}
|
|
47
50
|
localStorage.curFocusId = 0;
|
|
51
|
+
watch(
|
|
52
|
+
() => {
|
|
53
|
+
return this.data;
|
|
54
|
+
},
|
|
55
|
+
() => {
|
|
56
|
+
this.$refs.mw?.refreshData(true);
|
|
57
|
+
}
|
|
58
|
+
);
|
|
48
59
|
},
|
|
49
60
|
};
|
|
50
61
|
</script>
|
|
51
62
|
|
|
52
63
|
<template>
|
|
53
|
-
<
|
|
64
|
+
<metro-widget
|
|
65
|
+
ref="mw"
|
|
54
66
|
:name="name"
|
|
55
67
|
:width="width"
|
|
56
68
|
:height="height"
|
|
57
69
|
:direction="direction"
|
|
58
|
-
:
|
|
70
|
+
:provideData="_provideData"
|
|
59
71
|
:enableTouch="true"
|
|
60
72
|
:measures="measures"
|
|
61
73
|
:padding="{ left: 10, top: 10, right: 10, bottom: 10 }"
|
|
@@ -79,5 +91,5 @@ export default {
|
|
|
79
91
|
{{ data.name }}
|
|
80
92
|
</Item>
|
|
81
93
|
</template>
|
|
82
|
-
</
|
|
94
|
+
</metro-widget>
|
|
83
95
|
</template>
|
|
@@ -1,8 +1,5 @@
|
|
|
1
1
|
<script>
|
|
2
|
-
import {
|
|
3
|
-
SimpleWidget,
|
|
4
|
-
VERTICAL,
|
|
5
|
-
} from "jsview/utils/JsViewEngineWidget";
|
|
2
|
+
import { MetroWidget, VERTICAL } from "jsview";
|
|
6
3
|
import Item from "./Item.vue";
|
|
7
4
|
|
|
8
5
|
const measures = (item) => {
|
|
@@ -15,13 +12,14 @@ const measures = (item) => {
|
|
|
15
12
|
|
|
16
13
|
export default {
|
|
17
14
|
components: {
|
|
18
|
-
|
|
15
|
+
MetroWidget,
|
|
19
16
|
Item,
|
|
20
17
|
},
|
|
21
18
|
props: {
|
|
22
19
|
name: String,
|
|
23
20
|
itemFocus: Function,
|
|
24
21
|
onEdge: Function,
|
|
22
|
+
initId: Number,
|
|
25
23
|
},
|
|
26
24
|
setup() {
|
|
27
25
|
const width = 1280;
|
|
@@ -37,7 +35,7 @@ export default {
|
|
|
37
35
|
{
|
|
38
36
|
width: 200,
|
|
39
37
|
height: 50,
|
|
40
|
-
name: "
|
|
38
|
+
name: "MetroWidget",
|
|
41
39
|
focusable: true,
|
|
42
40
|
id: 1,
|
|
43
41
|
},
|
|
@@ -55,7 +53,7 @@ export default {
|
|
|
55
53
|
</script>
|
|
56
54
|
|
|
57
55
|
<template>
|
|
58
|
-
<
|
|
56
|
+
<metro-widget
|
|
59
57
|
:name="name"
|
|
60
58
|
:width="width"
|
|
61
59
|
:height="height"
|
|
@@ -64,6 +62,7 @@ export default {
|
|
|
64
62
|
:measures="measures"
|
|
65
63
|
:padding="{ left: 10, top: 10, right: 10, bottom: 10 }"
|
|
66
64
|
:onEdge="onEdge"
|
|
65
|
+
:initFocusId="initId"
|
|
67
66
|
>
|
|
68
67
|
<template #renderItem="{ data, query, onEdge, onAction }">
|
|
69
68
|
<Item
|
|
@@ -82,5 +81,5 @@ export default {
|
|
|
82
81
|
{{ data.name }}
|
|
83
82
|
</Item>
|
|
84
83
|
</template>
|
|
85
|
-
</
|
|
84
|
+
</metro-widget>
|
|
86
85
|
</template>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { createRouter } from "vue-router";
|
|
2
|
-
import { createJsvHashHistory } from "jsview
|
|
2
|
+
import { createJsvHashHistory } from "jsview";
|
|
3
3
|
|
|
4
4
|
const routeList = [
|
|
5
5
|
// 功能实例
|
|
@@ -8,6 +8,16 @@ const routeList = [
|
|
|
8
8
|
path: "/",
|
|
9
9
|
component: () => import("./views/Homepage"),
|
|
10
10
|
},
|
|
11
|
+
{
|
|
12
|
+
name: "基础示例合集",
|
|
13
|
+
path: "/feature/Basic",
|
|
14
|
+
component: () => import("jsview/samples/Basic/App"),
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
name: "可视化变化通知",
|
|
18
|
+
path: "/feature/VisibleSensorDemo",
|
|
19
|
+
component: () => import("jsview/samples/VisibleSensorDemo/App"),
|
|
20
|
+
},
|
|
11
21
|
{
|
|
12
22
|
name: "快速刷新的表格布局组件",
|
|
13
23
|
path: "/feature/GridDemo",
|
|
@@ -18,21 +28,6 @@ const routeList = [
|
|
|
18
28
|
path: "/feature/NinePatchDemo",
|
|
19
29
|
component: () => import("jsview/samples/NinePatchDemo/App"),
|
|
20
30
|
},
|
|
21
|
-
{
|
|
22
|
-
name: "基础示例合集",
|
|
23
|
-
path: "/feature/Basic",
|
|
24
|
-
component: () => import("jsview/samples/Basic/App"),
|
|
25
|
-
},
|
|
26
|
-
{
|
|
27
|
-
name: "SimpleWidget",
|
|
28
|
-
path: "/feature/SimpleWidgetDemo",
|
|
29
|
-
component: () => import("jsview/samples/SimpleWidgetDemo/App"),
|
|
30
|
-
},
|
|
31
|
-
{
|
|
32
|
-
name: "SimpleWidget(进阶)",
|
|
33
|
-
path: "/feature/AdvanceMetroWidget",
|
|
34
|
-
component: () => import("jsview/samples/AdvanceMetroWidget/App"),
|
|
35
|
-
},
|
|
36
31
|
{
|
|
37
32
|
name: "视频",
|
|
38
33
|
path: "/feature/VideoDemo",
|
|
@@ -49,12 +44,6 @@ const routeList = [
|
|
|
49
44
|
props: { routePath: "/feature/HashHistory" },
|
|
50
45
|
component: () => import("jsview/samples/HashHistory/App"),
|
|
51
46
|
},
|
|
52
|
-
//TODO MetroPage未完成
|
|
53
|
-
// {
|
|
54
|
-
// name: "ClassName写法样例",
|
|
55
|
-
// path: "/feature/ClassNameDemo",
|
|
56
|
-
// component: () => import("jsview/samples/ClassNameDemo/App"),
|
|
57
|
-
// },
|
|
58
47
|
{
|
|
59
48
|
name: "翻牌游戏",
|
|
60
49
|
path: "/feature/FlipCard",
|
|
@@ -70,11 +59,6 @@ const routeList = [
|
|
|
70
59
|
path: "/feature/TextureSize",
|
|
71
60
|
component: () => import("jsview/samples/TextureSize/App"),
|
|
72
61
|
},
|
|
73
|
-
{
|
|
74
|
-
name: "橱窗",
|
|
75
|
-
path: "/feature/FlowMultiWidget",
|
|
76
|
-
component: () => import("jsview/samples/FlowMultiWidget/App"),
|
|
77
|
-
},
|
|
78
62
|
{
|
|
79
63
|
name: "动图",
|
|
80
64
|
path: "/feature/AnimPicture",
|
|
@@ -85,13 +69,11 @@ const routeList = [
|
|
|
85
69
|
path: "/feature/SprayView",
|
|
86
70
|
component: () => import("jsview/samples/SprayView/App"),
|
|
87
71
|
},
|
|
88
|
-
//TODO 代码需要优化
|
|
89
72
|
{
|
|
90
73
|
name: "长文字",
|
|
91
74
|
path: "/feature/LongText",
|
|
92
75
|
component: () => import("jsview/samples/LongText/App"),
|
|
93
76
|
},
|
|
94
|
-
//TODO 代码需要优化
|
|
95
77
|
{
|
|
96
78
|
name: "长图片",
|
|
97
79
|
path: "/feature/LongImage",
|
|
@@ -147,17 +129,54 @@ const routeList = [
|
|
|
147
129
|
path: "/feature/TextureAnimation",
|
|
148
130
|
component: () => import("jsview/samples/TextureAnimation/App"),
|
|
149
131
|
},
|
|
132
|
+
{
|
|
133
|
+
name: "焦点框旋转光效果",
|
|
134
|
+
path: "/feature/TextureAnimation2",
|
|
135
|
+
component: () => import("jsview/samples/TextureAnimation/App2"),
|
|
136
|
+
},
|
|
150
137
|
{
|
|
151
138
|
name: "公祭日黑白效果",
|
|
152
139
|
path: "/feature/GrayDown",
|
|
153
140
|
component: () => import("jsview/samples/FilterDemo/App"),
|
|
154
141
|
},
|
|
142
|
+
{
|
|
143
|
+
name: "预加载",
|
|
144
|
+
path: "/feature/Preload",
|
|
145
|
+
component: () => import("jsview/samples/Preload/App"),
|
|
146
|
+
},
|
|
147
|
+
// {
|
|
148
|
+
// name: "碰撞检测",
|
|
149
|
+
// path: "/feature/Collision",
|
|
150
|
+
// component: () => import("jsview/samples/Collision/App"),
|
|
151
|
+
// },
|
|
152
|
+
// {
|
|
153
|
+
// name: "碰撞即停",
|
|
154
|
+
// path: "/feature/ImpactStop",
|
|
155
|
+
// component: () => import("jsview/samples/ImpactStop/App"),
|
|
156
|
+
// },
|
|
155
157
|
|
|
156
|
-
//
|
|
158
|
+
// MetroWidget示例
|
|
159
|
+
{
|
|
160
|
+
name: "简单示例",
|
|
161
|
+
path: "/metroWidget/Simple",
|
|
162
|
+
component: () => import("jsview/samples/MetroWidgetDemos/Simple/App"),
|
|
163
|
+
},
|
|
164
|
+
{
|
|
165
|
+
name: "嵌套示例",
|
|
166
|
+
path: "/metroWidget/Advanced",
|
|
167
|
+
component: () => import("jsview/samples/MetroWidgetDemos/Advanced/App"),
|
|
168
|
+
},
|
|
169
|
+
{
|
|
170
|
+
name: "性能测试",
|
|
171
|
+
path: "/metroWidget/PerformanceTest",
|
|
172
|
+
component: () =>
|
|
173
|
+
import("jsview/samples/MetroWidgetDemos/PerformanceTest/App"),
|
|
174
|
+
},
|
|
157
175
|
{
|
|
158
|
-
name: "
|
|
159
|
-
path: "/
|
|
160
|
-
|
|
176
|
+
name: "乒乓模式",
|
|
177
|
+
path: "/metroWidget/PingPong",
|
|
178
|
+
component: () =>
|
|
179
|
+
import("jsview/samples/MetroWidgetDemos/PingPong/App"),
|
|
161
180
|
},
|
|
162
181
|
];
|
|
163
182
|
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
<script>
|
|
2
|
-
import { jJsvRuntimeBridge } from "jsview
|
|
3
|
-
import { EdgeDirection } from "jsview/utils/JsViewEngineWidget";
|
|
2
|
+
import { jJsvRuntimeBridge, EdgeDirection } from "jsview";
|
|
4
3
|
import TabFrame from "../components/TabFrame.vue";
|
|
5
4
|
import BodyFrame from "../components/BodyFrame.vue";
|
|
6
5
|
import Dialog from "../components/Dialog.vue";
|
|
@@ -9,7 +8,7 @@ import { routeList } from "../router.js";
|
|
|
9
8
|
const colorTemplete = ["#89BEB2", "#C9BA83", "#DED38C", "#DE9C53"];
|
|
10
9
|
|
|
11
10
|
const featureData = [];
|
|
12
|
-
const
|
|
11
|
+
const metroWidgetData = [];
|
|
13
12
|
for (let item of routeList) {
|
|
14
13
|
let obj = {
|
|
15
14
|
name: item.name,
|
|
@@ -21,12 +20,12 @@ for (let item of routeList) {
|
|
|
21
20
|
if (item.path.indexOf("feature") >= 0) {
|
|
22
21
|
obj.backgroundColor = colorTemplete[featureData.length % 4];
|
|
23
22
|
featureData.push(obj);
|
|
24
|
-
} else if (item.path.indexOf("
|
|
25
|
-
obj.backgroundColor = colorTemplete[
|
|
26
|
-
|
|
23
|
+
} else if (item.path.indexOf("metroWidget") >= 0) {
|
|
24
|
+
obj.backgroundColor = colorTemplete[metroWidgetData.length % 4];
|
|
25
|
+
metroWidgetData.push(obj);
|
|
27
26
|
}
|
|
28
27
|
}
|
|
29
|
-
const dataList = [featureData,
|
|
28
|
+
const dataList = [featureData, metroWidgetData];
|
|
30
29
|
|
|
31
30
|
export default {
|
|
32
31
|
components: {
|
|
@@ -96,7 +95,6 @@ export default {
|
|
|
96
95
|
}
|
|
97
96
|
},
|
|
98
97
|
onDialogAction(msg) {
|
|
99
|
-
console.log("cchtes dialog onaction", msg);
|
|
100
98
|
this.showExitDialog = false;
|
|
101
99
|
this.changeFocus(this.preFocusName);
|
|
102
100
|
switch (msg) {
|
|
@@ -113,6 +111,15 @@ export default {
|
|
|
113
111
|
}
|
|
114
112
|
},
|
|
115
113
|
},
|
|
114
|
+
created() {
|
|
115
|
+
if (typeof localStorage.curTab !== "undefined") {
|
|
116
|
+
this.tabId = parseInt(localStorage.curTab);
|
|
117
|
+
}
|
|
118
|
+
localStorage.curTab = 0;
|
|
119
|
+
this.contentData = dataList[this.tabId];
|
|
120
|
+
},
|
|
121
|
+
mounted() {},
|
|
122
|
+
beforeUnmount() {},
|
|
116
123
|
};
|
|
117
124
|
</script>
|
|
118
125
|
|
|
@@ -136,6 +143,7 @@ export default {
|
|
|
136
143
|
:name="name + '/tabFrame'"
|
|
137
144
|
:onEdge="onTabEdge"
|
|
138
145
|
:itemFocus="tabItemFocus"
|
|
146
|
+
:initId="tabId"
|
|
139
147
|
/>
|
|
140
148
|
</div>
|
|
141
149
|
|
|
@@ -149,6 +157,7 @@ export default {
|
|
|
149
157
|
:data="contentData"
|
|
150
158
|
:name="name + '/bodyFrame'"
|
|
151
159
|
:onEdge="onContentEdge"
|
|
160
|
+
:tabId="tabId"
|
|
152
161
|
/>
|
|
153
162
|
</div>
|
|
154
163
|
|
|
@@ -156,7 +165,7 @@ export default {
|
|
|
156
165
|
v-if="showExitDialog"
|
|
157
166
|
:name="name + '/exitDialog'"
|
|
158
167
|
:onAction="onDialogAction"
|
|
159
|
-
|
|
168
|
+
></Dialog>
|
|
160
169
|
</jsv-focus-block>
|
|
161
170
|
</div>
|
|
162
171
|
</template>
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
const item_url =
|
|
3
|
+
"http://oss.image.51vtv.cn/homepage/20210209/27bda620942566673ab449a3ef765321.png";
|
|
4
|
+
</script>
|
|
5
|
+
|
|
6
|
+
<template>
|
|
7
|
+
<div
|
|
8
|
+
className="blockStyle"
|
|
9
|
+
:style="{
|
|
10
|
+
backgroundColor: '#0000FF',
|
|
11
|
+
animation: 'opacityDemo_CompositeNoOpacity 3s infinite',
|
|
12
|
+
}"
|
|
13
|
+
/>
|
|
14
|
+
<img
|
|
15
|
+
className="blockStyle"
|
|
16
|
+
:style="{
|
|
17
|
+
objectFit: 'contain',
|
|
18
|
+
animation: 'opacityDemo_CompositeOpacity 3s infinite',
|
|
19
|
+
}"
|
|
20
|
+
:src="item_url"
|
|
21
|
+
/>
|
|
22
|
+
</template>
|
|
23
|
+
|
|
24
|
+
<style scoped>
|
|
25
|
+
.blockStyle {
|
|
26
|
+
top: 50;
|
|
27
|
+
left: 50;
|
|
28
|
+
width: 150;
|
|
29
|
+
height: 150;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
.picTitleTextClass {
|
|
33
|
+
font-size: 25;
|
|
34
|
+
height: 68;
|
|
35
|
+
line-height: 34;
|
|
36
|
+
color: "#000000";
|
|
37
|
+
text-align: "center";
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
@keyframes opacityDemo_CompositeOpacity {
|
|
41
|
+
from {
|
|
42
|
+
transform: translate3d(50%, 30px, 0) scale3d(1.5, 1.5, 1)
|
|
43
|
+
rotate3d(1.5, 1, 0, 90deg) skew(30deg, 45deg);
|
|
44
|
+
opacity: 0.1;
|
|
45
|
+
}
|
|
46
|
+
to {
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
@keyframes opacityDemo_CompositeNoOpacity {
|
|
51
|
+
from {
|
|
52
|
+
transform: translate3d(50%, 30px, 0) scale3d(1.5, 1.5, 1)
|
|
53
|
+
rotate3d(1.5, 1, 0, 90deg) skew(30deg, 45deg);
|
|
54
|
+
}
|
|
55
|
+
to {
|
|
56
|
+
}
|
|
57
|
+
} ;
|
|
58
|
+
</style>
|
|
@@ -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);
|