暂无描述
您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

authloader.js 2.2KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130
  1. const template = document.createElement('template');
  2. template.innerHTML = `
  3. <style>
  4. .authloaderanwi {
  5. display: flex;
  6. justify-content: center;
  7. align-items: center;
  8. }
  9. .wrap{
  10. position:absolute;
  11. left:50%;
  12. width:5em;
  13. height:5em;
  14. top:20%;
  15. transform: translate(-50%,-50%);
  16. }
  17. .loader{
  18. transition: all 0.7s ease-in-out;
  19. border:10px solid #ebebeb;
  20. border-bottom-color:#26B8BF;
  21. width: 100px;
  22. height: 100px;
  23. border-radius:50%;
  24. -webkit-font-smoothing: antialiased !important;
  25. margin:30px 0px;
  26. }
  27. #lrd1{
  28. -webkit-animation: spin1 0.5s linear infinite;
  29. }
  30. #lrd2{
  31. -webkit-animation: spin2 3s ease-in-out infinite;
  32. }
  33. #lrd3{
  34. -webkit-animation: spin3 15s ease-in-out infinite;
  35. }
  36. @keyframes spin1{
  37. 0% {
  38. transform: rotate(0deg);
  39. }
  40. 100% {
  41. transform: rotate(360deg);
  42. }
  43. }
  44. @keyframes spin2{
  45. 0% {
  46. transform: rotate(0deg);
  47. }
  48. 50% {
  49. transform: rotate(1020deg);
  50. }
  51. 100% {
  52. transform: rotate(720deg);
  53. }
  54. }
  55. @keyframes spin3{
  56. 0% {
  57. transform: rotate(0deg);
  58. }
  59. 40% {
  60. transform: rotate(1070deg);
  61. }
  62. 100% {
  63. transform: rotate(6119deg);
  64. border-bottom-color:#072426 !important;
  65. }
  66. }
  67. .authloaderanwi {
  68. height: 100vh;
  69. }
  70. .overlayanwiAuth{
  71. width:100vw;
  72. height:100vh;
  73. background:white;
  74. position:fixed;
  75. top:0;
  76. right:0;
  77. z-index:99999;
  78. display:none;
  79. }
  80. </style>
  81. <div class="overlayanwiAuth ">
  82. <div class="authloaderanwi">
  83. <div class='loader' id='lrd1'></div>
  84. </div>
  85. </div>
  86. `
  87. class AuthLoader extends HTMLElement {
  88. constructor() {
  89. super();
  90. this._shadowRoot = this.attachShadow({ 'mode': 'open' });
  91. this._shadowRoot.appendChild(template.content.cloneNode(true));
  92. }
  93. show(){
  94. // $('.overlayanwiAuth').css('display','block');
  95. this._shadowRoot.querySelector('.overlayanwiAuth').style.display = "block";
  96. }
  97. hide(){
  98. // $('.overlayanwiAuth').addClass('display','none');
  99. this._shadowRoot.querySelector('.overlayanwiAuth').style.display = "none";
  100. }
  101. }
  102. window.customElements.define('auth-loader', AuthLoader);