提交 ef8611f8 编写于 作者: glod-money-money's avatar glod-money-money

update:更新

上级 b6a1abbf
<template>
<div :class="{'app-field-image-dynamic':true,[cssClass]:cssClass?true:false}">
<div :class="{'app-field-image-dynamic':true,[`${cssClass}`]:cssClass?true:false}">
<img :style="cssStyle" :src="imgUrl" />
</div>
</template>
......@@ -32,7 +32,7 @@ export default class AppFieldImageDynamic extends Vue {
* @type {string}
* @memberof AppRawItemImage
*/
@Prop({default:''}) public cssClass: string;
@Prop({default:''}) public cssClass?: string;
/**
* 动态图片路径
......
......@@ -24,7 +24,7 @@ export default class AppCarousel extends Vue {
* @type {*}
* @memberof AppPresetCarousel
*/
@Prop() public contextData?: any;
@Prop() public data?: any;
/**
* @description 轮播图数据
......
......@@ -17,6 +17,14 @@ export default class AppRawItemImage extends Vue {
*/
@Prop() public cssStyle: any;
/**
* 样式表
*
* @type {string}
* @memberof AppRawItemImage
*/
@Prop() public cssClass: any;
/**
* 图片地址
*
......
<template>
<div class="app-rawitem-video">
<video
:src="playerParams.url"
:autoplay="playerParams.autoplay"
:controls="playerParams.controls"
:loop="playerParams.loop"
:muted="playerParams.volume">
<video :src="playerParams.url" :autoplay="playerParams.autoplay" :controls="playerParams.controls"
:loop="playerParams.loop" :muted="playerParams.volume">
</video>
</div>
</template>
......@@ -30,23 +26,33 @@ export default class AppVideo extends Vue {
id: this.uuid,
height: '100%',
width: '100%',
url:"",
volume:0.8,
autoplay:false,
loop:false,
controls:false
};
url: "",
volume: 0.8,
autoplay: false,
loop: false,
controls: false
};
/**
* 生命周期
*/
public mounted() {
if (this.videoParmas) {
this.playerParams.url = this.videoParmas.path;
this.playerParams.volume = this.videoParmas.mute ? 0 : 0.8;
this.playerParams.autoplay = this.videoParmas.autoplay ? true : false;
this.playerParams.loop = this.videoParmas.replay ? true : false;
this.playerParams.controls = this.videoParmas.showcontrols ? true : false
this.handleStaticVideo();
}
/**
* 处理静态视频播放
*
* @memberof AppPresetRawitem
*/
protected handleStaticVideo() {
if (this.videoParmas && this.videoParmas.length > 0) {
const rawParams:any = {};
this.videoParmas.forEach((param: any) => {
rawParams[param.key] = param.value;
})
Object.assign(this.playerParams,rawParams);
}
}
}
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册