fix: code style

This commit is contained in:
陈嘉涵
2017-08-25 15:57:38 +08:00
parent 43693fa781
commit e7b1d70900
18 changed files with 64 additions and 80 deletions

View File

@@ -1,12 +1,13 @@
<template>
<div class="van-loading" :class="['van-loading--' + type]">
<span class="van-loading__spinner" :class="['van-loading__spinner--' + type, 'van-loading__spinner--' + color]"></span>
<div :class="['van-loading', 'van-loading--' + type]">
<span :class="['van-loading__spinner', 'van-loading__spinner--' + type, 'van-loading__spinner--' + color]"></span>
</div>
</template>
<script>
const VALID_TYPES = ['gradient-circle', 'circle'];
const VALID_COLORS = ['black', 'white'];
export default {
name: 'van-loading',
@@ -14,16 +15,12 @@ export default {
type: {
type: String,
default: 'gradient-circle',
validator(value) {
return VALID_TYPES.indexOf(value) > -1;
}
validator: value => VALID_TYPES.indexOf(value) > -1
},
color: {
type: String,
default: 'black',
validator(value) {
return VALID_COLORS.indexOf(value) > -1;
}
validator: value => VALID_COLORS.indexOf(value) > -1
}
}
};