fq-uniapp-video-play
v0.1.8
Published
fq-uniapp-video-play
Downloads
3
Readme
fq-uniapp-video-play
安装
# npm
npm install fq-uniapp-video-play
# yarn
yarn add fq-uniapp-video-play
使用
import fqVideoPlay from 'fq-uniapp-video-play'
Vue.use(fqVideoPlay)
// template ...
<fq-video-play />
属性
props
支持所有uni.vedio的props |Name|Description|Type|Required|Default| |-|-|-|-|-| |srcDatas|视频数据|SrcDatas|true|[]|
props.srcDatas
|Name|Description|Type|Required|Default| |-|-|-|-|-| |id|主键|Number | String|true| |links|链接数据|Array|false|[] |url|视频地址|String|true| |isTop|是否为顶层节点|Boolean|false|
props.srcDatas.links
|Name|Description|Type|Required|Default| |-|-|-|-|-| |id|主键|Number | String|false| |text|按钮文案|String|true| |linkId|需要跳转的视频id|Number | String|true|
Demo
<template>
<view class="content">
<view>
<fq-video-play :srcDatas="srcDatas" />
</view>
</view>
</template>
<script>
export default {
data() {
return {
srcDatas: [
{
id: 1,
links: [
{ id: "link-01", text: "A.打开", linkId: 2 },
{ id: "link-02", text: "B.离开", linkId: 3 },
],
url: '/static/id01.mp4',
isTop: true,
},
{
id: 2,
links: [
{ id: "link-03", text: "A.拿起", linkId: 4 },
{ id: "link-04", text: "B.自杀", linkId: 5 },
],
url: '/static/id02.mp4',
},
{
id: 3,
links: [],
url: '/static/id03.mp4',
},
{
id: 4,
links: [
{ id: "link-05", text: "A.观摩", linkId: 5 },
{ id: "link-06", text: "B.收起", linkId: 5 },
{ id: "link-07", text: "C.破坏", linkId: 5 },
],
url: '/static/id04.mp4',
},
{
id: 5,
links: [],
url: '/static/id05.mp4',
}
],
};
},
onLoad() {},
methods: {},
};
</script>
<style>
</style>