1.0.5 • Published 6 years ago

mpvue-audio v1.0.5

Weekly downloads
1
License
MIT
Repository
github
Last release
6 years ago

mpvue-audio

mpvue 微信小程序 音频播放组件

安装

npm install mpvue-audio --save

可用属性

参数说明类型默认值
task单音频Objectnull
task_array多音频ArrayObject[]

task说明

参数说明类型
content_url音频地址String
title标题String''
content_cover_url封面地址String

使用

<template>
  <div class="audio-container">
    <my-audio :task="task" />
  </div>
</template>
<script>
import MyAudio from 'mpvue-audio'

export default {
  data() {
    return {
      task: {}
    }
  },

  components: {
    MyAudio
  },

  methods: {
    //...省略

    initTask() {
      this.task.content_url = 'http://example.mp3'
      this.task.content_cover_url = 'http://example.png'
      this.task.title = 'example'
    }
  },

  created() {
    this.initTask()
  }
}
</script>
1.0.5

6 years ago

1.0.4

6 years ago

1.0.3

6 years ago

1.0.2

6 years ago

1.0.1

6 years ago

1.0.0

6 years ago