From 51a83b70a366faa3c5e0307edd201a474c10d653 Mon Sep 17 00:00:00 2001 From: thinkgem Date: Fri, 17 May 2019 18:52:53 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=AD=A3=E5=9B=BD=E9=99=85=E5=8C=96?= =?UTF-8?q?=E9=81=97=E7=95=99=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/resources/static/layer/3.1/layer.js | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/common/src/main/resources/static/layer/3.1/layer.js b/common/src/main/resources/static/layer/3.1/layer.js index 61a04305..cca8c162 100644 --- a/common/src/main/resources/static/layer/3.1/layer.js +++ b/common/src/main/resources/static/layer/3.1/layer.js @@ -193,7 +193,7 @@ Class.pt.config = { shade: 0.3, fixed: true, move: doms[1], -// title: layer.i18n.title, // ThinkGem 替换 config.title 为 layer.i18n.title,支持国际化 + title: layer.i18n.title, offset: 'auto', area: 'auto', closeBtn: 1, @@ -212,10 +212,10 @@ Class.pt.config = { //容器 Class.pt.vessel = function(conType, callback){ 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 titleHTML = (layer.i18n.title ? '
' - + (titype ? layer.i18n.title[0] : layer.i18n.title) + var titleHTML = (config.title ? '
' + + (titype ? config.title[0] : layer.i18n.title) + '
' : ''); config.zIndex = zIndex; @@ -231,8 +231,9 @@ Class.pt.vessel = function(conType, callback){ + (config.type == 1 && conType ? '' : (config.content||'')) + '
' + ''+ function(){ - var closebtn = ismax ? '' : ''; - config.closeBtn && (closebtn += ''); + var closebtn = ismax && config.title ? '' : ''; // ThinkGem 必须有标题的清空下才能最小化 + closebtn += ismax ? '' : ''; + config.closeBtn && (closebtn += ''); return closebtn; }() + '' + (config.btn ? function(){ @@ -293,7 +294,7 @@ Class.pt.creat = function(){ + doms[4] + '' + times +'">'; break; case 3: - delete layer.i18n.title; + delete config.title; delete config.closeBtn; config.icon === -1 && (config.icon === 0); layer.closeAll('loading'); @@ -302,7 +303,7 @@ Class.pt.creat = function(){ conType || (config.content = [config.content, 'body']); config.follow = config.content[1]; config.content = config.content[0] + ''; - delete layer.i18n.title; + delete config.title; config.tips = typeof config.tips === 'object' ? config.tips : [config.tips, true]; config.tipsMore || layer.closeAll('tips'); break;