3.19 Spinner 加载中
0x00 简介
0x01 Spinner 组件
<template>
<span class="el-spinner">
<svg
class="el-spinner-inner"
viewBox="0 0 50 50"
:style="{ width: radius/2 + 'px', height: radius/2 + 'px' }"
>
<circle
class="path"
cx="25"
cy="25"
r="20"
fill="none"
:stroke="strokeColor"
:stroke-width="strokeWidth"
></circle>
</svg>
</span>
</template>
<script>
export default {
name: "ElSpinner",
props: {
type: String,
radius: {
type: Number,
default: 100,
},
strokeWidth: {
type: Number,
default: 5,
},
strokeColor: {
type: String,
default: "#efefef",
},
},
};
</script>参数
说明
类型
默认值
0x02 组件样式
src/spinner.scss
lib/spinner.css
0x03 CSS 动画
0x04 📚 参考
最后更新于