mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-14 01:53:55 +00:00
feat(nuxt): allow disabling color for <NuxtLoadingIndicator>
(#18432)
This commit is contained in:
parent
98d292ae85
commit
ea9812a559
@ -29,7 +29,7 @@ You can pass custom HTML or components through the loading indicator's default s
|
|||||||
|
|
||||||
## Props
|
## Props
|
||||||
|
|
||||||
- **color**: The color of the loading bar.
|
- **color**: The color of the loading bar. It can be set to `false` to turn off explicit color styling.
|
||||||
- **height**: Height of the loading bar, in pixels (default `3`).
|
- **height**: Height of the loading bar, in pixels (default `3`).
|
||||||
- **duration**: Duration of the loading bar, in milliseconds (default `2000`).
|
- **duration**: Duration of the loading bar, in milliseconds (default `2000`).
|
||||||
- **throttle**: Throttle the appearing and hiding, in milliseconds (default `200`).
|
- **throttle**: Throttle the appearing and hiding, in milliseconds (default `200`).
|
||||||
|
@ -17,7 +17,7 @@ export default defineComponent({
|
|||||||
default: 3
|
default: 3
|
||||||
},
|
},
|
||||||
color: {
|
color: {
|
||||||
type: String,
|
type: [String, Boolean],
|
||||||
default: 'repeating-linear-gradient(to right,#00dc82 0%,#34cdfe 50%,#0047e1 100%)'
|
default: 'repeating-linear-gradient(to right,#00dc82 0%,#34cdfe 50%,#0047e1 100%)'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -45,7 +45,7 @@ export default defineComponent({
|
|||||||
width: `${indicator.progress.value}%`,
|
width: `${indicator.progress.value}%`,
|
||||||
height: `${props.height}px`,
|
height: `${props.height}px`,
|
||||||
opacity: indicator.isLoading.value ? 1 : 0,
|
opacity: indicator.isLoading.value ? 1 : 0,
|
||||||
background: props.color,
|
background: props.color || undefined,
|
||||||
backgroundSize: `${(100 / indicator.progress.value) * 100}% auto`,
|
backgroundSize: `${(100 / indicator.progress.value) * 100}% auto`,
|
||||||
transition: 'width 0.1s, height 0.4s, opacity 0.4s',
|
transition: 'width 0.1s, height 0.4s, opacity 0.4s',
|
||||||
zIndex: 999999
|
zIndex: 999999
|
||||||
|
Loading…
Reference in New Issue
Block a user