更新记录

1.0.0(2025-02-25)

ay-Pag新版本发布


平台兼容性

uni-app

Vue2 Vue3 Chrome Safari app-vue app-nvue Android iOS 鸿蒙
- - - - 4.4 12 -
微信小程序 支付宝小程序 抖音小程序 百度小程序 快手小程序 京东小程序 鸿蒙元服务 QQ小程序 飞书小程序 快应用-华为 快应用-联盟
× × × × × × - × × × ×

uni-app x

Chrome Safari Android iOS 鸿蒙 微信小程序
- - 5.0 12 - ×

ay-Pag支持安卓/iOS端的Pag动画插件

使用说明

<ay-Pag
    ref="pagView" 
    class="pagView" 
    pag-file-path="/static/pag/test.pag"
    :repeat-count="100">
</ay-Pag>

选项式api

methods: {
    play() {
        this.$refs['pagView'].isPlaying((isPlaying: boolean) => {
        if (!isPlaying) {
            this.$refs['pagView'].play()
            }
        }) 
    },
    stop() {
        this.$refs['pagView'].stop()
    },
    replaceImage() {
        this.$refs['pagView'].replaceImage('/static/images/test.png', 0)
    },
    replaceText() {
        this.$refs['pagView'].replaceText('123', 0)
    }
}

组合式api

const pagView = ref(null)
const play = () => {
    pagView.value.isPlaying(isPlaying => {
        if (!isPlaying) {
            pagView.value.play()
        }
    })
}
const stop = () => {
    pagView.value.stop()
}
const replaceImage = () => {
    pagView.value.replaceImage('/static/images/test.png', 0)
    pagView.value.replaceText('123', 0)
}
const replaceText = () => {
    pagView.value.replaceText('123', 0)
}

关于我

支持定制、本地包、源码等,有建议和需要,请联系我

微信:ayao110100

QQ:206788568

博客:https://anyaowl.cn/

隐私、权限声明

1. 本插件需要申请的系统权限列表:

2. 本插件采集的数据、发送的服务器地址、以及数据用途说明:

3. 本插件是否包含广告,如包含需详细说明广告表达方式、展示频率:

暂无用户评论。

使用中有什么不明白的地方,就向插件作者提问吧~ 我要提问