baiqiu-cms-decoration-dg 0.1.0 → 0.1.5
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.
- package/lib/baiqiu-cms-decoration-dg.common.js +90072 -0
- package/lib/baiqiu-cms-decoration-dg.css +7 -0
- package/lib/baiqiu-cms-decoration-dg.umd.js +90082 -0
- package/lib/baiqiu-cms-decoration-dg.umd.min.js +48 -0
- package/lib/demo.html +10 -0
- package/{dist/img/iconfont.654cc65b.svg → lib/img/iconfont.210a3a86.svg} +89 -89
- package/package.json +5 -10
- package/babel.config.js +0 -5
- package/dist/css/app.d43615c0.css +0 -1
- package/dist/css/chunk-vendors.ef1800aa.css +0 -7
- package/dist/favicon.ico +0 -0
- package/dist/index.html +0 -1
- package/dist/js/app.453dd14c.js +0 -2
- package/dist/js/app.453dd14c.js.map +0 -1
- package/dist/js/chunk-vendors.cfd53f93.js +0 -37
- package/dist/js/chunk-vendors.cfd53f93.js.map +0 -1
- package/public/favicon.ico +0 -0
- package/public/index.html +0 -17
- package/src/App.vue +0 -594
- package/src/api/com-service.js +0 -26
- package/src/assets/iconfont/demo.css +0 -539
- package/src/assets/iconfont/iconfont.css +0 -158
- package/src/assets/iconfont/iconfont.eot +0 -0
- package/src/assets/iconfont/iconfont.json +0 -254
- package/src/assets/iconfont/iconfont.svg +0 -89
- package/src/assets/iconfont/iconfont.ttf +0 -0
- package/src/assets/iconfont/iconfont.woff +0 -0
- package/src/assets/iconfont/iconfont.woff2 +0 -0
- package/src/assets/img/pc-cms-v2/creation.png +0 -0
- package/src/assets/img/pc-cms-v2/icon.png +0 -0
- package/src/assets/img/pc-cms-v2/mobileNav.png +0 -0
- package/src/assets/img/pc-cms-v2/next1.png +0 -0
- package/src/assets/img/pc-cms-v2/next2.png +0 -0
- package/src/assets/img/pc-cms-v2/prev1.png +0 -0
- package/src/assets/img/pc-cms-v2/prev2.png +0 -0
- package/src/assets/img/pc-cms-v2/text.png +0 -0
- package/src/components/cms/animate.scss +0 -19
- package/src/components/cms/buttonItem/buttonItem.js +0 -135
- package/src/components/cms/buttonItem/buttonItem.scss +0 -95
- package/src/components/cms/buttonItem/buttonItem.vue +0 -47
- package/src/components/cms/buttonItem/index.js +0 -2
- package/src/components/cms/cms.js +0 -104
- package/src/components/cms/cms.scss +0 -46
- package/src/components/cms/cms.vue +0 -51
- package/src/components/cms/customLayout/customLayout.js +0 -46
- package/src/components/cms/customLayout/customLayout.scss +0 -8
- package/src/components/cms/customLayout/customLayout.vue +0 -15
- package/src/components/cms/customLayout/index.js +0 -2
- package/src/components/cms/hotspot/hotspot.js +0 -200
- package/src/components/cms/hotspot/hotspot.scss +0 -20
- package/src/components/cms/hotspot/hotspot.vue +0 -35
- package/src/components/cms/hotspot/index.js +0 -2
- package/src/components/cms/imgNav/imgNav.js +0 -176
- package/src/components/cms/imgNav/imgNav.scss +0 -113
- package/src/components/cms/imgNav/imgNav.vue +0 -123
- package/src/components/cms/imgNav/index.js +0 -2
- package/src/components/cms/index.js +0 -2
- package/src/components/cms/mixin.js +0 -239
- package/src/components/cms/multipleLayout/index.js +0 -2
- package/src/components/cms/multipleLayout/multipleLayout.js +0 -54
- package/src/components/cms/multipleLayout/multipleLayout.scss +0 -21
- package/src/components/cms/multipleLayout/multipleLayout.vue +0 -25
- package/src/components/cms/productItem/index.js +0 -2
- package/src/components/cms/productItem/productItem.js +0 -290
- package/src/components/cms/productItem/productItem.scss +0 -180
- package/src/components/cms/productItem/productItem.vue +0 -117
- package/src/components/cms/singleLayout/index.js +0 -2
- package/src/components/cms/singleLayout/singleLayout.js +0 -63
- package/src/components/cms/singleLayout/singleLayout.scss +0 -21
- package/src/components/cms/singleLayout/singleLayout.vue +0 -42
- package/src/components/cms/slideLayout/index.js +0 -2
- package/src/components/cms/slideLayout/slideLayout.js +0 -248
- package/src/components/cms/slideLayout/slideLayout.scss +0 -18
- package/src/components/cms/slideLayout/slideLayout.vue +0 -44
- package/src/components/cms/swiperItem/index.js +0 -2
- package/src/components/cms/swiperItem/swiperItem.js +0 -228
- package/src/components/cms/swiperItem/swiperItem.scss +0 -204
- package/src/components/cms/swiperItem/swiperItem.vue +0 -123
- package/src/components/cms/tabLayout/index.js +0 -2
- package/src/components/cms/tabLayout/navItem/index.js +0 -2
- package/src/components/cms/tabLayout/navItem/navItem.js +0 -47
- package/src/components/cms/tabLayout/navItem/navItem.scss +0 -23
- package/src/components/cms/tabLayout/navItem/navItem.vue +0 -13
- package/src/components/cms/tabLayout/tabLayout.js +0 -158
- package/src/components/cms/tabLayout/tabLayout.scss +0 -26
- package/src/components/cms/tabLayout/tabLayout.vue +0 -43
- package/src/components/cms/textItem/index.js +0 -2
- package/src/components/cms/textItem/textItem.js +0 -65
- package/src/components/cms/textItem/textItem.scss +0 -41
- package/src/components/cms/textItem/textItem.vue +0 -26
- package/src/components/cms/utils.js +0 -101
- package/src/components/cms/videoItem/index.js +0 -2
- package/src/components/cms/videoItem/videoItem.js +0 -96
- package/src/components/cms/videoItem/videoItem.scss +0 -27
- package/src/components/cms/videoItem/videoItem.vue +0 -56
- package/src/components/cms/videoPlayer/index.js +0 -2
- package/src/components/cms/videoPlayer/videoPlayer.js +0 -68
- package/src/components/cms/videoPlayer/videoPlayer.scss +0 -37
- package/src/components/cms/videoPlayer/videoPlayer.vue +0 -34
- package/src/index.js +0 -23
- package/src/index.scss +0 -221
- package/src/main.js +0 -8
- package/src/utils/common.js +0 -23
- package/src/utils/http-client.js +0 -101
- package/src/utils/utils.js +0 -63
- package/webpack.config.js +0 -109
- /package/{dist → lib}/fonts/iconfont.529b3ed0.ttf +0 -0
- /package/{dist → lib}/fonts/iconfont.580c918e.eot +0 -0
- /package/{dist → lib}/fonts/iconfont.ea5b1aa2.woff +0 -0
@@ -1,204 +0,0 @@
|
|
1
|
-
.swiper-wrap {
|
2
|
-
position: absolute;
|
3
|
-
.swiper-con {
|
4
|
-
position: relative;
|
5
|
-
width: 100%;
|
6
|
-
height: 100%;
|
7
|
-
background-size: cover;
|
8
|
-
|
9
|
-
.entrance-con {
|
10
|
-
position: relative;
|
11
|
-
width: 100%;
|
12
|
-
height: 100%;
|
13
|
-
}
|
14
|
-
|
15
|
-
.swiper-container {
|
16
|
-
position: relative;
|
17
|
-
width: 100%;
|
18
|
-
height: 100%;
|
19
|
-
transform: translate3d(0, 0, 0);
|
20
|
-
overflow: hidden;
|
21
|
-
|
22
|
-
.swiper-slide {
|
23
|
-
transform: translate3d(0, 0, 0);
|
24
|
-
position: relative;
|
25
|
-
overflow: hidden;
|
26
|
-
&.slide-auto {
|
27
|
-
width: auto;
|
28
|
-
}
|
29
|
-
|
30
|
-
img {
|
31
|
-
object-fit: contain;
|
32
|
-
width: 100%;
|
33
|
-
height: 100%;
|
34
|
-
}
|
35
|
-
|
36
|
-
.swiper-hot {
|
37
|
-
position: absolute;
|
38
|
-
width: 100%;
|
39
|
-
height: 100%;
|
40
|
-
left: 0;
|
41
|
-
top: 0;
|
42
|
-
}
|
43
|
-
|
44
|
-
.video-player-con {
|
45
|
-
position: relative;
|
46
|
-
|
47
|
-
.video-item {
|
48
|
-
object-fit: cover;
|
49
|
-
position: relative;
|
50
|
-
width: 100%;
|
51
|
-
height: 100%;
|
52
|
-
}
|
53
|
-
|
54
|
-
.video-hot-image {
|
55
|
-
position: absolute;
|
56
|
-
top: 0;
|
57
|
-
left: 0;
|
58
|
-
width: 100%;
|
59
|
-
height: 100%;
|
60
|
-
|
61
|
-
img {
|
62
|
-
object-fit: fill;
|
63
|
-
width: 100%;
|
64
|
-
height: 100%;
|
65
|
-
}
|
66
|
-
}
|
67
|
-
}
|
68
|
-
}
|
69
|
-
|
70
|
-
// 轮播图左右指示器样式
|
71
|
-
.swiper-button-prev {
|
72
|
-
background-image: none;
|
73
|
-
left: 20px;
|
74
|
-
&:hover {
|
75
|
-
.cms2iconfont {
|
76
|
-
color: var(--hoverColor) !important;
|
77
|
-
}
|
78
|
-
}
|
79
|
-
&::after {
|
80
|
-
display: none;
|
81
|
-
}
|
82
|
-
|
83
|
-
.cms2iconfont {
|
84
|
-
font-size: 28px;
|
85
|
-
}
|
86
|
-
}
|
87
|
-
|
88
|
-
.swiper-button-next {
|
89
|
-
background-image: none;
|
90
|
-
right: 20px;
|
91
|
-
|
92
|
-
&:hover {
|
93
|
-
.cms2iconfont {
|
94
|
-
color: var(--hoverColor) !important;
|
95
|
-
}
|
96
|
-
}
|
97
|
-
|
98
|
-
&::after {
|
99
|
-
display: none;
|
100
|
-
}
|
101
|
-
|
102
|
-
.cms2iconfont {
|
103
|
-
font-size: 28px;
|
104
|
-
}
|
105
|
-
}
|
106
|
-
|
107
|
-
.swiper-scrollbar-own {
|
108
|
-
position: absolute;
|
109
|
-
height: 3px;
|
110
|
-
width: 70%;
|
111
|
-
left: 50%;
|
112
|
-
bottom: 10px;
|
113
|
-
background-color: var(--color);
|
114
|
-
transform: translateX(-50%);
|
115
|
-
z-index: 10;
|
116
|
-
.swiper-scrollbar-drag {
|
117
|
-
position: absolute;
|
118
|
-
background-color: var(--activeColor);
|
119
|
-
transition: all 0.3s;
|
120
|
-
}
|
121
|
-
}
|
122
|
-
|
123
|
-
.arrow {
|
124
|
-
width: 40px;
|
125
|
-
height: 40px;
|
126
|
-
background-color: #edf5fe;
|
127
|
-
border-radius: 50%;
|
128
|
-
display: flex;
|
129
|
-
align-items: center;
|
130
|
-
justify-content: center;
|
131
|
-
flex-shrink: 0;
|
132
|
-
|
133
|
-
.cms2iconfont {
|
134
|
-
font-size: 20px;
|
135
|
-
}
|
136
|
-
}
|
137
|
-
|
138
|
-
// 底部指示器
|
139
|
-
.swiper-pagination-custom {
|
140
|
-
position: absolute;
|
141
|
-
text-align: center;
|
142
|
-
transition: opacity .3s;
|
143
|
-
transform: translateZ(0);
|
144
|
-
bottom: 10px;
|
145
|
-
display: flex;
|
146
|
-
justify-content: center;
|
147
|
-
align-items: center;
|
148
|
-
z-index: 10;
|
149
|
-
|
150
|
-
.pagination-custom-bullt {
|
151
|
-
width: 8px;
|
152
|
-
height: 8px;
|
153
|
-
border-radius: 50%;
|
154
|
-
background-color: #000;
|
155
|
-
background-color: var(--color)!important;
|
156
|
-
margin: 0 4px;
|
157
|
-
transition: all 0.3s;
|
158
|
-
&.bullt-active {
|
159
|
-
background-color: #fff;
|
160
|
-
background-color: var(--activeColor)!important;
|
161
|
-
}
|
162
|
-
}
|
163
|
-
}
|
164
|
-
}
|
165
|
-
|
166
|
-
.swiper-container-3 {
|
167
|
-
.swiper-button-prev {
|
168
|
-
top: 84%;
|
169
|
-
left: 36px;
|
170
|
-
.cms2iconfont {
|
171
|
-
font-size: 24px;
|
172
|
-
}
|
173
|
-
}
|
174
|
-
|
175
|
-
.swiper-button-next {
|
176
|
-
top: 84%;
|
177
|
-
right: 0;
|
178
|
-
left: 98px;
|
179
|
-
.cms2iconfont {
|
180
|
-
font-size: 24px;
|
181
|
-
}
|
182
|
-
}
|
183
|
-
}
|
184
|
-
}
|
185
|
-
|
186
|
-
.swiper-con-mobile {
|
187
|
-
.swiper-container {
|
188
|
-
.arrow {
|
189
|
-
width: 32px;
|
190
|
-
height: 32px;
|
191
|
-
background-color: #edf5fe;
|
192
|
-
border-radius: 50%;
|
193
|
-
display: flex;
|
194
|
-
align-items: center;
|
195
|
-
justify-content: center;
|
196
|
-
flex-shrink: 0;
|
197
|
-
|
198
|
-
.cms2iconfont {
|
199
|
-
font-size: 12px !important;
|
200
|
-
}
|
201
|
-
}
|
202
|
-
}
|
203
|
-
}
|
204
|
-
}
|
@@ -1,123 +0,0 @@
|
|
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="swiper-wrap"
|
10
|
-
>
|
11
|
-
|
12
|
-
<div
|
13
|
-
v-if=" hasSwiperItem || (bgStyle.status === 1 && bgStyle.picList.length != 0)"
|
14
|
-
:style="{backgroundImage: bgStyle.picList.length != 0 ?`url(${bgStyle.picList[0].resourcePath})` : ''}"
|
15
|
-
:class="['swiper-con', `swiper-con-${mode}`]"
|
16
|
-
v-hoverAnimate
|
17
|
-
>
|
18
|
-
<div
|
19
|
-
class="entrance-con"
|
20
|
-
:style="{'--hoverColor': paginationStyle.hoverColor || paginationStyle.color, '--activeColor': paginationStyle.activeColor, '--color': paginationStyle.color, width: `${baseStyle.w* ratio}px`, height: `${baseStyle.h * ratio}px`}">
|
21
|
-
<div
|
22
|
-
:ref="`swiper${attributeJson.sort}`"
|
23
|
-
:class="[`swiper-container swiper-container-${sortId} swiper-container-${indicatorType}`, animationInObj.type ? enterClass : '']"
|
24
|
-
:style="{ animationDuration: `${animationInObj.duration}s` }"
|
25
|
-
:id="`mySwiper-${sortId}`"
|
26
|
-
:key="indicatorType"
|
27
|
-
v-show="entranceShow">
|
28
|
-
<div class="swiper-wrapper">
|
29
|
-
<div :class="['swiper-slide', {'slide-auto': isSpaceSwiper}]" v-for="(carousel, index) in swiperList" :key="carousel.sort+index">
|
30
|
-
<div :style="{width: `${(baseStyle.w - (styleType == 2 ? 100 : 0)) * ratio}px!important`, height: `${baseStyle.h * ratio}px`}">
|
31
|
-
<!-- 图片 -->
|
32
|
-
<img v-if="carousel.type === 1" :src="carousel.picList[0].resourcePath" :alt="carousel.picList[0].resourceName.split('.')[0]">
|
33
|
-
<!-- 视频 -->
|
34
|
-
<div class="video-player-con" v-if="carousel.type === 2">
|
35
|
-
<myVideoPlayer :sort="new Date().getTime()" :videoInfo="carousel.videoInfo" :autoPlay="carousel.videoInfo.checkedAttr.indexOf('autoPlay') > -1 && activeIndex == index"></myVideoPlayer>
|
36
|
-
|
37
|
-
<!-- 视频热区图片 -->
|
38
|
-
<div class="video-hot-image" v-if="carousel.type == 2 && carousel.isVideoHasHot == 1 && carousel.videoHotInfo.picList.length!=0">
|
39
|
-
<img :src="carousel.videoHotInfo.picList[0].resourcePath" :alt="carousel.videoHotInfo.picList[0].resourceName.split('.')[0]">
|
40
|
-
<div class="swiper-hot" v-if="carousel.videoHotInfo.picList.length!=0">
|
41
|
-
<hotspot
|
42
|
-
:ref="`hotspot${sortId}${index}`"
|
43
|
-
v-on="$listeners"
|
44
|
-
v-bind="$attrs"
|
45
|
-
:item="{realWidth: carousel.realWidth, realHeight: carousel.realHeight, popList: carousel.videoHotInfo.popList, width: carousel.videoHotInfo.picList[0].width, height: carousel.videoHotInfo.picList[0].height}"
|
46
|
-
:componentType="1"
|
47
|
-
:ratio="ratio"
|
48
|
-
:uniqueName="attributeJson.uniqueName"
|
49
|
-
:envUrl="envUrl"
|
50
|
-
:sortId="sortId"
|
51
|
-
:laySort="sort"
|
52
|
-
:path="path"
|
53
|
-
:brand="brand"
|
54
|
-
:prePosition="positionTotal[carousel.i]"
|
55
|
-
:recordId="recordId"></hotspot>
|
56
|
-
</div>
|
57
|
-
</div>
|
58
|
-
</div>
|
59
|
-
|
60
|
-
<template v-if="carousel.type == 1 && carousel.picList.length!=0">
|
61
|
-
<hotspot
|
62
|
-
:ref="`hotspot${sortId}${index}`"
|
63
|
-
v-on="$listeners"
|
64
|
-
v-bind="$attrs"
|
65
|
-
:item="carousel"
|
66
|
-
:ratio="ratio"
|
67
|
-
:componentType="1"
|
68
|
-
:uniqueName="attributeJson.uniqueName"
|
69
|
-
:path="path"
|
70
|
-
:envUrl="envUrl"
|
71
|
-
:sortId="sortId"
|
72
|
-
:brand="brand"
|
73
|
-
:prePosition="positionTotal[carousel.i]"
|
74
|
-
:recordId="recordId"></hotspot>
|
75
|
-
</template>
|
76
|
-
</div>
|
77
|
-
|
78
|
-
</div>
|
79
|
-
</div>
|
80
|
-
|
81
|
-
<!-- 滑动条 -->
|
82
|
-
<div v-if="hasScrollBar" class="swiper-scrollbar-own">
|
83
|
-
<div class="swiper-scrollbar-drag" :style="{width: `${100 / list.length}%`, left: `${(activeIndex > list.length) ? 0 : (100 / list.length * (activeIndex - 1))}%`}"></div>
|
84
|
-
</div>
|
85
|
-
|
86
|
-
<!-- 如果需要分页器 -->
|
87
|
-
<div v-if="hasSwiperPagination" class="swiper-pagination-custom">
|
88
|
-
<span v-for="(item,index) in list" @click="swiperSlide(index)" :key="index" :class="['pagination-custom-bullt', {'bullt-active': slideIndex == index}]"></span>
|
89
|
-
</div>
|
90
|
-
|
91
|
-
<!-- 如果需要导航按钮 -->
|
92
|
-
<template v-if="hasSwiperButton">
|
93
|
-
<div :class="['swiper-button-prev', `swiper-button-prev-${sortId}`]" >
|
94
|
-
<slot name="swiper-button-prev">
|
95
|
-
<div v-if="indicatorType == 2 || indicatorType == 3"><span :style="pageStyle" class="cms2iconfont iconleft"></span></div>
|
96
|
-
<div class="arrow" v-if="indicatorType == 4"><span :style="pageStyle" class="cms2iconfont iconarrow-left"></span></div>
|
97
|
-
</slot>
|
98
|
-
</div>
|
99
|
-
<div :class="['swiper-button-next', `swiper-button-next-${sortId}`]">
|
100
|
-
<slot name="swiper-button-next">
|
101
|
-
<div v-if="indicatorType == 2 || indicatorType == 3"><span :style="pageStyle" class="cms2iconfont iconright"></span></div>
|
102
|
-
<div class="arrow" v-if="indicatorType == 4"><span :style="pageStyle" class="cms2iconfont iconarrow-right"></span></div>
|
103
|
-
</slot>
|
104
|
-
</div>
|
105
|
-
</template>
|
106
|
-
</div>
|
107
|
-
</div>
|
108
|
-
|
109
|
-
<!-- 边框 -->
|
110
|
-
<div class="hover-con" v-if="animationHoverObj.type === 2" :style="[hoverStyle, {opacity: (hoverStyleShow? 1 : 0)}]"></div>
|
111
|
-
</div>
|
112
|
-
</div>
|
113
|
-
</template>
|
114
|
-
|
115
|
-
<script>
|
116
|
-
import swiperItemJs from "./swiperItem.js";
|
117
|
-
export default swiperItemJs;
|
118
|
-
</script>
|
119
|
-
|
120
|
-
<style lang="scss" scoped>
|
121
|
-
@import "swiperItem";
|
122
|
-
@import "../animate.scss";
|
123
|
-
</style>
|
@@ -1,47 +0,0 @@
|
|
1
|
-
export default {
|
2
|
-
name: 'navItem',
|
3
|
-
props: {
|
4
|
-
item: {
|
5
|
-
type: Object,
|
6
|
-
default: () => {}
|
7
|
-
},
|
8
|
-
active: {
|
9
|
-
type: Boolean,
|
10
|
-
default: false
|
11
|
-
},
|
12
|
-
navStyle: {
|
13
|
-
type: Object,
|
14
|
-
default: () => {}
|
15
|
-
},
|
16
|
-
spacing:{
|
17
|
-
type:[String,Number],
|
18
|
-
default:0
|
19
|
-
}
|
20
|
-
},
|
21
|
-
data() {
|
22
|
-
return {
|
23
|
-
|
24
|
-
}
|
25
|
-
},
|
26
|
-
watch: {
|
27
|
-
// item: {
|
28
|
-
// handler(val) {
|
29
|
-
// console.log('item', val);
|
30
|
-
// },
|
31
|
-
// immediate: true,
|
32
|
-
// deep: true
|
33
|
-
// }
|
34
|
-
},
|
35
|
-
computed: {
|
36
|
-
backStyle() {
|
37
|
-
let {item, active} = this
|
38
|
-
return {
|
39
|
-
backgroundColor: item.navStyle.type == 1 ? (active ? item.navStyle.activeColor: item.navStyle.backgroundColor) : '',
|
40
|
-
backgroundImage: item.navStyle.type == 2 ? (active ? `url('${item.navStyle.activeBackImage}')` : `url('${item.navStyle.backImage}')`) : ''
|
41
|
-
}
|
42
|
-
}
|
43
|
-
},
|
44
|
-
methods: {
|
45
|
-
|
46
|
-
}
|
47
|
-
}
|
@@ -1,23 +0,0 @@
|
|
1
|
-
.nav-item {
|
2
|
-
overflow: hidden;
|
3
|
-
text-overflow: ellipsis;
|
4
|
-
white-space: nowrap;
|
5
|
-
flex-shrink: 0;
|
6
|
-
display: flex;
|
7
|
-
align-items: center;
|
8
|
-
cursor: pointer;
|
9
|
-
transition: all 0.2s;
|
10
|
-
background-size: cover;
|
11
|
-
overflow: hidden;
|
12
|
-
&:last-child {
|
13
|
-
margin-right: 0;
|
14
|
-
}
|
15
|
-
|
16
|
-
&:hover {
|
17
|
-
color: var(--hoverColor)!important;
|
18
|
-
border-top: var(--hoverBorderTop)!important;
|
19
|
-
border-right: var(--hoverBorderRight)!important;
|
20
|
-
border-bottom: var(--hoverBorderBottom)!important;
|
21
|
-
border-left: var(--hoverBorderLeft)!important;
|
22
|
-
}
|
23
|
-
}
|
@@ -1,13 +0,0 @@
|
|
1
|
-
<template>
|
2
|
-
<div
|
3
|
-
class="nav-item"
|
4
|
-
:style="[navStyle, backStyle]"><span :style="{marginLeft:spacing+'px'}">{{item.title}}</span></div>
|
5
|
-
</template>
|
6
|
-
<script>
|
7
|
-
import navItemJs from './navItem.js';
|
8
|
-
export default navItemJs;
|
9
|
-
</script>
|
10
|
-
|
11
|
-
<style lang="scss" scoped>
|
12
|
-
@import 'navItem';
|
13
|
-
</style>
|
@@ -1,158 +0,0 @@
|
|
1
|
-
import navItem from './navItem/'
|
2
|
-
import singleLayout from '../singleLayout/'
|
3
|
-
export default {
|
4
|
-
name: 'tabLayout',
|
5
|
-
components: {
|
6
|
-
navItem,
|
7
|
-
singleLayout
|
8
|
-
},
|
9
|
-
props: {
|
10
|
-
layOutData: {
|
11
|
-
type: Object,
|
12
|
-
default: () => {}
|
13
|
-
},
|
14
|
-
ratio: {
|
15
|
-
type: Number,
|
16
|
-
default: 1
|
17
|
-
},
|
18
|
-
mode: {
|
19
|
-
type: String,
|
20
|
-
default: 'pc'
|
21
|
-
},
|
22
|
-
recordId: {
|
23
|
-
type: Number,
|
24
|
-
default: 0
|
25
|
-
}
|
26
|
-
},
|
27
|
-
data() {
|
28
|
-
return {
|
29
|
-
tabIndex: 0,
|
30
|
-
activeSort: '',
|
31
|
-
tabHeadTitleH: 0
|
32
|
-
}
|
33
|
-
},
|
34
|
-
computed: {
|
35
|
-
hasTab() {
|
36
|
-
return this.layOutData.list.some(item => {
|
37
|
-
return item.title
|
38
|
-
})
|
39
|
-
},
|
40
|
-
list() {
|
41
|
-
return this.layOutData.list
|
42
|
-
},
|
43
|
-
tabHeadInfo() {
|
44
|
-
return this.layOutData.tabHeadInfo
|
45
|
-
},
|
46
|
-
navStyle() {
|
47
|
-
let {
|
48
|
-
tabHeadInfo: { width, height, space },
|
49
|
-
borderStyle,
|
50
|
-
fontStyle: {
|
51
|
-
fontSize,
|
52
|
-
color,
|
53
|
-
fontWeight,
|
54
|
-
textDecoration,
|
55
|
-
fontItalic,
|
56
|
-
hoverObj: { color: _color }
|
57
|
-
}
|
58
|
-
} = this.layOutData
|
59
|
-
let { borderTop, borderRight, borderBottom, borderLeft, borderColor, hoverObj } = borderStyle
|
60
|
-
return function(index) {
|
61
|
-
return {
|
62
|
-
marginLeft: index == 0 && `${(this.mode=='pc' ? 30 : 60) * this.ratio}px`,
|
63
|
-
width: width * this.ratio + 'px',
|
64
|
-
height: height * this.ratio + 'px',
|
65
|
-
color: color,
|
66
|
-
fontSize,
|
67
|
-
fontWeight: fontWeight ? 'bold' : '',
|
68
|
-
textDecoration: textDecoration ? 'underline' : '',
|
69
|
-
fontStyle: fontItalic ? 'italic' : '',
|
70
|
-
marginRight: (index == this.list.length -1) ? `${(this.mode=='pc' ? 30 : 60) * this.ratio}px` : space * this.ratio + 'px',
|
71
|
-
borderTop: borderStyle.type === 2 && borderTop ? `1px solid ${borderTop}` : borderStyle.type === 1 && borderColor ? `1px solid ${borderColor}` : 'none',
|
72
|
-
borderRight: borderStyle.type === 2 && borderRight ? `1px solid ${borderRight}` : borderStyle.type === 1 && borderColor ? `1px solid ${borderColor}` : 'none',
|
73
|
-
borderBottom: borderStyle.type === 2 && borderBottom ? `1px solid ${borderBottom}` : borderStyle.type === 1 && borderColor ? `1px solid ${borderColor}` : 'none',
|
74
|
-
borderLeft: borderStyle.type === 2 && borderLeft ? `1px solid ${borderLeft}` : borderStyle.type === 1 && borderColor ? `1px solid ${borderColor}` : 'none',
|
75
|
-
'--hoverColor': _color,
|
76
|
-
'--hoverBorderTop': hoverObj.type === 2 && hoverObj.borderTop ? `1px solid ${hoverObj.borderTop}` : hoverObj.type === 1 && hoverObj.borderColor ? `1px solid ${hoverObj.borderColor}` : 'none',
|
77
|
-
'--hoverBorderRight':
|
78
|
-
hoverObj.type === 2 && hoverObj.borderRight ? `1px solid ${hoverObj.borderRight}` : hoverObj.type === 1 && hoverObj.borderColor ? `1px solid ${hoverObj.borderColor}` : 'none',
|
79
|
-
'--hoverBorderBottom':
|
80
|
-
hoverObj.type === 2 && hoverObj.borderBottom ? `1px solid ${hoverObj.borderBottom}` : hoverObj.type === 1 && hoverObj.borderColor ? `1px solid ${hoverObj.borderColor}` : 'none',
|
81
|
-
'--hoverBorderLeft':
|
82
|
-
hoverObj.type === 2 && hoverObj.borderLeft ? `1px solid ${hoverObj.borderLeft}` : hoverObj.type === 1 && hoverObj.borderColor ? `1px solid ${hoverObj.borderColor}` : 'none'
|
83
|
-
}
|
84
|
-
}
|
85
|
-
|
86
|
-
},
|
87
|
-
titleStyle() {
|
88
|
-
let {
|
89
|
-
tabHeadInfo: {
|
90
|
-
titleStyle: { fontSize, color, fontWeight, textDecoration, fontItalic }
|
91
|
-
}
|
92
|
-
} = this.layOutData
|
93
|
-
return {
|
94
|
-
color: color,
|
95
|
-
fontSize,
|
96
|
-
fontWeight: fontWeight ? 'bold' : '',
|
97
|
-
textDecoration: textDecoration ? 'underline' : '',
|
98
|
-
fontStyle: fontItalic ? 'italic' : '',
|
99
|
-
paddingLeft: `${(this.mode == 'pc' ? 30 : 60) * this.ratio}px`,
|
100
|
-
paddingBottom: `${(this.mode == 'pc' ? 40 : 80) * this.ratio}px`
|
101
|
-
}
|
102
|
-
}
|
103
|
-
},
|
104
|
-
watch: {
|
105
|
-
'layOutData.tabHeadInfo': {
|
106
|
-
handler: function() {
|
107
|
-
this.$nextTick(() => {
|
108
|
-
this.tabHeadTitleH = this.layOutData.tabHeadInfo.showTitle == 2 ? (this.$refs['tabHeadTitleDom'] ? this.$refs['tabHeadTitleDom'].clientHeight : 0) : 0
|
109
|
-
this.setLayoutH()
|
110
|
-
})
|
111
|
-
},
|
112
|
-
immediate: true,
|
113
|
-
deep: true
|
114
|
-
},
|
115
|
-
'list.length': {
|
116
|
-
handler: function() {
|
117
|
-
//当导航变化时, 判断当前选中的选项及选中的索引
|
118
|
-
let ind = this.list.findIndex((item) => {
|
119
|
-
return item.sort == this.activeSort
|
120
|
-
})
|
121
|
-
if (ind > -1) {
|
122
|
-
this.tabIndex = ind
|
123
|
-
} else {
|
124
|
-
this.tabIndex = this.tabIndex > 0 ? this.tabIndex - 1 : 0
|
125
|
-
this.activeSort = this.list[this.tabIndex].sort
|
126
|
-
}
|
127
|
-
},
|
128
|
-
deep: true
|
129
|
-
},
|
130
|
-
hasTab: {
|
131
|
-
handler: function(val) {
|
132
|
-
if (val) {
|
133
|
-
this.activeSort = this.list[0].sort
|
134
|
-
this.tabIndex = 0
|
135
|
-
}
|
136
|
-
}
|
137
|
-
}
|
138
|
-
},
|
139
|
-
methods: {
|
140
|
-
chooseTab(item, index) {
|
141
|
-
this.activeSort = item.sort
|
142
|
-
this.tabIndex = index
|
143
|
-
this.setLayoutH()
|
144
|
-
this.$emit('updateLayOut', { sort: this.layOutData.sort })
|
145
|
-
setTimeout(()=>{
|
146
|
-
this.reportData(this.h)
|
147
|
-
},0)
|
148
|
-
},
|
149
|
-
setLayoutH: function() {
|
150
|
-
this.$set(this.layOutData.layoutStyle, 'height', this.layOutData.list[this.tabIndex].height * 1 + this.layOutData.tabHeadInfo.height * 1 + (this.tabHeadTitleH * 1) / this.ratio)
|
151
|
-
},
|
152
|
-
reportData(h) {
|
153
|
-
this.h = h
|
154
|
-
let ref = this.$refs.tabSingle
|
155
|
-
ref && ref.reportData(this.h)
|
156
|
-
}
|
157
|
-
}
|
158
|
-
}
|
@@ -1,26 +0,0 @@
|
|
1
|
-
.tab-layout{
|
2
|
-
width: 100%;
|
3
|
-
height: 100%;
|
4
|
-
overflow: hidden;
|
5
|
-
position: relative;
|
6
|
-
.tab-con {
|
7
|
-
position: relative;
|
8
|
-
width: 100%;
|
9
|
-
height: 100%;
|
10
|
-
}
|
11
|
-
.tab-detail {
|
12
|
-
overflow: hidden;
|
13
|
-
.tab-list {
|
14
|
-
overflow: auto;
|
15
|
-
position: relative;
|
16
|
-
.tab-line {
|
17
|
-
display: flex;
|
18
|
-
align-items: center;
|
19
|
-
width: max-content
|
20
|
-
}
|
21
|
-
&::-webkit-scrollbar {
|
22
|
-
display: none;
|
23
|
-
}
|
24
|
-
}
|
25
|
-
}
|
26
|
-
}
|
@@ -1,43 +0,0 @@
|
|
1
|
-
<template>
|
2
|
-
<div class="tab-layout">
|
3
|
-
<div v-if="hasTab" class="tab-detail tab-con">
|
4
|
-
<div>
|
5
|
-
<div v-if="tabHeadInfo.showTitle == 2" :style="titleStyle" ref="tabHeadTitleDom">
|
6
|
-
<span>{{ tabHeadInfo.customTitle == 1 ? tabHeadInfo.title : list[tabIndex].title }}</span>
|
7
|
-
</div>
|
8
|
-
<div class="tab-list">
|
9
|
-
<div class="tab-line">
|
10
|
-
<navItem
|
11
|
-
v-for="(item, index) in list"
|
12
|
-
:key="index"
|
13
|
-
@click.native="chooseTab(item, index)"
|
14
|
-
:item="item"
|
15
|
-
:ratio="ratio"
|
16
|
-
:mode="mode"
|
17
|
-
:spacing="layOutData.fontStyle.spacing * ratio"
|
18
|
-
:active="tabIndex == index"
|
19
|
-
:navStyle="navStyle(index)"
|
20
|
-
></navItem>
|
21
|
-
</div>
|
22
|
-
</div>
|
23
|
-
<div
|
24
|
-
:style="{
|
25
|
-
height: list[tabIndex].height * ratio + 'px'
|
26
|
-
}"
|
27
|
-
class="tab-content"
|
28
|
-
>
|
29
|
-
<singleLayout ref="tabSingle" v-bind="$attrs" v-on="$listeners" :layOutData="list[tabIndex]" :componentList="list[tabIndex].componentList" :ratio="ratio" :recordId="recordId" :mode="mode"></singleLayout>
|
30
|
-
</div>
|
31
|
-
</div>
|
32
|
-
</div>
|
33
|
-
</div>
|
34
|
-
</template>
|
35
|
-
|
36
|
-
<script>
|
37
|
-
import tabLayoutJs from './tabLayout.js'
|
38
|
-
export default tabLayoutJs
|
39
|
-
</script>
|
40
|
-
|
41
|
-
<style lang="scss" scoped>
|
42
|
-
@import 'tabLayout';
|
43
|
-
</style>
|