提交 a79696e6 编写于 作者: DCloud-yinjiacheng's avatar DCloud-yinjiacheng

更新list-view示例

上级 73fc5465
......@@ -63,6 +63,12 @@
"navigationBarTitleText": "list-view-multiplex"
}
},
{
"path": "pages/component/list-view/list-view-multiplex-video",
"style": {
"navigationBarTitleText": "list-view-multiplex-video"
}
},
{
"path": "pages/component/sticky-section/sticky-section",
"style": {
......
<template>
<list-view class="list">
<list-item class="list-item" v-for="(_,index) in 20">
<text>第{{index + 1}}个视频</text>
<video class="video" :src="src" :controls="true" @pause="onPause"></video>
</list-item>
</list-view>
</template>
<script>
export default {
data() {
return {
src: 'https://qiniu-web-assets.dcloud.net.cn/video/sample/2minute-demo.mp4'
}
},
methods: {
onPause(e : UniEvent) {
console.log(JSON.stringify(e));
}
}
}
</script>
<style>
.list {
flex: 1;
}
.list-item {
background-color: white;
margin-bottom: 30px;
}
.video {
width: 100%;
height: 200px;
}
</style>
......@@ -193,6 +193,11 @@
list-view 复用测试(item中嵌入input)
</button>
</navigator>
<navigator url="/pages/component/list-view/list-view-multiplex-video" hover-class="none">
<button type="primary" class="button">
list-view 复用测试(item中嵌入video)
</button>
</navigator>
</view>
</scroll-view>
</template>
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册