mirror of
https://github.com/youzan/vant.git
synced 2025-10-19 01:54:48 +00:00
fix: code style
This commit is contained in:
@@ -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
|
||||
}
|
||||
}
|
||||
};
|
||||
|
Reference in New Issue
Block a user