|
@@ -3,6 +3,7 @@
|
|
|
<audio
|
|
<audio
|
|
|
class="audio"
|
|
class="audio"
|
|
|
ref="audioRef"
|
|
ref="audioRef"
|
|
|
|
|
+ :autoplay="autoplayDefault"
|
|
|
:src="src"
|
|
:src="src"
|
|
|
@durationchange="handleDurationchange()"
|
|
@durationchange="handleDurationchange()"
|
|
|
@timeupdate="handleTimeupdate()"
|
|
@timeupdate="handleTimeupdate()"
|
|
@@ -97,6 +98,12 @@ watch(
|
|
|
}
|
|
}
|
|
|
)
|
|
)
|
|
|
|
|
|
|
|
|
|
+// 当没有动画 需要自动播放
|
|
|
|
|
+const autoplayDefault = ref(false)
|
|
|
|
|
+if (!props.needWaitAnimation && props.autoplay) {
|
|
|
|
|
+ autoplayDefault.value = true
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
const secondToTime = (second = 0) => {
|
|
const secondToTime = (second = 0) => {
|
|
|
if (second === 0 || isNaN(second)) return "00:00"
|
|
if (second === 0 || isNaN(second)) return "00:00"
|
|
|
|
|
|