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
package/package.json
CHANGED
|
@@ -1,43 +1,176 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
+
import {dataVal, statusDataVal, statusShow} from "@/utils/AttrTools";
|
|
4
|
+
|
|
3
5
|
/**
|
|
4
6
|
* @description 当表单组件中有联动操作时候,使用方法进行返回
|
|
5
7
|
*/
|
|
6
8
|
export default {
|
|
7
9
|
style: [],
|
|
8
|
-
content:
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
10
|
+
content:(data, gValue, gColor, oldData)=>{
|
|
11
|
+
return [
|
|
12
|
+
{
|
|
13
|
+
label: '',
|
|
14
|
+
ele: 'slot',
|
|
15
|
+
slot: 'is_reference_title',
|
|
16
|
+
groupKey:'advanced',
|
|
17
|
+
},
|
|
18
|
+
{
|
|
19
|
+
ele: 'title',
|
|
20
|
+
label: '基础',
|
|
21
|
+
size: 'small',
|
|
22
|
+
groupKey:'content',
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
label: '外边距',
|
|
26
|
+
ele: 'xd-radio',
|
|
27
|
+
groupKey: 'content',
|
|
28
|
+
valueKey: 'marginStatus',
|
|
29
|
+
value: statusDataVal({data, key:'marginStatus', fields:['margin'],gValue}),
|
|
30
|
+
labelInline:true,
|
|
31
|
+
list: [
|
|
32
|
+
{label: '默认', value: 'D'},
|
|
33
|
+
{label: '自定义', value: 'C'},
|
|
34
|
+
]
|
|
35
|
+
},
|
|
36
|
+
{ele: 'group_start'},
|
|
37
|
+
{
|
|
38
|
+
label: '',
|
|
39
|
+
ele: 'xd-margin-padding',
|
|
40
|
+
groupKey:'content',
|
|
41
|
+
valueKey: 'margin',
|
|
42
|
+
value: dataVal({
|
|
43
|
+
data,
|
|
44
|
+
key:'margin',
|
|
45
|
+
dValue:0,
|
|
46
|
+
gValue,
|
|
47
|
+
isPM: true,
|
|
48
|
+
}),
|
|
49
|
+
hidden: !statusShow({data, key: 'marginStatus', fields:['margin'], gValue}),
|
|
50
|
+
setting: {
|
|
51
|
+
type: 'margin',
|
|
52
|
+
},
|
|
53
|
+
},
|
|
54
|
+
{ele: 'group_end'},
|
|
55
|
+
{
|
|
56
|
+
label: '背景颜色',
|
|
57
|
+
ele: 'xd-radio',
|
|
58
|
+
groupKey: 'content',
|
|
59
|
+
valueKey: 'bgcolorStatus',
|
|
60
|
+
value: statusDataVal({data, key:'bgcolorStatus', fields:['bgcolor'],gValue}),
|
|
61
|
+
labelInline:true,
|
|
62
|
+
list: [
|
|
63
|
+
{label: '默认', value: 'D'},
|
|
64
|
+
{label: '自定义', value: 'C'},
|
|
65
|
+
]
|
|
66
|
+
},
|
|
67
|
+
{ele: 'group_start'},
|
|
68
|
+
{
|
|
69
|
+
label: '',
|
|
70
|
+
ele: 'xd-color',
|
|
71
|
+
valueKey: 'bgcolor',
|
|
72
|
+
value: dataVal({data, key:'bgcolor', dValue:'', gValue}),
|
|
73
|
+
hidden: !statusShow({data, key: 'bgcolorStatus', fields:['bgcolor'], gValue}),
|
|
74
|
+
placeholder: '请输入占位框背景颜色',
|
|
75
|
+
classNmae: 'input80',
|
|
76
|
+
groupKey: 'content',
|
|
77
|
+
labelInline: true,
|
|
78
|
+
setting: {
|
|
79
|
+
showAlpha: true
|
|
80
|
+
}
|
|
81
|
+
},
|
|
82
|
+
{ele: 'group_end'},
|
|
83
|
+
{
|
|
84
|
+
label: '高度',
|
|
85
|
+
ele: 'xd-radio',
|
|
86
|
+
groupKey: 'content',
|
|
87
|
+
valueKey: 'heightStatus',
|
|
88
|
+
value: statusDataVal({data, key:'heightStatus', fields:['height'],gValue}),
|
|
89
|
+
labelInline:true,
|
|
90
|
+
list: [
|
|
91
|
+
{label: '默认', value: 'D'},
|
|
92
|
+
{label: '自定义', value: 'C'},
|
|
93
|
+
]
|
|
94
|
+
},
|
|
95
|
+
{ele: 'group_start'},
|
|
96
|
+
{
|
|
97
|
+
label: '',
|
|
98
|
+
ele: 'el-input',
|
|
99
|
+
type: 'number',
|
|
100
|
+
valueKey: 'height',
|
|
101
|
+
groupKey:'content',
|
|
102
|
+
value: dataVal({data, key:'height', dValue:'', gValue}), //默认0
|
|
103
|
+
hidden: !statusShow({data, key: 'heightStatus', fields:['height'], gValue}),
|
|
104
|
+
classNmae: 'input100',
|
|
105
|
+
},
|
|
106
|
+
{ele: 'group_end'},
|
|
107
|
+
{
|
|
108
|
+
label: '圆角',
|
|
109
|
+
ele: 'xd-radio',
|
|
110
|
+
groupKey: 'content',
|
|
111
|
+
valueKey: 'radiusStatus',
|
|
112
|
+
value: statusDataVal({data, key:'radiusStatus',cValue: 'N', fields:['radius'],gValue}),
|
|
113
|
+
labelInline:true,
|
|
114
|
+
list: [
|
|
115
|
+
{label: '默认', value: 'D'},
|
|
116
|
+
{label: '无圆角', value: 'N'},
|
|
117
|
+
{label: '自定义', value: 'C'},
|
|
118
|
+
]
|
|
119
|
+
},
|
|
120
|
+
{ele: 'group_start'},
|
|
121
|
+
{
|
|
122
|
+
label: '',
|
|
123
|
+
ele: 'xd-site-select-list',
|
|
124
|
+
labelInline: true,
|
|
125
|
+
valueKey: 'radius',
|
|
126
|
+
value: dataVal({data, key:'radius', dValue:'10', gValue}),
|
|
127
|
+
hidden: !statusShow({data, key: 'radiusStatus', fields:['radius'], gValue}),
|
|
128
|
+
placeholder: '请选择圆角',
|
|
129
|
+
multiple: false,
|
|
130
|
+
className: 'input80',
|
|
131
|
+
groupKey:'content',
|
|
132
|
+
handleCustom({action, data}) {
|
|
133
|
+
XdBus.getParentApi('getOptionsSettingList')({
|
|
134
|
+
setting_id: 'edtix_style_radius',
|
|
135
|
+
key: Date.now()
|
|
136
|
+
})
|
|
137
|
+
.then(res => {
|
|
138
|
+
res.list = res.list.filter(item=>{
|
|
139
|
+
return item.label !== '无';
|
|
140
|
+
});
|
|
141
|
+
data.cb(res.list)
|
|
142
|
+
})
|
|
143
|
+
.catch(error => {
|
|
144
|
+
console.error(error);
|
|
145
|
+
});
|
|
146
|
+
},
|
|
147
|
+
},
|
|
148
|
+
{ele: 'group_end'},
|
|
149
|
+
{
|
|
150
|
+
label: '版本号:',
|
|
151
|
+
ele: 'el-input',
|
|
152
|
+
type: 'text',
|
|
153
|
+
groupKey: 'content',
|
|
154
|
+
valueKey: 'version',
|
|
155
|
+
value: 'v2.0',
|
|
156
|
+
hidden: true,
|
|
157
|
+
},
|
|
158
|
+
{
|
|
159
|
+
label: '过滤引用模版字段:',
|
|
160
|
+
ele: 'el-input',
|
|
161
|
+
type: 'text',
|
|
162
|
+
groupKey: 'content',
|
|
163
|
+
valueKey: 'refFilterKey',
|
|
164
|
+
value: '[]',
|
|
165
|
+
hidden: true,
|
|
166
|
+
},
|
|
167
|
+
{
|
|
168
|
+
label: '',
|
|
169
|
+
ele: 'slot',
|
|
170
|
+
slot: 'is_reference',
|
|
171
|
+
groupKey:'advanced',
|
|
172
|
+
},
|
|
173
|
+
]
|
|
174
|
+
},
|
|
42
175
|
advanced: [],
|
|
43
176
|
};
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
</view>
|
|
18
18
|
<!-- #endif -->
|
|
19
19
|
<view class="jfb-base-block__body">
|
|
20
|
-
<view :style="
|
|
20
|
+
<view :style="[contentStyle]"></view>
|
|
21
21
|
</view>
|
|
22
22
|
</view>
|
|
23
23
|
</template>
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
import JfbBaseBlockMixin from "./JfbBaseBlockMixin";
|
|
29
29
|
import componentsMixins from "@/mixins/componentsMixins";
|
|
30
30
|
import extsMixins from "@/mixins/extsMixins"
|
|
31
|
-
import {getContainerPropsValue} from "@/utils/xd.base";
|
|
31
|
+
import {getContainerPropsValue, gCPVal} from "@/utils/xd.base";
|
|
32
32
|
|
|
33
33
|
export default {
|
|
34
34
|
name: "JfbBaseBlock",
|
|
@@ -38,8 +38,7 @@
|
|
|
38
38
|
mixins: [componentsMixins,extsMixins,JfbBaseBlockMixin],
|
|
39
39
|
data() {
|
|
40
40
|
return {
|
|
41
|
-
|
|
42
|
-
bgcolor: '#fff'
|
|
41
|
+
contentStyle:{},
|
|
43
42
|
}
|
|
44
43
|
},
|
|
45
44
|
watch: {
|
|
@@ -52,11 +51,15 @@
|
|
|
52
51
|
this.init(this.container);
|
|
53
52
|
},
|
|
54
53
|
methods: {
|
|
55
|
-
init(
|
|
56
|
-
let
|
|
57
|
-
let
|
|
58
|
-
|
|
59
|
-
|
|
54
|
+
init(container) {
|
|
55
|
+
let radius = gCPVal(container, 'radius', [this.gStyleValue.radius,0],{sKey: 'radiusStatus', fields: ['radius']})||0;
|
|
56
|
+
let margin = gCPVal(container, 'margin', [0],{sKey: 'marginStatus', fields: ['margin'], isPMR: true});
|
|
57
|
+
this.contentStyle = {
|
|
58
|
+
backgroundColor: gCPVal(container, 'bgcolor', '',{sKey: 'bgcolorStatus', fields: ['bgcolor']}),
|
|
59
|
+
height: gCPVal(container, 'height', '20',{sKey: 'heightStatus', fields: ['height']}) + 'rpx',
|
|
60
|
+
borderRadius: radius + 'rpx',
|
|
61
|
+
margin: this.getMarginAndPadding(margin, 0)
|
|
62
|
+
};
|
|
60
63
|
},
|
|
61
64
|
}
|
|
62
65
|
}
|
|
@@ -1,83 +1,16 @@
|
|
|
1
1
|
'use strict';
|
|
2
|
+
import content from "./cusAttr/content";
|
|
3
|
+
import style from "./cusAttr/style";
|
|
2
4
|
|
|
3
5
|
/**
|
|
4
6
|
* @description 当表单组件中有联动操作时候,使用方法进行返回
|
|
5
7
|
*/
|
|
6
8
|
export default {
|
|
7
9
|
style: [],
|
|
8
|
-
content: (data) => {
|
|
10
|
+
content: (data, gValue, gColor, oldData={}) => {
|
|
9
11
|
return [
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
ele: 'xd-site-select-list',
|
|
13
|
-
valueKey: 'entryType',
|
|
14
|
-
value: data['entryType'],
|
|
15
|
-
placeholder: '请选择综合入口类型',
|
|
16
|
-
multiple: false,
|
|
17
|
-
groupKey:'content',
|
|
18
|
-
className: 'input50',
|
|
19
|
-
rules: [
|
|
20
|
-
{required: true, message: '请选择综合入口类型', trigger: ['blur', 'change']}
|
|
21
|
-
],
|
|
22
|
-
handleCustom({action, data}) {
|
|
23
|
-
XdBus.getParentApi('getEntryGroupOption')({key: Date.now()})
|
|
24
|
-
.then(res => {
|
|
25
|
-
data.cb(res.list)
|
|
26
|
-
})
|
|
27
|
-
.catch(error => {
|
|
28
|
-
console.error(error);
|
|
29
|
-
});
|
|
30
|
-
},
|
|
31
|
-
},
|
|
32
|
-
{
|
|
33
|
-
label: '每行显示数量',
|
|
34
|
-
ele: 'xd-radio',
|
|
35
|
-
valueKey: 'rowNum',
|
|
36
|
-
groupKey: 'content',
|
|
37
|
-
value: data.rowNum || 1,
|
|
38
|
-
rules: [
|
|
39
|
-
{required: true, message: '请选择', trigger: ['blur', 'change']}
|
|
40
|
-
],
|
|
41
|
-
list: [
|
|
42
|
-
{"label": "一行一列", "value": 1},
|
|
43
|
-
{"label": "一行二列", "value": 2},
|
|
44
|
-
{"label": "一行三列", "value": 3},
|
|
45
|
-
]
|
|
46
|
-
},
|
|
47
|
-
{
|
|
48
|
-
label: '背景颜色:',
|
|
49
|
-
ele: 'xd-color',
|
|
50
|
-
valueKey: 'bgcolor',
|
|
51
|
-
value: data.bgcolor || '',
|
|
52
|
-
groupKey: 'style',
|
|
53
|
-
placeholder: '请输入背景颜色',
|
|
54
|
-
classNmae: 'input80',
|
|
55
|
-
},
|
|
56
|
-
{
|
|
57
|
-
label: '间隔边距',
|
|
58
|
-
ele: 'el-input',
|
|
59
|
-
type: 'number',
|
|
60
|
-
valueKey: "paddingInput",
|
|
61
|
-
groupKey: 'style',
|
|
62
|
-
value: data.paddingInput || '',
|
|
63
|
-
placeholder: '请输入间隔边距',
|
|
64
|
-
inline: false,
|
|
65
|
-
className:'input60',
|
|
66
|
-
notice: '设置间隔边距,<span style="color: red">单位:像素</span>。默认值:<span style="color: red">20</span>像素',
|
|
67
|
-
},
|
|
68
|
-
{
|
|
69
|
-
label: '边距设置:',
|
|
70
|
-
ele: 'xd-margin-padding',
|
|
71
|
-
valueKey: 'margin',
|
|
72
|
-
groupKey:'style',
|
|
73
|
-
value: data.margin || null,
|
|
74
|
-
setting: {
|
|
75
|
-
type: 'margin',
|
|
76
|
-
},
|
|
77
|
-
placeholder: '请设置边距设置',
|
|
78
|
-
inline: false,
|
|
79
|
-
notice: '设置边距设置,<span style="color: red">单位:像素</span>。默认值:<span style="color: red">0</span> 像素',
|
|
80
|
-
},
|
|
12
|
+
...content(data, gValue, gColor, oldData),
|
|
13
|
+
...style(data, gValue, gColor, oldData),
|
|
81
14
|
].filter(i=>i)
|
|
82
15
|
},
|
|
83
16
|
advanced: [
|