@shijiu/jsview-vue-samples 2.2.201 → 2.2.426-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/BakeViewDemo/App.vue +6 -1
- package/Basic/components/anim/AnimEasingCubicBezier.vue +56 -0
- package/Basic/components/anim/AnimGroup2.vue +33 -0
- package/Basic/components/panel/Panel2.vue +8 -3
- package/Basic/components/text/TextDirection.vue +0 -1
- package/ColorSpace/App.vue +2 -2
- package/CoupletsTest/widget/Banger/Maroon.vue +0 -1
- package/CoupletsTest/widget/Fireworks/Fireworks.vue +0 -2
- package/CssPreprocessor/Stylus/components/stylus-group1/StylusOperations.vue +0 -1
- package/CssPreprocessor/utils/ContentBlock.vue +3 -3
- package/CssPreprocessor/utils/{FontStyle.css → FontConfig.css} +3 -3
- package/CssPreprocessor/utils/TitleBar.vue +2 -2
- package/CustomShader/App.vue +32 -15
- package/CustomShader/pageFlip.glsl +3 -2
- package/DemoHomepage/App.vue +14 -5
- package/DemoHomepage/components/Item.vue +23 -12
- package/DemoHomepage/index.d.ts +5 -2
- package/DemoHomepage/router.js +97 -74
- package/DemoHomepage/views/Homepage.vue +0 -4
- package/DispersedFocusControl/App.vue +67 -0
- package/DispersedFocusControl/Button.vue +76 -0
- package/DispersedFocusControl/data.js +44 -0
- package/DivMetroPerformance/components/ContentItem.vue +0 -1
- package/DragBox/App.vue +148 -0
- package/FlexCellDemo/App.vue +47 -223
- package/FlexCellDemo/TestFrame1.vue +84 -0
- package/FlexCellDemo/TestFrame2.vue +100 -0
- package/FlexCellDemo/TestFrame3.vue +97 -0
- package/FlexCellDemo/TestFrame4.vue +60 -0
- package/FlexCellDemo/TestFrame5.vue +60 -0
- package/FlexCellDemo/images/6.jpg +0 -0
- package/FocusMoveStyle/App.vue +1 -0
- package/FocusMoveStyle/CreepFocus.vue +11 -1
- package/FocusMoveStyle/FoldableItem.vue +1 -1
- package/FullScreenFlex/App.vue +42 -0
- package/FullScreenFlex/TestFrame2.vue +107 -0
- package/FullScreenFlex/images/1.png +0 -0
- package/GiftRain/App.vue +0 -3
- package/HashHistory/App.vue +8 -4
- package/HashParams/App.vue +0 -1
- package/Input/App.vue +184 -97
- package/Input/InputPanel.vue +98 -82
- package/JsvPreDownloader/App.vue +0 -2
- package/LatexFormula/App.vue +97 -10
- package/Marquee/App.vue +2 -2
- package/MetroWidgetDemos/MassiveItems/ContentItem.vue +0 -1
- package/MetroWidgetDemos/PerformanceTest/components/ContentItem.vue +0 -1
- package/MetroWidgetDemos/PerformanceTest/components/MyTab.vue +18 -17
- package/MetroWidgetDemos/itemSizeUpdate/backward/Item.vue +1 -1
- package/MetroWidgetDemos/routeList.js +17 -17
- package/MindMap/App.vue +10 -1
- package/MindMap/data.js +34 -8
- package/Parkour/appConfig/jsview.config.mjs +0 -4
- package/PosterPacker/App.vue +207 -0
- package/PosterPacker/images/bg.jpg +0 -0
- package/PosterPacker/images/blue.png +0 -0
- package/PosterPacker/images/darkGreen.png +0 -0
- package/PosterPacker/images/left.png +0 -0
- package/PosterPacker/images/orange.png +0 -0
- package/PosterPacker/images/pink.png +0 -0
- package/PosterPacker/images/purple.png +0 -0
- package/PosterPacker/images/red.png +0 -0
- package/PosterPacker/images/right.png +0 -0
- package/PosterPacker/images/yellowGreen.png +0 -0
- package/PosterPacker/tools/geniePakcer/Genie.vue +686 -0
- package/PosterPacker/tools/geniePakcer/genieBottom.glsl +49 -0
- package/PosterPacker/tools/geniePakcer/genieLeft.glsl +50 -0
- package/PosterPacker/tools/geniePakcer/genieRight.glsl +57 -0
- package/PosterPacker/tools/geniePakcer/genieTop.glsl +50 -0
- package/PosterPacker/tools/particlePacker/Particle.vue +71 -0
- package/PosterPacker/tools/vortexPacker/Vortex.vue +135 -0
- package/PosterPacker/tools/vortexPacker/vortex.glsl +37 -0
- package/Preload/App.vue +1 -1
- package/ScaleDownNeon/App.vue +13 -10
- package/SceneTransition/App.vue +5 -4
- package/ScrollBoxTest/ClipBar.vue +1 -0
- package/ScrollBoxTest/NinePatchBar.vue +1 -0
- package/ScrollBoxTest/SizeDivBar.vue +1 -0
- package/SprayMove/App.vue +75 -0
- package/SprayMove/SprayMove.vue +173 -0
- package/SprayView/App.vue +8 -9
- package/TestNativeSharedView/App.vue +6 -4
- package/TextShadowDemo/App.vue +3 -3
- package/TextureAnimation/App.vue +237 -151
- package/TextureAnimation/App2.vue +66 -14
- package/TextureAnimation/assets/blackWhiteTurntable.png +0 -0
- package/TextureAnimation/assets/circleHaloMask.png +0 -0
- package/TextureSize/App.vue +5 -6
- package/TouchWidget/App.vue +79 -40
- package/TouchWidget/Item.vue +15 -3
- package/ViewOpacity/App.vue +4 -5
- package/index.d.ts +1 -1
- package/package.json +1 -1
- package/TextureAnimation/assets/mask.png +0 -0
- package/TextureAnimation/assets/php.jpg +0 -0
- package/TouchSample/App.vue +0 -136
- package/TouchSample/Item.vue +0 -102
- package/TouchSample/MetroWidgetHorizontal.vue +0 -144
- package/TouchSample/MetroWidgetVertical.vue +0 -144
- package/TouchSample/TouchContainerHorizontal.vue +0 -160
- package/TouchSample/TouchContainerVertical.vue +0 -160
- package/TouchSample/data.js +0 -81
- /package/TextureAnimation/assets/{php2.png → borderOpacity.png} +0 -0
|
@@ -1,144 +0,0 @@
|
|
|
1
|
-
<script>
|
|
2
|
-
import {
|
|
3
|
-
VERTICAL,
|
|
4
|
-
MetroWidget,
|
|
5
|
-
WholePageSlide,
|
|
6
|
-
SeamlessSlide,
|
|
7
|
-
FixPositionSlide,
|
|
8
|
-
} from "jsview";
|
|
9
|
-
|
|
10
|
-
import Item from "./Item.vue";
|
|
11
|
-
|
|
12
|
-
import { metroWidgetV, measures } from "./data.js";
|
|
13
|
-
import { ref } from "vue";
|
|
14
|
-
|
|
15
|
-
export default {
|
|
16
|
-
components: {
|
|
17
|
-
MetroWidget,
|
|
18
|
-
Item,
|
|
19
|
-
},
|
|
20
|
-
setup() {
|
|
21
|
-
return {
|
|
22
|
-
measures,
|
|
23
|
-
name: "/metroWidgetH",
|
|
24
|
-
direction: VERTICAL,
|
|
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: 300,
|
|
39
|
-
CONST_ITEM_HEIGHT: 100,
|
|
40
|
-
};
|
|
41
|
-
},
|
|
42
|
-
methods: {
|
|
43
|
-
_provideData() {
|
|
44
|
-
return metroWidgetV;
|
|
45
|
-
},
|
|
46
|
-
},
|
|
47
|
-
|
|
48
|
-
mounted() {},
|
|
49
|
-
};
|
|
50
|
-
</script>
|
|
51
|
-
|
|
52
|
-
<template>
|
|
53
|
-
<div class="rootSize">
|
|
54
|
-
<div :style="{ width: 1280, height: 720, left: 50, overflow: 'hidden' }">
|
|
55
|
-
<div
|
|
56
|
-
:style="{
|
|
57
|
-
left: 0,
|
|
58
|
-
width: 200,
|
|
59
|
-
height: 40,
|
|
60
|
-
fontSize: 25,
|
|
61
|
-
lineHeight: 40,
|
|
62
|
-
color: '#fff753',
|
|
63
|
-
}"
|
|
64
|
-
>
|
|
65
|
-
整页滑动
|
|
66
|
-
</div>
|
|
67
|
-
<div
|
|
68
|
-
:style="{
|
|
69
|
-
left: 200,
|
|
70
|
-
width: CONST_ITEM_WIDTH + 20,
|
|
71
|
-
height: CONST_ITEM_HEIGHT * 5 + 20,
|
|
72
|
-
backgroundColor: '#ff0000',
|
|
73
|
-
}"
|
|
74
|
-
>
|
|
75
|
-
<metro-widget
|
|
76
|
-
name="simpleWidgetVertical1"
|
|
77
|
-
:width="CONST_ITEM_WIDTH + 20"
|
|
78
|
-
:height="CONST_ITEM_HEIGHT * 5 + 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_HEIGHT * 5"
|
|
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
|
-
left: 600,
|
|
98
|
-
width: 200,
|
|
99
|
-
height: 40,
|
|
100
|
-
fontSize: 25,
|
|
101
|
-
lineHeight: 40,
|
|
102
|
-
color: '#fff753',
|
|
103
|
-
}"
|
|
104
|
-
>
|
|
105
|
-
普通滑动
|
|
106
|
-
</div>
|
|
107
|
-
<div
|
|
108
|
-
:style="{
|
|
109
|
-
left: 800,
|
|
110
|
-
width: CONST_ITEM_WIDTH + 20,
|
|
111
|
-
height: CONST_ITEM_HEIGHT * 5 + 20,
|
|
112
|
-
backgroundColor: '#ff0000',
|
|
113
|
-
}"
|
|
114
|
-
>
|
|
115
|
-
<metro-widget
|
|
116
|
-
name="simpleWidgetVertical2"
|
|
117
|
-
:width="CONST_ITEM_WIDTH + 20"
|
|
118
|
-
:height="CONST_ITEM_HEIGHT * 5 + 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>
|
|
@@ -1,160 +0,0 @@
|
|
|
1
|
-
<!--
|
|
2
|
-
* @Author: ChenChanghua
|
|
3
|
-
* @Date: 2022-04-10 21:21:02
|
|
4
|
-
* @LastEditors: ChenChanghua
|
|
5
|
-
* @LastEditTime: 2022-07-08 14:40:19
|
|
6
|
-
* @Description: file content
|
|
7
|
-
-->
|
|
8
|
-
<script>
|
|
9
|
-
import {
|
|
10
|
-
JsvTouchContainer,
|
|
11
|
-
DIRECTION_VERTICAL,
|
|
12
|
-
DIRECTION_HORIZONTAL,
|
|
13
|
-
DIRECTION_DISABLE,
|
|
14
|
-
} from "jsview";
|
|
15
|
-
import { touchContainerH, measures } from "./data.js";
|
|
16
|
-
function randomColor() {
|
|
17
|
-
let randomColor = Math.round(Math.random() * 2 ** 24).toString(16);
|
|
18
|
-
return (
|
|
19
|
-
"#" + new Array(6 - randomColor.length).fill("0").join("") + randomColor
|
|
20
|
-
);
|
|
21
|
-
}
|
|
22
|
-
export default {
|
|
23
|
-
components: {
|
|
24
|
-
JsvTouchContainer,
|
|
25
|
-
},
|
|
26
|
-
setup() {
|
|
27
|
-
return {
|
|
28
|
-
DIRECTION_VERTICAL,
|
|
29
|
-
DIRECTION_HORIZONTAL,
|
|
30
|
-
DIRECTION_DISABLE,
|
|
31
|
-
touchContainerH,
|
|
32
|
-
measures,
|
|
33
|
-
randomColor,
|
|
34
|
-
};
|
|
35
|
-
},
|
|
36
|
-
methods: {
|
|
37
|
-
_onClick(msg) {
|
|
38
|
-
console.log(`_onClick:${JSON.stringify(msg)}`);
|
|
39
|
-
return true;
|
|
40
|
-
},
|
|
41
|
-
},
|
|
42
|
-
};
|
|
43
|
-
</script>
|
|
44
|
-
|
|
45
|
-
<template>
|
|
46
|
-
<div :style="{ width: 1280, height: 720, overflow: 'hidden' }">
|
|
47
|
-
<jsv-touch-container
|
|
48
|
-
:style="{ width: 1280, height: 720 * 2, backgroundColor: '#7b7a1c' }"
|
|
49
|
-
:direction="DIRECTION_VERTICAL"
|
|
50
|
-
:dragLimitArea="{ x: 0, y: 0, width: 1280, height: 720 }"
|
|
51
|
-
>
|
|
52
|
-
<div
|
|
53
|
-
:style="{
|
|
54
|
-
left: 30,
|
|
55
|
-
top: 0,
|
|
56
|
-
width: 400,
|
|
57
|
-
height: 30,
|
|
58
|
-
fontSize: 18,
|
|
59
|
-
lineHeight: 30,
|
|
60
|
-
color: '#f0ef29',
|
|
61
|
-
}"
|
|
62
|
-
>
|
|
63
|
-
整屏幕滑动
|
|
64
|
-
</div>
|
|
65
|
-
<jsv-touch-container
|
|
66
|
-
:style="{
|
|
67
|
-
left: 0,
|
|
68
|
-
top: 40,
|
|
69
|
-
width: (1280 - 60) * 5,
|
|
70
|
-
height: 220,
|
|
71
|
-
backgroundColor: 'rgba(255,0,0,0.5)',
|
|
72
|
-
}"
|
|
73
|
-
:direction="DIRECTION_HORIZONTAL"
|
|
74
|
-
:flingPageWidth="1280 - 60"
|
|
75
|
-
:dragLimitArea="{ x: 0, y: 0, width: 1280 - 60, height: 220 }"
|
|
76
|
-
>
|
|
77
|
-
<div
|
|
78
|
-
v-for="(tabList, tabIndex) in touchContainerH"
|
|
79
|
-
:key="'tab' + tabIndex"
|
|
80
|
-
:style="{
|
|
81
|
-
left: (1280 - 60) * tabIndex,
|
|
82
|
-
top: 0,
|
|
83
|
-
width: 1280 - 60,
|
|
84
|
-
height: 220,
|
|
85
|
-
backgroundColor: randomColor(),
|
|
86
|
-
}"
|
|
87
|
-
>
|
|
88
|
-
<jsv-touch-container
|
|
89
|
-
v-for="(item, itemIndex) in tabList"
|
|
90
|
-
:key="'tab' + tabIndex + '-' + itemIndex"
|
|
91
|
-
:style="{
|
|
92
|
-
left: item.left,
|
|
93
|
-
top: item.top,
|
|
94
|
-
width: item.width,
|
|
95
|
-
height: item.height,
|
|
96
|
-
backgroundColor: item.backgroundColor,
|
|
97
|
-
fontSize: 18,
|
|
98
|
-
}"
|
|
99
|
-
:onClick="_onClick"
|
|
100
|
-
:direction="DIRECTION_DISABLE"
|
|
101
|
-
>{{ item.content }}</jsv-touch-container
|
|
102
|
-
>
|
|
103
|
-
</div>
|
|
104
|
-
</jsv-touch-container>
|
|
105
|
-
|
|
106
|
-
<div
|
|
107
|
-
:style="{
|
|
108
|
-
left: 30,
|
|
109
|
-
top: 280,
|
|
110
|
-
width: 400,
|
|
111
|
-
height: 40,
|
|
112
|
-
fontSize: 18,
|
|
113
|
-
lineHeight: 40,
|
|
114
|
-
color: '#f0ef29',
|
|
115
|
-
}"
|
|
116
|
-
>
|
|
117
|
-
左右滑动
|
|
118
|
-
</div>
|
|
119
|
-
<jsv-touch-container
|
|
120
|
-
:style="{
|
|
121
|
-
left: 0,
|
|
122
|
-
top: 320,
|
|
123
|
-
width: (1280 - 60) * 5,
|
|
124
|
-
height: 220,
|
|
125
|
-
backgroundColor: '#1d9797',
|
|
126
|
-
}"
|
|
127
|
-
:direction="DIRECTION_HORIZONTAL"
|
|
128
|
-
:dragLimitArea="{ x: 0, y: 0, width: 1280 - 60, height: 220 }"
|
|
129
|
-
>
|
|
130
|
-
<div
|
|
131
|
-
v-for="(tabList, tabIndex) in touchContainerH"
|
|
132
|
-
:key="'tab' + tabIndex"
|
|
133
|
-
:style="{
|
|
134
|
-
left: (1280 - 60) * tabIndex,
|
|
135
|
-
top: 0,
|
|
136
|
-
width: 1280 - 60,
|
|
137
|
-
height: 220,
|
|
138
|
-
backgroundColor: randomColor(),
|
|
139
|
-
}"
|
|
140
|
-
>
|
|
141
|
-
<jsv-touch-container
|
|
142
|
-
v-for="(item, itemIndex) in tabList"
|
|
143
|
-
:key="'tab' + tabIndex + '-' + itemIndex"
|
|
144
|
-
:style="{
|
|
145
|
-
left: item.left,
|
|
146
|
-
top: item.top,
|
|
147
|
-
width: item.width,
|
|
148
|
-
height: item.height,
|
|
149
|
-
backgroundColor: item.backgroundColor,
|
|
150
|
-
fontSize: 18,
|
|
151
|
-
}"
|
|
152
|
-
:onClick="_onClick"
|
|
153
|
-
:direction="DIRECTION_DISABLE"
|
|
154
|
-
>{{ item.content }}</jsv-touch-container
|
|
155
|
-
>
|
|
156
|
-
</div>
|
|
157
|
-
</jsv-touch-container>
|
|
158
|
-
</jsv-touch-container>
|
|
159
|
-
</div>
|
|
160
|
-
</template>
|
|
@@ -1,160 +0,0 @@
|
|
|
1
|
-
<!--
|
|
2
|
-
* @Author: ChenChanghua
|
|
3
|
-
* @Date: 2022-04-10 21:21:02
|
|
4
|
-
* @LastEditors: ChenChanghua
|
|
5
|
-
* @LastEditTime: 2022-04-11 09:04:26
|
|
6
|
-
* @Description: file content
|
|
7
|
-
-->
|
|
8
|
-
<script>
|
|
9
|
-
import {
|
|
10
|
-
JsvTouchContainer,
|
|
11
|
-
DIRECTION_VERTICAL,
|
|
12
|
-
DIRECTION_HORIZONTAL,
|
|
13
|
-
DIRECTION_DISABLE,
|
|
14
|
-
} from "jsview";
|
|
15
|
-
import { touchContainerV, measures } from "./data.js";
|
|
16
|
-
function randomColor() {
|
|
17
|
-
let randomColor = Math.round(Math.random() * 2 ** 24).toString(16);
|
|
18
|
-
return (
|
|
19
|
-
"#" + new Array(6 - randomColor.length).fill("0").join("") + randomColor
|
|
20
|
-
);
|
|
21
|
-
}
|
|
22
|
-
export default {
|
|
23
|
-
components: {
|
|
24
|
-
JsvTouchContainer,
|
|
25
|
-
},
|
|
26
|
-
setup() {
|
|
27
|
-
return {
|
|
28
|
-
DIRECTION_VERTICAL,
|
|
29
|
-
DIRECTION_HORIZONTAL,
|
|
30
|
-
DIRECTION_DISABLE,
|
|
31
|
-
touchContainerV,
|
|
32
|
-
measures,
|
|
33
|
-
randomColor,
|
|
34
|
-
};
|
|
35
|
-
},
|
|
36
|
-
methods: {
|
|
37
|
-
_onClick(msg) {
|
|
38
|
-
console.log(`_onClick:${JSON.stringify(msg)}`);
|
|
39
|
-
return true;
|
|
40
|
-
},
|
|
41
|
-
},
|
|
42
|
-
};
|
|
43
|
-
</script>
|
|
44
|
-
|
|
45
|
-
<template>
|
|
46
|
-
<div :style="{ width: 1280, height: 720, overflow: 'hidden' }">
|
|
47
|
-
<jsv-touch-container
|
|
48
|
-
:style="{ width: 1280, height: 720 * 2, backgroundColor: '#7b7a1c' }"
|
|
49
|
-
:direction="DIRECTION_HORIZONTAL"
|
|
50
|
-
:dragLimitArea="{ x: 0, y: 0, width: 1280, height: 720 }"
|
|
51
|
-
>
|
|
52
|
-
<div
|
|
53
|
-
:style="{
|
|
54
|
-
left: 30,
|
|
55
|
-
top: 0,
|
|
56
|
-
width: 400,
|
|
57
|
-
height: 40,
|
|
58
|
-
fontSize: 25,
|
|
59
|
-
lineHeight: 40,
|
|
60
|
-
color: '#f0ef29',
|
|
61
|
-
}"
|
|
62
|
-
>
|
|
63
|
-
整屏幕滑动
|
|
64
|
-
</div>
|
|
65
|
-
<jsv-touch-container
|
|
66
|
-
:style="{
|
|
67
|
-
left: 30,
|
|
68
|
-
top: 50,
|
|
69
|
-
width: 400,
|
|
70
|
-
height: 500 * 5,
|
|
71
|
-
backgroundColor: '#810000',
|
|
72
|
-
}"
|
|
73
|
-
:direction="DIRECTION_VERTICAL"
|
|
74
|
-
:flingPageWidth="500"
|
|
75
|
-
:dragLimitArea="{ x: 0, y: 0, width: 400, height: 500 }"
|
|
76
|
-
>
|
|
77
|
-
<div
|
|
78
|
-
v-for="(tabList, tabIndex) in touchContainerV"
|
|
79
|
-
:key="'tab' + tabIndex"
|
|
80
|
-
:style="{
|
|
81
|
-
left: 0,
|
|
82
|
-
top: 500 * tabIndex,
|
|
83
|
-
width: 400,
|
|
84
|
-
height: 500,
|
|
85
|
-
backgroundColor: randomColor(),
|
|
86
|
-
}"
|
|
87
|
-
>
|
|
88
|
-
<jsv-touch-container
|
|
89
|
-
v-for="(item, itemIndex) in tabList"
|
|
90
|
-
:key="'tab' + tabIndex + '-' + itemIndex"
|
|
91
|
-
:style="{
|
|
92
|
-
left: item.left,
|
|
93
|
-
top: item.top,
|
|
94
|
-
width: item.width,
|
|
95
|
-
height: item.height,
|
|
96
|
-
backgroundColor: item.backgroundColor,
|
|
97
|
-
fontSize: 18,
|
|
98
|
-
}"
|
|
99
|
-
:onClick="_onClick"
|
|
100
|
-
:direction="DIRECTION_DISABLE"
|
|
101
|
-
>{{ item.content }}</jsv-touch-container
|
|
102
|
-
>
|
|
103
|
-
</div>
|
|
104
|
-
</jsv-touch-container>
|
|
105
|
-
|
|
106
|
-
<div
|
|
107
|
-
:style="{
|
|
108
|
-
left: 530,
|
|
109
|
-
top: 0,
|
|
110
|
-
width: 400,
|
|
111
|
-
height: 40,
|
|
112
|
-
fontSize: 25,
|
|
113
|
-
lineHeight: 40,
|
|
114
|
-
color: '#f0ef29',
|
|
115
|
-
}"
|
|
116
|
-
>
|
|
117
|
-
上下滑动
|
|
118
|
-
</div>
|
|
119
|
-
<jsv-touch-container
|
|
120
|
-
:style="{
|
|
121
|
-
left: 530,
|
|
122
|
-
top: 50,
|
|
123
|
-
width: 400,
|
|
124
|
-
height: 500 * 5,
|
|
125
|
-
backgroundColor: '#810000',
|
|
126
|
-
}"
|
|
127
|
-
:direction="DIRECTION_VERTICAL"
|
|
128
|
-
:dragLimitArea="{ x: 0, y: 0, width: 400, height: 500 }"
|
|
129
|
-
>
|
|
130
|
-
<div
|
|
131
|
-
v-for="(tabList, tabIndex) in touchContainerV"
|
|
132
|
-
:key="'tab' + tabIndex"
|
|
133
|
-
:style="{
|
|
134
|
-
left: 0,
|
|
135
|
-
top: 500 * tabIndex,
|
|
136
|
-
width: 400,
|
|
137
|
-
height: 500,
|
|
138
|
-
backgroundColor: randomColor(),
|
|
139
|
-
}"
|
|
140
|
-
>
|
|
141
|
-
<jsv-touch-container
|
|
142
|
-
v-for="(item, itemIndex) in tabList"
|
|
143
|
-
:key="'tab' + tabIndex + '-' + itemIndex"
|
|
144
|
-
:style="{
|
|
145
|
-
left: item.left,
|
|
146
|
-
top: item.top,
|
|
147
|
-
width: item.width,
|
|
148
|
-
height: item.height,
|
|
149
|
-
backgroundColor: item.backgroundColor,
|
|
150
|
-
fontSize: 18,
|
|
151
|
-
}"
|
|
152
|
-
:onClick="_onClick"
|
|
153
|
-
:direction="DIRECTION_DISABLE"
|
|
154
|
-
>{{ item.content }}</jsv-touch-container
|
|
155
|
-
>
|
|
156
|
-
</div>
|
|
157
|
-
</jsv-touch-container>
|
|
158
|
-
</jsv-touch-container>
|
|
159
|
-
</div>
|
|
160
|
-
</template>
|
package/TouchSample/data.js
DELETED
|
@@ -1,81 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* @Author: ChenChanghua
|
|
3
|
-
* @Date: 2022-04-10 21:23:15
|
|
4
|
-
* @LastEditors: ChenChanghua
|
|
5
|
-
* @LastEditTime: 2022-04-11 10:03:21
|
|
6
|
-
* @Description: file content
|
|
7
|
-
*/
|
|
8
|
-
function randomColor() {
|
|
9
|
-
let randomColor = Math.round(Math.random() * 2 ** 24).toString(16);
|
|
10
|
-
return (
|
|
11
|
-
"#" + new Array(6 - randomColor.length).fill("0").join("") + randomColor
|
|
12
|
-
);
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
const metroWidgetH = [];
|
|
16
|
-
for (let i = 0; i < 500; i++) {
|
|
17
|
-
metroWidgetH.push({
|
|
18
|
-
content: i,
|
|
19
|
-
id: i,
|
|
20
|
-
width: 100,
|
|
21
|
-
height: 200,
|
|
22
|
-
color: randomColor(),
|
|
23
|
-
});
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
const metroWidgetV = [];
|
|
27
|
-
for (let i = 0; i < 500; i++) {
|
|
28
|
-
metroWidgetV.push({
|
|
29
|
-
content: i,
|
|
30
|
-
id: i,
|
|
31
|
-
width: 200,
|
|
32
|
-
height: 100,
|
|
33
|
-
color: randomColor(),
|
|
34
|
-
});
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
const touchContainerH = [];
|
|
38
|
-
for (let i = 0; i < 5; i++) {
|
|
39
|
-
const tabData = [];
|
|
40
|
-
for (let i = 0; i < 20; i++) {
|
|
41
|
-
tabData.push({
|
|
42
|
-
content: i,
|
|
43
|
-
id: i,
|
|
44
|
-
left: (122 / 2) * i,
|
|
45
|
-
top: 10,
|
|
46
|
-
width: 122 / 2 - 10,
|
|
47
|
-
height: 200,
|
|
48
|
-
backgroundColor: randomColor(),
|
|
49
|
-
});
|
|
50
|
-
}
|
|
51
|
-
touchContainerH.push(tabData);
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
const touchContainerV = [];
|
|
55
|
-
for (let i = 0; i < 5; i++) {
|
|
56
|
-
const tabData = [];
|
|
57
|
-
for (let i = 0; i < 20; i++) {
|
|
58
|
-
tabData.push({
|
|
59
|
-
content: i,
|
|
60
|
-
id: i,
|
|
61
|
-
left: 10,
|
|
62
|
-
top: 50 * i,
|
|
63
|
-
width: 300,
|
|
64
|
-
height: 40,
|
|
65
|
-
backgroundColor: randomColor(),
|
|
66
|
-
});
|
|
67
|
-
}
|
|
68
|
-
touchContainerV.push(tabData);
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
function measures(item) {
|
|
72
|
-
return item;
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
export {
|
|
76
|
-
metroWidgetH,
|
|
77
|
-
metroWidgetV,
|
|
78
|
-
touchContainerH,
|
|
79
|
-
touchContainerV,
|
|
80
|
-
measures,
|
|
81
|
-
};
|
|
File without changes
|