第一次提交

This commit is contained in:
gxwebsoft
2023-08-04 13:14:48 +08:00
commit 1b923e5cff
1030 changed files with 128016 additions and 0 deletions

View File

@@ -0,0 +1,56 @@
<template>
<view>
<video :style="{width: vWidth + 'px',height: vHeight + 'px'}" :src="src" :poster="poster"></video>
</view>
</template>
<script>
export default {
name:"article-video",
props: {
width: {
type: Number,
default: 400
},
height: {
type: Number,
default: 400
},
src: {
type: String,
default: ''
},
poster: {
type: String,
default: ''
}
},
data() {
return {
vWidth: 400,
vHeight: 400
};
},
created() {
console.error("------------------------------- article-video created-------------------------------------------------");
const maxWidth = uni.upx2px(400)
const maxHeight = uni.upx2px(400)
// 获得长边
const wL = this.width > this.height
if(wL) {
this.vWidth = maxWidth
this.vHeight = this.height/this.width * maxWidth
}else {
this.vHeight = maxHeight
this.vWidth = this.width/this.height * maxHeight
}
},
methods: {
}
}
</script>
<style>
</style>