baiqiu-cms-decoration-dg 0.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (101) hide show
  1. package/.babelrc +17 -0
  2. package/.editorconfig +9 -0
  3. package/.prettierrc +8 -0
  4. package/README.md +18 -0
  5. package/dist/baiqiu-cms-decoration.min.js +26 -0
  6. package/dist/baiqiu-cms-decoration.min.js.map +1 -0
  7. package/dist/font/iconfont.eot +0 -0
  8. package/dist/font/iconfont.svg +89 -0
  9. package/dist/font/iconfont.ttf +0 -0
  10. package/dist/font/iconfont.woff +0 -0
  11. package/dist/iconfont.svg +1 -0
  12. package/index.html +11 -0
  13. package/package.json +48 -0
  14. package/src/App.vue +198 -0
  15. package/src/api/com-service.js +26 -0
  16. package/src/assets/iconfont/demo.css +539 -0
  17. package/src/assets/iconfont/iconfont.css +158 -0
  18. package/src/assets/iconfont/iconfont.eot +0 -0
  19. package/src/assets/iconfont/iconfont.json +254 -0
  20. package/src/assets/iconfont/iconfont.svg +89 -0
  21. package/src/assets/iconfont/iconfont.ttf +0 -0
  22. package/src/assets/iconfont/iconfont.woff +0 -0
  23. package/src/assets/iconfont/iconfont.woff2 +0 -0
  24. package/src/assets/img/pc-cms-v2/creation.png +0 -0
  25. package/src/assets/img/pc-cms-v2/icon.png +0 -0
  26. package/src/assets/img/pc-cms-v2/mobileNav.png +0 -0
  27. package/src/assets/img/pc-cms-v2/next1.png +0 -0
  28. package/src/assets/img/pc-cms-v2/next2.png +0 -0
  29. package/src/assets/img/pc-cms-v2/prev1.png +0 -0
  30. package/src/assets/img/pc-cms-v2/prev2.png +0 -0
  31. package/src/assets/img/pc-cms-v2/text.png +0 -0
  32. package/src/components/cms/animate.scss +19 -0
  33. package/src/components/cms/buttonItem/buttonItem.js +139 -0
  34. package/src/components/cms/buttonItem/buttonItem.scss +95 -0
  35. package/src/components/cms/buttonItem/buttonItem.vue +47 -0
  36. package/src/components/cms/buttonItem/index.js +2 -0
  37. package/src/components/cms/cms.js +102 -0
  38. package/src/components/cms/cms.scss +46 -0
  39. package/src/components/cms/cms.vue +48 -0
  40. package/src/components/cms/customLayout/customLayout.js +46 -0
  41. package/src/components/cms/customLayout/customLayout.scss +8 -0
  42. package/src/components/cms/customLayout/customLayout.vue +15 -0
  43. package/src/components/cms/customLayout/index.js +2 -0
  44. package/src/components/cms/hotspot/hotspot.js +199 -0
  45. package/src/components/cms/hotspot/hotspot.scss +20 -0
  46. package/src/components/cms/hotspot/hotspot.vue +35 -0
  47. package/src/components/cms/hotspot/index.js +2 -0
  48. package/src/components/cms/imgNav/imgNav.js +177 -0
  49. package/src/components/cms/imgNav/imgNav.scss +110 -0
  50. package/src/components/cms/imgNav/imgNav.vue +123 -0
  51. package/src/components/cms/imgNav/index.js +2 -0
  52. package/src/components/cms/index.js +2 -0
  53. package/src/components/cms/mixin.js +244 -0
  54. package/src/components/cms/multipleLayout/index.js +2 -0
  55. package/src/components/cms/multipleLayout/multipleLayout.js +54 -0
  56. package/src/components/cms/multipleLayout/multipleLayout.scss +21 -0
  57. package/src/components/cms/multipleLayout/multipleLayout.vue +25 -0
  58. package/src/components/cms/productItem/index.js +2 -0
  59. package/src/components/cms/productItem/productItem.js +293 -0
  60. package/src/components/cms/productItem/productItem.scss +180 -0
  61. package/src/components/cms/productItem/productItem.vue +117 -0
  62. package/src/components/cms/singleLayout/index.js +2 -0
  63. package/src/components/cms/singleLayout/singleLayout.js +72 -0
  64. package/src/components/cms/singleLayout/singleLayout.scss +21 -0
  65. package/src/components/cms/singleLayout/singleLayout.vue +39 -0
  66. package/src/components/cms/slideLayout/index.js +2 -0
  67. package/src/components/cms/slideLayout/slideLayout.js +248 -0
  68. package/src/components/cms/slideLayout/slideLayout.scss +18 -0
  69. package/src/components/cms/slideLayout/slideLayout.vue +44 -0
  70. package/src/components/cms/swiperItem/index.js +2 -0
  71. package/src/components/cms/swiperItem/swiperItem.js +228 -0
  72. package/src/components/cms/swiperItem/swiperItem.scss +204 -0
  73. package/src/components/cms/swiperItem/swiperItem.vue +123 -0
  74. package/src/components/cms/tabLayout/index.js +2 -0
  75. package/src/components/cms/tabLayout/navItem/index.js +2 -0
  76. package/src/components/cms/tabLayout/navItem/navItem.js +47 -0
  77. package/src/components/cms/tabLayout/navItem/navItem.scss +23 -0
  78. package/src/components/cms/tabLayout/navItem/navItem.vue +13 -0
  79. package/src/components/cms/tabLayout/tabLayout.js +158 -0
  80. package/src/components/cms/tabLayout/tabLayout.scss +26 -0
  81. package/src/components/cms/tabLayout/tabLayout.vue +43 -0
  82. package/src/components/cms/textItem/index.js +2 -0
  83. package/src/components/cms/textItem/textItem.js +72 -0
  84. package/src/components/cms/textItem/textItem.scss +41 -0
  85. package/src/components/cms/textItem/textItem.vue +26 -0
  86. package/src/components/cms/utils.js +101 -0
  87. package/src/components/cms/videoItem/index.js +2 -0
  88. package/src/components/cms/videoItem/videoItem.js +96 -0
  89. package/src/components/cms/videoItem/videoItem.scss +27 -0
  90. package/src/components/cms/videoItem/videoItem.vue +56 -0
  91. package/src/components/cms/videoPlayer/index.js +2 -0
  92. package/src/components/cms/videoPlayer/videoPlayer.js +69 -0
  93. package/src/components/cms/videoPlayer/videoPlayer.scss +37 -0
  94. package/src/components/cms/videoPlayer/videoPlayer.vue +34 -0
  95. package/src/index.js +26 -0
  96. package/src/index.scss +213 -0
  97. package/src/main.js +7 -0
  98. package/src/utils/common.js +23 -0
  99. package/src/utils/http-client.js +111 -0
  100. package/src/utils/utils.js +63 -0
  101. package/webpack.config.js +113 -0
