【Element】ElLoading 自定义动画

import { ElLoading } from "element-plus";
LoadingInstance = ElLoading.service({
	background: "rgba(0, 0, 0, 0.7)",
	customClass: "ElLoading_class",
});
// 主页面自定义加载动画 (按照自己需求修改)
.ElLoading_class .el-loading-spinner {
	height: 140px;
	background: url("@/assets/loading/icon.png") no-repeat;
	background-position: center center;
	background-size: 88px 88px;
	.circular {
		width: 75px !important;
		height: 100% !important;
		animation: loading 2s linear infinite;
		transform-origin: left center;
		position: relative;
		left: 37px;
		@keyframes loading {
			0% {
				transform: rotate(0deg);
			}
			100% {
				transform: rotate(360deg);
			}
		}
		background: url("@/assets/loading/line.png") no-repeat center center;
		.path {
			display: none;
		}
	}
}
posted @ 2023-03-13 10:00  努力挣钱的小鑫  阅读(342)  评论(0编辑  收藏  举报