@asd20/ui 3.2.965 → 3.2.967
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/package.json
CHANGED
|
@@ -13,23 +13,20 @@
|
|
|
13
13
|
v-if="imageUrl && !$slots.aside"
|
|
14
14
|
class="asd20-school-homepage-video-header__image"
|
|
15
15
|
>
|
|
16
|
-
<
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
<source :src="videoUrl" type="video/mp4" />
|
|
31
|
-
</video>
|
|
32
|
-
</client-only>
|
|
16
|
+
<video
|
|
17
|
+
ref="backgroundVideo"
|
|
18
|
+
class="background-video"
|
|
19
|
+
role="presentation"
|
|
20
|
+
aria-hidden="true"
|
|
21
|
+
autoplay
|
|
22
|
+
loop
|
|
23
|
+
autobuffer
|
|
24
|
+
muted
|
|
25
|
+
playsinline
|
|
26
|
+
:poster="imageUrl"
|
|
27
|
+
>
|
|
28
|
+
<source :src="loadVideo" type="video/mp4" />
|
|
29
|
+
</video>
|
|
33
30
|
<button
|
|
34
31
|
v-if="videoUrl"
|
|
35
32
|
class="video-toggle-btn"
|
|
@@ -109,8 +106,12 @@ export default {
|
|
|
109
106
|
data() {
|
|
110
107
|
return {
|
|
111
108
|
isPaused: false,
|
|
109
|
+
isMobile: false,
|
|
112
110
|
}
|
|
113
111
|
},
|
|
112
|
+
mounted() {
|
|
113
|
+
this.isMobile = this.$mq === 'xs' || this.$mq === 'sm'
|
|
114
|
+
},
|
|
114
115
|
computed: {
|
|
115
116
|
mq() {
|
|
116
117
|
return this.$mq || 'sm'
|
|
@@ -130,9 +131,11 @@ export default {
|
|
|
130
131
|
this.detailLink.split('/').pop()
|
|
131
132
|
)
|
|
132
133
|
},
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
134
|
+
loadVideo() {
|
|
135
|
+
if (this.isMobile) {
|
|
136
|
+
return null
|
|
137
|
+
}
|
|
138
|
+
return this.videoUrl
|
|
136
139
|
},
|
|
137
140
|
},
|
|
138
141
|
methods: {
|
|
@@ -9,24 +9,20 @@
|
|
|
9
9
|
<slot name="top" />
|
|
10
10
|
</div>
|
|
11
11
|
|
|
12
|
-
<
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
>
|
|
27
|
-
<source :src="videoUrl" type="video/mp4" />
|
|
28
|
-
</video>
|
|
29
|
-
</client-only>
|
|
12
|
+
<video
|
|
13
|
+
ref="backgroundVideo"
|
|
14
|
+
class="background-video"
|
|
15
|
+
role="presentation"
|
|
16
|
+
aria-hidden="true"
|
|
17
|
+
autoplay
|
|
18
|
+
loop
|
|
19
|
+
autobuffer
|
|
20
|
+
muted
|
|
21
|
+
playsinline
|
|
22
|
+
:poster="imageUrl"
|
|
23
|
+
>
|
|
24
|
+
<source :src="loadVideo" type="video/mp4" />
|
|
25
|
+
</video>
|
|
30
26
|
<button
|
|
31
27
|
v-if="videoUrl"
|
|
32
28
|
class="video-toggle-btn"
|
|
@@ -73,8 +69,12 @@ export default {
|
|
|
73
69
|
data() {
|
|
74
70
|
return {
|
|
75
71
|
isPaused: false,
|
|
72
|
+
isMobile: false,
|
|
76
73
|
}
|
|
77
74
|
},
|
|
75
|
+
mounted() {
|
|
76
|
+
this.isMobile = this.$mq === 'xs' || this.$mq === 'sm'
|
|
77
|
+
},
|
|
78
78
|
computed: {
|
|
79
79
|
mq() {
|
|
80
80
|
return this.$mq || 'sm'
|
|
@@ -92,9 +92,11 @@ export default {
|
|
|
92
92
|
this.detailLink.split('/').pop()
|
|
93
93
|
)
|
|
94
94
|
},
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
95
|
+
loadVideo() {
|
|
96
|
+
if (this.isMobile) {
|
|
97
|
+
return null
|
|
98
|
+
}
|
|
99
|
+
return this.videoUrl
|
|
98
100
|
},
|
|
99
101
|
},
|
|
100
102
|
methods: {
|