@shijiu/jsview-vue 1.9.731 → 1.9.759
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
package/index.d.ts
CHANGED
package/index.js
CHANGED
package/package.json
CHANGED
|
@@ -1,27 +1,16 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@shijiu/jsview-vue",
|
|
3
|
-
"
|
|
4
|
-
|
|
5
|
-
],
|
|
6
|
-
"version": "1.9.731",
|
|
3
|
+
"version": "1.9.759",
|
|
4
|
+
"license": "MIT",
|
|
7
5
|
"repository": "system/jsview-framework",
|
|
6
|
+
"author": "mengxk",
|
|
7
|
+
"homepage": "http://gitlab.qcast.cn/system/jsview-framework",
|
|
8
8
|
"bugs": "http://gitlab.qcast.cn/system/jsview-framework/issues",
|
|
9
9
|
"keywords": [
|
|
10
10
|
"jsview",
|
|
11
|
-
"vue3",
|
|
12
11
|
"jsview-vue"
|
|
13
12
|
],
|
|
14
|
-
"author": "mengxk",
|
|
15
|
-
"homepage": "http://gitlab.qcast.cn/system/jsview-framework",
|
|
16
|
-
"license": "MIT",
|
|
17
13
|
"engines": {
|
|
18
|
-
"node": ">=
|
|
19
|
-
},
|
|
20
|
-
"dependencies": {
|
|
21
|
-
"vue": "3.2.37",
|
|
22
|
-
"vue-router": "4.1.4"
|
|
23
|
-
},
|
|
24
|
-
"devDependencies": {
|
|
25
|
-
"@vue/compiler-sfc": "3.2.8"
|
|
14
|
+
"node": ">=16.0.0"
|
|
26
15
|
}
|
|
27
16
|
}
|
|
@@ -1,207 +0,0 @@
|
|
|
1
|
-
<!--
|
|
2
|
-
* @Author: ChenChanghua
|
|
3
|
-
* @Date: 2021-10-13 14:44:03
|
|
4
|
-
* @LastEditors: ChenChanghua
|
|
5
|
-
* @LastEditTime: 2022-07-08 10:09:50
|
|
6
|
-
* @Description: file content
|
|
7
|
-
-->
|
|
8
|
-
<script setup>
|
|
9
|
-
import { ref, shallowRef } from "vue";
|
|
10
|
-
import { useRouter, useRoute } from "vue-router";
|
|
11
|
-
import { LoopType, JsvApic } from "jsview";
|
|
12
|
-
import catRun from "./assets/animated_webp.webp";
|
|
13
|
-
import girlRun from "./assets/girl_run.gif";
|
|
14
|
-
import quan from "./assets/quan.webp";
|
|
15
|
-
import ball from "./assets/ball_3.webp";
|
|
16
|
-
|
|
17
|
-
const router = useRouter();
|
|
18
|
-
const route = useRoute();
|
|
19
|
-
let catRunPlay = ref(false);
|
|
20
|
-
let girlRunPlay = ref(false);
|
|
21
|
-
let quanPlay = ref(false);
|
|
22
|
-
let ballPlay = ref(false);
|
|
23
|
-
|
|
24
|
-
const catRunCallback = {
|
|
25
|
-
onStart: () => {
|
|
26
|
-
catRunPlay.value = true;
|
|
27
|
-
},
|
|
28
|
-
onEnd: () => {
|
|
29
|
-
catRunPlay.value = false;
|
|
30
|
-
},
|
|
31
|
-
};
|
|
32
|
-
const girlRunCallback = {
|
|
33
|
-
onStart: () => {
|
|
34
|
-
girlRunPlay.value = true;
|
|
35
|
-
},
|
|
36
|
-
onEnd: () => {
|
|
37
|
-
girlRunPlay.value = false;
|
|
38
|
-
},
|
|
39
|
-
};
|
|
40
|
-
const quanCallback = {
|
|
41
|
-
onStart: () => {
|
|
42
|
-
quanPlay.value = true;
|
|
43
|
-
},
|
|
44
|
-
onEnd: () => {
|
|
45
|
-
quanPlay.value = false;
|
|
46
|
-
},
|
|
47
|
-
};
|
|
48
|
-
const ballCallback = {
|
|
49
|
-
onStart: () => {
|
|
50
|
-
ballPlay.value = true;
|
|
51
|
-
},
|
|
52
|
-
onEnd: () => {
|
|
53
|
-
ballPlay.value = false;
|
|
54
|
-
},
|
|
55
|
-
};
|
|
56
|
-
let catRunRef = shallowRef(null);
|
|
57
|
-
let girlRunRef = shallowRef(null);
|
|
58
|
-
let quanRef = shallowRef(null);
|
|
59
|
-
let ballRef = shallowRef(null);
|
|
60
|
-
|
|
61
|
-
const onKeyDown = (ev) => {
|
|
62
|
-
if (ev.keyCode == 8 || ev.keyCode == 27 || ev.keyCode == 10000) {
|
|
63
|
-
router.go(-1); // 有router时,是从DemoHomepage进入,回退
|
|
64
|
-
return true;
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
if (ev.keyCode === 37) {
|
|
68
|
-
if (catRunRef.value) {
|
|
69
|
-
if (catRunPlay.value) {
|
|
70
|
-
catRunRef.value.stop();
|
|
71
|
-
catRunPlay.value = false;
|
|
72
|
-
} else {
|
|
73
|
-
catRunRef.value.play();
|
|
74
|
-
catRunPlay.value = true;
|
|
75
|
-
}
|
|
76
|
-
}
|
|
77
|
-
} else if (ev.keyCode === 13) {
|
|
78
|
-
if (girlRunRef.value) {
|
|
79
|
-
if (girlRunPlay.value) {
|
|
80
|
-
girlRunRef.value.stop();
|
|
81
|
-
girlRunPlay.value = false;
|
|
82
|
-
} else {
|
|
83
|
-
girlRunRef.value.play();
|
|
84
|
-
girlRunPlay.value = true;
|
|
85
|
-
}
|
|
86
|
-
}
|
|
87
|
-
} else if (ev.keyCode === 39) {
|
|
88
|
-
if (quanRef.value) {
|
|
89
|
-
if (quanPlay.value) {
|
|
90
|
-
quanRef.value.stop();
|
|
91
|
-
quanPlay.value = false;
|
|
92
|
-
} else {
|
|
93
|
-
quanRef.value.play();
|
|
94
|
-
quanPlay.value = true;
|
|
95
|
-
}
|
|
96
|
-
}
|
|
97
|
-
} else if (ev.keyCode === 38) {
|
|
98
|
-
if (ballRef.value) {
|
|
99
|
-
if (ballPlay.value) {
|
|
100
|
-
ballRef.value.stop();
|
|
101
|
-
ballPlay.value = false;
|
|
102
|
-
} else {
|
|
103
|
-
ballRef.value.play();
|
|
104
|
-
ballPlay.value = true;
|
|
105
|
-
}
|
|
106
|
-
}
|
|
107
|
-
}
|
|
108
|
-
return true;
|
|
109
|
-
};
|
|
110
|
-
</script>
|
|
111
|
-
|
|
112
|
-
<template>
|
|
113
|
-
<jsv-focus-block ref="rootNode" autoFocus :onKeyDown="onKeyDown">
|
|
114
|
-
<div :style="{ width: 1920, height: 1080, backgroundColor: '#334C4C' }">
|
|
115
|
-
<div :style="{ left: 20, top: 20 }">
|
|
116
|
-
<jsv-apic
|
|
117
|
-
ref="catRunRef"
|
|
118
|
-
:src="`url(${catRun})`"
|
|
119
|
-
:style="{ width: 250, height: 250 }"
|
|
120
|
-
:autoPlay="true"
|
|
121
|
-
:loopType="LoopType.LOOP_DEFAULT"
|
|
122
|
-
:onStart="catRunCallback.onStart"
|
|
123
|
-
:onEnd="catRunCallback.onEnd"
|
|
124
|
-
/>
|
|
125
|
-
<div className="text" :style="{ top: 270, width: 250 }">
|
|
126
|
-
{{ `WEBP(${catRunPlay ? "运行" : "停止"})\n左键控制` }}
|
|
127
|
-
</div>
|
|
128
|
-
</div>
|
|
129
|
-
|
|
130
|
-
<div :style="{ left: 280, top: 20 }">
|
|
131
|
-
<JsvApic
|
|
132
|
-
ref="girlRunRef"
|
|
133
|
-
:src="`url(${girlRun})`"
|
|
134
|
-
:style="{ width: 250, height: 214 }"
|
|
135
|
-
:autoPlay="true"
|
|
136
|
-
:loopType="LoopType.LOOP_DEFAULT"
|
|
137
|
-
:onStart="girlRunCallback.onStart"
|
|
138
|
-
:onEnd="girlRunCallback.onEnd"
|
|
139
|
-
/>
|
|
140
|
-
<div className="text" :style="{ top: 219, width: 250 }">
|
|
141
|
-
{{ `GIF(${girlRunPlay ? "运行" : "停止"})\nOK键控制` }}
|
|
142
|
-
</div>
|
|
143
|
-
</div>
|
|
144
|
-
|
|
145
|
-
<div :style="{ left: 540, top: 20 }">
|
|
146
|
-
<JsvApic
|
|
147
|
-
ref="quanRef"
|
|
148
|
-
:src="`url(${quan})`"
|
|
149
|
-
:style="{ width: 250, height: 296 }"
|
|
150
|
-
:autoPlay="true"
|
|
151
|
-
:loopType="LoopType.LOOP_DEFAULT"
|
|
152
|
-
:onStart="quanCallback.onStart"
|
|
153
|
-
:onEnd="quanCallback.onEnd"
|
|
154
|
-
/>
|
|
155
|
-
<div className="text" :style="{ top: 301, width: 250 }">
|
|
156
|
-
{{ `单次播放WEBP(${quanPlay ? "运行" : "停止"})\n右键控制` }}
|
|
157
|
-
</div>
|
|
158
|
-
</div>
|
|
159
|
-
|
|
160
|
-
<div :style="{ left: 800, top: 20 }">
|
|
161
|
-
<JsvApic
|
|
162
|
-
ref="ballRef"
|
|
163
|
-
:src="`url(${ball})`"
|
|
164
|
-
:style="{ width: 300, height: 200 }"
|
|
165
|
-
:autoPlay="true"
|
|
166
|
-
:loopType="LoopType.LOOP_PART"
|
|
167
|
-
:loopInfo="[
|
|
168
|
-
[3, 2, 4],
|
|
169
|
-
[5, 7, 10],
|
|
170
|
-
]"
|
|
171
|
-
:onStart="ballCallback.onStart"
|
|
172
|
-
:onEnd="ballCallback.onEnd"
|
|
173
|
-
/>
|
|
174
|
-
<div class="text" :style="{ top: 205, width: 300, height: 200 }">
|
|
175
|
-
{{
|
|
176
|
-
`局部循环WEBP(${
|
|
177
|
-
ballPlay ? "运行" : "停止"
|
|
178
|
-
})\n先循环2次后循环4次\n上键控制`
|
|
179
|
-
}}
|
|
180
|
-
</div>
|
|
181
|
-
</div>
|
|
182
|
-
|
|
183
|
-
<div
|
|
184
|
-
:style="{
|
|
185
|
-
left: 50,
|
|
186
|
-
top: 590,
|
|
187
|
-
width: 1180,
|
|
188
|
-
textAlign: 'center',
|
|
189
|
-
color: '#000000',
|
|
190
|
-
fontSize: '30px',
|
|
191
|
-
}"
|
|
192
|
-
>
|
|
193
|
-
{{ `(按键可进行停止/重播操作)` }}
|
|
194
|
-
</div>
|
|
195
|
-
</div>
|
|
196
|
-
</jsv-focus-block>
|
|
197
|
-
</template>
|
|
198
|
-
|
|
199
|
-
<style scoped>
|
|
200
|
-
.text {
|
|
201
|
-
font-size: 25px;
|
|
202
|
-
height: 68px;
|
|
203
|
-
line-height: 34px;
|
|
204
|
-
color: #000000;
|
|
205
|
-
text-align: center;
|
|
206
|
-
}
|
|
207
|
-
</style>
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/samples/Basic/App.vue
DELETED
|
@@ -1,134 +0,0 @@
|
|
|
1
|
-
<!--
|
|
2
|
-
* 【界面概述】
|
|
3
|
-
* div元素style中设置值对应的样例
|
|
4
|
-
*
|
|
5
|
-
* 【控件介绍】
|
|
6
|
-
* 无
|
|
7
|
-
*
|
|
8
|
-
* 【技巧说明】
|
|
9
|
-
* Q: 如何将div布局到指定坐标中?
|
|
10
|
-
* A: 设置div style中的top和left,坐标值是相对于父div的左上角的坐标值
|
|
11
|
-
*
|
|
12
|
-
* Q: 如何在界面上描画图片?
|
|
13
|
-
* A: 参照div/DivBackground,div的style中,
|
|
14
|
-
* 描绘纯色时,通过backgroundColor来设置,例如
|
|
15
|
-
* <div style={{width:200, height:200, backgroundColor: 'rgba(255, 255, 0, 1)'}}>
|
|
16
|
-
* 描绘图片时,通过backgroundImage来设置,例如
|
|
17
|
-
* <div style={{width:200, height:200, backgroundColor:`url(${iconImgPath})`}}>
|
|
18
|
-
* 注意,不设置width和height的情况是默认尺寸为0px * 0px,不会展示图片
|
|
19
|
-
*
|
|
20
|
-
* Q: 如何对图片进行剪切,只展示图片的局部内容?
|
|
21
|
-
* A: 参照div/DivClip,使用style中的overflow:"hidden"属性进行裁剪,或者使用style中clipPath属性进行裁剪
|
|
22
|
-
*
|
|
23
|
-
* Q: 如何将展示图片的四个角变成圆角?
|
|
24
|
-
* A: 参照img/ImgRadius,通过设置style中的borderRadius属性完成圆角改变
|
|
25
|
-
*
|
|
26
|
-
* Q: 文字如何描绘?
|
|
27
|
-
* A: 在div标签的内容中可填写需要描绘的文字,文字的字体字号等属性,通过div标签中的style来控制,参照text文件夹中的各个js。
|
|
28
|
-
* 注意:若文字内容中需要折行,则需要把要显示内容放入字符串中,并加入'\n'来达到换行效果,例如:
|
|
29
|
-
* <div>{"第一行
|
|
30
|
-
* 第二行"}</div>
|
|
31
|
-
* =======需要改成=======
|
|
32
|
-
* <div>{"第一行\n\
|
|
33
|
-
* 第二行"}</div>
|
|
34
|
-
*
|
|
35
|
-
* Q: 几个位置使用的文字属性是统一的情况下,如何减少每个div中设置文字style的代码量?
|
|
36
|
-
* A: 将统一的文字属性定义到一个js文件中(例如本Demo中的CommonFontStyle),使用时,在style中采用array扩展的方式即可:
|
|
37
|
-
* <div style={{...TitleFont}}>
|
|
38
|
-
*
|
|
39
|
-
* Q: 如何让div产生动画效果?
|
|
40
|
-
* A: 动画需要通过以下两种方式实现,具体见anim文件夹各个js:
|
|
41
|
-
* 方式1:声明keyframe结构,通过div的style中的animation来引用keyFrame,启动动画
|
|
42
|
-
* 方式2:设置div style中的transition属性,然后调整div的left/top/width/height之后,会按照transition规则进行动画。
|
|
43
|
-
* 注意点1:keyFrame可以声明在css文件中,也可以通过document.styleSheet来动态加载,可以参考转盘demo(turntableDemo)
|
|
44
|
-
* 在JsView系统中,css文件中只能声明keyFrame内容,不能声明其他内容
|
|
45
|
-
* 注意点2:transition目前只支持left/top/width/height属性的跟踪,其他属性目前不支持
|
|
46
|
-
-->
|
|
47
|
-
|
|
48
|
-
<script setup>
|
|
49
|
-
import { jJsvRuntimeBridge } from "jsview";
|
|
50
|
-
import { reactive, onMounted } from "vue";
|
|
51
|
-
import { useRouter } from "vue-router";
|
|
52
|
-
import Panel1 from "./components/panel/Panel1.vue";
|
|
53
|
-
import Panel2 from "./components/panel/Panel2.vue";
|
|
54
|
-
|
|
55
|
-
const router = useRouter();
|
|
56
|
-
const itemSides = {
|
|
57
|
-
top: 0,
|
|
58
|
-
left: 0,
|
|
59
|
-
width: 240,
|
|
60
|
-
height: 160,
|
|
61
|
-
};
|
|
62
|
-
|
|
63
|
-
const panelInfo = reactive({
|
|
64
|
-
index: 1,
|
|
65
|
-
total: 2,
|
|
66
|
-
desc: "1/2",
|
|
67
|
-
});
|
|
68
|
-
const onKeyDown = (ev) => {
|
|
69
|
-
// 8:Backspace, 27:Escape, 10000:盒子返回键
|
|
70
|
-
if (ev.keyCode == 8 || ev.keyCode == 27 || ev.keyCode == 10000) {
|
|
71
|
-
router.go(-1); // 有router时,是从DemoHomepage进入,回退
|
|
72
|
-
return true;
|
|
73
|
-
} else if (ev.keyCode == 37) {
|
|
74
|
-
// left
|
|
75
|
-
panelInfo.index = --panelInfo.index > 1 ? panelInfo.index : 1;
|
|
76
|
-
panelInfo.desc = panelInfo.index + "/" + panelInfo.total;
|
|
77
|
-
return true;
|
|
78
|
-
} else if (ev.keyCode == 39) {
|
|
79
|
-
// right
|
|
80
|
-
panelInfo.index =
|
|
81
|
-
++panelInfo.index < panelInfo.total ? panelInfo.index : panelInfo.total;
|
|
82
|
-
panelInfo.desc = panelInfo.index + "/" + panelInfo.total;
|
|
83
|
-
return true;
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
return false;
|
|
87
|
-
};
|
|
88
|
-
onMounted(() => {
|
|
89
|
-
jJsvRuntimeBridge.notifyPageLoaded();
|
|
90
|
-
});
|
|
91
|
-
</script>
|
|
92
|
-
|
|
93
|
-
<template>
|
|
94
|
-
<div>
|
|
95
|
-
<!-- 有router时,将按键交给router去处理,此处没有其他用处 -->
|
|
96
|
-
<jsv-focus-block autoFocus :onKeyDown="onKeyDown" />
|
|
97
|
-
|
|
98
|
-
<div class="root">
|
|
99
|
-
<Panel1
|
|
100
|
-
v-if="panelInfo.index == 1"
|
|
101
|
-
:style="{ top: 10, left: 20 }"
|
|
102
|
-
panelClass="panel-size"
|
|
103
|
-
:itemSides="itemSides"
|
|
104
|
-
/>
|
|
105
|
-
<Panel2
|
|
106
|
-
v-else-if="panelInfo.index == 2"
|
|
107
|
-
:style="{ top: 10, left: 20 }"
|
|
108
|
-
panelClass="panel-size"
|
|
109
|
-
:itemSides="itemSides"
|
|
110
|
-
/>
|
|
111
|
-
<div :style="{ top: 650, left: 20, width: 500, color: '#0000FF' }">
|
|
112
|
-
{{ panelInfo.desc }}
|
|
113
|
-
</div>
|
|
114
|
-
<div :style="{ top: 650, left: 50, width: 500, color: '#0000FF' }">
|
|
115
|
-
按左/右键切换Panel,按Back键返回
|
|
116
|
-
</div>
|
|
117
|
-
</div>
|
|
118
|
-
</div>
|
|
119
|
-
</template>
|
|
120
|
-
|
|
121
|
-
<style>
|
|
122
|
-
.root {
|
|
123
|
-
top: 10;
|
|
124
|
-
left: 10;
|
|
125
|
-
width: 1250;
|
|
126
|
-
height: 670;
|
|
127
|
-
background-color: rgba(200, 200, 200, 1);
|
|
128
|
-
}
|
|
129
|
-
|
|
130
|
-
.panel-size {
|
|
131
|
-
width: 1210;
|
|
132
|
-
height: 630;
|
|
133
|
-
}
|
|
134
|
-
</style>
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
<script setup>
|
|
2
|
-
const props = defineProps({
|
|
3
|
-
title: String,
|
|
4
|
-
index: Number,
|
|
5
|
-
itemSides: Object,
|
|
6
|
-
});
|
|
7
|
-
const titleStyle = {
|
|
8
|
-
lineHeight: 18,
|
|
9
|
-
width: props.itemSides.width,
|
|
10
|
-
height: 18,
|
|
11
|
-
backgroundColor: "rgba(0,0,255,0.7)",
|
|
12
|
-
};
|
|
13
|
-
const blockOpacity = props.index % 2 === 0 ? 0.2 : 0.5;
|
|
14
|
-
</script>
|
|
15
|
-
|
|
16
|
-
<template>
|
|
17
|
-
<div>
|
|
18
|
-
<div class="container-font" :style="titleStyle">
|
|
19
|
-
{{ title }}
|
|
20
|
-
</div>
|
|
21
|
-
<div
|
|
22
|
-
key="blockColor"
|
|
23
|
-
:style="{
|
|
24
|
-
top: titleStyle.lineHeight,
|
|
25
|
-
width: itemSides.width,
|
|
26
|
-
height: itemSides.height - 18,
|
|
27
|
-
backgroundColor: 'rgba(0,0,255,' + blockOpacity + ')',
|
|
28
|
-
}"
|
|
29
|
-
></div>
|
|
30
|
-
<div key="container" :style="{ top: titleStyle.lineHeight }">
|
|
31
|
-
<slot></slot>
|
|
32
|
-
</div>
|
|
33
|
-
</div>
|
|
34
|
-
</template>
|
|
35
|
-
|
|
36
|
-
<style>
|
|
37
|
-
@import "./FontStyle.css";
|
|
38
|
-
</style>
|
|
@@ -1,66 +0,0 @@
|
|
|
1
|
-
<script setup>
|
|
2
|
-
import { reactive, onMounted, onBeforeUnmount } from "vue";
|
|
3
|
-
import ContentBlock from "../ContentBlock.vue";
|
|
4
|
-
import AnimKeyframeBasic from "./AnimKeyframeBasic.vue";
|
|
5
|
-
import AnimKeyframeComposite from "./AnimKeyframeComposite.vue";
|
|
6
|
-
import AnimTransition from "./AnimTransition.vue";
|
|
7
|
-
|
|
8
|
-
const props = defineProps({
|
|
9
|
-
contentClass: String,
|
|
10
|
-
itemSides: Object,
|
|
11
|
-
});
|
|
12
|
-
|
|
13
|
-
const contentBlockProps = {
|
|
14
|
-
colIndex: 0,
|
|
15
|
-
itemSides: props.itemSides,
|
|
16
|
-
};
|
|
17
|
-
let timerId = -1;
|
|
18
|
-
const state = reactive({
|
|
19
|
-
timeCount: 20,
|
|
20
|
-
});
|
|
21
|
-
|
|
22
|
-
onMounted(() => {
|
|
23
|
-
timerId = setInterval(() => {
|
|
24
|
-
state.timeCount = state.timeCount + 5;
|
|
25
|
-
}, 2000);
|
|
26
|
-
});
|
|
27
|
-
|
|
28
|
-
onBeforeUnmount(() => {
|
|
29
|
-
if (timerId >= 0) {
|
|
30
|
-
clearInterval(timerId);
|
|
31
|
-
}
|
|
32
|
-
timerId = -1;
|
|
33
|
-
});
|
|
34
|
-
</script>
|
|
35
|
-
|
|
36
|
-
<template>
|
|
37
|
-
<div id="item-root">
|
|
38
|
-
<ContentBlock
|
|
39
|
-
:class="contentClass"
|
|
40
|
-
:style="{ top: itemSides.height * 0 }"
|
|
41
|
-
:="contentBlockProps"
|
|
42
|
-
:index="1"
|
|
43
|
-
title="Keyframe基础动画集合"
|
|
44
|
-
>
|
|
45
|
-
<AnimKeyframeBasic />
|
|
46
|
-
</ContentBlock>
|
|
47
|
-
<ContentBlock
|
|
48
|
-
:class="contentClass"
|
|
49
|
-
:style="{ top: itemSides.height * 1 }"
|
|
50
|
-
:="contentBlockProps"
|
|
51
|
-
:index="2"
|
|
52
|
-
title="Keyframe组合示例"
|
|
53
|
-
>
|
|
54
|
-
<AnimKeyframeComposite />
|
|
55
|
-
</ContentBlock>
|
|
56
|
-
<ContentBlock
|
|
57
|
-
:class="contentClass"
|
|
58
|
-
:style="{ top: itemSides.height * 2 }"
|
|
59
|
-
:="{ ...contentBlockProps, itemSides: { ...itemSides, height: 290 } }"
|
|
60
|
-
:index="3"
|
|
61
|
-
title="Transition动画示例"
|
|
62
|
-
>
|
|
63
|
-
<AnimTransition :timeCount="state.timeCount" />
|
|
64
|
-
</ContentBlock>
|
|
65
|
-
</div>
|
|
66
|
-
</template>
|
|
@@ -1,119 +0,0 @@
|
|
|
1
|
-
<script setup>
|
|
2
|
-
const blockSize = {
|
|
3
|
-
width: 70,
|
|
4
|
-
height: 70,
|
|
5
|
-
};
|
|
6
|
-
const titleStyle = {
|
|
7
|
-
width: 60,
|
|
8
|
-
height: 20,
|
|
9
|
-
textAlign: "center",
|
|
10
|
-
lineHeight: 20,
|
|
11
|
-
};
|
|
12
|
-
const itemStyle = {
|
|
13
|
-
top: 20,
|
|
14
|
-
width: 50,
|
|
15
|
-
height: 50,
|
|
16
|
-
backgroundColor: "rgba(255, 0, 0, 1)",
|
|
17
|
-
};
|
|
18
|
-
</script>
|
|
19
|
-
|
|
20
|
-
<template>
|
|
21
|
-
<div id="layout-root">
|
|
22
|
-
<div>
|
|
23
|
-
<div class="content-font" :style="{ ...titleStyle }">Translate3d</div>
|
|
24
|
-
<div :style="{ ...itemStyle, animation: 'AnimTranslate 3s infinite' }" />
|
|
25
|
-
</div>
|
|
26
|
-
<div :style="{ left: blockSize.width }">
|
|
27
|
-
<div class="content-font" :style="{ ...titleStyle }">Scale3d</div>
|
|
28
|
-
<div
|
|
29
|
-
:style="{ ...itemStyle, animation: 'AnimScale 3s infinite linear' }"
|
|
30
|
-
/>
|
|
31
|
-
</div>
|
|
32
|
-
<div :style="{ left: blockSize.width * 2 }">
|
|
33
|
-
<div class="content-font" :style="{ ...titleStyle }">Rotate3d</div>
|
|
34
|
-
<div
|
|
35
|
-
:style="{ ...itemStyle, animation: 'AnimRotate 3s infinite linear' }"
|
|
36
|
-
/>
|
|
37
|
-
</div>
|
|
38
|
-
<div :style="{ left: blockSize.width, top: blockSize.height }">
|
|
39
|
-
<div class="content-font" :style="{ ...titleStyle }">Skew</div>
|
|
40
|
-
<div
|
|
41
|
-
:style="{ ...itemStyle, animation: 'AnimSkew 3s infinite ease-in' }"
|
|
42
|
-
/>
|
|
43
|
-
</div>
|
|
44
|
-
<div :style="{ left: blockSize.width * 2, top: blockSize.height }">
|
|
45
|
-
<div class="content-font" :style="{ ...titleStyle }">Opacity</div>
|
|
46
|
-
<div
|
|
47
|
-
:style="{
|
|
48
|
-
...itemStyle,
|
|
49
|
-
width: 20,
|
|
50
|
-
animation: 'AnimOpacityOut 3s infinite ease-out',
|
|
51
|
-
}"
|
|
52
|
-
/>
|
|
53
|
-
<div
|
|
54
|
-
:style="{
|
|
55
|
-
...itemStyle,
|
|
56
|
-
left: 25,
|
|
57
|
-
width: 20,
|
|
58
|
-
animation: 'AnimOpacityIn 3s infinite ease-in-out',
|
|
59
|
-
}"
|
|
60
|
-
/>
|
|
61
|
-
</div>
|
|
62
|
-
</div>
|
|
63
|
-
</template>
|
|
64
|
-
|
|
65
|
-
<style>
|
|
66
|
-
@keyframes AnimTranslate {
|
|
67
|
-
from {
|
|
68
|
-
transform: translate3d(50%, 50px, 0);
|
|
69
|
-
}
|
|
70
|
-
to {
|
|
71
|
-
transform: translate3d(0, 0, 0);
|
|
72
|
-
}
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
@keyframes AnimScale {
|
|
76
|
-
from {
|
|
77
|
-
transform: scale3d(1.5, 1.5, 1);
|
|
78
|
-
}
|
|
79
|
-
to {
|
|
80
|
-
transform: scale3d(0, 0, 0);
|
|
81
|
-
}
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
@keyframes AnimRotate {
|
|
85
|
-
from {
|
|
86
|
-
transform: rotate3d(1.5, 1, 1, 90deg);
|
|
87
|
-
}
|
|
88
|
-
to {
|
|
89
|
-
transform: rotate3d(1.5, 1, 1, 0);
|
|
90
|
-
}
|
|
91
|
-
}
|
|
92
|
-
|
|
93
|
-
@keyframes AnimSkew {
|
|
94
|
-
from {
|
|
95
|
-
transform: skew(30deg, 45deg);
|
|
96
|
-
}
|
|
97
|
-
to {
|
|
98
|
-
transform: skew(0, 0);
|
|
99
|
-
}
|
|
100
|
-
}
|
|
101
|
-
|
|
102
|
-
@keyframes AnimOpacityOut {
|
|
103
|
-
from {
|
|
104
|
-
opacity: 0.1;
|
|
105
|
-
}
|
|
106
|
-
to {
|
|
107
|
-
opacity: 1;
|
|
108
|
-
}
|
|
109
|
-
}
|
|
110
|
-
|
|
111
|
-
@keyframes AnimOpacityIn {
|
|
112
|
-
from {
|
|
113
|
-
opacity: 1;
|
|
114
|
-
}
|
|
115
|
-
to {
|
|
116
|
-
opacity: 20%;
|
|
117
|
-
}
|
|
118
|
-
}
|
|
119
|
-
</style>
|