[Improvement] Toast: add loadingType option (#1049)
This commit is contained in:
@@ -9,6 +9,7 @@ const defaultOptions = {
|
||||
value: true,
|
||||
duration: 3000,
|
||||
position: 'middle',
|
||||
loadingType: 'circular',
|
||||
forbidClick: false,
|
||||
overlayStyle: {}
|
||||
};
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
|
||||
<!-- with icon -->
|
||||
<template v-if="displayStyle === 'default'">
|
||||
<loading v-if="type === 'loading'" color="white" />
|
||||
<loading v-if="type === 'loading'" color="white" :type="loadingType" />
|
||||
<icon v-else :class="b('icon')" :name="type" />
|
||||
<div v-if="hasMessage" :class="b('text')">{{ message }}</div>
|
||||
</template>
|
||||
@@ -32,6 +32,10 @@ export default create({
|
||||
type: String,
|
||||
default: 'text'
|
||||
},
|
||||
loadingType: {
|
||||
type: String,
|
||||
default: 'circular'
|
||||
},
|
||||
position: {
|
||||
type: String,
|
||||
default: 'middle'
|
||||
|
||||
Reference in New Issue
Block a user