@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,76 @@
|
|
|
1
|
+
{"frames": [
|
|
2
|
+
|
|
3
|
+
{
|
|
4
|
+
"filename": "01.png",
|
|
5
|
+
"frame": {"x":0,"y":0,"w":280,"h":30},
|
|
6
|
+
"rotated": false,
|
|
7
|
+
"trimmed": false,
|
|
8
|
+
"spriteSourceSize": {"x":0,"y":0,"w":280,"h":30},
|
|
9
|
+
"sourceSize": {"w":280,"h":30}
|
|
10
|
+
},
|
|
11
|
+
{
|
|
12
|
+
"filename": "02.png",
|
|
13
|
+
"frame": {"x":280,"y":0,"w":280,"h":30},
|
|
14
|
+
"rotated": false,
|
|
15
|
+
"trimmed": false,
|
|
16
|
+
"spriteSourceSize": {"x":0,"y":0,"w":280,"h":30},
|
|
17
|
+
"sourceSize": {"w":280,"h":30}
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
"filename": "03.png",
|
|
21
|
+
"frame": {"x":0,"y":30,"w":280,"h":30},
|
|
22
|
+
"rotated": false,
|
|
23
|
+
"trimmed": false,
|
|
24
|
+
"spriteSourceSize": {"x":0,"y":0,"w":280,"h":30},
|
|
25
|
+
"sourceSize": {"w":280,"h":30}
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
"filename": "04.png",
|
|
29
|
+
"frame": {"x":280,"y":30,"w":280,"h":30},
|
|
30
|
+
"rotated": false,
|
|
31
|
+
"trimmed": false,
|
|
32
|
+
"spriteSourceSize": {"x":0,"y":0,"w":280,"h":30},
|
|
33
|
+
"sourceSize": {"w":280,"h":30}
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
"filename": "05.png",
|
|
37
|
+
"frame": {"x":0,"y":60,"w":280,"h":30},
|
|
38
|
+
"rotated": false,
|
|
39
|
+
"trimmed": false,
|
|
40
|
+
"spriteSourceSize": {"x":0,"y":0,"w":280,"h":30},
|
|
41
|
+
"sourceSize": {"w":280,"h":30}
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
"filename": "06.png",
|
|
45
|
+
"frame": {"x":280,"y":60,"w":280,"h":30},
|
|
46
|
+
"rotated": false,
|
|
47
|
+
"trimmed": false,
|
|
48
|
+
"spriteSourceSize": {"x":0,"y":0,"w":280,"h":30},
|
|
49
|
+
"sourceSize": {"w":280,"h":30}
|
|
50
|
+
},
|
|
51
|
+
{
|
|
52
|
+
"filename": "07.png",
|
|
53
|
+
"frame": {"x":0,"y":90,"w":280,"h":30},
|
|
54
|
+
"rotated": false,
|
|
55
|
+
"trimmed": false,
|
|
56
|
+
"spriteSourceSize": {"x":0,"y":0,"w":280,"h":30},
|
|
57
|
+
"sourceSize": {"w":280,"h":30}
|
|
58
|
+
},
|
|
59
|
+
{
|
|
60
|
+
"filename": "08.png",
|
|
61
|
+
"frame": {"x":280,"y":90,"w":280,"h":30},
|
|
62
|
+
"rotated": false,
|
|
63
|
+
"trimmed": false,
|
|
64
|
+
"spriteSourceSize": {"x":0,"y":0,"w":280,"h":30},
|
|
65
|
+
"sourceSize": {"w":280,"h":30}
|
|
66
|
+
}],
|
|
67
|
+
"meta": {
|
|
68
|
+
"app": "http://www.texturepacker.com",
|
|
69
|
+
"version": "1.0",
|
|
70
|
+
"image": "����.png",
|
|
71
|
+
"format": "RGBA8888",
|
|
72
|
+
"size": {"w":560,"h":120},
|
|
73
|
+
"scale": "1",
|
|
74
|
+
"smartupdate": "$TexturePacker:SmartUpdate:d628bb5ee32423e3182ff3fed396f679$"
|
|
75
|
+
}
|
|
76
|
+
}
|
|
Binary file
|
|
@@ -0,0 +1,268 @@
|
|
|
1
|
+
{"frames": [
|
|
2
|
+
|
|
3
|
+
{
|
|
4
|
+
"filename": "火星000.png",
|
|
5
|
+
"frame": {"x":0,"y":0,"w":130,"h":130},
|
|
6
|
+
"rotated": false,
|
|
7
|
+
"trimmed": false,
|
|
8
|
+
"spriteSourceSize": {"x":0,"y":0,"w":130,"h":130},
|
|
9
|
+
"sourceSize": {"w":130,"h":130}
|
|
10
|
+
},
|
|
11
|
+
{
|
|
12
|
+
"filename": "火星001.png",
|
|
13
|
+
"frame": {"x":130,"y":0,"w":130,"h":130},
|
|
14
|
+
"rotated": false,
|
|
15
|
+
"trimmed": false,
|
|
16
|
+
"spriteSourceSize": {"x":0,"y":0,"w":130,"h":130},
|
|
17
|
+
"sourceSize": {"w":130,"h":130}
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
"filename": "火星002.png",
|
|
21
|
+
"frame": {"x":260,"y":0,"w":130,"h":130},
|
|
22
|
+
"rotated": false,
|
|
23
|
+
"trimmed": false,
|
|
24
|
+
"spriteSourceSize": {"x":0,"y":0,"w":130,"h":130},
|
|
25
|
+
"sourceSize": {"w":130,"h":130}
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
"filename": "火星003.png",
|
|
29
|
+
"frame": {"x":390,"y":0,"w":130,"h":130},
|
|
30
|
+
"rotated": false,
|
|
31
|
+
"trimmed": false,
|
|
32
|
+
"spriteSourceSize": {"x":0,"y":0,"w":130,"h":130},
|
|
33
|
+
"sourceSize": {"w":130,"h":130}
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
"filename": "火星004.png",
|
|
37
|
+
"frame": {"x":520,"y":0,"w":130,"h":130},
|
|
38
|
+
"rotated": false,
|
|
39
|
+
"trimmed": false,
|
|
40
|
+
"spriteSourceSize": {"x":0,"y":0,"w":130,"h":130},
|
|
41
|
+
"sourceSize": {"w":130,"h":130}
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
"filename": "火星005.png",
|
|
45
|
+
"frame": {"x":650,"y":0,"w":130,"h":130},
|
|
46
|
+
"rotated": false,
|
|
47
|
+
"trimmed": false,
|
|
48
|
+
"spriteSourceSize": {"x":0,"y":0,"w":130,"h":130},
|
|
49
|
+
"sourceSize": {"w":130,"h":130}
|
|
50
|
+
},
|
|
51
|
+
{
|
|
52
|
+
"filename": "火星006.png",
|
|
53
|
+
"frame": {"x":780,"y":0,"w":130,"h":130},
|
|
54
|
+
"rotated": false,
|
|
55
|
+
"trimmed": false,
|
|
56
|
+
"spriteSourceSize": {"x":0,"y":0,"w":130,"h":130},
|
|
57
|
+
"sourceSize": {"w":130,"h":130}
|
|
58
|
+
},
|
|
59
|
+
{
|
|
60
|
+
"filename": "火星007.png",
|
|
61
|
+
"frame": {"x":910,"y":0,"w":130,"h":130},
|
|
62
|
+
"rotated": false,
|
|
63
|
+
"trimmed": false,
|
|
64
|
+
"spriteSourceSize": {"x":0,"y":0,"w":130,"h":130},
|
|
65
|
+
"sourceSize": {"w":130,"h":130}
|
|
66
|
+
},
|
|
67
|
+
{
|
|
68
|
+
"filename": "火星008.png",
|
|
69
|
+
"frame": {"x":1040,"y":0,"w":130,"h":130},
|
|
70
|
+
"rotated": false,
|
|
71
|
+
"trimmed": false,
|
|
72
|
+
"spriteSourceSize": {"x":0,"y":0,"w":130,"h":130},
|
|
73
|
+
"sourceSize": {"w":130,"h":130}
|
|
74
|
+
},
|
|
75
|
+
{
|
|
76
|
+
"filename": "火星009.png",
|
|
77
|
+
"frame": {"x":1170,"y":0,"w":130,"h":130},
|
|
78
|
+
"rotated": false,
|
|
79
|
+
"trimmed": false,
|
|
80
|
+
"spriteSourceSize": {"x":0,"y":0,"w":130,"h":130},
|
|
81
|
+
"sourceSize": {"w":130,"h":130}
|
|
82
|
+
},
|
|
83
|
+
{
|
|
84
|
+
"filename": "火星010.png",
|
|
85
|
+
"frame": {"x":1300,"y":0,"w":130,"h":130},
|
|
86
|
+
"rotated": false,
|
|
87
|
+
"trimmed": false,
|
|
88
|
+
"spriteSourceSize": {"x":0,"y":0,"w":130,"h":130},
|
|
89
|
+
"sourceSize": {"w":130,"h":130}
|
|
90
|
+
},
|
|
91
|
+
{
|
|
92
|
+
"filename": "火星011.png",
|
|
93
|
+
"frame": {"x":0,"y":130,"w":130,"h":130},
|
|
94
|
+
"rotated": false,
|
|
95
|
+
"trimmed": false,
|
|
96
|
+
"spriteSourceSize": {"x":0,"y":0,"w":130,"h":130},
|
|
97
|
+
"sourceSize": {"w":130,"h":130}
|
|
98
|
+
},
|
|
99
|
+
{
|
|
100
|
+
"filename": "火星012.png",
|
|
101
|
+
"frame": {"x":130,"y":130,"w":130,"h":130},
|
|
102
|
+
"rotated": false,
|
|
103
|
+
"trimmed": false,
|
|
104
|
+
"spriteSourceSize": {"x":0,"y":0,"w":130,"h":130},
|
|
105
|
+
"sourceSize": {"w":130,"h":130}
|
|
106
|
+
},
|
|
107
|
+
{
|
|
108
|
+
"filename": "火星013.png",
|
|
109
|
+
"frame": {"x":260,"y":130,"w":130,"h":130},
|
|
110
|
+
"rotated": false,
|
|
111
|
+
"trimmed": false,
|
|
112
|
+
"spriteSourceSize": {"x":0,"y":0,"w":130,"h":130},
|
|
113
|
+
"sourceSize": {"w":130,"h":130}
|
|
114
|
+
},
|
|
115
|
+
{
|
|
116
|
+
"filename": "火星014.png",
|
|
117
|
+
"frame": {"x":390,"y":130,"w":130,"h":130},
|
|
118
|
+
"rotated": false,
|
|
119
|
+
"trimmed": false,
|
|
120
|
+
"spriteSourceSize": {"x":0,"y":0,"w":130,"h":130},
|
|
121
|
+
"sourceSize": {"w":130,"h":130}
|
|
122
|
+
},
|
|
123
|
+
{
|
|
124
|
+
"filename": "火星015.png",
|
|
125
|
+
"frame": {"x":520,"y":130,"w":130,"h":130},
|
|
126
|
+
"rotated": false,
|
|
127
|
+
"trimmed": false,
|
|
128
|
+
"spriteSourceSize": {"x":0,"y":0,"w":130,"h":130},
|
|
129
|
+
"sourceSize": {"w":130,"h":130}
|
|
130
|
+
},
|
|
131
|
+
{
|
|
132
|
+
"filename": "火星016.png",
|
|
133
|
+
"frame": {"x":650,"y":130,"w":130,"h":130},
|
|
134
|
+
"rotated": false,
|
|
135
|
+
"trimmed": false,
|
|
136
|
+
"spriteSourceSize": {"x":0,"y":0,"w":130,"h":130},
|
|
137
|
+
"sourceSize": {"w":130,"h":130}
|
|
138
|
+
},
|
|
139
|
+
{
|
|
140
|
+
"filename": "火星017.png",
|
|
141
|
+
"frame": {"x":780,"y":130,"w":130,"h":130},
|
|
142
|
+
"rotated": false,
|
|
143
|
+
"trimmed": false,
|
|
144
|
+
"spriteSourceSize": {"x":0,"y":0,"w":130,"h":130},
|
|
145
|
+
"sourceSize": {"w":130,"h":130}
|
|
146
|
+
},
|
|
147
|
+
{
|
|
148
|
+
"filename": "火星018.png",
|
|
149
|
+
"frame": {"x":910,"y":130,"w":130,"h":130},
|
|
150
|
+
"rotated": false,
|
|
151
|
+
"trimmed": false,
|
|
152
|
+
"spriteSourceSize": {"x":0,"y":0,"w":130,"h":130},
|
|
153
|
+
"sourceSize": {"w":130,"h":130}
|
|
154
|
+
},
|
|
155
|
+
{
|
|
156
|
+
"filename": "火星019.png",
|
|
157
|
+
"frame": {"x":1040,"y":130,"w":130,"h":130},
|
|
158
|
+
"rotated": false,
|
|
159
|
+
"trimmed": false,
|
|
160
|
+
"spriteSourceSize": {"x":0,"y":0,"w":130,"h":130},
|
|
161
|
+
"sourceSize": {"w":130,"h":130}
|
|
162
|
+
},
|
|
163
|
+
{
|
|
164
|
+
"filename": "火星020.png",
|
|
165
|
+
"frame": {"x":1170,"y":130,"w":130,"h":130},
|
|
166
|
+
"rotated": false,
|
|
167
|
+
"trimmed": false,
|
|
168
|
+
"spriteSourceSize": {"x":0,"y":0,"w":130,"h":130},
|
|
169
|
+
"sourceSize": {"w":130,"h":130}
|
|
170
|
+
},
|
|
171
|
+
{
|
|
172
|
+
"filename": "火星021.png",
|
|
173
|
+
"frame": {"x":1300,"y":130,"w":130,"h":130},
|
|
174
|
+
"rotated": false,
|
|
175
|
+
"trimmed": false,
|
|
176
|
+
"spriteSourceSize": {"x":0,"y":0,"w":130,"h":130},
|
|
177
|
+
"sourceSize": {"w":130,"h":130}
|
|
178
|
+
},
|
|
179
|
+
{
|
|
180
|
+
"filename": "火星022.png",
|
|
181
|
+
"frame": {"x":0,"y":260,"w":130,"h":130},
|
|
182
|
+
"rotated": false,
|
|
183
|
+
"trimmed": false,
|
|
184
|
+
"spriteSourceSize": {"x":0,"y":0,"w":130,"h":130},
|
|
185
|
+
"sourceSize": {"w":130,"h":130}
|
|
186
|
+
},
|
|
187
|
+
{
|
|
188
|
+
"filename": "火星023.png",
|
|
189
|
+
"frame": {"x":130,"y":260,"w":130,"h":130},
|
|
190
|
+
"rotated": false,
|
|
191
|
+
"trimmed": false,
|
|
192
|
+
"spriteSourceSize": {"x":0,"y":0,"w":130,"h":130},
|
|
193
|
+
"sourceSize": {"w":130,"h":130}
|
|
194
|
+
},
|
|
195
|
+
{
|
|
196
|
+
"filename": "火星024.png",
|
|
197
|
+
"frame": {"x":260,"y":260,"w":130,"h":130},
|
|
198
|
+
"rotated": false,
|
|
199
|
+
"trimmed": false,
|
|
200
|
+
"spriteSourceSize": {"x":0,"y":0,"w":130,"h":130},
|
|
201
|
+
"sourceSize": {"w":130,"h":130}
|
|
202
|
+
},
|
|
203
|
+
{
|
|
204
|
+
"filename": "火星025.png",
|
|
205
|
+
"frame": {"x":390,"y":260,"w":130,"h":130},
|
|
206
|
+
"rotated": false,
|
|
207
|
+
"trimmed": false,
|
|
208
|
+
"spriteSourceSize": {"x":0,"y":0,"w":130,"h":130},
|
|
209
|
+
"sourceSize": {"w":130,"h":130}
|
|
210
|
+
},
|
|
211
|
+
{
|
|
212
|
+
"filename": "火星026.png",
|
|
213
|
+
"frame": {"x":520,"y":260,"w":130,"h":130},
|
|
214
|
+
"rotated": false,
|
|
215
|
+
"trimmed": false,
|
|
216
|
+
"spriteSourceSize": {"x":0,"y":0,"w":130,"h":130},
|
|
217
|
+
"sourceSize": {"w":130,"h":130}
|
|
218
|
+
},
|
|
219
|
+
{
|
|
220
|
+
"filename": "火星027.png",
|
|
221
|
+
"frame": {"x":650,"y":260,"w":130,"h":130},
|
|
222
|
+
"rotated": false,
|
|
223
|
+
"trimmed": false,
|
|
224
|
+
"spriteSourceSize": {"x":0,"y":0,"w":130,"h":130},
|
|
225
|
+
"sourceSize": {"w":130,"h":130}
|
|
226
|
+
},
|
|
227
|
+
{
|
|
228
|
+
"filename": "火星028.png",
|
|
229
|
+
"frame": {"x":780,"y":260,"w":130,"h":130},
|
|
230
|
+
"rotated": false,
|
|
231
|
+
"trimmed": false,
|
|
232
|
+
"spriteSourceSize": {"x":0,"y":0,"w":130,"h":130},
|
|
233
|
+
"sourceSize": {"w":130,"h":130}
|
|
234
|
+
},
|
|
235
|
+
{
|
|
236
|
+
"filename": "火星029.png",
|
|
237
|
+
"frame": {"x":910,"y":260,"w":130,"h":130},
|
|
238
|
+
"rotated": false,
|
|
239
|
+
"trimmed": false,
|
|
240
|
+
"spriteSourceSize": {"x":0,"y":0,"w":130,"h":130},
|
|
241
|
+
"sourceSize": {"w":130,"h":130}
|
|
242
|
+
},
|
|
243
|
+
{
|
|
244
|
+
"filename": "火星030.png",
|
|
245
|
+
"frame": {"x":1040,"y":260,"w":130,"h":130},
|
|
246
|
+
"rotated": false,
|
|
247
|
+
"trimmed": false,
|
|
248
|
+
"spriteSourceSize": {"x":0,"y":0,"w":130,"h":130},
|
|
249
|
+
"sourceSize": {"w":130,"h":130}
|
|
250
|
+
},
|
|
251
|
+
{
|
|
252
|
+
"filename": "火星031.png",
|
|
253
|
+
"frame": {"x":1170,"y":260,"w":130,"h":130},
|
|
254
|
+
"rotated": false,
|
|
255
|
+
"trimmed": false,
|
|
256
|
+
"spriteSourceSize": {"x":0,"y":0,"w":130,"h":130},
|
|
257
|
+
"sourceSize": {"w":130,"h":130}
|
|
258
|
+
}],
|
|
259
|
+
"meta": {
|
|
260
|
+
"app": "https://www.codeandweb.com/texturepacker",
|
|
261
|
+
"version": "1.0",
|
|
262
|
+
"image": "火星1.png",
|
|
263
|
+
"format": "RGBA8888",
|
|
264
|
+
"size": {"w":1430,"h":390},
|
|
265
|
+
"scale": "1",
|
|
266
|
+
"smartupdate": "$TexturePacker:SmartUpdate:d5f882130258f98a64f58cb8ed7c6892:7e6dc8bd8bb6ca3a3b52f49fa498af1e:e573f7d0271baa5852351b87eaa7b9c8$"
|
|
267
|
+
}
|
|
268
|
+
}
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -4,13 +4,13 @@ import { MetroWidget, VERTICAL } from "jsview";
|
|
|
4
4
|
import Item from "./Item.vue";
|
|
5
5
|
import { useRouter } from "vue-router";
|
|
6
6
|
const router = useRouter();
|
|
7
|
-
let mw = shallowRef(null)
|
|
7
|
+
let mw = shallowRef(null);
|
|
8
8
|
const props = defineProps({
|
|
9
9
|
data: Array,
|
|
10
10
|
name: String,
|
|
11
11
|
onEdge: Function,
|
|
12
12
|
tabId: Number,
|
|
13
|
-
})
|
|
13
|
+
});
|
|
14
14
|
|
|
15
15
|
const direction = VERTICAL;
|
|
16
16
|
const width = 1280;
|
|
@@ -23,7 +23,7 @@ const measures = (item) => {
|
|
|
23
23
|
height: item.height,
|
|
24
24
|
focusable: item.focusable,
|
|
25
25
|
};
|
|
26
|
-
}
|
|
26
|
+
};
|
|
27
27
|
|
|
28
28
|
const itemClick = (index, data) => {
|
|
29
29
|
if (!data.path) {
|
|
@@ -33,11 +33,11 @@ const itemClick = (index, data) => {
|
|
|
33
33
|
router.push(data.path);
|
|
34
34
|
localStorage.curFocusId = index;
|
|
35
35
|
localStorage.curTab = props.tabId;
|
|
36
|
-
}
|
|
36
|
+
};
|
|
37
37
|
|
|
38
38
|
const _provideData = () => {
|
|
39
39
|
return props.data;
|
|
40
|
-
}
|
|
40
|
+
};
|
|
41
41
|
|
|
42
42
|
if (typeof localStorage.curFocusId !== "undefined") {
|
|
43
43
|
initFocusId.value = parseInt(localStorage.curFocusId);
|
|
@@ -54,18 +54,34 @@ watch(
|
|
|
54
54
|
</script>
|
|
55
55
|
|
|
56
56
|
<template>
|
|
57
|
-
<metro-widget
|
|
58
|
-
|
|
59
|
-
:
|
|
57
|
+
<metro-widget
|
|
58
|
+
ref="mw"
|
|
59
|
+
:name="props.name"
|
|
60
|
+
:width="width"
|
|
61
|
+
:height="height"
|
|
62
|
+
:direction="direction"
|
|
63
|
+
:provideData="_provideData"
|
|
64
|
+
:measures="measures"
|
|
65
|
+
:padding="{ left: 10, top: 10, right: 10, bottom: 10 }"
|
|
66
|
+
:onEdge="props.onEdge"
|
|
67
|
+
:initFocusId="initFocusId"
|
|
68
|
+
>
|
|
60
69
|
<template #renderItem="{ data, query, onEdge, onAction }">
|
|
61
|
-
<Item
|
|
70
|
+
<Item
|
|
71
|
+
:style="{
|
|
62
72
|
width: data.width,
|
|
63
73
|
height: data.height,
|
|
64
74
|
backgroundColor: data.backgroundColor,
|
|
65
75
|
color: '#000000',
|
|
66
|
-
}"
|
|
76
|
+
}"
|
|
77
|
+
:data="data"
|
|
78
|
+
:query="query"
|
|
79
|
+
:onEdge="onEdge"
|
|
80
|
+
:onAction="onAction"
|
|
81
|
+
:itemClick="itemClick"
|
|
82
|
+
>
|
|
67
83
|
{{ data.name }}
|
|
68
84
|
</Item>
|
|
69
85
|
</template>
|
|
70
86
|
</metro-widget>
|
|
71
|
-
</template>
|
|
87
|
+
</template>
|
package/DemoHomepage/router.js
CHANGED
|
@@ -16,6 +16,17 @@ let routeList = [
|
|
|
16
16
|
path: '/feature/Basic',
|
|
17
17
|
component: () => import('jsview-vue-samples/Basic/App.vue'),
|
|
18
18
|
},
|
|
19
|
+
{
|
|
20
|
+
name: '连接线Demo',
|
|
21
|
+
path: '/feature/ConnectLine',
|
|
22
|
+
component: () => import('jsview-vue-samples/ConnectLine/App.vue')
|
|
23
|
+
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
name: '离散焦点分布',
|
|
27
|
+
path: '/feature/DispersedItemSample',
|
|
28
|
+
component: () => import('jsview-vue-samples/DispersedItemSample/DispersedItemSample.vue')
|
|
29
|
+
},
|
|
19
30
|
{
|
|
20
31
|
name: '饼图测试',
|
|
21
32
|
path: '/feature/SecTorTest',
|
|
@@ -167,6 +178,11 @@ let routeList = [
|
|
|
167
178
|
path: '/feature/Preload',
|
|
168
179
|
component: () => import('jsview-vue-samples/Preload/App.vue'),
|
|
169
180
|
},
|
|
181
|
+
{
|
|
182
|
+
name: '单图片透明',
|
|
183
|
+
path: '/feature/ViewOpacity',
|
|
184
|
+
component: () => import('jsview-vue-samples/ViewOpacity/App.vue'),
|
|
185
|
+
},
|
|
170
186
|
{
|
|
171
187
|
name: '图片缩小算法',
|
|
172
188
|
path: '/feature/ScaleDownNeon',
|
|
@@ -252,11 +268,11 @@ let routeList = [
|
|
|
252
268
|
path: '/feature/JsvLine',
|
|
253
269
|
component: () => import('jsview-vue-samples/JsvLine/App.vue'),
|
|
254
270
|
},
|
|
255
|
-
{
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
},
|
|
271
|
+
// {
|
|
272
|
+
// name: 'FreeMove示例',
|
|
273
|
+
// path: '/feature/FreeMove',
|
|
274
|
+
// component: () => import('jsview-vue-samples/FreeMove/App.vue'),
|
|
275
|
+
// },
|
|
260
276
|
{
|
|
261
277
|
name: '思维导图示例',
|
|
262
278
|
path: '/feature/MindMap',
|
|
@@ -266,6 +282,20 @@ let routeList = [
|
|
|
266
282
|
name: 'latex公式',
|
|
267
283
|
path: '/feature/LatexFormula',
|
|
268
284
|
component: () => import('jsview-vue-samples/LatexFormula/App.vue'),
|
|
285
|
+
},{
|
|
286
|
+
name: 'Swiper3dTest',
|
|
287
|
+
path: '/Operations/Swiper3D',
|
|
288
|
+
component: () => import('jsview-vue-samples/SwiperTest/App.vue'),
|
|
289
|
+
},
|
|
290
|
+
{
|
|
291
|
+
name: '进度条',
|
|
292
|
+
path: '/Game/ProgressBar',
|
|
293
|
+
component: () => import('jsview-vue-samples/ProgressBar/App.vue'),
|
|
294
|
+
},
|
|
295
|
+
{
|
|
296
|
+
name:'春联测试',
|
|
297
|
+
path:'/Game/CoupletsTest',
|
|
298
|
+
component: () => import('jsview-vue-samples/CoupletsTest/App.vue'),
|
|
269
299
|
}
|
|
270
300
|
];
|
|
271
301
|
|
|
@@ -141,7 +141,7 @@ onDeactivated(() => {
|
|
|
141
141
|
<div class="address">
|
|
142
142
|
{{ address }}
|
|
143
143
|
</div>
|
|
144
|
-
<div class="logo">{{ 'JsView-Vue3 (
|
|
144
|
+
<div class="logo">{{ 'JsView-Vue3 (Vite5) [' + (isDevelopment ? 'Debug' : 'Release') + ']' }}</div>
|
|
145
145
|
|
|
146
146
|
<jsv-focus-block
|
|
147
147
|
autoFocus
|
|
@@ -0,0 +1,138 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<jsv-focus-block :onAction="{ onFocus: mainFocus }" name="main">
|
|
3
|
+
<div class="bgStyle">
|
|
4
|
+
<DispersedItemWidget
|
|
5
|
+
name="dispersed"
|
|
6
|
+
:data="data"
|
|
7
|
+
:initFocusId="2"
|
|
8
|
+
:onEdge="onEdge"
|
|
9
|
+
>
|
|
10
|
+
<template #renderItem="{ data, query, onEdge, onAction }">
|
|
11
|
+
<Item
|
|
12
|
+
:data="data"
|
|
13
|
+
:query="query"
|
|
14
|
+
:onEdge="onEdge"
|
|
15
|
+
:onAction="onAction"
|
|
16
|
+
></Item>
|
|
17
|
+
</template>
|
|
18
|
+
</DispersedItemWidget>
|
|
19
|
+
<!-- 提示 -->
|
|
20
|
+
<div class="focusText">{{ "初始聚焦: 第2项" }}</div>
|
|
21
|
+
<div class="opText">
|
|
22
|
+
{{
|
|
23
|
+
"操作提示:按上下左右键进行焦点切换,按【OK】键对当前聚焦项进行变色,按【返回】键退出。"
|
|
24
|
+
}}
|
|
25
|
+
</div>
|
|
26
|
+
<div class="specialText">
|
|
27
|
+
{{ "第2项正常情况按右键应为第3项,通过SpecIndex重新设置到了第6项。" }}
|
|
28
|
+
</div>
|
|
29
|
+
</div>
|
|
30
|
+
</jsv-focus-block>
|
|
31
|
+
</template>
|
|
32
|
+
|
|
33
|
+
<script setup>
|
|
34
|
+
import { useFocusHub } from "jsview";
|
|
35
|
+
import { onMounted } from "vue";
|
|
36
|
+
import Item from "./Item.vue";
|
|
37
|
+
import DispersedItemWidget from "./DispersedItemWidget/DispersedItemWidget.vue";
|
|
38
|
+
let focusHub = useFocusHub();
|
|
39
|
+
const data = [
|
|
40
|
+
{
|
|
41
|
+
width: 200,
|
|
42
|
+
height: 100,
|
|
43
|
+
left: 60,
|
|
44
|
+
top: 400,
|
|
45
|
+
color: "#FF1213",
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
width: 200,
|
|
49
|
+
height: 100,
|
|
50
|
+
left: 380,
|
|
51
|
+
top: 420,
|
|
52
|
+
color: "#FF1213",
|
|
53
|
+
},
|
|
54
|
+
{
|
|
55
|
+
width: 200,
|
|
56
|
+
height: 100,
|
|
57
|
+
left: 700,
|
|
58
|
+
top: 360,
|
|
59
|
+
color: "#FF1213",
|
|
60
|
+
SpecIndex: {
|
|
61
|
+
right: 6,
|
|
62
|
+
},
|
|
63
|
+
},
|
|
64
|
+
{
|
|
65
|
+
width: 300,
|
|
66
|
+
height: 200,
|
|
67
|
+
left: 900,
|
|
68
|
+
top: 500,
|
|
69
|
+
color: "#FF1213",
|
|
70
|
+
},
|
|
71
|
+
{
|
|
72
|
+
width: 200,
|
|
73
|
+
height: 100,
|
|
74
|
+
left: 1060,
|
|
75
|
+
top: 200,
|
|
76
|
+
color: "#FF1213",
|
|
77
|
+
},
|
|
78
|
+
{
|
|
79
|
+
width: 200,
|
|
80
|
+
height: 100,
|
|
81
|
+
left: 760,
|
|
82
|
+
top: 60,
|
|
83
|
+
color: "#FF1213",
|
|
84
|
+
},
|
|
85
|
+
{
|
|
86
|
+
width: 200,
|
|
87
|
+
height: 100,
|
|
88
|
+
left: 1060,
|
|
89
|
+
top: 380,
|
|
90
|
+
color: "#FF1213",
|
|
91
|
+
},
|
|
92
|
+
];
|
|
93
|
+
|
|
94
|
+
const mainFocus = () => {
|
|
95
|
+
focusHub.setFocus("dispersed");
|
|
96
|
+
};
|
|
97
|
+
|
|
98
|
+
const onEdge = () => {
|
|
99
|
+
console.log("到边缘了无法移动");
|
|
100
|
+
};
|
|
101
|
+
onMounted(() => {
|
|
102
|
+
focusHub.setFocus("main");
|
|
103
|
+
});
|
|
104
|
+
</script>
|
|
105
|
+
|
|
106
|
+
<style lang="scss" scoped>
|
|
107
|
+
.bgStyle {
|
|
108
|
+
width: 1280;
|
|
109
|
+
height: 720;
|
|
110
|
+
background-color: #007788;
|
|
111
|
+
}
|
|
112
|
+
.focusText {
|
|
113
|
+
width: 200;
|
|
114
|
+
height: 26;
|
|
115
|
+
font-size: 24;
|
|
116
|
+
color: #ffffff;
|
|
117
|
+
line-height: 26;
|
|
118
|
+
left: 30;
|
|
119
|
+
}
|
|
120
|
+
.opText {
|
|
121
|
+
width: 400;
|
|
122
|
+
height: 90;
|
|
123
|
+
font-size: 24;
|
|
124
|
+
color: #ffffff;
|
|
125
|
+
line-height: 26;
|
|
126
|
+
top: 40;
|
|
127
|
+
left: 30;
|
|
128
|
+
}
|
|
129
|
+
.specialText {
|
|
130
|
+
width: 400;
|
|
131
|
+
height: 90;
|
|
132
|
+
font-size: 24;
|
|
133
|
+
color: #ffffff;
|
|
134
|
+
line-height: 26;
|
|
135
|
+
top: 150;
|
|
136
|
+
left: 30;
|
|
137
|
+
}
|
|
138
|
+
</style>
|