[new feature] Toast: support multiple instance (#586)

This commit is contained in:
neverland
2018-01-29 17:19:01 +08:00
committed by GitHub
parent 7f055a4d2d
commit 1f19852118
5 changed files with 115 additions and 56 deletions

View File

@@ -21,7 +21,7 @@
<script>
import { create } from '../utils';
const DEFAULT_STYLE_LIST = ['success', 'fail', 'loading'];
const STYLE_LIST = ['success', 'fail', 'loading'];
export default create({
name: 'van-toast',
@@ -48,7 +48,7 @@ export default create({
computed: {
displayStyle() {
return DEFAULT_STYLE_LIST.indexOf(this.type) !== -1 ? 'default' : this.type;
return STYLE_LIST.indexOf(this.type) !== -1 ? 'default' : this.type;
}
}
});