@@ -0,0 +1,72 @@
1
+ import { cmsMixin } from "../mixin";
2
+ import { dataSaveDecorationPageComponentEventFn } from '../../../utils/utils';
3
+
4
+ export default {
5
+ name:'textItem',
6
+ mixins: [cmsMixin],
7
+ components: {
8
+ },
9
+ props: {
10
+
11
+ },
12
+ data() {
13
+ return {}
14
+ },
15
+ watch: {
16
+
17
+ },
18
+ methods: {
19
+ pageClick() {
20
+ if(this.attributeJson.linkObj.jumpLinkType) {
21
+ try {
22
+ dataSaveDecorationPageComponentEventFn(
23
+ {
24
+ uniqueId: this.recordId + '_' + this.sortId, // 组件_id
25
+ uniqueName: this.attributeJson.uniqueName, // 组件_名称
26
+ componentType: 12,
27
+ popData: {},
28
+ materialId: this.recordId + '_' + this.sortId, //素材id
29
+ materialName: this.attributeJson.uniqueName, //素材名称
30
+ refererPagePath: this.refererPagePath,
31
+ brand: this.brand,
32
+ path: this.path,
33
+ position: 1,
34
+ event: 'bannerClick'
35
+ },
36
+ this.envUrl
37
+ )
38
+ } catch(err) {
39
+
40
+ }
41
+ }
42
+
43
+ this.$emit('jumpLink', this.attributeJson.linkObj)
44
+ },
45
+ // 上报数据
46
+ reportData(h) {
47
+ if(this.isReport) return
48
+ let ref = this.$refs[`text${this.attributeJson.sort}`]
49
+ if(!ref || ref.style.display == 'none') return
50
+ let el = ref.getBoundingClientRect()
51
+ if(el.top <= h) {
52
+ this.isReport = true
53
+ dataSaveDecorationPageComponentEventFn(
54
+ {
55
+ uniqueId: this.recordId + '_' + this.sortId, // 组件_id
56
+ uniqueName: this.attributeJson.uniqueName, // 组件_名称
57
+ componentType: 12,
58
+ popData: {},
59
+ materialId: this.recordId + '_' + this.sortId, //素材id
60
+ materialName: this.attributeJson.uniqueName, //素材名称
61
+ refererPagePath: this.refererPagePath,
62
+ brand: this.brand,
63
+ path: this.path,
64
+ position: 1,
65
+ event: 'bannerShow'
66
+ },
67
+ this.envUrl
68
+ )
69
+ }
70
+ }
71
+ }
72
+ }
@@ -0,0 +1,41 @@
1
+ .text-wrap {
2
+ position: absolute;
3
+ border: none;
4
+ touch-action: auto;
5
+ overflow: hidden;
6
+ .add-con {
7
+ width: 100%;
8
+ height: 100%;
9
+ background-color: #EDF5FE;
10
+ overflow: hidden;
11
+ .default {
12
+ width: 120px;
13
+ height: 84px;
14
+ position: relative;
15
+ left: 50%;
16
+ top: 50%;
17
+ transform: translate(-50%, -50%);
18
+ .default-image {
19
+ background-image: url("/src/assets/img/pc-cms-v2/icon.png");
20
+ background-size: 1941px 1407px;
21
+ background-position: -424px -583px;
22
+ width: 100%;
23
+ height: 100%;
24
+ }
25
+ }
26
+ }
27
+
28
+ .entrance-con {
29
+ position: relative;
30
+ width: 100%;
31
+ height: 100%;
32
+ }
33
+
34
+ .text-con {
35
+ position: relative;
36
+ width: 100%;
37
+ height: 100%;
38
+ font-size: 14px;
39
+ overflow: hidden;
40
+ }
41
+ }
@@ -0,0 +1,26 @@
1
+ <template>
2
+ <div
3
+ :style="{
4
+ width: Math.round(attributeJson.baseStyle.w * ratio) + 'px',
5
+ height: Math.round(attributeJson.baseStyle.h * ratio) + 'px',
6
+ left: Math.round(attributeJson.baseStyle.l * ratio) + 'px',
7
+ top: Math.round(attributeJson.baseStyle.t * ratio) + 'px'
8
+ }"
9
+ class="text-wrap"
10
+ >
11
+ <div v-if="attributeJson.label">
12
+ <div class="entrance-con editor-richTextWrap" @click="pageClick">
13
+ <div :ref="`text${attributeJson.sort}`" :class="['text-con', `text-con-${sortId}`, animationInObj.type ? enterClass : '']" v-show="entranceShow" v-html="attributeJson.label" :style="{ animationDuration: `${animationInObj.duration}s` }"></div>
14
+ </div>
15
+ </div>
16
+ </div>
17
+ </template>
18
+
19
+ <script>
20
+ import textItemJs from './textItem.js'
21
+ export default textItemJs
22
+ </script>
23
+
24
+ <style lang="scss" scoped>
25
+ @import 'textItem';
26
+ </style>
@@ -0,0 +1,101 @@
1
+ //防抖
2
+ export function debounce(fn, wait=500, immediate=false) {
3
+ let timer, startTimeStamp=0;
4
+ let context, args;
5
+
6
+ let run = (timerInterval)=>{
7
+ timer= setTimeout(()=>{
8
+ let now = (new Date()).getTime();
9
+ let interval=now-startTimeStamp
10
+ if(interval<timerInterval){ // the timer start time has been reset,so the interval is less than timerInterval
11
+ // console.log('debounce reset',timerInterval-interval);
12
+ startTimeStamp=now;
13
+ run(wait-interval); // reset timer for left time
14
+ }else{
15
+ if(!immediate){
16
+ fn.apply(context,args);
17
+ }
18
+ clearTimeout(timer);
19
+ timer=null;
20
+ }
21
+
22
+ },timerInterval);
23
+ }
24
+
25
+ return function() {
26
+ context = this;
27
+ args = arguments;
28
+ let now = (new Date()).getTime();
29
+ startTimeStamp = now; // set timer start time
30
+
31
+ if (!timer) {
32
+ // console.log('debounce set', wait);
33
+ if (immediate) {
34
+ fn.apply(context, args);
35
+ }
36
+ run(wait); // last timer alreay executed, set a new timer
37
+ }
38
+ }
39
+ }
40
+
41
+ export function throttle(func, wait) {
42
+
43
+ var timer = null;
44
+ var startTime = Date.now();
45
+
46
+ return function(){
47
+ var curTime = Date.now();
48
+ var remaining = wait-(curTime-startTime);
49
+ var context = this;
50
+ var args = arguments;
51
+
52
+ clearTimeout(timer);
53
+
54
+ if(remaining<=0){
55
+ func.apply(context, args);
56
+
57
+ startTime = Date.now();
58
+
59
+ }else{
60
+ timer = setTimeout(func, remaining); // 如果小于wait 保证在差值时间后执行
61
+ }
62
+ }
63
+ }
64
+
65
+
66
+ export function navigateJump(params) {
67
+ let path = ''
68
+ let jumpLinkDic = {
69
+ defaultPath: {
70
+ 1: '/productDetail/', //商品详情
71
+ 2: '/productList', //商品列表
72
+ 9: '/articleList/', //文章列表
73
+ 10: '/articleDetail/' //文章详情
74
+ }
75
+ }
76
+ switch (params.brand) {
77
+ case 'defaultPath':
78
+ path = `${jumpLinkDic[params.brand][params.jumpLinkType]}${defaultPathParams(params)}`
79
+ break
80
+ }
81
+ return path
82
+ }
83
+
84
+ function defaultPathParams(params) {
85
+ let code = ''
86
+ switch (params.jumpLinkType) {
87
+ case 1:
88
+ code = `${params.productCode}?colorCode=${params.colorCode}`
89
+ break
90
+ case 2:
91
+ code = `?categoryId=${params.categoryCode}`
92
+ break
93
+ case 9:
94
+ code = ''
95
+ break
96
+ case 10:
97
+ code = `${params.articleCode}`
98
+ break
99
+ }
100
+ return code
101
+ }
@@ -0,0 +1,2 @@
1
+ import videoItem from './videoItem.vue';
2
+ export default videoItem;
@@ -0,0 +1,96 @@
1
+ import { cmsMixin } from "../mixin";
2
+ import hotspot from "../hotspot/";
3
+ import videoPlayer from '../videoPlayer/'
4
+ import { dataSaveDecorationPageComponentEventFn } from '../../../utils/utils';
5
+
6
+ export default {
7
+ name: 'videoItem',
8
+ mixins: [cmsMixin],
9
+ components: {
10
+ hotspot,
11
+ myVideoPlayer: videoPlayer
12
+ },
13
+ props:{
14
+ attributeJson: {
15
+ type: Object,
16
+ default: function() {}
17
+ },
18
+ ratio: {
19
+ type: Number,
20
+ default: 1,
21
+ positionList: []
22
+ }
23
+ },
24
+ data() {
25
+ return {
26
+ autoPlay: false
27
+ }
28
+ },
29
+ watch: {
30
+ 'videoInfo.checkedAttr': {
31
+ handler(val) {
32
+ this.autoPlay = val.indexOf('autoPlay') > -1
33
+ },
34
+ immediate: true,
35
+ deep: true
36
+ },
37
+ },
38
+ computed: {
39
+ videoItem() {
40
+ return this.attributeJson.videoInfo.list
41
+ },
42
+ videoHotPic() {
43
+ return this.attributeJson.videoHotInfo.picList
44
+ },
45
+ videoHotPop() {
46
+ return this.attributeJson.videoHotInfo.popList
47
+ },
48
+ videoInfo() {
49
+ return this.attributeJson.videoInfo
50
+ },
51
+ hotData() {
52
+ let {attributeJson} = this
53
+ return {
54
+ popList: attributeJson.videoHotInfo.popList,
55
+ width: attributeJson.videoHotInfo.picList[0].width,
56
+ height: attributeJson.videoHotInfo.picList[0].height,
57
+ realWidth: attributeJson.baseStyle.w,
58
+ realHeight: attributeJson.baseStyle.h,
59
+ top: 0,
60
+ left: 0
61
+ }
62
+ }
63
+ },
64
+ methods: {
65
+ // 上报数据
66
+ reportData(h) {
67
+ if(this.attributeJson.isVideoHasHot == 1) {
68
+ this.$refs.hotspot&&this.$refs.hotspot.reportData(h, 0)
69
+ return
70
+ }
71
+ if(this.isReport) return
72
+ let ref = this.$refs[`video${this.attributeJson.sort}`]
73
+ if( !ref || ref.style.display == 'none') return
74
+ let el = ref.getBoundingClientRect()
75
+ if(el.top <= h) {
76
+ this.isReport = true
77
+ dataSaveDecorationPageComponentEventFn(
78
+ {
79
+ uniqueId: this.recordId + '_' + this.sortId, // 组件_id
80
+ uniqueName: this.attributeJson.uniqueName, // 组件_名称
81
+ componentType: 3,
82
+ popData: {},
83
+ materialId: this.recordId + '_' + this.sortId, //素材id
84
+ materialName: this.attributeJson.uniqueName, //素材名称
85
+ refererPagePath: this.refererPagePath,
86
+ brand: this.brand,
87
+ path: this.path,
88
+ event: 'bannerShow',
89
+ position: 1
90
+ },
91
+ this.envUrl
92
+ )
93
+ }
94
+ }
95
+ }
96
+ }
@@ -0,0 +1,27 @@
1
+ .video-wrap {
2
+ border: none;
3
+ touch-action: auto;
4
+ position: absolute;
5
+ .entrance-con {
6
+ position: relative;
7
+ width: 100%;
8
+ height: 100%;
9
+ overflow: hidden;
10
+ }
11
+
12
+ .video-con {
13
+ position: relative;
14
+
15
+ .hot-image {
16
+ position: absolute;
17
+ left: 0;
18
+ top: 0;
19
+ width: 100%;
20
+ height: 100%;
21
+ img {
22
+ width: 100%;
23
+ height: 100%;
24
+ }
25
+ }
26
+ }
27
+ }
@@ -0,0 +1,56 @@
1
+ <template>
2
+ <div
3
+ :style="{
4
+ width: Math.round(attributeJson.baseStyle.w * ratio) + 'px',
5
+ height: Math.round(attributeJson.baseStyle.h * ratio) + 'px',
6
+ left: Math.round(attributeJson.baseStyle.l * ratio) + 'px',
7
+ top: Math.round(attributeJson.baseStyle.t * ratio) + 'px'
8
+ }"
9
+ class="video-wrap"
10
+ >
11
+
12
+ <div v-if="videoItem.length !== 0">
13
+ <div class="entrance-con">
14
+ <div
15
+ :class="['video-con', `video-con-${sortId}`, animationInObj.type ? enterClass : '']"
16
+ :ref="`video${attributeJson.sort}`"
17
+ v-show="entranceShow"
18
+ :style="{
19
+ width: Math.round(attributeJson.baseStyle.w * ratio) + 'px',
20
+ height: Math.round(attributeJson.baseStyle.h * ratio) + 'px',
21
+ animationDuration: `${animationInObj.duration}s`
22
+ }">
23
+
24
+ <myVideoPlayer :sort="new Date().getTime()" :videoInfo="videoInfo" :autoPlay="autoPlay"></myVideoPlayer>
25
+ <!-- 热区图片 -->
26
+ <div class="hot-image" v-if="attributeJson.isVideoHasHot === 1 && videoHotPic.length != 0">
27
+ <img :src="videoHotPic[0].resourcePath" alt="" />
28
+ <hotspot
29
+ ref="hotspot"
30
+ v-bind="$attrs"
31
+ v-on="$listeners"
32
+ :componentType="3"
33
+ :item="hotData"
34
+ :ratio="ratio"
35
+ :envUrl="envUrl"
36
+ :language="language"
37
+ :recordId="recordId"
38
+ :sortId="sortId"
39
+ :path="path"
40
+ :brand="brand"
41
+ :uniqueName="attributeJson.uniqueName"></hotspot>
42
+ </div>
43
+ </div>
44
+ </div>
45
+ </div>
46
+ </div>
47
+ </template>
48
+
49
+ <script>
50
+ import videoItemJs from "./videoItem.js";
51
+ export default videoItemJs;
52
+ </script>
53
+
54
+ <style lang="scss" scoped>
55
+ @import "videoItem";
56
+ </style>
@@ -0,0 +1,2 @@
1
+ import videoPlayer from './videoPlayer.vue';
2
+ export default videoPlayer;
@@ -0,0 +1,69 @@
1
+ import videojs from "video.js"
2
+ export default {
3
+ name: 'videoPlayer',
4
+ props: {
5
+ videoInfo: {
6
+ type: Object,
7
+ default: () => {}
8
+ },
9
+ autoPlay: {
10
+ type: Boolean,
11
+ default: false
12
+ },
13
+ sort: {
14
+ type: Number,
15
+ default: 0
16
+ }
17
+ },
18
+ data() {
19
+ return {
20
+ isPlay: false, // 是否正在播放
21
+ }
22
+ },
23
+ watch: {
24
+ autoPlay: {
25
+ handler(n) {
26
+ if(this.player) {
27
+ if(n) {
28
+ this.player.play()
29
+ } else {
30
+ this.player.pause()
31
+ }
32
+ }
33
+ },
34
+ immediate: true,
35
+ deep: true
36
+ }
37
+ },
38
+ mounted() {
39
+ let that = this
40
+ setTimeout(()=>{
41
+ this.player = videojs(this.$refs[`myVideo-${this.sort}`], {}, function() {
42
+ this.on("play", () => {
43
+ that.isPlay = true
44
+ });
45
+ this.on("pause", () => {
46
+ that.isPlay = false
47
+ });
48
+ })
49
+ this.$nextTick(()=>{
50
+ this.play()
51
+ });
52
+ }, 50)
53
+
54
+ },
55
+ methods: {
56
+ play() {
57
+ if(this.videoInfo.list.length!=0 && this.autoPlay) {
58
+ this.player.play()
59
+ }
60
+ },
61
+ clickVideo() {
62
+ if (this.isPlay) {
63
+ this.player.pause();
64
+ } else {
65
+ this.player.play()
66
+ }
67
+ }
68
+ }
69
+ }
@@ -0,0 +1,37 @@
1
+ .video-item{
2
+ width: 100%!important;
3
+ height: 100%!important;
4
+ object-fit: cover;
5
+ }
6
+
7
+ .video-cover {
8
+ position: absolute;
9
+ width: 100%;
10
+ height: 100%;
11
+ top: 0;
12
+ left: 0;
13
+ }
14
+
15
+ .cover-btn {
16
+ position: absolute;
17
+ width: 80px;
18
+ height: 80px;
19
+ border-radius: 50%;
20
+ top: 50%;
21
+ left: 50%;
22
+ transform: translate(-50%, -50%);
23
+ background-color: rgba(0,0,0,0.6);
24
+ display: flex;
25
+ align-items: center;
26
+ justify-content: center;
27
+ }
28
+
29
+ .cover-btn .cms2iconfont{
30
+ color: #fff;
31
+ font-size: 32px;
32
+ }
33
+
34
+ .cover-btn .iconbofang {
35
+ position: relative;
36
+ left: 2px;
37
+ }
@@ -0,0 +1,34 @@
1
+ <template>
2
+ <div style="height: 100%;position: relative;">
3
+ <video
4
+ :ref="`myVideo-${sort}`"
5
+ preload="auto"
6
+ data-setup="{}"
7
+ x5-playsinline
8
+ x5-video-orientation="landscape|portrait"
9
+ x5-video-player-type="h5"
10
+ webkit-playsinline="true"
11
+ playsinline="true"
12
+ :controls="videoInfo.checkedAttr.indexOf('controls') > -1"
13
+ :autoplay="autoPlay"
14
+ :loop="videoInfo.checkedAttr.indexOf('loop') > -1"
15
+ muted
16
+ :poster="videoInfo.list.length != 0 ? videoInfo.list[0].imgUrl : ''"
17
+ class="video-js vjs-default-skin vjs-big-play-centered vjs-16-9 video-item"
18
+ >
19
+ <source
20
+ :src="videoInfo.list.length != 0 ? videoInfo.list[0].resourcePath : ''"
21
+ />
22
+ </video>
23
+ <div @click="clickVideo" class="video-cover"></div>
24
+ </div>
25
+ </template>
26
+
27
+ <script>
28
+ import videoPlayerJs from "./videoPlayer.js";
29
+ export default videoPlayerJs;
30
+ </script>
31
+
32
+ <style lang="scss" scoped>
33
+ @import "videoPlayer";
34
+ </style>
package/src/index.js ADDED
@@ -0,0 +1,26 @@
1
+ import Vue from 'vue'
2
+ import cms from './components/cms/'
3
+ import singleLayout from './components/cms/singleLayout/'
4
+
5
+ Vue.component('singleLayout', singleLayout)
6
+
7
+ const components = [
8
+ cms
9
+ ]
10
+
11
+ const install = function(Vue) {
12
+ // 判断是否安装
13
+ if (install.installed) return;
14
+ // 遍历注册全局组件
15
+ components.map(component => Vue.component(component.name, component));
16
+ };
17
+
18
+ export default {
19
+ install
20
+ // picNav
21
+ // banner
22
+ };
23
+
24
+ export {
25
+ cms
26
+ };