@shijiu/jsview-vue-samples 2.1.200 → 2.1.340-test.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/AnimPicture/App.vue +224 -120
- package/AnimPicture/Item.vue +44 -0
- package/ConnectLine/App.vue +173 -0
- package/CoupletsTest/App.vue +212 -0
- package/CoupletsTest/Common/SpriteDeal.js +30 -0
- package/CoupletsTest/LeadWire.vue +221 -0
- package/CoupletsTest/Maroon.vue +112 -0
- package/CoupletsTest/Salvo.vue +251 -0
- package/CoupletsTest/Sprite/firecracker.json +212 -0
- package/CoupletsTest/Sprite/firecracker.png +0 -0
- package/CoupletsTest/Sprite/fireworks.json +220 -0
- package/CoupletsTest/Sprite/fireworks.png +0 -0
- package/CoupletsTest/Sprite/scroll.json +76 -0
- package/CoupletsTest/Sprite/scroll.png +0 -0
- package/CoupletsTest/Sprite/spark.json +268 -0
- package/CoupletsTest/Sprite/spark.png +0 -0
- package/CoupletsTest/images/Couplets.png +0 -0
- package/CoupletsTest/images/goldencoin1.png +0 -0
- package/CoupletsTest/images/goldencoin2.png +0 -0
- package/CoupletsTest/images/leadWire.png +0 -0
- package/CoupletsTest/images/line.png +0 -0
- package/CoupletsTest/images/purpleStar.png +0 -0
- package/CoupletsTest/images/redStar.png +0 -0
- package/CoupletsTest/images/scroll1.png +0 -0
- package/CoupletsTest/images/star1.png +0 -0
- package/CoupletsTest/images/star2.png +0 -0
- package/CoupletsTest/images/star3.png +0 -0
- package/CoupletsTest/images/star4.png +0 -0
- package/CoupletsTest/images/yellowStar.png +0 -0
- package/DemoHomepage/components/BodyFrame.vue +27 -11
- package/DemoHomepage/router.js +35 -5
- package/DemoHomepage/views/Homepage.vue +1 -1
- package/DispersedItemSample/DispersedItemSample.vue +138 -0
- package/DispersedItemSample/DispersedItemWidget/DispersedItemWidget.vue +358 -0
- package/DispersedItemSample/DispersedItemWidget/MyRenderItem.ts +115 -0
- package/DispersedItemSample/Item.vue +55 -0
- package/FilterDemo/AnimatePic.vue +5 -6
- package/FocusMoveStyle/App.vue +126 -110
- package/FocusMoveStyle/CreepFocus.vue +128 -0
- package/FocusMoveStyle/FoldableItem.vue +279 -0
- package/FocusMoveStyle/Item.vue +32 -31
- package/FreeMove/App.vue +2 -2
- package/ImpactStop/App.vue +343 -384
- package/LatexDemo/App.vue +11 -0
- package/MetroWidgetDemos/RefreshDemo/App.vue +101 -0
- package/MetroWidgetDemos/RefreshDemo/Item.vue +116 -0
- package/MetroWidgetDemos/RefreshDemo/assets/imageList.json +237 -0
- package/MetroWidgetDemos/RefreshDemo/data.js +16 -0
- package/MetroWidgetDemos/TripleWidget/App.vue +81 -0
- package/MetroWidgetDemos/TripleWidget/Item.vue +64 -0
- package/MetroWidgetDemos/TripleWidget/SWidgetItem.vue +93 -0
- package/MetroWidgetDemos/TripleWidget/WidgetItem.vue +111 -0
- package/MetroWidgetDemos/routeList.js +12 -0
- package/ProgressBar/App.vue +128 -0
- package/QrcodeDemo/App.vue +2 -2
- package/SpriteImage/App.vue +113 -68
- package/SwiperTest/App.vue +105 -0
- package/ViewOpacity/App.vue +98 -0
- package/package.json +1 -1
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<jsv-focus-block autoFocus>
|
|
3
|
+
<div class="bgStyle">
|
|
4
|
+
<JsvSwiper3D
|
|
5
|
+
name="JsvSwiper3D"
|
|
6
|
+
:layoutInfo="layoutInfo"
|
|
7
|
+
:duration="0.5"
|
|
8
|
+
:sideScale="0.1"
|
|
9
|
+
:ItemArray="items"
|
|
10
|
+
:initItemStyle="initItemStyle"
|
|
11
|
+
:dispNumber="7"
|
|
12
|
+
:initIndex="2"
|
|
13
|
+
:onClick="onClick"
|
|
14
|
+
:onChange="onChange"
|
|
15
|
+
>
|
|
16
|
+
<template #itemView="{ item, dataIndex }">
|
|
17
|
+
<div
|
|
18
|
+
:style="{
|
|
19
|
+
width: item.width,
|
|
20
|
+
height: item.height,
|
|
21
|
+
backgroundImage: item.backgroundImage,
|
|
22
|
+
fontSize: 40,
|
|
23
|
+
}"
|
|
24
|
+
></div>
|
|
25
|
+
</template>
|
|
26
|
+
</JsvSwiper3D>
|
|
27
|
+
</div>
|
|
28
|
+
<div :style="{width:550,height:60,fontSize:24,color:'#FFFFFF',lineHeight:30,left:30,top:50}">
|
|
29
|
+
{{ '操作提示:左右键选择,【OK】键触发点击事件。初始聚焦:第 2 项' }}
|
|
30
|
+
</div>
|
|
31
|
+
</jsv-focus-block>
|
|
32
|
+
</template>
|
|
33
|
+
|
|
34
|
+
<script setup>
|
|
35
|
+
import { JsvSwiper3D, useFocusHub } from "jsview";
|
|
36
|
+
import { onMounted, reactive } from "vue";
|
|
37
|
+
const focusHub = useFocusHub();
|
|
38
|
+
const layoutInfo = {
|
|
39
|
+
width: 1200,
|
|
40
|
+
height: 500,
|
|
41
|
+
left: 30,
|
|
42
|
+
top: 200,
|
|
43
|
+
};
|
|
44
|
+
const items = reactive([
|
|
45
|
+
{
|
|
46
|
+
image:
|
|
47
|
+
"https://pic.meetao.com/images/admin/2531edf0b7e34c299892ceace72b2c81.jpg",
|
|
48
|
+
},
|
|
49
|
+
{
|
|
50
|
+
image:
|
|
51
|
+
"https://oss.image.qcast.cn/JsViewVideo/ImageTestSample/TabUi/rBAQvWLWXvKAdqZ5AAB5Ot8fJhc62.webp",
|
|
52
|
+
},
|
|
53
|
+
{
|
|
54
|
+
image:
|
|
55
|
+
"https://pic.meetao.com/images/admin/bc28dfc4a9ae470e86eed8f743a3d97a.png",
|
|
56
|
+
},
|
|
57
|
+
{
|
|
58
|
+
image:
|
|
59
|
+
"https://pic.meetao.com/images/admin/1070701b82e8416d940c558f5fb61ad2.jpg",
|
|
60
|
+
},
|
|
61
|
+
{
|
|
62
|
+
image:
|
|
63
|
+
"https://pic.meetao.com/images/admin/5a454819dabd469991c62c72e348c49b.jpg",
|
|
64
|
+
},
|
|
65
|
+
{
|
|
66
|
+
image:
|
|
67
|
+
"https://oss.image.qcast.cn/JsViewVideo/ImageTestSample/TabUi/rBAQvWNpwcGAM-w1AACsNFeB3SQ56.webp",
|
|
68
|
+
},
|
|
69
|
+
{
|
|
70
|
+
image:
|
|
71
|
+
"https://oss.image.qcast.cn/JsViewVideo/ImageTestSample/TabUi/rBAQvWNpw9GAbOL_AABn2OGO6UY97.webp",
|
|
72
|
+
},
|
|
73
|
+
{
|
|
74
|
+
image:
|
|
75
|
+
"https://oss.image.qcast.cn/JsViewVideo/ImageTestSample/TabUi/rBAQvWLWWFGAfDz4AAB_dMtnwC831.webp",
|
|
76
|
+
},
|
|
77
|
+
{
|
|
78
|
+
image:
|
|
79
|
+
"https://oss.image.qcast.cn/JsViewVideo/ImageTestSample/TabUi/rBAQvWNpxACASppDAACKmP9qkQ020.webp",
|
|
80
|
+
},
|
|
81
|
+
]);
|
|
82
|
+
|
|
83
|
+
const onClick = (index) => {
|
|
84
|
+
console.log(index);
|
|
85
|
+
};
|
|
86
|
+
const initItemStyle = {
|
|
87
|
+
width: 300,
|
|
88
|
+
height: 400,
|
|
89
|
+
};
|
|
90
|
+
|
|
91
|
+
const onChange = (preIndex, currentIndex) => {
|
|
92
|
+
console.log('preIndex:',preIndex, 'currentIndex',currentIndex);
|
|
93
|
+
};
|
|
94
|
+
onMounted(() => {
|
|
95
|
+
focusHub.setFocus("JsvSwiper3D");
|
|
96
|
+
});
|
|
97
|
+
</script>
|
|
98
|
+
|
|
99
|
+
<style scoped>
|
|
100
|
+
.bgStyle {
|
|
101
|
+
width: 1280;
|
|
102
|
+
height: 720;
|
|
103
|
+
background-color: #007788;
|
|
104
|
+
}
|
|
105
|
+
</style>
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
<!--
|
|
2
|
+
* @Author: ChenChanghua
|
|
3
|
+
* @Date: 2022-10-24 13:19:41
|
|
4
|
+
* @LastEditors: Please set LastEditors
|
|
5
|
+
* @LastEditTime: 2023-02-13 11:20:12
|
|
6
|
+
* @Description: file content
|
|
7
|
+
-->
|
|
8
|
+
<script setup>
|
|
9
|
+
import { shallowRef, onMounted, onUnmounted } from "vue";
|
|
10
|
+
import { useRouter } from "vue-router";
|
|
11
|
+
const router = useRouter();
|
|
12
|
+
|
|
13
|
+
const test1 =
|
|
14
|
+
"url(https://qcast-image.oss-cn-qingdao.aliyuncs.com/JsViewVideo/ImageTestSample/ScaleDownTest/test_1.jpeg)";
|
|
15
|
+
const test2 =
|
|
16
|
+
"url(https://qcast-image.oss-cn-qingdao.aliyuncs.com/JsViewVideo/ImageTestSample/ScaleDownTest/test_2.jpeg)";
|
|
17
|
+
|
|
18
|
+
const onKeyDown = (ev) => {
|
|
19
|
+
// 8:Backspace, 27:Escape, 10000:盒子返回键
|
|
20
|
+
if (ev.keyCode == 8 || ev.keyCode == 27 || ev.keyCode == 10000) {
|
|
21
|
+
if (window.JsView) {
|
|
22
|
+
window.JsView.setGlobalConfig({
|
|
23
|
+
texCache: -1,
|
|
24
|
+
});
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
router.go(-1); // 有router时,回退
|
|
28
|
+
return true;
|
|
29
|
+
}
|
|
30
|
+
return false;
|
|
31
|
+
};
|
|
32
|
+
|
|
33
|
+
const style1 = {
|
|
34
|
+
left: 0,
|
|
35
|
+
top: 0,
|
|
36
|
+
width: 300,
|
|
37
|
+
height: 300,
|
|
38
|
+
borderRadius: 15,
|
|
39
|
+
};
|
|
40
|
+
|
|
41
|
+
let altOpacity = shallowRef(0.1);
|
|
42
|
+
let timerHandle = -1;
|
|
43
|
+
|
|
44
|
+
onMounted(() => {
|
|
45
|
+
timerHandle = setInterval(() => {
|
|
46
|
+
altOpacity.value += 0.3;
|
|
47
|
+
if (altOpacity.value > 1.0) {
|
|
48
|
+
altOpacity.value = 0.1;
|
|
49
|
+
}
|
|
50
|
+
console.log("Opacity set to" + altOpacity.value);
|
|
51
|
+
}, 1200);
|
|
52
|
+
});
|
|
53
|
+
|
|
54
|
+
onUnmounted(() => {
|
|
55
|
+
if (timerHandle != -1) {
|
|
56
|
+
clearInterval(timerHandle);
|
|
57
|
+
timerHandle = -1;
|
|
58
|
+
}
|
|
59
|
+
});
|
|
60
|
+
</script>
|
|
61
|
+
<template>
|
|
62
|
+
<jsv-focus-block autoFocus :onKeyDown="onKeyDown">
|
|
63
|
+
<div class="allBgc">
|
|
64
|
+
<div class="block">
|
|
65
|
+
<div :style="{ left: 120, top: 0 }">
|
|
66
|
+
<img
|
|
67
|
+
:style="{
|
|
68
|
+
...style1,
|
|
69
|
+
opacity: altOpacity,
|
|
70
|
+
}"
|
|
71
|
+
:src="test1"
|
|
72
|
+
/>
|
|
73
|
+
</div>
|
|
74
|
+
|
|
75
|
+
<div :style="{ left: 500, top: 0 }">
|
|
76
|
+
<img
|
|
77
|
+
:style="{
|
|
78
|
+
...style1,
|
|
79
|
+
opacity: altOpacity,
|
|
80
|
+
}"
|
|
81
|
+
:src="test2"
|
|
82
|
+
/>
|
|
83
|
+
</div>
|
|
84
|
+
</div>
|
|
85
|
+
</div>
|
|
86
|
+
</jsv-focus-block>
|
|
87
|
+
</template>
|
|
88
|
+
<style scoped>
|
|
89
|
+
.allBgc {
|
|
90
|
+
width: 1920;
|
|
91
|
+
height: 1080;
|
|
92
|
+
background-color: #334c4c;
|
|
93
|
+
}
|
|
94
|
+
.block {
|
|
95
|
+
left: 20;
|
|
96
|
+
top: 50;
|
|
97
|
+
}
|
|
98
|
+
</style>
|