From df2911eed04c25099e0594ffb600828d0b3ff74e Mon Sep 17 00:00:00 2001 From: neverland Date: Mon, 4 Dec 2017 11:47:27 +0800 Subject: [PATCH] [bugfix] Tab: active block disappeared when delete tab (#372) * [Improvement] CouponCell text adjust * fix: Coupon test cases * [bugfix] SubmitBar i18n not work * [bugfix] Tab: active block disappeared when delete tab * [bugfix] Toast number message --- packages/tabs/index.vue | 7 ++++++- packages/toast/index.js | 4 ++-- packages/toast/toast.vue | 4 ++-- 3 files changed, 10 insertions(+), 5 deletions(-) diff --git a/packages/tabs/index.vue b/packages/tabs/index.vue index f99e2bc02..f09b02b92 100644 --- a/packages/tabs/index.vue +++ b/packages/tabs/index.vue @@ -20,7 +20,7 @@
tab.index === this.curActive); + if (!activeExist) { + this.curActive = val[0].index || 0; + } }); } }, diff --git a/packages/toast/index.js b/packages/toast/index.js index 939612810..800b021a1 100644 --- a/packages/toast/index.js +++ b/packages/toast/index.js @@ -28,7 +28,7 @@ const createInstance = () => { const Toast = (options = {}) => { createInstance(); - options = typeof options === 'string' ? { message: options } : options; + options = typeof options === 'object' ? options : { message: options }; options = { ...defaultOptions, ...options }; Object.assign(instance, options); @@ -45,7 +45,7 @@ const Toast = (options = {}) => { const createMethod = type => (options = {}) => Toast({ type, - message: typeof options === 'string' ? options : options.message, + message: typeof options === 'object' ? options.message : options, ...options }); diff --git a/packages/toast/toast.vue b/packages/toast/toast.vue index 7717321b6..dc21abeac 100644 --- a/packages/toast/toast.vue +++ b/packages/toast/toast.vue @@ -10,7 +10,7 @@
@@ -34,7 +34,7 @@ export default { props: { mask: Boolean, - message: String, + message: [String, Number], forbidClick: Boolean, type: { type: String,