修正国际化遗留问题
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, // ThinkGem 替换 config.title 为 layer.i18n.title,支持国际化
|
title: layer.i18n.title,
|
||||||
offset: 'auto',
|
offset: 'auto',
|
||||||
area: 'auto',
|
area: 'auto',
|
||||||
closeBtn: 1,
|
closeBtn: 1,
|
||||||
@@ -212,10 +212,10 @@ Class.pt.config = {
|
|||||||
//容器
|
//容器
|
||||||
Class.pt.vessel = function(conType, callback){
|
Class.pt.vessel = function(conType, callback){
|
||||||
var that = this, times = that.index, config = that.config;
|
var that = this, times = that.index, config = that.config;
|
||||||
var zIndex = config.zIndex + times, titype = typeof layer.i18n.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 = (layer.i18n.title ? '<div class="layui-layer-title" style="'+ (titype ? layer.i18n.title[1] : '') +'">'
|
var titleHTML = (config.title ? '<div class="layui-layer-title" style="'+ (titype ? config.title[1] : '') +'">'
|
||||||
+ (titype ? layer.i18n.title[0] : layer.i18n.title)
|
+ (titype ? config.title[0] : layer.i18n.title)
|
||||||
+ '</div>' : '');
|
+ '</div>' : '');
|
||||||
|
|
||||||
config.zIndex = zIndex;
|
config.zIndex = zIndex;
|
||||||
@@ -231,8 +231,9 @@ Class.pt.vessel = function(conType, callback){
|
|||||||
+ (config.type == 1 && conType ? '' : (config.content||''))
|
+ (config.type == 1 && conType ? '' : (config.content||''))
|
||||||
+ '</div>'
|
+ '</div>'
|
||||||
+ '<span class="layui-layer-setwin">'+ function(){
|
+ '<span class="layui-layer-setwin">'+ function(){
|
||||||
var closebtn = ismax ? '<a class="layui-layer-min" href="javascript:;"><cite></cite></a><a class="layui-layer-ico layui-layer-max" href="javascript:;"></a>' : '';
|
var closebtn = ismax && config.title ? '<a class="layui-layer-min" href="javascript:;"><cite></cite></a>' : ''; // ThinkGem 必须有标题的清空下才能最小化
|
||||||
config.closeBtn && (closebtn += '<a class="layui-layer-ico '+ doms[7] +' '+ doms[7] + (layer.i18n.title ? config.closeBtn : (config.type == 4 ? '1' : '2')) +'" href="javascript:;"></a>');
|
closebtn += ismax ? '<a class="layui-layer-ico layui-layer-max" href="javascript:;"></a>' : '';
|
||||||
|
config.closeBtn && (closebtn += '<a class="layui-layer-ico '+ doms[7] +' '+ doms[7] + (config.title ? config.closeBtn : (config.type == 4 ? '1' : '2')) +'" href="javascript:;"></a>');
|
||||||
return closebtn;
|
return closebtn;
|
||||||
}() + '</span>'
|
}() + '</span>'
|
||||||
+ (config.btn ? function(){
|
+ (config.btn ? function(){
|
||||||
@@ -293,7 +294,7 @@ Class.pt.creat = function(){
|
|||||||
+ doms[4] + '' + times +'">';
|
+ doms[4] + '' + times +'">';
|
||||||
break;
|
break;
|
||||||
case 3:
|
case 3:
|
||||||
delete layer.i18n.title;
|
delete config.title;
|
||||||
delete config.closeBtn;
|
delete config.closeBtn;
|
||||||
config.icon === -1 && (config.icon === 0);
|
config.icon === -1 && (config.icon === 0);
|
||||||
layer.closeAll('loading');
|
layer.closeAll('loading');
|
||||||
@@ -302,7 +303,7 @@ Class.pt.creat = function(){
|
|||||||
conType || (config.content = [config.content, 'body']);
|
conType || (config.content = [config.content, 'body']);
|
||||||
config.follow = config.content[1];
|
config.follow = config.content[1];
|
||||||
config.content = config.content[0] + '<i class="layui-layer-TipsG"></i>';
|
config.content = config.content[0] + '<i class="layui-layer-TipsG"></i>';
|
||||||
delete layer.i18n.title;
|
delete config.title;
|
||||||
config.tips = typeof config.tips === 'object' ? config.tips : [config.tips, true];
|
config.tips = typeof config.tips === 'object' ? config.tips : [config.tips, true];
|
||||||
config.tipsMore || layer.closeAll('tips');
|
config.tipsMore || layer.closeAll('tips');
|
||||||
break;
|
break;
|
||||||
|
|||||||
Reference in New Issue
Block a user