layer国际化代码优化
This commit is contained in:
@@ -193,7 +193,7 @@ Class.pt.config = {
|
|||||||
shade: 0.3,
|
shade: 0.3,
|
||||||
fixed: true,
|
fixed: true,
|
||||||
move: doms[1],
|
move: doms[1],
|
||||||
title: layer.i18n.title,
|
title: function(){return layer.i18n.title},
|
||||||
offset: 'auto',
|
offset: 'auto',
|
||||||
area: 'auto',
|
area: 'auto',
|
||||||
closeBtn: 1,
|
closeBtn: 1,
|
||||||
@@ -215,7 +215,7 @@ Class.pt.vessel = function(conType, callback){
|
|||||||
var zIndex = config.zIndex + times, titype = typeof config.title === 'object';
|
var zIndex = config.zIndex + times, titype = typeof config.title === 'object';
|
||||||
var ismax = config.maxmin && (config.type === 1 || config.type === 2);
|
var ismax = config.maxmin && (config.type === 1 || config.type === 2);
|
||||||
var titleHTML = (config.title ? '<div class="layui-layer-title" style="'+ (titype ? config.title[1] : '') +'">'
|
var titleHTML = (config.title ? '<div class="layui-layer-title" style="'+ (titype ? config.title[1] : '') +'">'
|
||||||
+ (titype ? config.title[0] : layer.i18n.title)
|
+ (titype ? config.title[0] : (typeof config.title === 'function' ? config.title() : config.title))
|
||||||
+ '</div>' : '');
|
+ '</div>' : '');
|
||||||
|
|
||||||
config.zIndex = zIndex;
|
config.zIndex = zIndex;
|
||||||
|
|||||||
Reference in New Issue
Block a user