jufubao-base 1.0.311-beta101 → 1.0.311-beta3
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 +34 -167
- package/src/components/JfbBaseBlock/JfbBaseBlock.vue +9 -12
- package/src/components/JfbBaseCardDetail/Attr.js +12 -0
- package/src/components/JfbBaseCardDetail/JfbBaseCardDetail.vue +162 -1
- package/src/components/JfbBaseCardDetailEntry/Attr.js +12 -0
- package/src/components/JfbBaseCardDetailEntry/JfbBaseCardDetailEntry.vue +163 -2
- package/src/components/JfbBaseCardInfo/JfbBaseCardInfo.vue +2 -2
- package/src/components/JfbBaseCardInfoEntry/JfbBaseCardInfoEntry.vue +3 -3
- package/src/components/JfbBaseEntry/Attr.js +72 -5
- package/src/components/JfbBaseEntry/JfbBaseEntry.vue +47 -183
- package/src/components/JfbBaseImageBlock/Attr.js +23 -150
- package/src/components/JfbBaseImageBlock/JfbBaseImageBlock.vue +27 -29
- package/src/components/JfbBaseNotice/Attr.js +512 -5
- package/src/components/JfbBaseNotice/JfbBaseNotice.vue +181 -188
- package/src/components/JfbBaseVideo/Attr.js +297 -5
- package/src/components/JfbBaseVideo/JfbBaseVideo.vue +62 -36
- package/src/components/JfbBaseEntry/cusAttr/content.js +0 -77
- package/src/components/JfbBaseEntry/cusAttr/style.js +0 -288
- package/src/components/JfbBaseNotice/cusAttr/content.js +0 -308
- package/src/components/JfbBaseNotice/cusAttr/cssOne.js +0 -395
- package/src/components/JfbBaseNotice/cusAttr/cssThree.js +0 -101
- package/src/components/JfbBaseNotice/cusAttr/cssTwo.js +0 -208
- package/src/components/JfbBaseNotice/cusAttr/style.js +0 -31
- package/src/components/JfbBaseVideo/cusAttr/content.js +0 -236
- package/src/components/JfbBaseVideo/cusAttr/image.js +0 -213
- package/src/components/JfbBaseVideo/cusAttr/style.js +0 -172
|
@@ -1,17 +1,309 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
import
|
|
4
|
-
import style from "./cusAttr/style";
|
|
3
|
+
import console from "@dcloudio/uni-h5/src/core/helpers/console";
|
|
5
4
|
|
|
6
5
|
/**
|
|
7
6
|
* @description 当表单组件中有联动操作时候,使用方法进行返回
|
|
8
7
|
*/
|
|
9
8
|
export default {
|
|
10
9
|
style:[],
|
|
11
|
-
content:(
|
|
10
|
+
content:(params)=>{
|
|
11
|
+
let size = {width:750};
|
|
12
|
+
let video = {
|
|
13
|
+
size: Object.assign({},(params.video && params.video.size),size),
|
|
14
|
+
type:'1',
|
|
15
|
+
position: Object.assign({},params.video && params.video.position)
|
|
16
|
+
};
|
|
12
17
|
return [
|
|
13
|
-
|
|
14
|
-
|
|
18
|
+
{
|
|
19
|
+
label: '视频位置配置:',
|
|
20
|
+
ele: 'xd-site-poster',
|
|
21
|
+
valueKey: 'video',
|
|
22
|
+
groupKey:'content',
|
|
23
|
+
className: 'input80',
|
|
24
|
+
value:video,
|
|
25
|
+
setting: {
|
|
26
|
+
count: 1,
|
|
27
|
+
scene: {label: '视频', value: 'video'},
|
|
28
|
+
sizeDisabled: {
|
|
29
|
+
wDisabled:true,
|
|
30
|
+
hDisabled: false,
|
|
31
|
+
},
|
|
32
|
+
typeDisabled: true
|
|
33
|
+
},
|
|
34
|
+
handleCustom({action, data}) {
|
|
35
|
+
//设置场景参数
|
|
36
|
+
if(data) {
|
|
37
|
+
data.params = Object.assign({}, {scene: 'video'}, data.params || {})
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
//获取显示内容
|
|
41
|
+
if (action === 'screenList') {
|
|
42
|
+
XdBus.getParentApi('getOptionsSettingList')({setting_id: 'editx_base_ad_split_screen'})
|
|
43
|
+
.then(res => {
|
|
44
|
+
data.cb(res['list'])
|
|
45
|
+
})
|
|
46
|
+
.catch(error => {
|
|
47
|
+
console.error(error);
|
|
48
|
+
});
|
|
49
|
+
return
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
//获取返回参数(广告位高度必选项)
|
|
53
|
+
if (action === 'getPosterInfo') {
|
|
54
|
+
XdBus.getParentApi('cmsGetPublishEditxContent')(data.params)
|
|
55
|
+
.then(res => {
|
|
56
|
+
data.cb({list: res.list, selectId: res.selected})
|
|
57
|
+
})
|
|
58
|
+
.catch(error => {
|
|
59
|
+
console.error(error);
|
|
60
|
+
});
|
|
61
|
+
return
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
//使用内容分类
|
|
65
|
+
if (action === 'cmsPublishEditxContent') {
|
|
66
|
+
XdBus.getParentApi('cmsPublishEditxContent')(data.params)
|
|
67
|
+
.then(res => {
|
|
68
|
+
data.cb(res)
|
|
69
|
+
})
|
|
70
|
+
.catch(error => {
|
|
71
|
+
console.error(error);
|
|
72
|
+
});
|
|
73
|
+
return
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
let loading = XdBus.getParentApi('loading')({});
|
|
77
|
+
//位置列表
|
|
78
|
+
if (action === 'getListPostion') {
|
|
79
|
+
XdBus.getParentApi('getListPosterPosition')(data.params)
|
|
80
|
+
.then(res => {
|
|
81
|
+
loading.close();
|
|
82
|
+
data.cb(res)
|
|
83
|
+
})
|
|
84
|
+
.catch(error => {
|
|
85
|
+
loading.close();
|
|
86
|
+
console.error(error);
|
|
87
|
+
});
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
//位置创建
|
|
91
|
+
if (action === 'addPostion') {
|
|
92
|
+
XdBus.getParentApi('addPosterPosition')(data.params)
|
|
93
|
+
.then(res => {
|
|
94
|
+
loading.close();
|
|
95
|
+
data.cb(true)
|
|
96
|
+
})
|
|
97
|
+
.catch(error => {
|
|
98
|
+
console.error(error);
|
|
99
|
+
loading.close();
|
|
100
|
+
data.cb(false)
|
|
101
|
+
});
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
//位置编辑
|
|
105
|
+
if (action === 'editPostion') {
|
|
106
|
+
XdBus.getParentApi('updatePosterPosition')(data.params)
|
|
107
|
+
.then(res => {
|
|
108
|
+
loading.close();
|
|
109
|
+
data.cb(true)
|
|
110
|
+
})
|
|
111
|
+
.catch(error => {
|
|
112
|
+
console.error(error);
|
|
113
|
+
loading.close();
|
|
114
|
+
data.cb(false)
|
|
115
|
+
});
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
//位置删除
|
|
119
|
+
if (action === 'deleltePostion') {
|
|
120
|
+
XdBus.getParentApi('deletePosterPosition')(data.params)
|
|
121
|
+
.then(res => {
|
|
122
|
+
loading.close();
|
|
123
|
+
data.cb(true)
|
|
124
|
+
})
|
|
125
|
+
.catch(error => {
|
|
126
|
+
console.error(error);
|
|
127
|
+
loading.close();
|
|
128
|
+
data.cb(false)
|
|
129
|
+
});
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
//获取广告位内容列表
|
|
133
|
+
if (action === 'getListContent') {
|
|
134
|
+
XdBus.getParentApi('getListPosterContent')(data.params)
|
|
135
|
+
.then(res => {
|
|
136
|
+
loading.close();
|
|
137
|
+
data.cb(res)
|
|
138
|
+
})
|
|
139
|
+
.catch(error => {
|
|
140
|
+
loading.close();
|
|
141
|
+
console.error(error);
|
|
142
|
+
});
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
//广告内容创建
|
|
146
|
+
if (action === 'addContent') {
|
|
147
|
+
XdBus.getParentApi('addPosterContent')(data.params)
|
|
148
|
+
.then(res => {
|
|
149
|
+
loading.close();
|
|
150
|
+
data.cb(true)
|
|
151
|
+
})
|
|
152
|
+
.catch(error => {
|
|
153
|
+
console.error(error);
|
|
154
|
+
loading.close();
|
|
155
|
+
data.cb(false)
|
|
156
|
+
});
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
//广告内容编辑
|
|
160
|
+
if (action === 'editContent') {
|
|
161
|
+
XdBus.getParentApi('updatePosterContent')(data.params)
|
|
162
|
+
.then(res => {
|
|
163
|
+
loading.close();
|
|
164
|
+
data.cb(true)
|
|
165
|
+
})
|
|
166
|
+
.catch(error => {
|
|
167
|
+
console.error(error);
|
|
168
|
+
loading.close();
|
|
169
|
+
data.cb(false)
|
|
170
|
+
});
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
//广告内容删除
|
|
174
|
+
if (action === 'deleteContent') {
|
|
175
|
+
XdBus.getParentApi('deletePosterContent')(data.params)
|
|
176
|
+
.then(res => {
|
|
177
|
+
loading.close();
|
|
178
|
+
data.cb(true)
|
|
179
|
+
})
|
|
180
|
+
.catch(error => {
|
|
181
|
+
console.error(error);
|
|
182
|
+
loading.close();
|
|
183
|
+
data.cb(false)
|
|
184
|
+
});
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
//获取广告内容跳转地址类型
|
|
188
|
+
if (action === 'jumpPosterContentType') {
|
|
189
|
+
XdBus.getParentApi('getOptionsSettingList')({setting_id: "cms_setting"})
|
|
190
|
+
.then(res => {
|
|
191
|
+
loading.close();
|
|
192
|
+
data.cb(res['redirect_type'])
|
|
193
|
+
})
|
|
194
|
+
.catch(error => {
|
|
195
|
+
loading.close();
|
|
196
|
+
console.error(error);
|
|
197
|
+
});
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
//发布
|
|
201
|
+
if (action === 'publish') {
|
|
202
|
+
console.log('publish', data.params)
|
|
203
|
+
XdBus.getParentApi('cmsPublishContent')(data.params)
|
|
204
|
+
.then(res => {
|
|
205
|
+
loading.close();
|
|
206
|
+
data.cb(res)
|
|
207
|
+
})
|
|
208
|
+
.catch(error => {
|
|
209
|
+
loading.close();
|
|
210
|
+
console.error(error);
|
|
211
|
+
});
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
//获取站内页面地址
|
|
215
|
+
if (action === 'router') {
|
|
216
|
+
loading.close()
|
|
217
|
+
return XdBus.getParentApi('getPagesTree');
|
|
218
|
+
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
//通知页面进行刷新
|
|
222
|
+
if(action === 'update') {
|
|
223
|
+
XdBus.getParentApi('getXdBusUpdateView')('onUpdateView', {});
|
|
224
|
+
loading.close()
|
|
225
|
+
}
|
|
226
|
+
},
|
|
227
|
+
rules: [
|
|
228
|
+
{
|
|
229
|
+
required: true,
|
|
230
|
+
validator: (rule, value, callback) => {
|
|
231
|
+
let message = '请设置视频位置相关内容';
|
|
232
|
+
if(!value) {
|
|
233
|
+
callback(message);
|
|
234
|
+
return;
|
|
235
|
+
}
|
|
236
|
+
if(value.size && !value.size.height){
|
|
237
|
+
callback(message);
|
|
238
|
+
return
|
|
239
|
+
}
|
|
240
|
+
// if(value.position && (!value.position['position_name'] || !value.position['position_id'])) {
|
|
241
|
+
// callback(message);
|
|
242
|
+
// return
|
|
243
|
+
// }
|
|
244
|
+
callback()
|
|
245
|
+
},trigger: ['blur', 'change']
|
|
246
|
+
}
|
|
247
|
+
],
|
|
248
|
+
},
|
|
249
|
+
{
|
|
250
|
+
label: '背景颜色:',
|
|
251
|
+
ele: 'xd-color',
|
|
252
|
+
valueKey: 'bgColor',
|
|
253
|
+
groupKey:'style',
|
|
254
|
+
value: params.bgColor || '',
|
|
255
|
+
placeholder: '请选择背景颜色',
|
|
256
|
+
classNmae: 'input80',
|
|
257
|
+
},
|
|
258
|
+
{
|
|
259
|
+
label: '内容圆角设置:',
|
|
260
|
+
ele: 'xd-site-select-list',
|
|
261
|
+
valueKey: 'radius',
|
|
262
|
+
groupKey:'style',
|
|
263
|
+
value: params['radius'] || '0',
|
|
264
|
+
placeholder: '请选择内容圆角设置',
|
|
265
|
+
multiple: false,
|
|
266
|
+
className: 'input60',
|
|
267
|
+
handleCustom({action, data}) {
|
|
268
|
+
XdBus.getParentApi('getOptionsSettingList')({
|
|
269
|
+
setting_id: 'edtix_style_radius',
|
|
270
|
+
key: Date.now()
|
|
271
|
+
})
|
|
272
|
+
.then(res => {
|
|
273
|
+
data.cb(res.list)
|
|
274
|
+
})
|
|
275
|
+
.catch(error => {
|
|
276
|
+
console.error(error);
|
|
277
|
+
});
|
|
278
|
+
},
|
|
279
|
+
},
|
|
280
|
+
{
|
|
281
|
+
label: '视频位边距设置:',
|
|
282
|
+
ele: 'xd-margin-padding',
|
|
283
|
+
valueKey: 'margin',
|
|
284
|
+
groupKey:'style',
|
|
285
|
+
value: params.margin || null,
|
|
286
|
+
setting: {
|
|
287
|
+
type: 'margin',
|
|
288
|
+
},
|
|
289
|
+
placeholder: '请设置视频位边距设置',
|
|
290
|
+
inline: false,
|
|
291
|
+
notice: '设置内边距,<span style="color: red">单位:像素</span>。默认值:<span style="color: red">0</span>像素',
|
|
292
|
+
},
|
|
293
|
+
{
|
|
294
|
+
label: '视频位填充设置:',
|
|
295
|
+
ele: 'xd-margin-padding',
|
|
296
|
+
valueKey: 'padding',
|
|
297
|
+
groupKey:'style',
|
|
298
|
+
value: params.padding || null,
|
|
299
|
+
setting: {
|
|
300
|
+
type: 'padding',
|
|
301
|
+
},
|
|
302
|
+
placeholder: '请设置视频位填充设置',
|
|
303
|
+
inline: false,
|
|
304
|
+
notice: '设置填充设置,<span style="color: red">单位:像素</span>。默认值:<span style="color: red">0</span>像素',
|
|
305
|
+
},
|
|
306
|
+
|
|
15
307
|
].filter(i=>i)
|
|
16
308
|
},
|
|
17
309
|
advanced: [
|
|
@@ -18,12 +18,19 @@
|
|
|
18
18
|
<view
|
|
19
19
|
v-if="isShow"
|
|
20
20
|
class="x-video"
|
|
21
|
-
:style="
|
|
21
|
+
:style="{
|
|
22
|
+
backgroundColor:bgColor,
|
|
23
|
+
margin:outMargin,
|
|
24
|
+
borderRadius:radius + 'rpx',
|
|
25
|
+
padding:outPadding,
|
|
26
|
+
width: contentWidth + 'rpx',
|
|
27
|
+
height:contentHeight + 'rpx'
|
|
28
|
+
}"
|
|
22
29
|
>
|
|
23
30
|
<xd-video
|
|
24
|
-
v-if="
|
|
31
|
+
v-if="video !== null && video !== ''"
|
|
25
32
|
:key="videoKey"
|
|
26
|
-
:poster="
|
|
33
|
+
:poster="videoSetting"
|
|
27
34
|
:video="video"
|
|
28
35
|
></xd-video>
|
|
29
36
|
<view class="not-video" v-if="isPreview && video === ''">
|
|
@@ -40,7 +47,7 @@
|
|
|
40
47
|
import JfbBaseVideoMixin from "./JfbBaseVideoMixin";
|
|
41
48
|
import componentsMixins from "@/mixins/componentsMixins";
|
|
42
49
|
import extsMixins from "@/mixins/extsMixins"
|
|
43
|
-
import {
|
|
50
|
+
import { getContainerPropsValue } from "@/utils/xd.base";
|
|
44
51
|
import XdVideo from "./XdVideo.vue";
|
|
45
52
|
|
|
46
53
|
|
|
@@ -52,46 +59,60 @@
|
|
|
52
59
|
mixins: [componentsMixins,extsMixins,JfbBaseVideoMixin],
|
|
53
60
|
data() {
|
|
54
61
|
return {
|
|
55
|
-
closeMask: true,
|
|
56
62
|
isPreview: false,
|
|
57
63
|
page_size: 1,
|
|
64
|
+
options:{},
|
|
58
65
|
|
|
59
|
-
|
|
60
|
-
video: null,
|
|
61
|
-
|
|
62
|
-
videoConf: null, //视频配置
|
|
63
|
-
|
|
64
|
-
//样式
|
|
66
|
+
//data
|
|
67
|
+
video: null,
|
|
68
|
+
videoSetting: null,
|
|
65
69
|
margin:{},
|
|
66
70
|
padding:{},
|
|
67
|
-
height:
|
|
68
|
-
width:
|
|
69
|
-
bgColor:'
|
|
71
|
+
height:0,
|
|
72
|
+
width:750,
|
|
73
|
+
bgColor:'',
|
|
70
74
|
radius:0,
|
|
75
|
+
videoKey : Date.now(),
|
|
71
76
|
}
|
|
72
77
|
},
|
|
73
78
|
computed: {
|
|
74
|
-
boxStyleComp(){
|
|
75
|
-
return {
|
|
76
|
-
backgroundColor: this.bgColor,
|
|
77
|
-
borderRadius: this.radius + 'rpx',
|
|
78
|
-
margin: this.getMarginAndPadding(this.margin, 0),
|
|
79
|
-
padding: this.getMarginAndPadding(this.padding, 0),
|
|
80
|
-
width: this.contentWidth + 'rpx',
|
|
81
|
-
height: this.contentHeight + 'rpx'
|
|
82
|
-
}
|
|
83
|
-
},
|
|
84
79
|
isShow(){
|
|
85
80
|
if(this.isPreview) return true;
|
|
86
81
|
else return this.video
|
|
87
82
|
},
|
|
83
|
+
iconFont(){
|
|
84
|
+
if(this.autoplay === 'N') return 'iconplayright'
|
|
85
|
+
if(this.autoplay === 'E') return 'iconshibai';
|
|
86
|
+
if(this.autoplay === 'R') return 'iconplayreplay';
|
|
87
|
+
},
|
|
88
88
|
contentWidth(){
|
|
89
|
-
let
|
|
90
|
-
let
|
|
91
|
-
|
|
89
|
+
let margin = Number(this.checkValue(this.margin.left, 0)) + Number(this.checkValue(this.margin.right, 0));
|
|
90
|
+
let padding = Number(this.checkValue(this.padding.left, 0)) + Number(this.checkValue(this.padding.right, 0));
|
|
91
|
+
let border = 0;
|
|
92
|
+
//if(this.isPreview) border = 2;
|
|
93
|
+
return this.width - (padding + margin + border);
|
|
92
94
|
},
|
|
93
95
|
contentHeight(){
|
|
94
|
-
|
|
96
|
+
let margin = Number(this.checkValue(this.margin.left, 0)) + Number(this.checkValue(this.margin.right, 0));
|
|
97
|
+
let padding = Number(this.checkValue(this.padding.left, 0)) + Number(this.checkValue(this.padding.right, 0));
|
|
98
|
+
let border = 0;
|
|
99
|
+
//if(this.isPreview) border = 2;
|
|
100
|
+
let winWidth = this.width - (padding + margin + border);
|
|
101
|
+
return winWidth * this.height/this.width;
|
|
102
|
+
},
|
|
103
|
+
outMargin(){
|
|
104
|
+
let str = `${this.checkValue(this.margin.top, 0)}rpx`;
|
|
105
|
+
str = `${str} ${this.checkValue(this.margin.right, 0)}rpx`;
|
|
106
|
+
str = `${str} ${this.checkValue(this.margin.bottom, 0)}rpx`;
|
|
107
|
+
str = `${str} ${this.checkValue(this.margin.left, 0)}rpx`;
|
|
108
|
+
return str
|
|
109
|
+
},
|
|
110
|
+
outPadding(){
|
|
111
|
+
let str = `${this.checkValue(this.padding.top, 0)}rpx`;
|
|
112
|
+
str = `${str} ${this.checkValue(this.padding.right, 0)}rpx`;
|
|
113
|
+
str = `${str} ${this.checkValue(this.padding.bottom, 0)}rpx`;
|
|
114
|
+
str = `${str} ${this.checkValue(this.padding.left, 0)}rpx`;
|
|
115
|
+
return str
|
|
95
116
|
},
|
|
96
117
|
getVideoSrc(){
|
|
97
118
|
let width = Math.floor(this.contentWidth * this.$rpxNum);
|
|
@@ -104,7 +125,7 @@
|
|
|
104
125
|
if(JSON.stringify(value) === JSON.stringify(oldValue)) return;
|
|
105
126
|
if (this.$configProject['isPreview']) {
|
|
106
127
|
this.init(value);
|
|
107
|
-
this.onJfbLoad()
|
|
128
|
+
this.onJfbLoad(this.options)
|
|
108
129
|
}
|
|
109
130
|
}
|
|
110
131
|
},
|
|
@@ -119,14 +140,19 @@
|
|
|
119
140
|
* @param container {object} 业务组件对象自己
|
|
120
141
|
*/
|
|
121
142
|
init(container) {
|
|
122
|
-
this.
|
|
123
|
-
this.
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
143
|
+
this.videoSetting = getContainerPropsValue(container, 'content.video', {size:{width: 400, height: 300}, type: '1'});
|
|
144
|
+
if(this.videoSetting && this.videoSetting.size && this.videoSetting.size.height) {
|
|
145
|
+
this.height = Number(this.videoSetting.size.height) || 563;
|
|
146
|
+
this.width = 750;
|
|
147
|
+
}
|
|
148
|
+
this.margin = getContainerPropsValue(container, 'content.margin', {});
|
|
149
|
+
this.padding = getContainerPropsValue(container, 'content.padding', {});
|
|
150
|
+
this.radius = getContainerPropsValue(container, 'content.radius', 0);
|
|
151
|
+
this.bgColor = getContainerPropsValue(container, 'content.bgColor', 'rgba(0,0,0,0)');
|
|
127
152
|
},
|
|
128
153
|
|
|
129
|
-
onJfbLoad() {
|
|
154
|
+
onJfbLoad(options) {
|
|
155
|
+
this.options = options;
|
|
130
156
|
jfbRootExec('getListVideoContent', {
|
|
131
157
|
vm: this,
|
|
132
158
|
data: {
|
|
@@ -148,7 +174,7 @@
|
|
|
148
174
|
},
|
|
149
175
|
|
|
150
176
|
onJfbUpdate() {
|
|
151
|
-
this.onJfbLoad();
|
|
177
|
+
this.onJfbLoad(this.options);
|
|
152
178
|
},
|
|
153
179
|
|
|
154
180
|
}
|
|
@@ -1,77 +0,0 @@
|
|
|
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
|
-
}
|