jufubao-base 1.0.289-beta2 → 1.0.289-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
CHANGED
|
@@ -364,7 +364,21 @@ export default function (data, gValue, gColor, oldData){
|
|
|
364
364
|
let setTpl = dataVal({data, key:'footerTpl', dValue:'normal', gValue});
|
|
365
365
|
if(setTpl === 'normal') {
|
|
366
366
|
if(value && value.length === 0) callback('请设置菜单');
|
|
367
|
-
else
|
|
367
|
+
else {
|
|
368
|
+
let errorStr = '';
|
|
369
|
+
if(value && value.length > 0) {
|
|
370
|
+
let len = value.length;
|
|
371
|
+
for(let i = 0; i < len; i++) {
|
|
372
|
+
if(value[i].name.length > 5) {
|
|
373
|
+
errorStr = `菜单${i}最大长度不能超过5个汉字`;
|
|
374
|
+
break
|
|
375
|
+
}
|
|
376
|
+
}
|
|
377
|
+
}
|
|
378
|
+
if(errorStr) {
|
|
379
|
+
callback(errorStr)
|
|
380
|
+
}else callback();
|
|
381
|
+
}
|
|
368
382
|
}
|
|
369
383
|
else callback()
|
|
370
384
|
},
|
|
@@ -410,7 +424,21 @@ export default function (data, gValue, gColor, oldData){
|
|
|
410
424
|
let setTpl = dataVal({data, key:'footerTpl', dValue:'normal', gValue});
|
|
411
425
|
if(setTpl === 'itemCenterBig') {
|
|
412
426
|
if(value && value.length === 0) callback('请设置菜单');
|
|
413
|
-
else
|
|
427
|
+
else {
|
|
428
|
+
let errorStr = '';
|
|
429
|
+
if(value && value.length > 0) {
|
|
430
|
+
let len = value.length;
|
|
431
|
+
for(let i = 0; i < len; i++) {
|
|
432
|
+
if(value[i].name.length > 5) {
|
|
433
|
+
errorStr = `菜单${i}最大长度不能超过5个汉字`;
|
|
434
|
+
break
|
|
435
|
+
}
|
|
436
|
+
}
|
|
437
|
+
}
|
|
438
|
+
if(errorStr) {
|
|
439
|
+
callback(errorStr)
|
|
440
|
+
}else callback();
|
|
441
|
+
}
|
|
414
442
|
}
|
|
415
443
|
else callback()
|
|
416
444
|
},
|