design.js 2.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. var floatBtnListHtml = '<div class="float-btn-list">';
  2. floatBtnListHtml += '<ul>';
  3. floatBtnListHtml += '<li v-for="(item,index) in list" v-bind:key="index">';
  4. floatBtnListHtml += '<div class="video-in-box">';
  5. floatBtnListHtml += '<span class="video-title">视频上传</span>';
  6. floatBtnListHtml += '<video-upload v-bind:data="{data : item}" :currIndex = "index"></video-upload>';
  7. floatBtnListHtml += '</div>';
  8. floatBtnListHtml += '<div class="video-in-box">';
  9. floatBtnListHtml += '<span class="video-title">视频封面</span>';
  10. floatBtnListHtml += '<img-upload v-bind:data="{data : item}" :currIndex = "index"></img-upload>';
  11. floatBtnListHtml += '</div>';
  12. // floatBtnListHtml += '<div class="layui-form-item goods-show-box ns-checkbox-wrap">';
  13. // floatBtnListHtml += '<div class="layui-input-block">';
  14. // floatBtnListHtml += '<div class="layui-input-inline-checkbox">';
  15. // floatBtnListHtml += '<span>自动播放</span>';
  16. // floatBtnListHtml += '<div v-on:click="changeStatus(\'is_play\')" class="layui-unselect layui-form-checkbox" v-bind:class="{\'layui-form-checked\': (item.is_play == 1)}" lay-skin="primary"><i class="layui-icon layui-icon-ok"></i></div>';
  17. // floatBtnListHtml += '</div>';
  18. // floatBtnListHtml += '<div class="layui-input-inline-checkbox">';
  19. // floatBtnListHtml += '<span>静音播放</span>';
  20. // floatBtnListHtml += '<div v-on:click="changeStatus(\'is_mute\')" class="layui-unselect layui-form-checkbox" v-bind:class="{\'layui-form-checked\': (item.is_mute == 1)}" lay-skin="primary"><i class="layui-icon layui-icon-ok"></i></div>';
  21. // floatBtnListHtml += '</div>';
  22. // floatBtnListHtml += '</div>';
  23. // floatBtnListHtml += '</div>';
  24. floatBtnListHtml += '<div class="error-msg"></div>';
  25. floatBtnListHtml += '</li>';
  26. floatBtnListHtml += '</ul>';
  27. floatBtnListHtml += '</div>';
  28. Vue.component("video-moba",{
  29. data: function () {
  30. return {
  31. list: this.$parent.data.list,
  32. maxTip : 3,//最大上传数量提示
  33. showAddItem : true,
  34. systemInfo:{
  35. top:0,
  36. left:0,
  37. right:0,
  38. bottom:0,
  39. width:0
  40. },
  41. screenWidth:0
  42. };
  43. },
  44. created : function(){
  45. if(!this.$parent.data.verify) this.$parent.data.verify = [];
  46. //this.$parent.data.verify.push(this.verify);//加载验证方法
  47. },
  48. methods: {
  49. verify :function () {
  50. },
  51. changeStatus: function(field) {
  52. if(this.$parent.data.list[0][field] == 0){
  53. this.$parent.data.list[0][field] = 1;
  54. }else{
  55. this.$parent.data.list[0][field] = 0;
  56. }
  57. }
  58. },
  59. template: floatBtnListHtml
  60. });