jufubao-base 1.0.362 → 1.0.363
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/JfbBaseFastLink/Attr.js +7 -305
- package/src/components/JfbBaseFastLink/JfbBaseFastLink.vue +315 -127
- package/src/components/JfbBaseFastLink/XdFastNav.vue +174 -143
- package/src/components/JfbBaseFastLink/cusAttr/advanced.js +127 -0
- package/src/components/JfbBaseFastLink/cusAttr/content.js +68 -0
- package/src/components/JfbBaseFastLink/cusAttr/style.js +512 -0
package/package.json
CHANGED
|
@@ -1,316 +1,18 @@
|
|
|
1
1
|
'use strict';
|
|
2
|
-
import
|
|
2
|
+
import content from './cusAttr/content';
|
|
3
|
+
import style from './cusAttr/style';
|
|
4
|
+
import advanced from './cusAttr/advanced';
|
|
3
5
|
|
|
4
6
|
/**
|
|
5
7
|
* @description 当表单组件中有联动操作时候,使用方法进行返回
|
|
6
8
|
*/
|
|
7
9
|
export default {
|
|
8
10
|
style: [],
|
|
9
|
-
content: (data)=>{
|
|
11
|
+
content: (data, gValue, gColor, oldData={})=>{
|
|
10
12
|
return [
|
|
11
|
-
{
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
slot: 'is_reference_title',
|
|
15
|
-
groupKey: 'advanced'
|
|
16
|
-
},
|
|
17
|
-
{
|
|
18
|
-
label: '快速链接布局:',
|
|
19
|
-
ele: 'xd-radio',
|
|
20
|
-
valueKey: 'is_layout',
|
|
21
|
-
value: data['is_layout'] || 'noraml',
|
|
22
|
-
groupKey:'content',
|
|
23
|
-
placeholder: '请选择是否有边框',
|
|
24
|
-
multiple: false,
|
|
25
|
-
className: 'input80',
|
|
26
|
-
list: [
|
|
27
|
-
{label: '垂直', value: 'noraml'},
|
|
28
|
-
{label: '水平', value: 'horizontal'},
|
|
29
|
-
{label: '悬浮', value: 'fixed'},
|
|
30
|
-
],
|
|
31
|
-
inline: false,
|
|
32
|
-
notice: `使用悬浮布局时,链接数量不可超过<span style="color:red"> 3 </span>个,超出部分不显示, 并且把该组件移动到最后`
|
|
33
|
-
},
|
|
34
|
-
{
|
|
35
|
-
label: '默认是否收起:',
|
|
36
|
-
ele: 'xd-radio',
|
|
37
|
-
valueKey: 'isNotExpand',
|
|
38
|
-
groupKey:'content',
|
|
39
|
-
value: data['isNotExpand'] || 'Y',
|
|
40
|
-
className: 'input80',
|
|
41
|
-
list: [
|
|
42
|
-
{label: '收起', value: 'Y'},
|
|
43
|
-
{label: '展开', value: 'N'},
|
|
44
|
-
],
|
|
45
|
-
hidden: data['is_layout'] !=='fixed'
|
|
46
|
-
},
|
|
47
|
-
data['is_layout'] ==='fixed' && 0 && {
|
|
48
|
-
label: '自定义名称:',
|
|
49
|
-
ele: 'el-input',
|
|
50
|
-
type: 'text',
|
|
51
|
-
groupKey:'content',
|
|
52
|
-
valueKey: 'fastName',
|
|
53
|
-
value: data['fastName']? data['fastName']: '快速导航',
|
|
54
|
-
placeholder: '请输入自定义名称',
|
|
55
|
-
className: 'input80',
|
|
56
|
-
},
|
|
57
|
-
{
|
|
58
|
-
label: '自定义服务名称:',
|
|
59
|
-
ele: 'el-input',
|
|
60
|
-
type: 'text',
|
|
61
|
-
groupKey:'content',
|
|
62
|
-
valueKey: 'customName',
|
|
63
|
-
value: data['customName']? data['customName']: '我的服务',
|
|
64
|
-
placeholder: '请输入自定义服务名称',
|
|
65
|
-
className: 'input80',
|
|
66
|
-
},
|
|
67
|
-
{
|
|
68
|
-
label: '背景颜色:',
|
|
69
|
-
ele: 'xd-color',
|
|
70
|
-
groupKey:'style',
|
|
71
|
-
valueKey: 'backgroundColor',
|
|
72
|
-
value: data['backgroundColor'] || '',
|
|
73
|
-
placeholder: '请选择背景颜色',
|
|
74
|
-
classNmae: 'input60',
|
|
75
|
-
},
|
|
76
|
-
{
|
|
77
|
-
label: '圆角设置:',
|
|
78
|
-
ele: 'xd-site-select-list',
|
|
79
|
-
valueKey: 'radius',
|
|
80
|
-
groupKey:'style',
|
|
81
|
-
value: data['radius'] || '',
|
|
82
|
-
placeholder: '请选择圆角设置',
|
|
83
|
-
multiple: false,
|
|
84
|
-
className: 'input60',
|
|
85
|
-
handleCustom({action, data}) {
|
|
86
|
-
XdBus.getParentApi('getOptionsSettingList')({setting_id: 'edtix_style_radius'})
|
|
87
|
-
.then(res => {
|
|
88
|
-
data.cb(res.list)
|
|
89
|
-
})
|
|
90
|
-
.catch(error => {
|
|
91
|
-
console.error(error);
|
|
92
|
-
});
|
|
93
|
-
},
|
|
94
|
-
},
|
|
95
|
-
{
|
|
96
|
-
label: '行间距:',
|
|
97
|
-
ele: 'el-input',
|
|
98
|
-
groupKey:'style',
|
|
99
|
-
type: 'number',
|
|
100
|
-
valueKey: 'rowSpacing',
|
|
101
|
-
value: data.rowSpacing===undefined? data.rowSpacing: '',
|
|
102
|
-
placeholder: '请输入行间距',
|
|
103
|
-
className: 'input60',
|
|
104
|
-
inline: false,
|
|
105
|
-
notice: '设置行间距,<span style="color: red">单位:像素</span>。默认值:<span style="color: red">20</span>像素',
|
|
106
|
-
},
|
|
107
|
-
{
|
|
108
|
-
label: '边距设置:',
|
|
109
|
-
ele: 'xd-margin-padding',
|
|
110
|
-
groupKey:'style',
|
|
111
|
-
valueKey: 'margin',
|
|
112
|
-
value: data['margin'] || null,
|
|
113
|
-
setting: {
|
|
114
|
-
type: 'margin',
|
|
115
|
-
},
|
|
116
|
-
placeholder: '边距设置',
|
|
117
|
-
inline: false,
|
|
118
|
-
notice: '边距设置,<span style="color: red">单位:像素</span>。默认值:<span style="color: red">0</span>像素',
|
|
119
|
-
},
|
|
120
|
-
{
|
|
121
|
-
label: '填充设置:',
|
|
122
|
-
ele: 'xd-margin-padding',
|
|
123
|
-
groupKey:'style',
|
|
124
|
-
valueKey: 'padding',
|
|
125
|
-
value: data['padding'] || null,
|
|
126
|
-
setting: {
|
|
127
|
-
type: 'padding',
|
|
128
|
-
},
|
|
129
|
-
placeholder: '填充设置',
|
|
130
|
-
inline: false,
|
|
131
|
-
notice: '填充设置,<span style="color: red">单位:像素</span>。默认值:<span style="color: red">20</span>像素',
|
|
132
|
-
},
|
|
133
|
-
{
|
|
134
|
-
ele: 'title',
|
|
135
|
-
label: '边框设置',
|
|
136
|
-
size: 'small',
|
|
137
|
-
groupKey:'style',
|
|
138
|
-
},
|
|
139
|
-
{
|
|
140
|
-
label: '是否有边框:',
|
|
141
|
-
ele: 'xd-radio',
|
|
142
|
-
valueKey: 'is_border',
|
|
143
|
-
groupKey:'style',
|
|
144
|
-
value: data['is_border'] || 'N',
|
|
145
|
-
placeholder: '请选择是否有边框',
|
|
146
|
-
multiple: false,
|
|
147
|
-
className: 'input80',
|
|
148
|
-
list: [
|
|
149
|
-
{label: '是', value: 'Y'},
|
|
150
|
-
{label: '否', value: 'N'},
|
|
151
|
-
]
|
|
152
|
-
},
|
|
153
|
-
data['is_border'] === 'Y' && {
|
|
154
|
-
label: '边框颜色:',
|
|
155
|
-
ele: 'xd-color',
|
|
156
|
-
valueKey: 'is_border_c',
|
|
157
|
-
groupKey:'style',
|
|
158
|
-
value: data['is_border_c'] || '',
|
|
159
|
-
placeholder: '请选择边框颜色',
|
|
160
|
-
classNmae: 'input80',
|
|
161
|
-
},
|
|
162
|
-
data['is_border'] === 'Y' && {
|
|
163
|
-
label: '边框大小:',
|
|
164
|
-
ele: 'el-input',
|
|
165
|
-
type: 'number',
|
|
166
|
-
groupKey:'style',
|
|
167
|
-
valueKey: 'is_border_w',
|
|
168
|
-
value: data['is_border_w'] || '',
|
|
169
|
-
placeholder: '请输入边框颜色',
|
|
170
|
-
className: 'input60',
|
|
171
|
-
},
|
|
172
|
-
{
|
|
173
|
-
ele: 'title',
|
|
174
|
-
label: '主标题',
|
|
175
|
-
size: 'small',
|
|
176
|
-
groupKey:'style',
|
|
177
|
-
},
|
|
178
|
-
{
|
|
179
|
-
label: '文字大小:',
|
|
180
|
-
ele: 'xd-site-select-list',
|
|
181
|
-
valueKey: 'fontSize',
|
|
182
|
-
groupKey:'style',
|
|
183
|
-
value: data['fontSize'] || '',
|
|
184
|
-
placeholder: '请选择文字大小',
|
|
185
|
-
multiple: false,
|
|
186
|
-
className: 'input60',
|
|
187
|
-
handleCustom({action, data}) {
|
|
188
|
-
XdBus.getParentApi('getOptionsSettingList')({
|
|
189
|
-
setting_id: 'edtix_style_font_size'
|
|
190
|
-
})
|
|
191
|
-
.then(res => {
|
|
192
|
-
data.cb(res.list)
|
|
193
|
-
})
|
|
194
|
-
.catch(error => {
|
|
195
|
-
console.error(error);
|
|
196
|
-
});
|
|
197
|
-
},
|
|
198
|
-
},
|
|
199
|
-
{
|
|
200
|
-
label: '文字颜色:',
|
|
201
|
-
ele: 'xd-color',
|
|
202
|
-
groupKey:'style',
|
|
203
|
-
valueKey: 'textColor',
|
|
204
|
-
value: data['textColor'] || '',
|
|
205
|
-
placeholder: '请选择文字颜色',
|
|
206
|
-
classNmae: 'input80',
|
|
207
|
-
},
|
|
208
|
-
{
|
|
209
|
-
label: 'ICON颜色:',
|
|
210
|
-
ele: 'xd-color',
|
|
211
|
-
groupKey:'style',
|
|
212
|
-
valueKey: 'iconColor',
|
|
213
|
-
value: data['iconColor'] || '',
|
|
214
|
-
placeholder: '请选择ICON颜色',
|
|
215
|
-
classNmae: 'input80',
|
|
216
|
-
},
|
|
217
|
-
{
|
|
218
|
-
ele: 'title',
|
|
219
|
-
label: '副标题',
|
|
220
|
-
size: 'small',
|
|
221
|
-
groupKey:'style',
|
|
222
|
-
},
|
|
223
|
-
{
|
|
224
|
-
label: '文字大小:',
|
|
225
|
-
ele: 'xd-site-select-list',
|
|
226
|
-
valueKey: 'fontSubSize',
|
|
227
|
-
groupKey:'style',
|
|
228
|
-
value: data['fontSubSize'] || '',
|
|
229
|
-
placeholder: '请选择文字大小',
|
|
230
|
-
multiple: false,
|
|
231
|
-
className: 'input60',
|
|
232
|
-
handleCustom({action, data}) {
|
|
233
|
-
XdBus.getParentApi('getOptionsSettingList')({
|
|
234
|
-
setting_id: 'edtix_style_font_size'
|
|
235
|
-
})
|
|
236
|
-
.then(res => {
|
|
237
|
-
data.cb(res.list)
|
|
238
|
-
})
|
|
239
|
-
.catch(error => {
|
|
240
|
-
console.error(error);
|
|
241
|
-
});
|
|
242
|
-
},
|
|
243
|
-
},
|
|
244
|
-
{
|
|
245
|
-
label: '文字颜色:',
|
|
246
|
-
ele: 'xd-color',
|
|
247
|
-
groupKey:'style',
|
|
248
|
-
valueKey: 'textSubColor',
|
|
249
|
-
value: data['textSubColor'] || '',
|
|
250
|
-
placeholder: '请选择文字颜色',
|
|
251
|
-
classNmae: 'input80',
|
|
252
|
-
},
|
|
253
|
-
|
|
254
|
-
{
|
|
255
|
-
label: '快速链接配置:',
|
|
256
|
-
ele: 'xd-footer-setting',
|
|
257
|
-
valueKey: 'quick_link_list',
|
|
258
|
-
groupKey:'advanced',
|
|
259
|
-
value: data.quick_link_list || [],
|
|
260
|
-
setting: {
|
|
261
|
-
router: XdBus.getParentApi('getPagesTree'),
|
|
262
|
-
showField: {
|
|
263
|
-
path: true,
|
|
264
|
-
icon: true,
|
|
265
|
-
notice: false,
|
|
266
|
-
subTitle: true,
|
|
267
|
-
params: true,
|
|
268
|
-
},
|
|
269
|
-
icons:ICONS,
|
|
270
|
-
},
|
|
271
|
-
handleCustom({action, data}) {
|
|
272
|
-
if (action === 'number') {
|
|
273
|
-
data.cb([])
|
|
274
|
-
}
|
|
275
|
-
},
|
|
276
|
-
inline: false,
|
|
277
|
-
notice: '设置快速链接配置址、标题(最多<sapn style="color: red">五个汉字</sapn>)、ICON图标(<a href="https://www.iconfont.cn/manage/index?spm=a313x.7781069.1998910419.db775f1f3&manage_type=myprojects&projectId=3378319&keyword=&project_type=&page=" style="color: blue" target="_blank">ICONFONT库</a>)、ICON大小(单位:<sapn style="color: red">像素</sapn>)和是否有消息数量显示(无数量显示可以不填写)',
|
|
278
|
-
rules: [
|
|
279
|
-
{
|
|
280
|
-
required: false,
|
|
281
|
-
validator: (rule, value, callback) => {
|
|
282
|
-
if (!value) {
|
|
283
|
-
callback('请设置快速链接配置');
|
|
284
|
-
return
|
|
285
|
-
}
|
|
286
|
-
|
|
287
|
-
if (value.length === 0) {
|
|
288
|
-
callback('请设置快速链接配置');
|
|
289
|
-
return
|
|
290
|
-
}
|
|
291
|
-
|
|
292
|
-
let status = value.filter(item => {
|
|
293
|
-
return !item.name
|
|
294
|
-
});
|
|
295
|
-
|
|
296
|
-
if (status.length > 0) {
|
|
297
|
-
callback('请设置快速链接配置');
|
|
298
|
-
return
|
|
299
|
-
}
|
|
300
|
-
|
|
301
|
-
callback()
|
|
302
|
-
},
|
|
303
|
-
trigger: 'change'
|
|
304
|
-
|
|
305
|
-
},
|
|
306
|
-
],
|
|
307
|
-
},
|
|
308
|
-
{
|
|
309
|
-
label: '',
|
|
310
|
-
ele: 'slot',
|
|
311
|
-
slot: 'is_reference',
|
|
312
|
-
groupKey: 'advanced'
|
|
313
|
-
},
|
|
13
|
+
...content(data, gValue, gColor, oldData={}),
|
|
14
|
+
...style(data, gValue, gColor, oldData={}),
|
|
15
|
+
...advanced(data, gValue, gColor, oldData={}),
|
|
314
16
|
].filter(i=>i)
|
|
315
17
|
},
|
|
316
18
|
advanced: [],
|