jufubao-base 1.0.310 → 1.0.311-beta101
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/package.json +1 -1
- package/src/components/JfbBaseBlock/Attr.js +167 -34
- package/src/components/JfbBaseBlock/JfbBaseBlock.vue +12 -9
- package/src/components/JfbBaseEntry/Attr.js +5 -72
- package/src/components/JfbBaseEntry/JfbBaseEntry.vue +183 -47
- package/src/components/JfbBaseEntry/cusAttr/content.js +77 -0
- package/src/components/JfbBaseEntry/cusAttr/style.js +288 -0
- package/src/components/JfbBaseImageBlock/Attr.js +150 -23
- package/src/components/JfbBaseImageBlock/JfbBaseImageBlock.vue +29 -27
- package/src/components/JfbBaseNotice/Attr.js +5 -512
- package/src/components/JfbBaseNotice/JfbBaseNotice.vue +188 -181
- package/src/components/JfbBaseNotice/cusAttr/content.js +308 -0
- package/src/components/JfbBaseNotice/cusAttr/cssOne.js +395 -0
- package/src/components/JfbBaseNotice/cusAttr/cssThree.js +101 -0
- package/src/components/JfbBaseNotice/cusAttr/cssTwo.js +208 -0
- package/src/components/JfbBaseNotice/cusAttr/style.js +31 -0
- package/src/components/JfbBaseVideo/Attr.js +5 -297
- package/src/components/JfbBaseVideo/JfbBaseVideo.vue +36 -62
- package/src/components/JfbBaseVideo/cusAttr/content.js +236 -0
- package/src/components/JfbBaseVideo/cusAttr/image.js +213 -0
- package/src/components/JfbBaseVideo/cusAttr/style.js +172 -0
|
@@ -13,30 +13,40 @@
|
|
|
13
13
|
<view class="jfb-base-entry__edit-icon" @click="delEdit">删除</view>
|
|
14
14
|
</view>
|
|
15
15
|
<!-- #endif -->
|
|
16
|
-
<view class="jfb-base-entry__body"
|
|
17
|
-
<view
|
|
18
|
-
|
|
19
|
-
|
|
16
|
+
<view class="jfb-base-entry__body">
|
|
17
|
+
<view class="x-line"></view>
|
|
18
|
+
<view :style="[contStyleComp]">
|
|
19
|
+
<view
|
|
20
|
+
v-if="entryList === null"
|
|
21
|
+
class="entry_list skeleton-wrap"
|
|
22
|
+
:class="{rowNum1: rowNum ===1,rowNum2: rowNum ===2,rowNum3: rowNum ===3}"
|
|
23
|
+
>
|
|
24
|
+
<view
|
|
25
|
+
v-for="i in 5"
|
|
26
|
+
:key="i"
|
|
20
27
|
:class="'row_num_'+rowNum"
|
|
21
28
|
class="entry_item"
|
|
29
|
+
:style="[entryItemSkeStyleComp]"
|
|
22
30
|
>
|
|
23
|
-
<image v-if="rowNum == 1" style="height: 260rpx;"/>
|
|
24
|
-
<image v-if="rowNum == 2" style="height: 200rpx;"/>
|
|
25
|
-
<image v-if="rowNum == 3" style="height: 150rpx;"/>
|
|
26
31
|
</view>
|
|
27
32
|
</view>
|
|
28
|
-
<view
|
|
33
|
+
<view
|
|
34
|
+
v-else
|
|
35
|
+
class="entry_list"
|
|
36
|
+
:class="{rowNum1: rowNum ===1,rowNum2: rowNum ===2,rowNum3: rowNum ===3}"
|
|
37
|
+
>
|
|
29
38
|
<view
|
|
39
|
+
:style="[entryItemStyleComp]"
|
|
30
40
|
v-if="entryList.length > 0"
|
|
31
41
|
v-for="(item,i) in entryList"
|
|
32
42
|
:key="i"
|
|
33
43
|
class="entry_item"
|
|
34
|
-
:class="'row_num_'+rowNum"
|
|
44
|
+
:class="'row_num_'+ rowNum"
|
|
35
45
|
@click="toLink(item)"
|
|
36
46
|
>
|
|
37
|
-
<image v-if="rowNum
|
|
38
|
-
<image v-if="rowNum
|
|
39
|
-
<image v-if="rowNum
|
|
47
|
+
<image v-if="rowNum === 1" :src="item.image_url" mode="widthFix"/>
|
|
48
|
+
<image v-if="rowNum === 2" :src="item.image_url2" mode="widthFix"/>
|
|
49
|
+
<image v-if="rowNum === 3" :src="item.image_url3" mode="widthFix"/>
|
|
40
50
|
</view>
|
|
41
51
|
<xd-no-data
|
|
42
52
|
icon-type="empty"
|
|
@@ -53,7 +63,7 @@
|
|
|
53
63
|
import XdFontIcon from "@/components/XdFontIcon/XdFontIcon";
|
|
54
64
|
import { jfbRootExec } from "@/utils/xd.event";
|
|
55
65
|
import JfbBaseEntryMixin from "./JfbBaseEntryMixin";
|
|
56
|
-
import {
|
|
66
|
+
import { gCPVal } from "@/utils/xd.base";
|
|
57
67
|
import componentsMixins from "@/mixins/componentsMixins";
|
|
58
68
|
import extsMixins from "@/mixins/extsMixins";
|
|
59
69
|
import getServiceUrl from "@/common/getServiceUrl";
|
|
@@ -70,61 +80,147 @@
|
|
|
70
80
|
],
|
|
71
81
|
data() {
|
|
72
82
|
return {
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
83
|
+
closeMask: true,
|
|
84
|
+
entryList: null,
|
|
85
|
+
height: 0,
|
|
86
|
+
width: 0,
|
|
87
|
+
|
|
88
|
+
//content
|
|
89
|
+
rowNum: 1, //列数
|
|
79
90
|
entryType: '',
|
|
91
|
+
|
|
92
|
+
//style
|
|
93
|
+
radius:0,
|
|
94
|
+
bgcolor: "", //背景色
|
|
95
|
+
bgImage:{}, //背景图
|
|
96
|
+
paddingInput: 20, //间距
|
|
97
|
+
margin: {}, //边距
|
|
98
|
+
contRadius:0,//圆角
|
|
99
|
+
padding:{},//填充
|
|
80
100
|
}
|
|
81
101
|
},
|
|
82
102
|
computed: {
|
|
83
103
|
...mapState(['brandInfo']),
|
|
84
|
-
|
|
85
|
-
|
|
104
|
+
contStyleComp(){
|
|
105
|
+
let marginTB = this.getPMValue(this.margin, 'TB', 0);
|
|
106
|
+
let paddingTB = this.getPMValue(this.padding, 'TB', 0);
|
|
107
|
+
let bodyMinHeight = this.layoutInfo.bodyMinHeightRpx - (marginTB + paddingTB)
|
|
108
|
+
let url = {};
|
|
109
|
+
if(this.bgImage && this.bgImage.url) {
|
|
110
|
+
url = {
|
|
111
|
+
backgroundImage: `url(${getServiceUrl(this.bgImage.url)})`,
|
|
112
|
+
backgroundSize: '100%',
|
|
113
|
+
backgroundRepeat: 'repeat-y',
|
|
114
|
+
backgroundPosition: 'top center'
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
return {
|
|
86
118
|
backgroundColor: this.bgcolor,
|
|
87
|
-
minHeight:
|
|
88
|
-
|
|
119
|
+
minHeight: bodyMinHeight + 'rpx',
|
|
120
|
+
margin: this.getMarginAndPadding(this.margin, 0),
|
|
121
|
+
padding: this.getMarginAndPadding(this.padding, 0),
|
|
122
|
+
borderRadius: this.radius + 'rpx',
|
|
123
|
+
...url
|
|
124
|
+
}
|
|
89
125
|
},
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
126
|
+
getWidthComp(){
|
|
127
|
+
let marginRL = this.getPMValue(this.margin, 'RL', 0);
|
|
128
|
+
let paddingRL = this.getPMValue(this.padding, 'RL', 0);
|
|
129
|
+
return (750 - (Number(this.paddingInput)*(this.rowNum-1) + marginRL + paddingRL)) / this.rowNum
|
|
130
|
+
},
|
|
131
|
+
getMarginRight(){
|
|
132
|
+
let marginRight = 0;
|
|
133
|
+
if([2,3].includes(this.rowNum)) marginRight = this.paddingInput + 'rpx';
|
|
134
|
+
return marginRight
|
|
96
135
|
},
|
|
97
|
-
|
|
98
|
-
let
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
136
|
+
entryItemSkeStyleComp(){
|
|
137
|
+
let width = this.getWidthComp
|
|
138
|
+
let height = '260rpx';
|
|
139
|
+
if([2,3].includes(this.rowNum)) height = '300rpx';
|
|
140
|
+
return {
|
|
141
|
+
borderRadius: this.contRadius + 'rpx',
|
|
142
|
+
marginTop: this.paddingInput + 'rpx',
|
|
143
|
+
marginRight: this.getMarginRight,
|
|
144
|
+
height,
|
|
145
|
+
width: width + 'rpx'
|
|
146
|
+
}
|
|
147
|
+
},
|
|
148
|
+
entryItemStyleComp(){
|
|
149
|
+
let width = this.getWidthComp
|
|
150
|
+
return {
|
|
151
|
+
borderRadius: this.contRadius + 'rpx',
|
|
152
|
+
marginTop: this.paddingInput + 'rpx',
|
|
153
|
+
width: width + 'rpx',
|
|
154
|
+
marginRight: this.getMarginRight,
|
|
155
|
+
height: width * this.height/this.width + 'rpx',
|
|
156
|
+
overflow: 'hidden'
|
|
157
|
+
}
|
|
103
158
|
}
|
|
104
159
|
},
|
|
105
160
|
watch: {
|
|
106
161
|
container(value,oldValue) {
|
|
107
162
|
if(JSON.stringify(value) === JSON.stringify(oldValue)) return;
|
|
108
|
-
if (this.$configProject['isPreview'])
|
|
163
|
+
if (this.$configProject['isPreview']) {
|
|
164
|
+
this.init(value);
|
|
165
|
+
this.onJfbLoad()
|
|
166
|
+
}
|
|
109
167
|
},
|
|
110
168
|
},
|
|
111
169
|
created() {
|
|
112
170
|
this.init(this.container);
|
|
113
171
|
},
|
|
114
172
|
methods: {
|
|
115
|
-
onJfbLoad(
|
|
173
|
+
onJfbLoad() {
|
|
116
174
|
this.getEntrySetting();
|
|
117
175
|
},
|
|
176
|
+
|
|
177
|
+
getImageInfo(entryList){
|
|
178
|
+
return new Promise((resolve,reject)=>{
|
|
179
|
+
let heightAll = 0,widthAll = 0, counter = 0, allCouter = 0;
|
|
180
|
+
let len = entryList.length;
|
|
181
|
+
entryList.map(item=>{
|
|
182
|
+
let imgUrl = item['image_url'];
|
|
183
|
+
if(this.rowNum === 2) imgUrl = item['image_url2'];
|
|
184
|
+
if(this.rowNum === 3) imgUrl = item['image_url3'];
|
|
185
|
+
uni.getImageInfo({
|
|
186
|
+
src:imgUrl,
|
|
187
|
+
success:({width,height})=>{
|
|
188
|
+
heightAll += height;
|
|
189
|
+
widthAll += width;
|
|
190
|
+
allCouter++;
|
|
191
|
+
counter++;
|
|
192
|
+
if(len === allCouter){
|
|
193
|
+
resolve({height:heightAll/counter, width: widthAll/counter})
|
|
194
|
+
}
|
|
195
|
+
},fail:()=>{
|
|
196
|
+
allCouter++;
|
|
197
|
+
if(len === allCouter){
|
|
198
|
+
resolve({height:heightAll/counter, width: widthAll/counter})
|
|
199
|
+
}
|
|
200
|
+
}
|
|
201
|
+
})
|
|
202
|
+
})
|
|
203
|
+
})
|
|
204
|
+
},
|
|
205
|
+
|
|
118
206
|
/**
|
|
119
207
|
* @description 监听事件变化
|
|
120
208
|
* @param container {object} 业务组件对象自己
|
|
121
209
|
*/
|
|
122
210
|
init(container) {
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
this.
|
|
126
|
-
this.
|
|
127
|
-
|
|
211
|
+
|
|
212
|
+
//content
|
|
213
|
+
this.rowNum = gCPVal(container, 'rowNum', 1);
|
|
214
|
+
this.entryType = gCPVal(container, 'entryType', 'default');
|
|
215
|
+
|
|
216
|
+
//style
|
|
217
|
+
this.bgcolor = gCPVal(container, 'bgcolor', 'rgba(0,0,0,0)',{sKey:'bgStatus',fields:['bgcolor','bgImage']});
|
|
218
|
+
this.bgImage = gCPVal(container, 'bgImage', {},{sKey:'bgStatus',fields:['bgcolor','bgImage']});
|
|
219
|
+
this.paddingInput = gCPVal(container, 'paddingInput', [16,20], {sKey:'paddingInputStatus',fields:['paddingInput'] });
|
|
220
|
+
this.margin = gCPVal(container, 'margin', 0, {sKey: 'marginStatus',fields:['margin'], isPMR: true});
|
|
221
|
+
this.padding = gCPVal(container, 'padding', 0, {sKey: 'paddingStatus',fields:['padding'], isPMR: true});
|
|
222
|
+
this.contRadius = gCPVal(container, 'contRadius', [this.gStyleValue.radius,0],{sKey: 'contRadiusStatus', fields: ['contRadius']})||0;
|
|
223
|
+
this.radius = gCPVal(container, 'radius', [this.gStyleValue.radius,0],{sKey: 'radiusStatus', fields: ['radius']})||0;
|
|
128
224
|
},
|
|
129
225
|
|
|
130
226
|
getCardPath(custom_redirect_data = {}){
|
|
@@ -152,6 +248,7 @@
|
|
|
152
248
|
else return null;
|
|
153
249
|
//#endif
|
|
154
250
|
},
|
|
251
|
+
|
|
155
252
|
getEntrySetting(){
|
|
156
253
|
this.$xdShowLoading({});
|
|
157
254
|
jfbRootExec("getEntrySetting", {
|
|
@@ -159,8 +256,7 @@
|
|
|
159
256
|
data: {
|
|
160
257
|
group_id:this.entryType || 'default'
|
|
161
258
|
}
|
|
162
|
-
}).then(res => {
|
|
163
|
-
this.loadingList = false;
|
|
259
|
+
}).then(async (res) => {
|
|
164
260
|
this.$xdHideLoading();
|
|
165
261
|
let isH5FilterEntryList = [];
|
|
166
262
|
let isMpFilterEntryList = [];
|
|
@@ -226,6 +322,11 @@
|
|
|
226
322
|
return item;
|
|
227
323
|
});
|
|
228
324
|
|
|
325
|
+
//获取平均高度
|
|
326
|
+
let {width, height} = await this.getImageInfo(entryList);
|
|
327
|
+
this.width = width;
|
|
328
|
+
this.height = height;
|
|
329
|
+
|
|
229
330
|
//#ifdef MP-WEIXIN
|
|
230
331
|
console.warn(`微信小程序端被过滤的入口列表:${JSON.stringify(isMpFilterEntryList.map(item=> `${item.redirect_data.appType}:${item.entry_name}:${item.redirect_data['frontPath']}`),null,2)}`)
|
|
231
332
|
//#endif
|
|
@@ -239,15 +340,18 @@
|
|
|
239
340
|
this.toLink(entryList[0]);
|
|
240
341
|
return
|
|
241
342
|
}
|
|
343
|
+
|
|
242
344
|
//无数据提示
|
|
243
345
|
if(res.list.length === 0) {
|
|
244
346
|
this.$xdAlert({content: '当前票券暂无支持服务'})
|
|
245
347
|
return;
|
|
246
348
|
}
|
|
349
|
+
|
|
247
350
|
//复制
|
|
248
|
-
this.entryList = entryList;
|
|
351
|
+
this.entryList = entryList || [];
|
|
249
352
|
})
|
|
250
353
|
},
|
|
354
|
+
|
|
251
355
|
toLink(item){
|
|
252
356
|
let path = "";
|
|
253
357
|
try{
|
|
@@ -271,11 +375,43 @@
|
|
|
271
375
|
|
|
272
376
|
<style scoped lang="less">
|
|
273
377
|
@import "./JfbBaseEntryLess.less";
|
|
274
|
-
|
|
378
|
+
//:class="{rowNum1: rowNum ===1,rowNum2: rowNum ===2,rowNum3: rowNum ===3}"
|
|
275
379
|
.jfb-base-entry {
|
|
276
380
|
&__body{
|
|
277
381
|
.entry_list{
|
|
278
|
-
|
|
382
|
+
&.rowNum1 {
|
|
383
|
+
& >view:first-child {
|
|
384
|
+
margin-top: 0!important;
|
|
385
|
+
}
|
|
386
|
+
}
|
|
387
|
+
&.rowNum2,&.rowNum3 {
|
|
388
|
+
display: flex;
|
|
389
|
+
justify-content: flex-start;
|
|
390
|
+
align-items: center;
|
|
391
|
+
flex-flow: wrap;
|
|
392
|
+
}
|
|
393
|
+
|
|
394
|
+
&.rowNum2 {
|
|
395
|
+
& > view:nth-child(1),& > view:nth-child(2) {
|
|
396
|
+
margin-top: 0!important;
|
|
397
|
+
}
|
|
398
|
+
}
|
|
399
|
+
|
|
400
|
+
&.rowNum2 > view:nth-child(2n) {
|
|
401
|
+
margin-right: 0!important;
|
|
402
|
+
}
|
|
403
|
+
|
|
404
|
+
&.rowNum3 > view:nth-child(3n) {
|
|
405
|
+
margin-right: 0!important;
|
|
406
|
+
}
|
|
407
|
+
&.rowNum3 {
|
|
408
|
+
& > view:nth-child(1),
|
|
409
|
+
& > view:nth-child(2),
|
|
410
|
+
& > view:nth-child(3) {
|
|
411
|
+
margin-top: 0!important;
|
|
412
|
+
}
|
|
413
|
+
}
|
|
414
|
+
|
|
279
415
|
&.skeleton-wrap{
|
|
280
416
|
.entry_item{
|
|
281
417
|
.skeleton-item(100%, auto);
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
import {dataVal} from "@/utils/AttrTools";
|
|
4
|
+
|
|
5
|
+
export default (data, gValue, gColor, oldData)=>{
|
|
6
|
+
let entryType = 'default'
|
|
7
|
+
if(data['entryType'] !== undefined) entryType = data['entryType']
|
|
8
|
+
|
|
9
|
+
let rowNum = 1;
|
|
10
|
+
if(data['rowNum'] !== undefined) rowNum = data['rowNum'];
|
|
11
|
+
|
|
12
|
+
return[
|
|
13
|
+
{
|
|
14
|
+
ele: 'title',
|
|
15
|
+
label: '基础',
|
|
16
|
+
size: 'small',
|
|
17
|
+
groupKey:'content',
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
label: '入口分组',
|
|
21
|
+
ele: 'xd-site-select-list',
|
|
22
|
+
valueKey: 'entryType',
|
|
23
|
+
value: entryType,
|
|
24
|
+
placeholder: '请选择综合入口分组',
|
|
25
|
+
multiple: false,
|
|
26
|
+
groupKey:'content',
|
|
27
|
+
className: 'input100',
|
|
28
|
+
labelInline:true,
|
|
29
|
+
rules: [
|
|
30
|
+
{required: true, message: '请选择综合入口分组', trigger: ['blur', 'change']}
|
|
31
|
+
],
|
|
32
|
+
handleCustom({action, data}) {
|
|
33
|
+
XdBus.getParentApi('getEntryGroupOption')({key: Date.now()})
|
|
34
|
+
.then(res => {
|
|
35
|
+
debugger
|
|
36
|
+
data.cb(res.list)
|
|
37
|
+
})
|
|
38
|
+
.catch(error => {
|
|
39
|
+
console.error(error);
|
|
40
|
+
});
|
|
41
|
+
},
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
ele: 'title',
|
|
45
|
+
label: '组件样式',
|
|
46
|
+
size: 'small',
|
|
47
|
+
groupKey:'content',
|
|
48
|
+
},
|
|
49
|
+
|
|
50
|
+
{
|
|
51
|
+
label: "组件样式",
|
|
52
|
+
ele: "xd-style-image",
|
|
53
|
+
groupKey: 'content',
|
|
54
|
+
valueKey: "rowNum",
|
|
55
|
+
value: rowNum,
|
|
56
|
+
labelInline:true,
|
|
57
|
+
className: 'input100',
|
|
58
|
+
handleCustom(cusRes) {
|
|
59
|
+
XdBus.getParentApi('getCompStylesOptions')({
|
|
60
|
+
layout_ids: 'gXd7Z5uu31nJpfZzlFgYz',
|
|
61
|
+
key: Date.now()
|
|
62
|
+
})
|
|
63
|
+
.then(res => {
|
|
64
|
+
res.list = res.list.map(item => {
|
|
65
|
+
item.value = Number(item.value)
|
|
66
|
+
return item;
|
|
67
|
+
})
|
|
68
|
+
cusRes.data.cb(res)
|
|
69
|
+
})
|
|
70
|
+
.catch(error => {
|
|
71
|
+
console.error(error);
|
|
72
|
+
});
|
|
73
|
+
},
|
|
74
|
+
},
|
|
75
|
+
|
|
76
|
+
].filter(i=>i)
|
|
77
|
+
}
|
|
@@ -0,0 +1,288 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
import {
|
|
3
|
+
dataVal ,
|
|
4
|
+
statusShow,
|
|
5
|
+
statusDataVal,
|
|
6
|
+
customVal,
|
|
7
|
+
cusDisabled ,
|
|
8
|
+
getCustomAttr,
|
|
9
|
+
} from "@/utils/AttrTools";
|
|
10
|
+
|
|
11
|
+
export default function (data, gValue, gColor, oldData) {
|
|
12
|
+
const width = 750, height = 1334;
|
|
13
|
+
return [
|
|
14
|
+
{
|
|
15
|
+
ele: 'title',
|
|
16
|
+
label: '常规',
|
|
17
|
+
size: 'small',
|
|
18
|
+
groupKey:'style',
|
|
19
|
+
},
|
|
20
|
+
|
|
21
|
+
{
|
|
22
|
+
label: '外边距',
|
|
23
|
+
ele: 'xd-radio',
|
|
24
|
+
groupKey: 'style',
|
|
25
|
+
valueKey: 'marginStatus',
|
|
26
|
+
value: statusDataVal({data, key:'marginStatus', fields:['margin'],gValue}),
|
|
27
|
+
labelInline:true,
|
|
28
|
+
list: [
|
|
29
|
+
{label: '默认', value: 'D'},
|
|
30
|
+
{label: '自定义', value: 'C'},
|
|
31
|
+
]
|
|
32
|
+
},
|
|
33
|
+
{ele: 'group_start'},
|
|
34
|
+
{
|
|
35
|
+
label: '',
|
|
36
|
+
ele: 'xd-margin-padding',
|
|
37
|
+
groupKey:'style',
|
|
38
|
+
valueKey: 'margin',
|
|
39
|
+
value: dataVal({
|
|
40
|
+
data,
|
|
41
|
+
key:'margin',
|
|
42
|
+
dValue:0,
|
|
43
|
+
gValue,
|
|
44
|
+
isPM: true,
|
|
45
|
+
}),
|
|
46
|
+
hidden: !statusShow({data, key: 'marginStatus', fields:['margin'], gValue}),
|
|
47
|
+
setting: {
|
|
48
|
+
type: 'margin',
|
|
49
|
+
},
|
|
50
|
+
},
|
|
51
|
+
{ele: 'group_end'},
|
|
52
|
+
|
|
53
|
+
{
|
|
54
|
+
label: '圆角',
|
|
55
|
+
ele: 'xd-radio',
|
|
56
|
+
groupKey: 'style',
|
|
57
|
+
valueKey: 'radiusStatus',
|
|
58
|
+
value: statusDataVal({data, key:'radiusStatus', fields:['radius'],gValue}),
|
|
59
|
+
labelInline:true,
|
|
60
|
+
list: [
|
|
61
|
+
{label: '默认', value: 'D'},
|
|
62
|
+
{label: '无圆角', value: 'N'},
|
|
63
|
+
{label: '自定义', value: 'C'},
|
|
64
|
+
]
|
|
65
|
+
},
|
|
66
|
+
{ele: 'group_start'},
|
|
67
|
+
{
|
|
68
|
+
label: '',
|
|
69
|
+
ele: 'xd-site-select-list',
|
|
70
|
+
labelInline: true,
|
|
71
|
+
valueKey: 'radius',
|
|
72
|
+
value: dataVal({data, key:'radius', dValue:'10', gValue}),
|
|
73
|
+
hidden: !statusShow({data, key: 'radiusStatus', fields:['radius'], gValue}),
|
|
74
|
+
placeholder: '请选择图标圆角',
|
|
75
|
+
multiple: false,
|
|
76
|
+
className: 'input80',
|
|
77
|
+
groupKey:'style',
|
|
78
|
+
handleCustom({action, data}) {
|
|
79
|
+
XdBus.getParentApi('getOptionsSettingList')({
|
|
80
|
+
setting_id: 'edtix_style_radius',
|
|
81
|
+
key: Date.now()
|
|
82
|
+
})
|
|
83
|
+
.then(res => {
|
|
84
|
+
let list = (res.list || [])
|
|
85
|
+
.filter(item=>{
|
|
86
|
+
return item.label !== '无'
|
|
87
|
+
});
|
|
88
|
+
data.cb(list)
|
|
89
|
+
})
|
|
90
|
+
.catch(error => {
|
|
91
|
+
console.error(error);
|
|
92
|
+
});
|
|
93
|
+
},
|
|
94
|
+
},
|
|
95
|
+
{ele: 'group_end'},
|
|
96
|
+
|
|
97
|
+
{
|
|
98
|
+
ele: 'title',
|
|
99
|
+
label: '內容区',
|
|
100
|
+
size: 'small',
|
|
101
|
+
groupKey:'style',
|
|
102
|
+
},
|
|
103
|
+
{
|
|
104
|
+
label: '内容区背景',
|
|
105
|
+
ele: 'xd-radio',
|
|
106
|
+
groupKey: 'style',
|
|
107
|
+
valueKey: 'bgStatus',
|
|
108
|
+
value: statusDataVal({data, key:'bgStatus', fields:['bgcolor','bgImage'],gValue}),
|
|
109
|
+
labelInline:true,
|
|
110
|
+
list: [
|
|
111
|
+
{label: '默认', value: 'D'},
|
|
112
|
+
{label: '自定义', value: 'C'},
|
|
113
|
+
]
|
|
114
|
+
},
|
|
115
|
+
{ele: 'group_start'},
|
|
116
|
+
{
|
|
117
|
+
label: '背景色',
|
|
118
|
+
ele: 'xd-color',
|
|
119
|
+
valueKey: 'bgcolor',
|
|
120
|
+
labelInline:true,
|
|
121
|
+
value: dataVal({data, key:'bgcolor', dValue:'rgba(0,0,0,0)', gValue}),
|
|
122
|
+
hidden: !statusShow({data, key: 'bgStatus', fields:['bgcolor','bgImage'], gValue}),
|
|
123
|
+
groupKey: 'style',
|
|
124
|
+
placeholder: '请输入背景颜色',
|
|
125
|
+
classNmae: 'input80',
|
|
126
|
+
},
|
|
127
|
+
{
|
|
128
|
+
label: '背景图',
|
|
129
|
+
ele: 'xd-upload',
|
|
130
|
+
labelInline: true,
|
|
131
|
+
valueKey: 'bgImage',
|
|
132
|
+
value: dataVal({
|
|
133
|
+
data,
|
|
134
|
+
key: 'bgImage',
|
|
135
|
+
dValue: {},
|
|
136
|
+
gValue,
|
|
137
|
+
}),
|
|
138
|
+
defaultValue: dataVal({
|
|
139
|
+
data,
|
|
140
|
+
key: 'bgImage',
|
|
141
|
+
dValue: {},
|
|
142
|
+
gValue,
|
|
143
|
+
}),
|
|
144
|
+
slot: true,
|
|
145
|
+
tipsformet: `<span style="font-size: 12px; color: #999">上传文件格式:@imageType@,不超过@size@MB.,建议宽度为:<span style="color:red">${width}*${height}</span></span>`,
|
|
146
|
+
type: ['jpg', 'png', 'jpeg'],
|
|
147
|
+
styleType: 'one',
|
|
148
|
+
uploadType: 'aliyun',
|
|
149
|
+
hidden: !statusShow({ data, key: 'bgStatus', fields: ['bgcolor', 'bgImage'], gValue }),
|
|
150
|
+
oneWidth: 200,
|
|
151
|
+
oneHeight: 200*height/width,
|
|
152
|
+
size: 5,
|
|
153
|
+
action: 'aliyun',
|
|
154
|
+
groupKey: 'style',
|
|
155
|
+
},
|
|
156
|
+
{ele: 'group_end'},
|
|
157
|
+
|
|
158
|
+
{
|
|
159
|
+
label: '内容区边距',
|
|
160
|
+
ele: 'xd-radio',
|
|
161
|
+
groupKey: 'style',
|
|
162
|
+
valueKey: 'paddingStatus',
|
|
163
|
+
value: statusDataVal({data, key:'paddingStatus', fields:['padding'],gValue}),
|
|
164
|
+
labelInline:true,
|
|
165
|
+
list: [
|
|
166
|
+
{label: '默认', value: 'D'},
|
|
167
|
+
{label: '自定义', value: 'C'},
|
|
168
|
+
]
|
|
169
|
+
},
|
|
170
|
+
{ele: 'group_start'},
|
|
171
|
+
{
|
|
172
|
+
label: '',
|
|
173
|
+
ele: 'xd-margin-padding',
|
|
174
|
+
groupKey:'style',
|
|
175
|
+
valueKey: 'padding',
|
|
176
|
+
value: dataVal({
|
|
177
|
+
data,
|
|
178
|
+
key:'padding',
|
|
179
|
+
dValue:0,
|
|
180
|
+
gValue,
|
|
181
|
+
isPM: true,
|
|
182
|
+
}),
|
|
183
|
+
hidden: !statusShow({data, key: 'paddingStatus', fields:['padding'], gValue}),
|
|
184
|
+
setting: {
|
|
185
|
+
type: 'margin',
|
|
186
|
+
},
|
|
187
|
+
},
|
|
188
|
+
{ele: 'group_end'},
|
|
189
|
+
|
|
190
|
+
{
|
|
191
|
+
label: '内容间距',
|
|
192
|
+
ele: 'xd-radio',
|
|
193
|
+
groupKey: 'style',
|
|
194
|
+
valueKey: 'paddingInputStatus',
|
|
195
|
+
value: statusDataVal({data, key:'paddingInputStatus', fields:['paddingInput'],gValue}),
|
|
196
|
+
labelInline:true,
|
|
197
|
+
list: [
|
|
198
|
+
{label: '默认', value: 'D'},
|
|
199
|
+
{label: '自定义', value: 'C'},
|
|
200
|
+
]
|
|
201
|
+
},
|
|
202
|
+
{ele: 'group_start'},
|
|
203
|
+
{
|
|
204
|
+
label: "",
|
|
205
|
+
groupKey: 'style',
|
|
206
|
+
ele: 'xd-slider',
|
|
207
|
+
valueKey: "paddingInput",
|
|
208
|
+
value: dataVal({data, key:'paddingInput', dValue:gValue.isFirst && gValue.isAdd ? 16: 20, gValue}),
|
|
209
|
+
hidden: !statusShow({data, key: 'paddingInputStatus', fields:['paddingInput'], gValue}),
|
|
210
|
+
className: "input80",
|
|
211
|
+
labelInline: true,
|
|
212
|
+
setting:{
|
|
213
|
+
min: 0,
|
|
214
|
+
max: 60,
|
|
215
|
+
step:1,
|
|
216
|
+
showStops:false,
|
|
217
|
+
showInput:false,
|
|
218
|
+
}
|
|
219
|
+
},
|
|
220
|
+
{ele: 'group_end'},
|
|
221
|
+
|
|
222
|
+
{
|
|
223
|
+
label: '内容圆角',
|
|
224
|
+
ele: 'xd-radio',
|
|
225
|
+
groupKey: 'style',
|
|
226
|
+
valueKey: 'contRadiusStatus',
|
|
227
|
+
value: statusDataVal({data, key:'contRadiusStatus', fields:['contRadius'],gValue}),
|
|
228
|
+
labelInline:true,
|
|
229
|
+
list: [
|
|
230
|
+
{label: '默认', value: 'D'},
|
|
231
|
+
{label: '无圆角', value: 'N'},
|
|
232
|
+
{label: '自定义', value: 'C'},
|
|
233
|
+
]
|
|
234
|
+
},
|
|
235
|
+
{ele: 'group_start'},
|
|
236
|
+
{
|
|
237
|
+
label: '',
|
|
238
|
+
ele: 'xd-site-select-list',
|
|
239
|
+
labelInline: true,
|
|
240
|
+
valueKey: 'contRadius',
|
|
241
|
+
value: dataVal({data, key:'contRadius', dValue:'10', gValue}),
|
|
242
|
+
hidden: !statusShow({data, key: 'contRadiusStatus', fields:['contRadius'], gValue}),
|
|
243
|
+
placeholder: '请选择图标圆角',
|
|
244
|
+
multiple: false,
|
|
245
|
+
className: 'input80',
|
|
246
|
+
groupKey:'style',
|
|
247
|
+
handleCustom({action, data}) {
|
|
248
|
+
XdBus.getParentApi('getOptionsSettingList')({
|
|
249
|
+
setting_id: 'edtix_style_radius',
|
|
250
|
+
key: Date.now()
|
|
251
|
+
})
|
|
252
|
+
.then(res => {
|
|
253
|
+
let list = (res.list || [])
|
|
254
|
+
.filter(item=>{
|
|
255
|
+
return item.label !== '无'
|
|
256
|
+
});
|
|
257
|
+
data.cb(list)
|
|
258
|
+
})
|
|
259
|
+
.catch(error => {
|
|
260
|
+
console.error(error);
|
|
261
|
+
});
|
|
262
|
+
},
|
|
263
|
+
},
|
|
264
|
+
{ele: 'group_end'},
|
|
265
|
+
|
|
266
|
+
|
|
267
|
+
|
|
268
|
+
{
|
|
269
|
+
label: '版本号:',
|
|
270
|
+
ele: 'el-input',
|
|
271
|
+
type: 'text',
|
|
272
|
+
groupKey: 'content',
|
|
273
|
+
valueKey: 'version',
|
|
274
|
+
value: 'v2.0',
|
|
275
|
+
hidden: true,
|
|
276
|
+
},
|
|
277
|
+
{
|
|
278
|
+
label: '过滤引用模版字段:',
|
|
279
|
+
ele: 'el-input',
|
|
280
|
+
type: 'text',
|
|
281
|
+
groupKey: 'content',
|
|
282
|
+
valueKey: 'refFilterKey',
|
|
283
|
+
value: '[]',
|
|
284
|
+
hidden: true,
|
|
285
|
+
},
|
|
286
|
+
].filter(i=>i);
|
|
287
|
+
}
|
|
288
|
+
|