From 7cfeb0ecc1d4f0f0d68378f62387b68600a12070 Mon Sep 17 00:00:00 2001 From: fleurWang <1159971011@qq.com> Date: Tue, 8 Dec 2015 16:31:00 +0800 Subject: [PATCH] for-taxi-2 --- component.json | 2 +- dialog.js | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/component.json b/component.json index 7f7fb5a..b2a67c6 100644 --- a/component.json +++ b/component.json @@ -1,6 +1,6 @@ { "name": "dialog", - "version": "0.0.7", + "version": "0.0.8", "main": "dialog.js", "description": "公共弹窗组件", "files":[ diff --git a/dialog.js b/dialog.js index b75098e..3f681e4 100644 --- a/dialog.js +++ b/dialog.js @@ -310,7 +310,7 @@ d.alert = function (cfg) { /** * confirm dialog */ -d.confirm = function (cfg , swapBtn) { +d.confirm = function (cfg) { var opts = {}; if (typeof arguments[0] === 'string' && arguments[0]) { @@ -351,7 +351,7 @@ d.confirm = function (cfg , swapBtn) { } }; - if(! swapBtn){ + if(! cfg.swapBtn){ btn.push(cancelObj); btn.push(confirmObj); }else{