2023-05-24 11:44:15 +00:00
|
|
|
<script>
|
|
|
|
import BaseComponent from 'primevue/basecomponent';
|
|
|
|
import { useStyle } from 'primevue/usestyle';
|
|
|
|
|
|
|
|
const styles = `
|
2023-09-26 06:40:02 +00:00
|
|
|
@layer primevue.core {
|
2023-09-25 19:11:55 +00:00
|
|
|
.p-progress-spinner {
|
|
|
|
position: relative;
|
|
|
|
margin: 0 auto;
|
|
|
|
width: 100px;
|
|
|
|
height: 100px;
|
|
|
|
display: inline-block;
|
|
|
|
}
|
|
|
|
|
|
|
|
.p-progress-spinner::before {
|
|
|
|
content: '';
|
|
|
|
display: block;
|
|
|
|
padding-top: 100%;
|
|
|
|
}
|
|
|
|
|
|
|
|
.p-progress-spinner-svg {
|
|
|
|
height: 100%;
|
|
|
|
transform-origin: center center;
|
|
|
|
width: 100%;
|
|
|
|
position: absolute;
|
|
|
|
top: 0;
|
|
|
|
bottom: 0;
|
|
|
|
left: 0;
|
|
|
|
right: 0;
|
|
|
|
margin: auto;
|
|
|
|
}
|
2023-05-24 11:44:15 +00:00
|
|
|
}
|
|
|
|
`;
|
|
|
|
|
|
|
|
const classes = {
|
|
|
|
root: 'p-progress-spinner',
|
|
|
|
spinner: 'p-progress-spinner-svg',
|
|
|
|
circle: 'p-progress-spinner-circle'
|
|
|
|
};
|
|
|
|
|
2023-07-03 22:20:35 +00:00
|
|
|
const { load: loadStyle } = useStyle(styles, { name: 'progressspinner', manual: true });
|
2023-05-24 11:44:15 +00:00
|
|
|
|
|
|
|
export default {
|
|
|
|
name: 'BaseProgressSpinner',
|
|
|
|
extends: BaseComponent,
|
|
|
|
props: {
|
|
|
|
strokeWidth: {
|
|
|
|
type: String,
|
|
|
|
default: '2'
|
|
|
|
},
|
|
|
|
fill: {
|
|
|
|
type: String,
|
|
|
|
default: 'none'
|
|
|
|
},
|
|
|
|
animationDuration: {
|
|
|
|
type: String,
|
|
|
|
default: '2s'
|
|
|
|
}
|
|
|
|
},
|
|
|
|
css: {
|
2023-05-30 12:28:04 +00:00
|
|
|
classes,
|
|
|
|
loadStyle
|
2023-05-24 11:44:15 +00:00
|
|
|
},
|
2023-05-30 12:28:04 +00:00
|
|
|
provide() {
|
|
|
|
return {
|
|
|
|
$parentInstance: this
|
|
|
|
};
|
2023-05-24 11:44:15 +00:00
|
|
|
}
|
|
|
|
};
|
|
|
|
</script>
|