更新记录

1.0.0(2025-02-25)

ay-Pag新版本发布


平台兼容性

Vue2 Vue3
App 快应用 微信小程序 支付宝小程序 百度小程序 字节小程序 QQ小程序
HBuilderX 3.99,Android:4.4,iOS:9,HarmonyNext:不确定 × × × × × ×
钉钉小程序 快手小程序 飞书小程序 京东小程序 鸿蒙元服务
× × × × ×
H5-Safari Android Browser 微信浏览器(Android) QQ浏览器(Android) Chrome IE Edge Firefox PC-Safari
× × × × × × × × ×

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. 本插件是否包含广告,如包含需详细说明广告表达方式、展示频率:

暂无用户评论。

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