mirror of
https://github.com/youzan/vant.git
synced 2025-10-18 09:24:25 +00:00
feat: 更新loading
This commit is contained in:
@@ -1,11 +1,30 @@
|
||||
<template>
|
||||
<div class="zan-loading">
|
||||
<span class="zan-spinner"></span>
|
||||
<span class="zan-loading__spinner" :class="['zan-loading__spinner--' + type, 'zan-loading__spinner--' + color]"></span>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
const VALID_TYPES = ['gradient-circle', 'circle'];
|
||||
const VALID_COLORS = ['black', 'white'];
|
||||
export default {
|
||||
name: 'zan-loading'
|
||||
name: 'zan-loading',
|
||||
|
||||
props: {
|
||||
type: {
|
||||
type: String,
|
||||
default: 'gradient-circle',
|
||||
validate(value) {
|
||||
return VALID_TYPES.indexOf(value) > -1;
|
||||
}
|
||||
},
|
||||
color: {
|
||||
type: String,
|
||||
default: 'black',
|
||||
validate(value) {
|
||||
return VALID_COLORS.indexOf(value) > -1;
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
Reference in New Issue
Block a user