[new feature] Loading: add circular type (#618)

This commit is contained in:
neverland
2018-02-07 16:35:24 +08:00
committed by GitHub
parent 6e00edac2d
commit 866aff9c45
8 changed files with 121 additions and 54 deletions

View File

@@ -1,7 +1,10 @@
<template>
<div class="van-loading" :class="['van-loading--' + type, 'van-loading--' + color]">
<span class="van-loading__spinner" :class="['van-loading__spinner--' + type, 'van-loading__spinner--' + color]">
<i v-if="type === 'spinner'" v-for="item in 12" />
<span class="van-loading__spinner" :class="'van-loading__spinner--' + type">
<i v-for="item in (type === 'spinner' ? 12 : 0)" />
<svg v-if="type === 'circular'" class="van-loading__circular" viewBox="25 25 50 50">
<circle cx="50" cy="50" r="20" fill="none"/>
</svg>
</span>
</div>
</template>