更改序列帧
This commit is contained in:
parent
81b547fa7a
commit
aaf903a8a1
@ -9,13 +9,13 @@ export default defineComponent({
|
|||||||
// 给图片设置替代文本
|
// 给图片设置替代文本
|
||||||
alt: { type: String, default: '' },
|
alt: { type: String, default: '' },
|
||||||
// 帧率(帧/秒),默认 20
|
// 帧率(帧/秒),默认 20
|
||||||
fps: { type: Number, default: 20 },
|
fps: { type: Number, default: 15 },
|
||||||
// 自动播放,默认 true
|
// 自动播放,默认 true
|
||||||
autoplay: { type: Boolean, default: true },
|
autoplay: { type: Boolean, default: true },
|
||||||
// 播放完毕后不循环,触发跳转逻辑
|
// 播放完毕后不循环,触发跳转逻辑
|
||||||
loop: { type: Boolean, default: false },
|
loop: { type: Boolean, default: false },
|
||||||
// 帧总数,默认 115
|
// 帧总数,默认 115
|
||||||
framesCount: { type: Number, default: 115 },
|
framesCount: { type: Number, default: 82 },
|
||||||
// 帧图所在目录
|
// 帧图所在目录
|
||||||
basePath: { type: String, default: '/openvideo/' }
|
basePath: { type: String, default: '/openvideo/' }
|
||||||
},
|
},
|
||||||
@ -105,7 +105,7 @@ export default defineComponent({
|
|||||||
const arr = []
|
const arr = []
|
||||||
for (let i = 0; i <= this.framesCount; i++) {
|
for (let i = 0; i <= this.framesCount; i++) {
|
||||||
// 保证五位数文件名,高位补零
|
// 保证五位数文件名,高位补零
|
||||||
const name = String(i).padStart(5, '0') + '.jpg'
|
const name = String(i).padStart(2, '0') + '.jpg'
|
||||||
arr.push(this.basePath + name)
|
arr.push(this.basePath + name)
|
||||||
}
|
}
|
||||||
return arr
|
return arr
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user