@shijiu/jsview-vue 1.9.731 → 1.9.747
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/index.d.ts +4 -1
- package/index.js +4 -1
- package/package.json +5 -16
- package/samples/AnimPicture/App.vue +0 -207
- 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 +0 -134
- 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 +0 -38
- package/samples/Basic/components/FontStyle.css +0 -16
- package/samples/Basic/components/anim/AnimGroup.vue +0 -66
- package/samples/Basic/components/anim/AnimKeyframeBasic.vue +0 -119
- package/samples/Basic/components/anim/AnimKeyframeComposite.vue +0 -52
- package/samples/Basic/components/anim/AnimTransition.vue +0 -157
- package/samples/Basic/components/div/DivBackground.vue +0 -44
- package/samples/Basic/components/div/DivClip.vue +0 -159
- package/samples/Basic/components/div/DivCssScoped.vue +0 -20
- package/samples/Basic/components/div/DivCssVar.vue +0 -53
- package/samples/Basic/components/div/DivGroup1.vue +0 -47
- package/samples/Basic/components/div/DivGroup2.vue +0 -65
- package/samples/Basic/components/div/DivLayout.vue +0 -70
- package/samples/Basic/components/div/DivRadius.vue +0 -65
- package/samples/Basic/components/div/DivTransform.vue +0 -32
- package/samples/Basic/components/img/ImageGroup.vue +0 -31
- package/samples/Basic/components/img/ImgLayout.vue +0 -41
- package/samples/Basic/components/panel/Panel1.vue +0 -55
- package/samples/Basic/components/panel/Panel2.vue +0 -31
- package/samples/Basic/components/panel/TitleBar.vue +0 -29
- package/samples/Basic/components/text/TextAlign.vue +0 -66
- package/samples/Basic/components/text/TextEmoji.vue +0 -26
- package/samples/Basic/components/text/TextFontStyle.vue +0 -89
- package/samples/Basic/components/text/TextGroup1.vue +0 -49
- package/samples/Basic/components/text/TextGroup2.vue +0 -28
- package/samples/Basic/components/text/TextOverflow.vue +0 -110
- package/samples/BasicFocusControl/App.vue +0 -104
- package/samples/BasicFocusControl/components/BaseBlock.vue +0 -50
- package/samples/BasicFocusControl/components/MainArea.vue +0 -83
- package/samples/BasicFocusControl/components/MainAreaLeftBlock.vue +0 -17
- package/samples/BasicFocusControl/components/MainAreaRightBlock.vue +0 -27
- package/samples/BasicFocusControl/components/SideBar.vue +0 -58
- package/samples/BasicFocusControl/components/SideBarBlock.vue +0 -27
- package/samples/Collision/App.vue +0 -452
- package/samples/ColorSpace/App.vue +0 -126
- package/samples/DemoHomepage/App.vue +0 -27
- package/samples/DemoHomepage/components/BodyFrame.vue +0 -95
- package/samples/DemoHomepage/components/Dialog.vue +0 -94
- package/samples/DemoHomepage/components/Item.vue +0 -77
- package/samples/DemoHomepage/components/TabFrame.vue +0 -85
- package/samples/DemoHomepage/router.js +0 -196
- package/samples/DemoHomepage/views/Homepage.vue +0 -195
- package/samples/FilterDemo/AnimatePic.vue +0 -58
- package/samples/FilterDemo/App.vue +0 -159
- package/samples/FilterDemo/VideoLayer.vue +0 -62
- package/samples/FlipCard/App.vue +0 -71
- package/samples/FlipCard/FlipCard.vue +0 -118
- package/samples/FlipCard/assets/blue_egg.png +0 -0
- package/samples/FlipCard/assets/red_egg.png +0 -0
- package/samples/FlipCard/data.js +0 -13
- package/samples/GridDemo/App.vue +0 -215
- package/samples/GridDemo/ButtonBlock.vue +0 -112
- package/samples/GridDemo/FocusItem.vue +0 -37
- package/samples/GridDemo/Item.vue +0 -93
- package/samples/HashHistory/App.vue +0 -115
- package/samples/HashHistory/components/HorizontalButtonList.vue +0 -91
- package/samples/HashHistory/components/Item.vue +0 -60
- package/samples/HashHistory/router.js +0 -41
- package/samples/HashHistory/views/MainPage.vue +0 -57
- package/samples/HashHistory/views/SubPage.vue +0 -66
- package/samples/ImpactStop/App.vue +0 -435
- package/samples/Input/App.vue +0 -164
- package/samples/Input/FullKeyboard.vue +0 -87
- package/samples/Input/InputPanel.vue +0 -131
- package/samples/Input/KeyboardItem.vue +0 -58
- package/samples/LongImage/App.vue +0 -80
- package/samples/LongImage/Button.vue +0 -58
- package/samples/LongImage/ButtonItem.vue +0 -44
- package/samples/LongImage/LongImageScroll.vue +0 -92
- package/samples/LongImage/Scroll.vue +0 -14
- package/samples/LongImage/assets/1280x7200.jpg +0 -0
- package/samples/LongText/App.vue +0 -96
- package/samples/LongText/Button.vue +0 -51
- package/samples/LongText/ButtonItem.vue +0 -44
- package/samples/LongText/LongTextScroll.vue +0 -192
- package/samples/LongText/Scroll.vue +0 -14
- package/samples/Marquee/App.vue +0 -247
- package/samples/Marquee/longText.js +0 -14
- package/samples/MaskClip/App.vue +0 -122
- package/samples/MaskClip/images/mask-025/config.json +0 -29
- package/samples/MaskClip/images/mask-025/res/1.png +0 -0
- package/samples/MaskClip/images/mask-025/res/2.png +0 -0
- package/samples/MaskClip/images/mask-025/res/3.png +0 -0
- package/samples/MaskClip/images/mask-025/res/4.png +0 -0
- package/samples/MaskClip/images/mask-025/res/icon.png +0 -0
- package/samples/MaskClip/images/mask-025/res/stroke.png +0 -0
- package/samples/MaskClip/images/php.jpg +0 -0
- package/samples/MetroWidgetDemos/Advanced/App.vue +0 -46
- package/samples/MetroWidgetDemos/Advanced/ButtonItem.vue +0 -90
- package/samples/MetroWidgetDemos/Advanced/Buttons.vue +0 -70
- package/samples/MetroWidgetDemos/Advanced/Mixed.vue +0 -77
- package/samples/MetroWidgetDemos/Advanced/widgets/Item.vue +0 -83
- package/samples/MetroWidgetDemos/Advanced/widgets/WidgetItem.vue +0 -89
- package/samples/MetroWidgetDemos/Advanced/widgets/Widgets.vue +0 -116
- package/samples/MetroWidgetDemos/Advanced/widgets/focus1.png +0 -0
- package/samples/MetroWidgetDemos/Item.vue +0 -85
- package/samples/MetroWidgetDemos/PerformanceTest/App.vue +0 -210
- package/samples/MetroWidgetDemos/PerformanceTest/Item.vue +0 -90
- package/samples/MetroWidgetDemos/PerformanceTest/assets/bg.jpg +0 -0
- package/samples/MetroWidgetDemos/PerformanceTest/assets/coupon_content.png +0 -0
- package/samples/MetroWidgetDemos/PerformanceTest/assets/coupon_left.png +0 -0
- package/samples/MetroWidgetDemos/PerformanceTest/assets/coupon_mid.png +0 -0
- package/samples/MetroWidgetDemos/PerformanceTest/assets/coupon_right.png +0 -0
- package/samples/MetroWidgetDemos/PerformanceTest/assets/focus_border.png +0 -0
- package/samples/MetroWidgetDemos/PerformanceTest/assets/holder_logo.png +0 -0
- package/samples/MetroWidgetDemos/PerformanceTest/assets/jrbm.png +0 -0
- package/samples/MetroWidgetDemos/PerformanceTest/assets/line_left.png +0 -0
- package/samples/MetroWidgetDemos/PerformanceTest/assets/line_mid.png +0 -0
- package/samples/MetroWidgetDemos/PerformanceTest/assets/line_right.png +0 -0
- package/samples/MetroWidgetDemos/PerformanceTest/assets/loading.png +0 -0
- package/samples/MetroWidgetDemos/PerformanceTest/assets/logo.png +0 -0
- package/samples/MetroWidgetDemos/PerformanceTest/assets/mcjx.png +0 -0
- package/samples/MetroWidgetDemos/PerformanceTest/assets/tao.png +0 -0
- package/samples/MetroWidgetDemos/PerformanceTest/assets/tmall.png +0 -0
- package/samples/MetroWidgetDemos/PerformanceTest/border.png +0 -0
- package/samples/MetroWidgetDemos/PerformanceTest/components/ContentItem.vue +0 -386
- package/samples/MetroWidgetDemos/PerformanceTest/components/MyTab.vue +0 -129
- package/samples/MetroWidgetDemos/PerformanceTest/data.js +0 -45
- package/samples/MetroWidgetDemos/PingPong/App.vue +0 -135
- package/samples/MetroWidgetDemos/PingPong/AppPage.vue +0 -73
- package/samples/MetroWidgetDemos/PingPong/AppTab.vue +0 -62
- package/samples/MetroWidgetDemos/PingPong/TabItem.vue +0 -84
- package/samples/MetroWidgetDemos/PingPong/ViewSwiper.vue +0 -214
- package/samples/MetroWidgetDemos/Simple/AbsoluteTemplate.vue +0 -75
- package/samples/MetroWidgetDemos/Simple/App.vue +0 -45
- package/samples/MetroWidgetDemos/Simple/RelativeTemplate.vue +0 -111
- package/samples/MetroWidgetDemos/WidgetItem.vue +0 -89
- package/samples/MetroWidgetDemos/data.js +0 -205
- package/samples/NinePatchDemo/App.vue +0 -145
- package/samples/NinePatchDemo/Item.vue +0 -69
- package/samples/NinePatchDemo/assets/border.png +0 -0
- package/samples/Preload/App.vue +0 -135
- package/samples/Preload/Item.vue +0 -32
- package/samples/Preload/data.js +0 -23
- 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/QrcodeDemo/App.vue +0 -68
- package/samples/ScaleDownNeon/App.vue +0 -107
- package/samples/SoundPool/App.vue +0 -134
- package/samples/SoundPool/bgmusic.mp3 +0 -0
- package/samples/SoundPool/coin.mp3 +0 -0
- package/samples/SoundPool/jump.mp3 +0 -0
- package/samples/SoundPool/lose.mp3 +0 -0
- package/samples/SoundPool/run.mp3 +0 -0
- package/samples/SprayView/App.vue +0 -272
- package/samples/SprayView/assets/snow.png +0 -0
- package/samples/SpriteImage/App.vue +0 -173
- package/samples/SpriteImage/images/cat_run.png +0 -0
- package/samples/SpriteImage/images/egg_break.json +0 -116
- package/samples/SpriteImage/images/egg_break.png +0 -0
- package/samples/SpriteImage/images/sprite.png +0 -0
- package/samples/TextBox/App.vue +0 -91
- package/samples/TextBox/RenderCenter.vue +0 -133
- package/samples/TextBox/RenderLeft.vue +0 -138
- package/samples/TextBox/RenderOneLine.vue +0 -101
- package/samples/TextBox/RenderRight.vue +0 -131
- package/samples/TextShadowDemo/App.vue +0 -91
- package/samples/TextureAnimation/App.vue +0 -336
- package/samples/TextureAnimation/App2.vue +0 -111
- 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/TextureAnimation/assets/php.jpg +0 -0
- package/samples/TextureAnimation/assets/php2.png +0 -0
- package/samples/TextureAnimation/assets/swipLight.png +0 -0
- package/samples/TextureSize/App.vue +0 -132
- 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 +0 -116
- package/samples/ThrowMoveDemo/App.vue +0 -114
- package/samples/ThrowMoveDemo/LRParabolicDemo.vue +0 -115
- package/samples/ThrowMoveDemo/TargetDemo.vue +0 -116
- package/samples/ThrowMoveDemo/UDParabolicDemo.vue +0 -121
- package/samples/TouchSample/App.vue +0 -136
- package/samples/TouchSample/Item.vue +0 -103
- package/samples/TouchSample/MetroWidgetHorizontal.vue +0 -144
- package/samples/TouchSample/MetroWidgetVertical.vue +0 -144
- package/samples/TouchSample/TouchContainerHorizontal.vue +0 -160
- package/samples/TouchSample/TouchContainerVertical.vue +0 -160
- package/samples/TouchSample/data.js +0 -81
- package/samples/TransitPage/App.vue +0 -29
- package/samples/VideoDemo/App.vue +0 -121
- package/samples/VideoDemo/components/Button.vue +0 -58
- package/samples/VideoDemo/components/Controllor.vue +0 -197
- package/samples/VideoDemo/components/VideoFrame.vue +0 -140
- package/samples/VisibleSensorDemo/App.vue +0 -234
- package/samples/assets/bmpDemo.bmp +0 -0
- package/samples/assets/jpegDemo.jpeg +0 -0
- package/samples/assets/pngDemo.png +0 -0
- package/samples/assets/pngNoAlphaDemo.png +0 -0
- package/samples/assets/webpDemo.webp +0 -0
- package/tsconfig.json +0 -47
- package/utils/index.d.ts +0 -3
- package/utils/index.js +0 -10
|
@@ -1,116 +0,0 @@
|
|
|
1
|
-
<!--
|
|
2
|
-
* @Author: ChenChanghua
|
|
3
|
-
* @Date: 2021-10-20 18:27:25
|
|
4
|
-
* @LastEditors: ChenChanghua
|
|
5
|
-
* @LastEditTime: 2022-07-08 14:11:39
|
|
6
|
-
* @Description: file content
|
|
7
|
-
-->
|
|
8
|
-
<script>
|
|
9
|
-
import { JsvActorMoveControl, JsvActorMove } from "jsview";
|
|
10
|
-
|
|
11
|
-
export default {
|
|
12
|
-
components: {
|
|
13
|
-
JsvActorMove,
|
|
14
|
-
},
|
|
15
|
-
props: {
|
|
16
|
-
name: String,
|
|
17
|
-
},
|
|
18
|
-
data() {
|
|
19
|
-
return {
|
|
20
|
-
direction: 1,
|
|
21
|
-
};
|
|
22
|
-
},
|
|
23
|
-
setup() {
|
|
24
|
-
let throwControl = new JsvActorMoveControl(); // 抛物运动体控制器
|
|
25
|
-
let moveControl = new JsvActorMoveControl(); // 平移运动体控制器
|
|
26
|
-
|
|
27
|
-
return {
|
|
28
|
-
throwControl,
|
|
29
|
-
moveControl,
|
|
30
|
-
};
|
|
31
|
-
},
|
|
32
|
-
methods: {
|
|
33
|
-
onKeyDown(ev) {
|
|
34
|
-
if (ev.keyCode === 13) {
|
|
35
|
-
let preDirection = this.direction;
|
|
36
|
-
this.direction = -this.direction;
|
|
37
|
-
this.moveControl.moveToX(195 * this.direction, 250, (x, y) => {
|
|
38
|
-
console.log(`Move end with x=${x} y=${y}`);
|
|
39
|
-
});
|
|
40
|
-
const position = (-100 * preDirection) / 2;
|
|
41
|
-
this.throwControl.throwAlongY(
|
|
42
|
-
-500 * preDirection,
|
|
43
|
-
750 * preDirection,
|
|
44
|
-
{
|
|
45
|
-
type: "catch",
|
|
46
|
-
position,
|
|
47
|
-
direction: -1 * preDirection,
|
|
48
|
-
},
|
|
49
|
-
(x, y) => {
|
|
50
|
-
console.log(`Throw end with x=${x} y=${y}`);
|
|
51
|
-
}
|
|
52
|
-
);
|
|
53
|
-
return true;
|
|
54
|
-
}
|
|
55
|
-
return false;
|
|
56
|
-
},
|
|
57
|
-
},
|
|
58
|
-
};
|
|
59
|
-
</script>
|
|
60
|
-
|
|
61
|
-
<template>
|
|
62
|
-
<jsv-focus-block
|
|
63
|
-
ref="focusNode"
|
|
64
|
-
:name="name"
|
|
65
|
-
autoFocus
|
|
66
|
-
:onAction="{
|
|
67
|
-
onKeyDown: onKeyDown,
|
|
68
|
-
}"
|
|
69
|
-
>
|
|
70
|
-
<div
|
|
71
|
-
key="sample1"
|
|
72
|
-
class="detail-font"
|
|
73
|
-
:style="{ top: 150, left: 425, width: 430, height: 40 }"
|
|
74
|
-
>
|
|
75
|
-
拐点前触碰目标点
|
|
76
|
-
</div>
|
|
77
|
-
<div
|
|
78
|
-
key="DirectText"
|
|
79
|
-
class="font"
|
|
80
|
-
:style="{ top: 250, left: 425, width: 430, height: 40 }"
|
|
81
|
-
>
|
|
82
|
-
{{ `当前方向:${direction > 0 ? "右" : "左"}` }}
|
|
83
|
-
</div>
|
|
84
|
-
<div :style="{ top: 590, left: 625 }">
|
|
85
|
-
<jsv-actor-move key="move" :control="moveControl">
|
|
86
|
-
<jsv-actor-move key="throw" :control="throwControl">
|
|
87
|
-
<div
|
|
88
|
-
:style="{ backgroundColor: '#0916ff', width: 30, height: 30 }"
|
|
89
|
-
></div>
|
|
90
|
-
</jsv-actor-move>
|
|
91
|
-
</jsv-actor-move>
|
|
92
|
-
</div>
|
|
93
|
-
</jsv-focus-block>
|
|
94
|
-
</template>
|
|
95
|
-
|
|
96
|
-
<style scoped>
|
|
97
|
-
.font {
|
|
98
|
-
font-size: 32px;
|
|
99
|
-
color: #73665c;
|
|
100
|
-
line-height: 40px;
|
|
101
|
-
overflow: hidden;
|
|
102
|
-
white-space: nowrap;
|
|
103
|
-
text-overflow: ellipsis;
|
|
104
|
-
text-align: center;
|
|
105
|
-
}
|
|
106
|
-
|
|
107
|
-
.detail-font {
|
|
108
|
-
font-size: 32px;
|
|
109
|
-
color: #f7f7eb;
|
|
110
|
-
line-height: 30px;
|
|
111
|
-
overflow: hidden;
|
|
112
|
-
white-space: nowrap;
|
|
113
|
-
text-overflow: ellipsis;
|
|
114
|
-
text-align: center;
|
|
115
|
-
}
|
|
116
|
-
</style>
|
|
@@ -1,121 +0,0 @@
|
|
|
1
|
-
<!--
|
|
2
|
-
* @Author: ChenChanghua
|
|
3
|
-
* @Date: 2021-10-20 18:27:25
|
|
4
|
-
* @LastEditors: ChenChanghua
|
|
5
|
-
* @LastEditTime: 2021-10-21 14:07:16
|
|
6
|
-
* @Description: file content
|
|
7
|
-
-->
|
|
8
|
-
<script>
|
|
9
|
-
import { JsvActorMoveControl, JsvActorMove } from "jsview";
|
|
10
|
-
|
|
11
|
-
export default {
|
|
12
|
-
components: {
|
|
13
|
-
JsvActorMove,
|
|
14
|
-
},
|
|
15
|
-
props: {
|
|
16
|
-
name: String,
|
|
17
|
-
},
|
|
18
|
-
data() {
|
|
19
|
-
return {
|
|
20
|
-
direction: 1,
|
|
21
|
-
};
|
|
22
|
-
},
|
|
23
|
-
computed: {
|
|
24
|
-
directionDetail() {
|
|
25
|
-
return this.direction < 0 ? "上" : "下";
|
|
26
|
-
},
|
|
27
|
-
detail() {
|
|
28
|
-
return this.direction < 0 ? "向上抛物" : "向下掷物并弹起";
|
|
29
|
-
},
|
|
30
|
-
},
|
|
31
|
-
setup() {
|
|
32
|
-
let throwControl = new JsvActorMoveControl(); // 抛物运动体控制器
|
|
33
|
-
let moveControl = new JsvActorMoveControl(); // 平移运动体控制器
|
|
34
|
-
|
|
35
|
-
return {
|
|
36
|
-
throwControl,
|
|
37
|
-
moveControl,
|
|
38
|
-
};
|
|
39
|
-
},
|
|
40
|
-
methods: {
|
|
41
|
-
onKeyDown(ev) {
|
|
42
|
-
let preDirection = this.direction;
|
|
43
|
-
switch (ev.keyCode) {
|
|
44
|
-
case 13:
|
|
45
|
-
this.direction = -this.direction;
|
|
46
|
-
this.throwControl.throwAlongY(
|
|
47
|
-
-400 * preDirection,
|
|
48
|
-
550 * preDirection,
|
|
49
|
-
{
|
|
50
|
-
type: "catch",
|
|
51
|
-
position: 100 * preDirection,
|
|
52
|
-
direction: preDirection,
|
|
53
|
-
},
|
|
54
|
-
(x, y) => {
|
|
55
|
-
console.log(`Throw end with x=${x} y=${y}`);
|
|
56
|
-
}
|
|
57
|
-
);
|
|
58
|
-
return true;
|
|
59
|
-
}
|
|
60
|
-
return false;
|
|
61
|
-
},
|
|
62
|
-
},
|
|
63
|
-
};
|
|
64
|
-
</script>
|
|
65
|
-
|
|
66
|
-
<template>
|
|
67
|
-
<jsv-focus-block
|
|
68
|
-
ref="focusNode"
|
|
69
|
-
:name="name"
|
|
70
|
-
autoFocus
|
|
71
|
-
:onAction="{
|
|
72
|
-
onKeyDown: onKeyDown,
|
|
73
|
-
}"
|
|
74
|
-
>
|
|
75
|
-
<div
|
|
76
|
-
key="sample1"
|
|
77
|
-
class="detail-font"
|
|
78
|
-
:style="{ top: 150, left: 425, width: 430, height: 40 }"
|
|
79
|
-
>
|
|
80
|
-
{{ detail }}
|
|
81
|
-
</div>
|
|
82
|
-
<div
|
|
83
|
-
key="DirectText"
|
|
84
|
-
class="font"
|
|
85
|
-
:style="{ top: 250, left: 425, width: 430, height: 40 }"
|
|
86
|
-
>
|
|
87
|
-
{{ `当前方向:${directionDetail}` }}
|
|
88
|
-
</div>
|
|
89
|
-
<div :style="{ top: 590, left: 625 }">
|
|
90
|
-
<jsv-actor-move key="move" :control="moveControl">
|
|
91
|
-
<jsv-actor-move key="throw" :control="throwControl">
|
|
92
|
-
<div
|
|
93
|
-
:style="{ backgroundColor: '#ffb915', width: 30, height: 30 }"
|
|
94
|
-
></div>
|
|
95
|
-
</jsv-actor-move>
|
|
96
|
-
</jsv-actor-move>
|
|
97
|
-
</div>
|
|
98
|
-
</jsv-focus-block>
|
|
99
|
-
</template>
|
|
100
|
-
|
|
101
|
-
<style scoped>
|
|
102
|
-
.font {
|
|
103
|
-
font-size: 32px;
|
|
104
|
-
color: #73665c;
|
|
105
|
-
line-height: 40px;
|
|
106
|
-
overflow: hidden;
|
|
107
|
-
white-space: nowrap;
|
|
108
|
-
text-overflow: ellipsis;
|
|
109
|
-
text-align: center;
|
|
110
|
-
}
|
|
111
|
-
|
|
112
|
-
.detail-font {
|
|
113
|
-
font-size: 32px;
|
|
114
|
-
color: #f7f7eb;
|
|
115
|
-
line-height: 30px;
|
|
116
|
-
overflow: hidden;
|
|
117
|
-
white-space: nowrap;
|
|
118
|
-
text-overflow: ellipsis;
|
|
119
|
-
text-align: center;
|
|
120
|
-
}
|
|
121
|
-
</style>
|
|
@@ -1,136 +0,0 @@
|
|
|
1
|
-
<!--
|
|
2
|
-
* @Author: ChenChanghua
|
|
3
|
-
* @Date: 2022-04-10 21:20:39
|
|
4
|
-
* @LastEditors: ChenChanghua
|
|
5
|
-
* @LastEditTime: 2022-07-08 14:12:05
|
|
6
|
-
* @Description: file content
|
|
7
|
-
-->
|
|
8
|
-
<script>
|
|
9
|
-
import MetroWidgetHorizontal from "./MetroWidgetHorizontal.vue";
|
|
10
|
-
import MetroWidgetVertical from "./MetroWidgetVertical.vue";
|
|
11
|
-
import TouchContainerHorizontal from "./TouchContainerHorizontal.vue";
|
|
12
|
-
import TouchContainerVertical from "./TouchContainerVertical.vue";
|
|
13
|
-
import { jJsvRuntimeBridge, JsvTouchContainer } from "jsview";
|
|
14
|
-
|
|
15
|
-
export default {
|
|
16
|
-
components: {
|
|
17
|
-
MetroWidgetHorizontal,
|
|
18
|
-
MetroWidgetVertical,
|
|
19
|
-
TouchContainerHorizontal,
|
|
20
|
-
JsvTouchContainer,
|
|
21
|
-
TouchContainerVertical,
|
|
22
|
-
},
|
|
23
|
-
data() {
|
|
24
|
-
return {
|
|
25
|
-
metroVerticalVisible: false,
|
|
26
|
-
metroHorizontalVisible: true,
|
|
27
|
-
touchContainerHorizontalVisible: false,
|
|
28
|
-
touchContainerVerticalVisible: false,
|
|
29
|
-
head: "SimpleWidget 横向",
|
|
30
|
-
};
|
|
31
|
-
},
|
|
32
|
-
setup() {
|
|
33
|
-
const tabList = [
|
|
34
|
-
"SimpleWidget 横向",
|
|
35
|
-
"SimpleWidget 纵向",
|
|
36
|
-
"TouchContainer 横向",
|
|
37
|
-
"TouchContainer 纵向",
|
|
38
|
-
];
|
|
39
|
-
return {
|
|
40
|
-
tabList,
|
|
41
|
-
};
|
|
42
|
-
},
|
|
43
|
-
methods: {
|
|
44
|
-
_onClick(id) {
|
|
45
|
-
switch (id) {
|
|
46
|
-
case 0:
|
|
47
|
-
this.head = "SimpleWidget 横向";
|
|
48
|
-
this.metroVerticalVisible = false;
|
|
49
|
-
this.metroHorizontalVisible = true;
|
|
50
|
-
this.touchContainerHorizontalVisible = false;
|
|
51
|
-
this.touchContainerVerticalVisible = false;
|
|
52
|
-
break;
|
|
53
|
-
case 1:
|
|
54
|
-
this.head = "SimpleWidget 纵向";
|
|
55
|
-
this.metroVerticalVisible = true;
|
|
56
|
-
this.metroHorizontalVisible = false;
|
|
57
|
-
this.touchContainerHorizontalVisible = false;
|
|
58
|
-
this.touchContainerVerticalVisible = false;
|
|
59
|
-
break;
|
|
60
|
-
case 2:
|
|
61
|
-
this.head = "TouchContainer 横向";
|
|
62
|
-
this.metroVerticalVisible = false;
|
|
63
|
-
this.metroHorizontalVisible = false;
|
|
64
|
-
this.touchContainerHorizontalVisible = true;
|
|
65
|
-
this.touchContainerVerticalVisible = false;
|
|
66
|
-
break;
|
|
67
|
-
case 3:
|
|
68
|
-
this.head = "TouchContainer 纵向";
|
|
69
|
-
this.metroVerticalVisible = false;
|
|
70
|
-
this.metroHorizontalVisible = false;
|
|
71
|
-
this.touchContainerHorizontalVisible = false;
|
|
72
|
-
this.touchContainerVerticalVisible = true;
|
|
73
|
-
break;
|
|
74
|
-
default:
|
|
75
|
-
break;
|
|
76
|
-
}
|
|
77
|
-
return true;
|
|
78
|
-
},
|
|
79
|
-
},
|
|
80
|
-
mounted() {
|
|
81
|
-
jJsvRuntimeBridge.notifyPageLoaded();
|
|
82
|
-
},
|
|
83
|
-
};
|
|
84
|
-
</script>
|
|
85
|
-
|
|
86
|
-
<template>
|
|
87
|
-
<div
|
|
88
|
-
:style="{
|
|
89
|
-
width: 1280,
|
|
90
|
-
height: 720 * 2,
|
|
91
|
-
backgroundColor: '#1b2697',
|
|
92
|
-
}"
|
|
93
|
-
>
|
|
94
|
-
<jsv-touch-container
|
|
95
|
-
v-for="(title, index) of tabList"
|
|
96
|
-
:key="'tab' + index"
|
|
97
|
-
:style="{
|
|
98
|
-
left: 50 + 300 * index,
|
|
99
|
-
top: 10,
|
|
100
|
-
width: 280,
|
|
101
|
-
height: 50,
|
|
102
|
-
backgroundColor: '#ff0000',
|
|
103
|
-
fontSize: 18,
|
|
104
|
-
lineHeight: '50px',
|
|
105
|
-
}"
|
|
106
|
-
:onClick="
|
|
107
|
-
() => {
|
|
108
|
-
return this._onClick(index);
|
|
109
|
-
}
|
|
110
|
-
"
|
|
111
|
-
:direction="DIRECTION_DISABLE"
|
|
112
|
-
>
|
|
113
|
-
{{ title }}
|
|
114
|
-
</jsv-touch-container>
|
|
115
|
-
|
|
116
|
-
<div
|
|
117
|
-
:style="{
|
|
118
|
-
left: 30,
|
|
119
|
-
top: 60,
|
|
120
|
-
width: 400,
|
|
121
|
-
height: 50,
|
|
122
|
-
fontSize: 30,
|
|
123
|
-
lineHeight: '50px',
|
|
124
|
-
color: '#f0ef29',
|
|
125
|
-
}"
|
|
126
|
-
>
|
|
127
|
-
{{ head }}
|
|
128
|
-
</div>
|
|
129
|
-
<div :style="{ left: 30, top: 120 }">
|
|
130
|
-
<metro-widget-horizontal v-if="metroHorizontalVisible" />
|
|
131
|
-
<metro-widget-vertical v-if="metroVerticalVisible" />
|
|
132
|
-
<touch-container-horizontal v-if="touchContainerHorizontalVisible" />
|
|
133
|
-
<touch-container-vertical v-if="touchContainerVerticalVisible" />
|
|
134
|
-
</div>
|
|
135
|
-
</div>
|
|
136
|
-
</template>
|
|
@@ -1,103 +0,0 @@
|
|
|
1
|
-
<!--
|
|
2
|
-
* @Author: ChenChanghua
|
|
3
|
-
* @Date: 2022-04-10 21:21:43
|
|
4
|
-
* @LastEditors: ChenChanghua
|
|
5
|
-
* @LastEditTime: 2022-04-10 21:21:44
|
|
6
|
-
* @Description: file content
|
|
7
|
-
-->
|
|
8
|
-
<script>
|
|
9
|
-
import { getPositionRelativeToView } from "jsview";
|
|
10
|
-
function randomColor() {
|
|
11
|
-
let randomColor = Math.round(Math.random() * 2 ** 24).toString(16);
|
|
12
|
-
return (
|
|
13
|
-
"#" + new Array(6 - randomColor.length).fill("0").join("") + randomColor
|
|
14
|
-
);
|
|
15
|
-
}
|
|
16
|
-
export default {
|
|
17
|
-
props: {
|
|
18
|
-
data: Object,
|
|
19
|
-
query: Object,
|
|
20
|
-
onEdge: Function,
|
|
21
|
-
onAction: Object,
|
|
22
|
-
test: Object,
|
|
23
|
-
},
|
|
24
|
-
data() {
|
|
25
|
-
return {
|
|
26
|
-
focused: false,
|
|
27
|
-
};
|
|
28
|
-
},
|
|
29
|
-
setup() {
|
|
30
|
-
return {
|
|
31
|
-
randomColor,
|
|
32
|
-
};
|
|
33
|
-
},
|
|
34
|
-
computed: {
|
|
35
|
-
style() {
|
|
36
|
-
return {
|
|
37
|
-
width: this.data.width,
|
|
38
|
-
height: this.data.height,
|
|
39
|
-
color: "#FFFFFF",
|
|
40
|
-
backgroundColor: this.focused ? "#FF0000" : this.data.color,
|
|
41
|
-
};
|
|
42
|
-
},
|
|
43
|
-
},
|
|
44
|
-
methods: {
|
|
45
|
-
onFocus() {
|
|
46
|
-
this.focused = true;
|
|
47
|
-
console.log("cchtest item onfocus", this.data);
|
|
48
|
-
},
|
|
49
|
-
|
|
50
|
-
onBlur() {
|
|
51
|
-
this.focused = false;
|
|
52
|
-
},
|
|
53
|
-
|
|
54
|
-
onClick() {
|
|
55
|
-
console.log(`item ${this.query.id} clicked`);
|
|
56
|
-
},
|
|
57
|
-
},
|
|
58
|
-
created() {
|
|
59
|
-
// console.log("cchtest item created", this.data.content)
|
|
60
|
-
this.onAction.register("onFocus", this.onFocus);
|
|
61
|
-
this.onAction.register("onBlur", this.onBlur);
|
|
62
|
-
this.onAction.register("onClick", this.onClick);
|
|
63
|
-
},
|
|
64
|
-
mounted() {
|
|
65
|
-
// console.log("cchtest item mounted", this.data.content)
|
|
66
|
-
},
|
|
67
|
-
beforeUnmount() {
|
|
68
|
-
// console.log("cchtest item unmount", this.data.content)
|
|
69
|
-
},
|
|
70
|
-
updated() {
|
|
71
|
-
// console.log("cchtest item update", this.data.content)
|
|
72
|
-
},
|
|
73
|
-
};
|
|
74
|
-
</script>
|
|
75
|
-
|
|
76
|
-
<template>
|
|
77
|
-
<div ref="element" :class="focused ? 'focus' : 'blur'" :style="style">
|
|
78
|
-
{{ data.content }}
|
|
79
|
-
</div>
|
|
80
|
-
<div
|
|
81
|
-
:style="{
|
|
82
|
-
left: data.width / 2,
|
|
83
|
-
top: data.height / 2,
|
|
84
|
-
width: 10,
|
|
85
|
-
height: 10,
|
|
86
|
-
backgroundColor: focused ? '#000000' : '#FF0000',
|
|
87
|
-
}"
|
|
88
|
-
/>
|
|
89
|
-
</template>
|
|
90
|
-
|
|
91
|
-
<style scoped>
|
|
92
|
-
.focus {
|
|
93
|
-
transform: scale3d(1, 1, 1);
|
|
94
|
-
transition: transform 0.25s linear;
|
|
95
|
-
font-size: 30px;
|
|
96
|
-
}
|
|
97
|
-
|
|
98
|
-
.blur {
|
|
99
|
-
transform: scale3d(1, 1, 1);
|
|
100
|
-
transition: transform 0.25s linear;
|
|
101
|
-
font-size: 30px;
|
|
102
|
-
}
|
|
103
|
-
</style>
|
|
@@ -1,144 +0,0 @@
|
|
|
1
|
-
<script>
|
|
2
|
-
import {
|
|
3
|
-
HORIZONTAL,
|
|
4
|
-
MetroWidget,
|
|
5
|
-
WholePageSlide,
|
|
6
|
-
SeamlessSlide,
|
|
7
|
-
FixPositionSlide,
|
|
8
|
-
} from "jsview";
|
|
9
|
-
|
|
10
|
-
import Item from "./Item.vue";
|
|
11
|
-
|
|
12
|
-
import { metroWidgetH, measures } from "./data.js";
|
|
13
|
-
import { ref, shallowRef } from "vue";
|
|
14
|
-
|
|
15
|
-
export default {
|
|
16
|
-
components: {
|
|
17
|
-
MetroWidget,
|
|
18
|
-
Item,
|
|
19
|
-
},
|
|
20
|
-
setup() {
|
|
21
|
-
return {
|
|
22
|
-
measures,
|
|
23
|
-
name: "/metroWidgetH",
|
|
24
|
-
direction: HORIZONTAL,
|
|
25
|
-
wholePageSlide: new WholePageSlide({
|
|
26
|
-
speed: 1.5,
|
|
27
|
-
}),
|
|
28
|
-
seamlessSlide: new SeamlessSlide({
|
|
29
|
-
startPercent: 0.4,
|
|
30
|
-
endPercent: 0.6,
|
|
31
|
-
speed: 0.5,
|
|
32
|
-
}),
|
|
33
|
-
fixPositionSlide: new FixPositionSlide({
|
|
34
|
-
fixPercent: 0.5,
|
|
35
|
-
speed: 0.5,
|
|
36
|
-
}),
|
|
37
|
-
token: ref(0),
|
|
38
|
-
CONST_ITEM_WIDTH: 100,
|
|
39
|
-
CONST_ITEM_HEIGHT: 200,
|
|
40
|
-
};
|
|
41
|
-
},
|
|
42
|
-
methods: {
|
|
43
|
-
_provideData() {
|
|
44
|
-
return metroWidgetH;
|
|
45
|
-
},
|
|
46
|
-
},
|
|
47
|
-
|
|
48
|
-
mounted() {},
|
|
49
|
-
};
|
|
50
|
-
</script>
|
|
51
|
-
|
|
52
|
-
<template>
|
|
53
|
-
<div class="rootSize">
|
|
54
|
-
<div :style="{ width: 1280, height: 720, left: 50 }">
|
|
55
|
-
<div
|
|
56
|
-
:style="{
|
|
57
|
-
top: 0,
|
|
58
|
-
width: 200,
|
|
59
|
-
height: 40,
|
|
60
|
-
fontSize: 25,
|
|
61
|
-
lineHeight: '40px',
|
|
62
|
-
color: '#fff753',
|
|
63
|
-
}"
|
|
64
|
-
>
|
|
65
|
-
整页滑动
|
|
66
|
-
</div>
|
|
67
|
-
<div
|
|
68
|
-
:style="{
|
|
69
|
-
top: 50,
|
|
70
|
-
width: CONST_ITEM_WIDTH * 10 + 20,
|
|
71
|
-
height: CONST_ITEM_HEIGHT + 20,
|
|
72
|
-
backgroundColor: '#ff0000',
|
|
73
|
-
}"
|
|
74
|
-
>
|
|
75
|
-
<metro-widget
|
|
76
|
-
name="simpleWidgetHorizontal1"
|
|
77
|
-
:width="CONST_ITEM_WIDTH * 10 + 20"
|
|
78
|
-
:height="CONST_ITEM_HEIGHT + 20"
|
|
79
|
-
:direction="direction"
|
|
80
|
-
:measures="measures"
|
|
81
|
-
:provideData="_provideData"
|
|
82
|
-
:padding="{ top: 10, left: 10, right: 10, bottom: 10 }"
|
|
83
|
-
:enableTouch="true"
|
|
84
|
-
:flingPageWidth="CONST_ITEM_WIDTH * 10"
|
|
85
|
-
>
|
|
86
|
-
<template #renderItem="{ data, query, onEdge, onAction }">
|
|
87
|
-
<item
|
|
88
|
-
:data="data"
|
|
89
|
-
:query="query"
|
|
90
|
-
:onEdge="onEdge"
|
|
91
|
-
:onAction="onAction"
|
|
92
|
-
/> </template
|
|
93
|
-
></metro-widget>
|
|
94
|
-
</div>
|
|
95
|
-
<div
|
|
96
|
-
:style="{
|
|
97
|
-
top: CONST_ITEM_HEIGHT + 100,
|
|
98
|
-
width: 200,
|
|
99
|
-
height: 40,
|
|
100
|
-
fontSize: 25,
|
|
101
|
-
lineHeight: '40px',
|
|
102
|
-
color: '#fff753',
|
|
103
|
-
}"
|
|
104
|
-
>
|
|
105
|
-
普通滑动
|
|
106
|
-
</div>
|
|
107
|
-
<div
|
|
108
|
-
:style="{
|
|
109
|
-
top: CONST_ITEM_HEIGHT + 100 + 50,
|
|
110
|
-
width: CONST_ITEM_WIDTH * 10 + 20,
|
|
111
|
-
height: CONST_ITEM_HEIGHT + 20,
|
|
112
|
-
backgroundColor: '#ff0000',
|
|
113
|
-
}"
|
|
114
|
-
>
|
|
115
|
-
<metro-widget
|
|
116
|
-
name="simpleWidgetHorizontal2"
|
|
117
|
-
:width="CONST_ITEM_WIDTH * 10 + 20"
|
|
118
|
-
:height="CONST_ITEM_HEIGHT + 20"
|
|
119
|
-
:direction="direction"
|
|
120
|
-
:measures="measures"
|
|
121
|
-
:provideData="_provideData"
|
|
122
|
-
:padding="{ top: 10, left: 10, right: 10, bottom: 10 }"
|
|
123
|
-
:enableTouch="true"
|
|
124
|
-
>
|
|
125
|
-
<template #renderItem="{ data, query, onEdge, onAction }">
|
|
126
|
-
<item
|
|
127
|
-
:data="data"
|
|
128
|
-
:query="query"
|
|
129
|
-
:onEdge="onEdge"
|
|
130
|
-
:onAction="onAction"
|
|
131
|
-
/> </template
|
|
132
|
-
></metro-widget>
|
|
133
|
-
</div>
|
|
134
|
-
</div>
|
|
135
|
-
</div>
|
|
136
|
-
</template>
|
|
137
|
-
|
|
138
|
-
<style scoped>
|
|
139
|
-
.rootSize {
|
|
140
|
-
width: 1920;
|
|
141
|
-
height: 1080;
|
|
142
|
-
background-color: #334c4c;
|
|
143
|
-
}
|
|
144
|
-
</style>
|