Merge pull request #5485 from pyyzcwg2833/2.0

修复notification的进入transition失效 & loading-bar新增duration属性
This commit is contained in:
Aresn 2019-04-08 11:27:06 +08:00 committed by GitHub
commit 18cffe186a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 11 additions and 2 deletions

View file

@ -1,5 +1,5 @@
<template>
<transition :name="transitionName" @enter="handleEnter" @leave="handleLeave">
<transition :name="transitionName" @enter="handleEnter" @leave="handleLeave" appear>
<div :class="classes" :style="styles">
<template v-if="type === 'notice'">
<div :class="contentClasses" ref="content" v-html="content"></div>

View file

@ -2,6 +2,7 @@ import LoadingBar from './loading-bar';
let loadingBarInstance;
let color = 'primary';
let duration = 800;
let failedColor = 'error';
let height = 2;
let timer;
@ -32,7 +33,7 @@ function hide() {
percent: 0
});
}, 200);
}, 800);
}, duration);
}
function clearTimer() {
@ -96,6 +97,9 @@ export default {
if (options.color) {
color = options.color;
}
if (options.duration) {
duration = options.duration;
}
if (options.failedColor) {
failedColor = options.failedColor;
}

View file

@ -41,6 +41,11 @@ export declare interface LoadingBarConfig {
* @default primary
*/
color?: string;
/**
* , 800ms
* @default 800
*/
duration?: number;
/**
* iView
* @default error