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

update:更新

上级 b6a1abbf
<template> <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" /> <img :style="cssStyle" :src="imgUrl" />
</div> </div>
</template> </template>
...@@ -32,7 +32,7 @@ export default class AppFieldImageDynamic extends Vue { ...@@ -32,7 +32,7 @@ export default class AppFieldImageDynamic extends Vue {
* @type {string} * @type {string}
* @memberof AppRawItemImage * @memberof AppRawItemImage
*/ */
@Prop({default:''}) public cssClass: string; @Prop({default:''}) public cssClass?: string;
/** /**
* 动态图片路径 * 动态图片路径
......
...@@ -24,7 +24,7 @@ export default class AppCarousel extends Vue { ...@@ -24,7 +24,7 @@ export default class AppCarousel extends Vue {
* @type {*} * @type {*}
* @memberof AppPresetCarousel * @memberof AppPresetCarousel
*/ */
@Prop() public contextData?: any; @Prop() public data?: any;
/** /**
* @description 轮播图数据 * @description 轮播图数据
......
...@@ -17,6 +17,14 @@ export default class AppRawItemImage extends Vue { ...@@ -17,6 +17,14 @@ export default class AppRawItemImage extends Vue {
*/ */
@Prop() public cssStyle: any; @Prop() public cssStyle: any;
/**
* 样式表
*
* @type {string}
* @memberof AppRawItemImage
*/
@Prop() public cssClass: any;
/** /**
* 图片地址 * 图片地址
* *
......
<template> <template>
<div class="app-rawitem-video"> <div class="app-rawitem-video">
<video <video :src="playerParams.url" :autoplay="playerParams.autoplay" :controls="playerParams.controls"
:src="playerParams.url" :loop="playerParams.loop" :muted="playerParams.volume">
:autoplay="playerParams.autoplay"
:controls="playerParams.controls"
:loop="playerParams.loop"
:muted="playerParams.volume">
</video> </video>
</div> </div>
</template> </template>
...@@ -30,23 +26,33 @@ export default class AppVideo extends Vue { ...@@ -30,23 +26,33 @@ export default class AppVideo extends Vue {
id: this.uuid, id: this.uuid,
height: '100%', height: '100%',
width: '100%', width: '100%',
url:"", url: "",
volume:0.8, volume: 0.8,
autoplay:false, autoplay: false,
loop:false, loop: false,
controls:false controls: false
}; };
/** /**
* 生命周期 * 生命周期
*/ */
public mounted() { public mounted() {
if (this.videoParmas) { this.handleStaticVideo();
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 *
* @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 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册