mirror of
https://github.com/youzan/vant.git
synced 2025-10-20 02:31:21 +00:00
[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
This commit is contained in:
@@ -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
|
||||
});
|
||||
|
||||
|
Reference in New Issue
Block a user