';
videoListHtml += '
';
videoListHtml += '
';
videoListHtml += '
';
videoListHtml += '
';
videoListHtml += '';
videoListHtml += '
';
videoListHtml += '
';
videoListHtml += '
其他设置
';
videoListHtml += '';
videoListHtml += '';
videoListHtml += '
';
videoListHtml += '
';
videoListHtml += '
';
videoListHtml += '';
videoListHtml += '
';
videoListHtml += '
';
videoListHtml += '
';
Vue.component("video-list", {
data: function () {
return {
data: this.$parent.data,
showAddItem: true,
list: this.$parent.data.list,
imageScale: this.$parent.data.imageScale,
padding: this.$parent.data.padding,
maxTip: 5, //最大上传数量提示
scrollSettingList: [{
name: "固定",
value: "fixed",
max: 5
}],
};
},
created: function () {
this.changeShowAddItem();
if (!this.$parent.data.verify) this.$parent.data.verify = [];
this.$parent.data.verify.push(this.verify); //加载验证方法
},
watch: {
list: function () {
this.changeShowAddItem();
}
},
methods: {
//改变图文导航按钮的显示隐藏
changeShowAddItem: function () {
if (this.list.length >= this.scrollSettingList[0].max) this.showAddItem = false;
else this.showAddItem = true;
this.maxTip = this.scrollSettingList[0].max;
},
//改变上下边距
changePadding: function (event) {
var v = event.target.value;
if (v != "") {
if (v >= 0 && v <= 100) {
this.padding = v;
this.$parent.data.padding = this.padding; //更新父级对象
} else {
layer.msg("请输入合法数字0~100");
}
} else {
layer.msg("请输入合法数字0~100");
}
},
verify: function () {
var res = {
code: true,
message: ""
};
var _self = this;
$(".draggable-element[data-index='" + this.data.index + "'] .slider .slider-list .template-edit-wrap>ul>li").each(function (index) {
$(this).find("input[name='title']").removeAttr("style"); //清空输入框的样式
//检测是否有未上传的视频
if (_self.list[index].videoUrl == "") {
res.code = false;
res.message = "请选择视频";
$(this).find(".error-msg").text("请选择视频").show();
return res;
} else {
$(this).find(".error-msg").text("").hide();
}
});
return res;
}
},
template: videoListHtml
});
var videoRadiusHtml = '