更新记录
1.0.1(2024-08-17)
更新文档
1.0.0(2024-08-17)
更新安卓
平台兼容性
uni-app x
Chrome | Safari | Android | iOS | 鸿蒙 | 微信小程序 |
---|---|---|---|---|---|
- | - | 5.0 | - | - | - |
pll-svga
开发文档
<template>
<view class="content">
<p-svga ref="svga" style="width: 750rpx;height: 800rpx" @onFinished="finished" @onLoadend="loadend" @onLoadfail="loadfail"></p-svga>
<button @click="setNetWorkAddress">设置网络地址</button>
<button @click="setLocalAddress">设置本地地址</button>
<button @click="start">开始播放</button>
<button @click="stop">暂停播放</button>
<button @click="stop">停止播放</button>
<button @click="setLoops">设置循环次数</button>
</view>
</template>
<script>
export default {
data() {
return {
}
},
onLoad() {
},
mounted() {
},
methods: {
finished(e) {
console.log(e)
},
loadfail(e) {
console.log(e)
},
loadend(e) {
console.log(e)
},
setNetWorkAddress() {
this.$refs["svga"].init("https://djfood-img.wuhunews.cn/Goddess.svga",(res)=> {
console.log(res)
});
},
setLocalAddress() {
this.$refs["svga"].init("/static/Castle.svga");
},
start() {
this.$refs['svga'].start();
},
stop() {
this.$refs['svga'].stop();
},
pause() {
this.$refs['svga'].pause();
},
setLoops() {
this.$refs['svga'].setLoops(1);
}
}
}
</script>
<style>
</style>