loading.vue 30 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793
  1. <template>
  2. <!-- 1、常用loading加载弹窗 -->
  3. <view class="aui-loading aui-loading-ring" :class="{'aui-loading-ring-row': direction == 'row'}" v-if="SHOW && type == 1">
  4. <view class="aui-mask" v-if="mask" @touchmove.stop.prevent></view>
  5. <view class="aui-loading-main">
  6. <view class="aui-loading-animate">
  7. <view class="span"></view>
  8. <view class="span"></view>
  9. <view class="span"></view>
  10. <view class="span"></view>
  11. <view class="span"></view>
  12. <view class="span"></view>
  13. <view class="span"></view>
  14. <view class="span"></view>
  15. <view class="span"></view>
  16. <view class="span"></view>
  17. <view class="span"></view>
  18. <view class="span"></view>
  19. </view>
  20. <view class="aui-loading-msg" v-if="msg">{{msg}}</view>
  21. </view>
  22. </view>
  23. <!-- 2、按钮内显示loading加载动画 -->
  24. <view class="aui-loading aui-loading-button" v-else-if="SHOW && type == 2">
  25. <view class="aui-loading-main" :style="{background: styles.background, borderRadius: styles.borderRadius, zIndex: styles.zIndex}">
  26. <view class="aui-loading-warp">
  27. <view class="aui-loading-animate">
  28. <view class="span" :style="{borderColor: styles.color}"></view>
  29. <view class="span" :style="{borderColor: styles.color}"></view>
  30. <view class="span" :style="{borderColor: styles.color}"></view>
  31. <view class="span" :style="{borderColor: styles.color}"></view>
  32. <view class="span" :style="{borderColor: styles.color}"></view>
  33. <view class="span" :style="{borderColor: styles.color}"></view>
  34. <view class="span" :style="{borderColor: styles.color}"></view>
  35. <view class="span" :style="{borderColor: styles.color}"></view>
  36. <view class="span" :style="{borderColor: styles.color}"></view>
  37. <view class="span" :style="{borderColor: styles.color}"></view>
  38. <view class="span" :style="{borderColor: styles.color}"></view>
  39. <view class="span" :style="{borderColor: styles.color}"></view>
  40. </view>
  41. <view class="aui-loading-msg" v-if="msg" :style="{color: styles.color}">{{msg}}</view>
  42. </view>
  43. </view>
  44. </view>
  45. <!-- 3、特殊风格loading加载弹窗 -> 四方块旋转 -->
  46. <view class="aui-loading aui-loading-squarefour" :class="{'aui-loading-squarefour-style-1': theme==1, 'aui-loading-squarefour-style-2': theme==2}" v-else-if="SHOW && type == 3">
  47. <view class="aui-mask" v-if="mask" @touchmove.stop.prevent></view>
  48. <view class="aui-loading-main" :style="{background: styles.background, zIndex: styles.zIndex}">
  49. <view class="aui-loading-animate">
  50. <view class="span1"></view>
  51. <view class="span2"></view>
  52. <view class="span3"></view>
  53. <view class="span4"></view>
  54. </view>
  55. <view class="aui-loading-msg" style="top: 40%;" v-if="msg" :style="{color: styles.color}">{{msg}}</view>
  56. </view>
  57. </view>
  58. <!-- 4、三平行四边形放大缩小(全屏首次加载过度动画) -->
  59. <view class="aui-loading aui-loading-dots" v-else-if="SHOW && type == 4">
  60. <view class="aui-mask" v-if="mask" @touchmove.stop.prevent></view>
  61. <view class="aui-loading-main">
  62. <view class="aui-loading-dot-items">
  63. <view class="aui-loading-dot-item dot_one"></view>
  64. <view class="aui-loading-dot-item dot_two"></view>
  65. <view class="aui-loading-dot-item dot_three"></view>
  66. </view>
  67. </view>
  68. </view>
  69. <!-- 5、三圆点背景过度(全屏首次加载过度动画) -->
  70. <view class="aui-loading aui-loading-dots-opacity" v-else-if="SHOW && type == 5">
  71. <view class="aui-mask" v-if="mask" @touchmove.stop.prevent></view>
  72. <view class="aui-loading-main">
  73. <view class="aui-loading-dot-items">
  74. <view class="aui-loading-dot-item dot_one"></view>
  75. <view class="aui-loading-dot-item dot_two"></view>
  76. <view class="aui-loading-dot-item dot_three"></view>
  77. </view>
  78. </view>
  79. </view>
  80. </template>
  81. <script>
  82. export default {
  83. name: "aui-loading",
  84. props: {
  85. type: { //默认圆环风格(<1>、1:toast圆环风格,<2>、2:点击按钮后在按钮内显示加载动画) <3>、3:四方块水平方向旋转,
  86. type: Number,
  87. default: 1
  88. },
  89. mask: { //是否显示遮罩,默认false
  90. type: Boolean,
  91. default: true
  92. },
  93. direction: { //横向("row")或纵向("col")控制,默认纵向
  94. type: String,
  95. default: 'row'
  96. },
  97. theme: { //控制风格 type==3时生效
  98. type: Number,
  99. default: 1
  100. },
  101. styles: { //样式
  102. type: Object,
  103. default () {
  104. return {
  105. color: '',
  106. borderRadius: '',
  107. background: '',
  108. zIndex: ''
  109. };
  110. }
  111. },
  112. },
  113. data() {
  114. return {
  115. msg:'加载中...',
  116. SHOW: false, //是否显示
  117. };
  118. },
  119. created(){
  120. //console.log(this.styles);
  121. },
  122. methods:{
  123. //显示
  124. show(msg='加载中...'){
  125. var _this = this;
  126. _this.msg=msg
  127. return new Promise(function(resolve, reject){
  128. _this.SHOW = true;
  129. var Timer = setTimeout(function(){
  130. clearTimeout(Timer)
  131. _this.hide(); //隐藏loading
  132. },2000)
  133. resolve();
  134. });
  135. },
  136. showLoading(msg='加载中...'){
  137. var _this = this;
  138. _this.msg=msg
  139. return new Promise(function(resolve, reject){
  140. _this.SHOW = true;
  141. resolve();
  142. });
  143. },
  144. //隐藏
  145. hide(){
  146. var _this = this;
  147. return new Promise(function(resolve, reject){
  148. _this.SHOW = false;
  149. resolve();
  150. });
  151. },
  152. }
  153. }
  154. </script>
  155. <style>
  156. /* loading加载弹窗 */
  157. /* loading-ring 样式设置 */
  158. .aui-loading.aui-loading-ring{
  159. width: 100%;
  160. height: 100%;
  161. position: fixed;
  162. top: 0;
  163. left: 0;
  164. z-index: 999;
  165. }
  166. .aui-loading.aui-loading-ring .aui-loading-main{
  167. width: auto;
  168. height: auto;
  169. min-width: 55px;
  170. min-height: 55px;
  171. background: rgba(0,0,0,.8);
  172. border-radius: 10px;
  173. box-shadow: 0 0 1px rgba(100,100,100,.5);
  174. padding: 15px;
  175. box-sizing: border-box;
  176. -ms-animation: aui-fade-in .1s ease-out forwards;
  177. -webkit-animation: aui-fade-in .1s ease-out forwards;
  178. animation: aui-fade-in .1s ease-out forwards;
  179. position: absolute;
  180. top: 40%;
  181. left: 50%;
  182. z-index: 999;
  183. -ms-transform: translate(-50%, -50%);
  184. -webkit-transform: translate(-50%, -50%);
  185. transform: translate(-50%, -50%);
  186. }
  187. .aui-loading.aui-loading-ring .aui-loading-animate{
  188. width: 25px;
  189. height: 25px;
  190. margin: 0 auto;
  191. border-radius: 50%;
  192. position: relative;
  193. z-index: 999;
  194. }
  195. .aui-loading.aui-loading-ring .aui-loading-msg{
  196. width: 100%;
  197. height: 17px;
  198. max-width: -webkit-calc(100vw - 40px);
  199. max-width: calc(100vw - 40px);
  200. line-height: 17px;
  201. position: relative;
  202. top: 5px;
  203. font-size: 13px;
  204. overflow: hidden;
  205. text-overflow: ellipsis;
  206. white-space: nowrap;
  207. color: #FFF;
  208. text-align: center;
  209. opacity: .8;
  210. }
  211. .aui-loading.aui-loading-ring .aui-loading-animate .span{
  212. width: -webkit-calc(100% - 6px);
  213. width: calc(100% - 6px);
  214. height: 2px;
  215. display: inline-block;
  216. border-radius: 2px;
  217. position: absolute;
  218. box-sizing: initial !important;
  219. top: -webkit-calc(50% - 1px);
  220. top: calc(50% - 1px);
  221. left: 0;
  222. opacity: 0.3;
  223. -ms-animation: load-button 0.6s ease infinite;
  224. -webkit-animation: load-button 0.6s ease infinite;
  225. animation: load-button 0.6s ease infinite;
  226. }
  227. .aui-loading.aui-loading-ring .aui-loading-animate .span:nth-child(1){
  228. border-left: 6px solid #FFF;
  229. -ms-transform: rotate(0deg);
  230. -webkit-transform: rotate(0deg);
  231. transform: rotate(0deg);
  232. -ms-animation-delay: 0.05s;
  233. -webkit-animation-delay: 0.05s;
  234. animation-delay: 0.05s;
  235. }
  236. .aui-loading.aui-loading-ring .aui-loading-animate .span:nth-child(2){
  237. border-left: 6px solid #FFF;
  238. -ms-transform: rotate(30deg);
  239. -webkit-transform: rotate(30deg);
  240. transform: rotate(30deg);
  241. -ms-animation-delay: 0.1s;
  242. -webkit-animation-delay: 0.1s;
  243. animation-delay: 0.1s;
  244. }
  245. .aui-loading.aui-loading-ring .aui-loading-animate .span:nth-child(3){
  246. border-left: 6px solid #FFF;
  247. -ms-transform: rotate(60deg);
  248. -webkit-transform: rotate(60deg);
  249. transform: rotate(60deg);
  250. -ms-animation-delay: 0.15s;
  251. -webkit-animation-delay: 0.15s;
  252. animation-delay: 0.15s;
  253. }
  254. .aui-loading.aui-loading-ring .aui-loading-animate .span:nth-child(4){
  255. border-left: 6px solid #FFF;
  256. -ms-transform: rotate(90deg);
  257. -webkit-transform: rotate(90deg);
  258. transform: rotate(90deg);
  259. -ms-animation-delay: 0.2s;
  260. -webkit-animation-delay: 0.2s;
  261. animation-delay: 0.2s;
  262. }
  263. .aui-loading.aui-loading-ring .aui-loading-animate .span:nth-child(5){
  264. border-left: 6px solid #FFF;
  265. -ms-transform: rotate(120deg);
  266. -webkit-transform: rotate(120deg);
  267. transform: rotate(120deg);
  268. -ms-animation-delay: 0.25s;
  269. -webkit-animation-delay: 0.25s;
  270. animation-delay: 0.25s;
  271. }
  272. .aui-loading.aui-loading-ring .aui-loading-animate .span:nth-child(6){
  273. border-left: 6px solid #FFF;
  274. -ms-transform: rotate(150deg);
  275. -webkit-transform: rotate(150deg);
  276. transform: rotate(150deg);
  277. -ms-animation-delay: 0.3s;
  278. -webkit-animation-delay: 0.3s;
  279. animation-delay: 0.3s;
  280. }
  281. .aui-loading.aui-loading-ring .aui-loading-animate .span:nth-child(7){
  282. border-right: 6px solid #FFF;
  283. -ms-transform: rotate(0deg);
  284. -webkit-transform: rotate(0deg);
  285. transform: rotate(0deg);
  286. -ms-animation-delay: 0.35s;
  287. -webkit-animation-delay: 0.35s;
  288. animation-delay: 0.35s;
  289. }
  290. .aui-loading.aui-loading-ring .aui-loading-animate .span:nth-child(8){
  291. border-right: 6px solid #FFF;
  292. -ms-transform: rotate(30deg);
  293. -webkit-transform: rotate(30deg);
  294. transform: rotate(30deg);
  295. -ms-animation-delay: 0.4s;
  296. -webkit-animation-delay: 0.4s;
  297. animation-delay: 0.4s;
  298. }
  299. .aui-loading.aui-loading-ring .aui-loading-animate .span:nth-child(9){
  300. border-right: 6px solid #FFF;
  301. -ms-transform: rotate(60deg);
  302. -webkit-transform: rotate(60deg);
  303. transform: rotate(60deg);
  304. -ms-animation-delay: 0.45s;
  305. -webkit-animation-delay: 0.45s;
  306. animation-delay: 0.45s;
  307. }
  308. .aui-loading.aui-loading-ring .aui-loading-animate .span:nth-child(10){
  309. border-right: 6px solid #FFF;
  310. -ms-transform: rotate(90deg);
  311. -webkit-transform: rotate(90deg);
  312. transform: rotate(90deg);
  313. -ms-animation-delay: 0.5s;
  314. -webkit-animation-delay: 0.5s;
  315. animation-delay: 0.5s;
  316. }
  317. .aui-loading.aui-loading-ring .aui-loading-animate .span:nth-child(11){
  318. border-right: 6px solid #FFF;
  319. -ms-transform: rotate(120deg);
  320. -webkit-transform: rotate(120deg);
  321. transform: rotate(120deg);
  322. -ms-animation-delay: 0.55s;
  323. -webkit-animation-delay: 0.55s;
  324. animation-delay: 0.55s;
  325. }
  326. .aui-loading.aui-loading-ring .aui-loading-animate .span:nth-child(12){
  327. border-right: 6px solid #FFF;
  328. -ms-transform: rotate(150deg);
  329. -webkit-transform: rotate(150deg);
  330. transform: rotate(150deg);
  331. -ms-animation-delay: 0.6s;
  332. -webkit-animation-delay: 0.6s;
  333. animation-delay: 0.6s;
  334. }
  335. .aui-loading.aui-loading-ring.aui-loading-ring-row .aui-loading-main{
  336. display: block;
  337. min-height: 40px;
  338. padding: 10px 15px;
  339. border-radius: 6px;
  340. }
  341. .aui-loading.aui-loading-ring.aui-loading-ring-row .aui-loading-animate{
  342. display: inline-block;
  343. vertical-align: top;
  344. }
  345. .aui-loading.aui-loading-ring.aui-loading-ring-row .aui-loading-msg{
  346. width: auto;
  347. height: 25px;
  348. line-height: 25px;
  349. top: 0;
  350. margin-left: 10px;
  351. display: inline-block;
  352. vertical-align: top;
  353. }
  354. /* loading-button 样式设置 */
  355. .aui-loading.aui-loading-button{
  356. width: 100%;
  357. height: 100%;
  358. position: absolute;
  359. top: 0;
  360. left: 0;
  361. }
  362. .aui-loading.aui-loading-button .aui-loading-main{
  363. width: 100%;
  364. height: 100%;
  365. text-align: center;
  366. position: absolute;
  367. top: 0;
  368. left: 0;
  369. z-index: 996;
  370. background: #FFF;
  371. white-space: nowrap;
  372. -ms-animation: aui-fade-in .2s ease-out forwards;
  373. -webkit-animation: aui-fade-in .2s ease-out forwards;
  374. animation: aui-fade-in .2s ease-out forwards;
  375. }
  376. .aui-loading.aui-loading-button .aui-loading-warp{
  377. width: auto;
  378. height: auto;
  379. display: flex;
  380. position: absolute;
  381. top: 50%;
  382. left: 50%;
  383. -webkit-transform: translate(-50%, -50%);
  384. transform: translate(-50%, -50%);
  385. }
  386. .aui-loading.aui-loading-button .aui-loading-animate{
  387. width: 20px;
  388. height: 20px;
  389. display: inline-block;
  390. vertical-align: top;
  391. position: relative;
  392. }
  393. .aui-loading.aui-loading-button .aui-loading-msg{
  394. height: 20px;
  395. line-height: 20px;
  396. font-size: 13px;
  397. margin-left: 5px;
  398. display: inline-block;
  399. vertical-align: top;
  400. position: relative;
  401. top: 1px;
  402. }
  403. .aui-loading.aui-loading-button .aui-loading-animate .span{
  404. width: -webkit-calc(100% - 6px);
  405. width: calc(100% - 6px);
  406. height: 2px;
  407. display: inline-block;
  408. border-radius: 2px;
  409. box-sizing: initial !important;
  410. position: absolute;
  411. top: -webkit-calc(50% - 1px);
  412. top: calc(50% - 1px);
  413. left: 0;
  414. opacity: 0.3;
  415. -ms-animation: load-button 0.6s ease infinite;
  416. -webkit-animation: load-button 0.6s ease infinite;
  417. animation: load-button 0.6s ease infinite;
  418. }
  419. .aui-loading.aui-loading-button .aui-loading-animate .span:nth-child(1){
  420. border-left: 5px solid #909090;
  421. -ms-transform: rotate(0deg);
  422. -webkit-transform: rotate(0deg);
  423. transform: rotate(0deg);
  424. -ms-animation-delay: 0.05s;
  425. -webkit-animation-delay: 0.05s;
  426. animation-delay: 0.05s;
  427. }
  428. .aui-loading.aui-loading-button .aui-loading-animate .span:nth-child(2){
  429. border-left: 5px solid #909090;
  430. -ms-transform: rotate(30deg);
  431. -webkit-transform: rotate(30deg);
  432. transform: rotate(30deg);
  433. -ms-animation-delay: 0.1s;
  434. -webkit-animation-delay: 0.1s;
  435. animation-delay: 0.1s;
  436. }
  437. .aui-loading.aui-loading-button .aui-loading-animate .span:nth-child(3){
  438. border-left: 5px solid #909090;
  439. -ms-transform: rotate(60deg);
  440. -webkit-transform: rotate(60deg);
  441. transform: rotate(60deg);
  442. -ms-animation-delay: 0.15s;
  443. -webkit-animation-delay: 0.15s;
  444. animation-delay: 0.15s;
  445. }
  446. .aui-loading.aui-loading-button .aui-loading-animate .span:nth-child(4){
  447. border-left: 5px solid #909090;
  448. -ms-transform: rotate(90deg);
  449. -webkit-transform: rotate(90deg);
  450. transform: rotate(90deg);
  451. -ms-animation-delay: 0.2s;
  452. -webkit-animation-delay: 0.2s;
  453. animation-delay: 0.2s;
  454. }
  455. .aui-loading.aui-loading-button .aui-loading-animate .span:nth-child(5){
  456. border-left: 5px solid #909090;
  457. -ms-transform: rotate(120deg);
  458. -webkit-transform: rotate(120deg);
  459. transform: rotate(120deg);
  460. -ms-animation-delay: 0.25s;
  461. -webkit-animation-delay: 0.25s;
  462. animation-delay: 0.25s;
  463. }
  464. .aui-loading.aui-loading-button .aui-loading-animate .span:nth-child(6){
  465. border-left: 5px solid #909090;
  466. -ms-transform: rotate(150deg);
  467. -webkit-transform: rotate(150deg);
  468. transform: rotate(150deg);
  469. -ms-animation-delay: 0.3s;
  470. -webkit-animation-delay: 0.3s;
  471. animation-delay: 0.3s;
  472. }
  473. .aui-loading.aui-loading-button .aui-loading-animate .span:nth-child(7){
  474. border-right: 5px solid #909090;
  475. -ms-transform: rotate(0deg);
  476. -webkit-transform: rotate(0deg);
  477. transform: rotate(0deg);
  478. -ms-animation-delay: 0.35s;
  479. -webkit-animation-delay: 0.35s;
  480. animation-delay: 0.35s;
  481. }
  482. .aui-loading.aui-loading-button .aui-loading-animate .span:nth-child(8){
  483. border-right: 5px solid #909090;
  484. -ms-transform: rotate(30deg);
  485. -webkit-transform: rotate(30deg);
  486. transform: rotate(30deg);
  487. -ms-animation-delay: 0.4s;
  488. -webkit-animation-delay: 0.4s;
  489. animation-delay: 0.4s;
  490. }
  491. .aui-loading.aui-loading-button .aui-loading-animate .span:nth-child(9){
  492. border-right: 5px solid #909090;
  493. -ms-transform: rotate(60deg);
  494. -webkit-transform: rotate(60deg);
  495. transform: rotate(60deg);
  496. -ms-animation-delay: 0.45s;
  497. -webkit-animation-delay: 0.45s;
  498. animation-delay: 0.45s;
  499. }
  500. .aui-loading.aui-loading-button .aui-loading-animate .span:nth-child(10){
  501. border-right: 5px solid #909090;
  502. -ms-transform: rotate(90deg);
  503. -webkit-transform: rotate(90deg);
  504. transform: rotate(90deg);
  505. -ms-animation-delay: 0.5s;
  506. -webkit-animation-delay: 0.5s;
  507. animation-delay: 0.5s;
  508. }
  509. .aui-loading.aui-loading-button .aui-loading-animate .span:nth-child(11){
  510. border-right: 5px solid #909090;
  511. -ms-transform: rotate(120deg);
  512. -webkit-transform: rotate(120deg);
  513. transform: rotate(120deg);
  514. -ms-animation-delay: 0.55s;
  515. -webkit-animation-delay: 0.55s;
  516. animation-delay: 0.55s;
  517. }
  518. .aui-loading.aui-loading-button .aui-loading-animate .span:nth-child(12){
  519. border-right: 5px solid #909090;
  520. -ms-transform: rotate(150deg);
  521. -webkit-transform: rotate(150deg);
  522. transform: rotate(150deg);
  523. -ms-animation-delay: 0.6s;
  524. -webkit-animation-delay: 0.6s;
  525. animation-delay: 0.6s;
  526. }
  527. /* loading-squarefour 样式设置 */
  528. .aui-loading.aui-loading-squarefour{
  529. width: 100%;
  530. height: 100%;
  531. position: fixed;
  532. top: 0;
  533. left: 0;
  534. z-index: 999;
  535. }
  536. .aui-loading.aui-loading-squarefour .aui-loading-main{
  537. width: 100%;
  538. height: 100%;
  539. position: absolute;
  540. top: 0;
  541. left: 0;
  542. z-index: 996;
  543. background: #FFF;
  544. -ms-animation: aui-fade-in .2s ease-out forwards;
  545. -webkit-animation: aui-fade-in .2s ease-out forwards;
  546. animation: aui-fade-in .2s ease-out forwards;
  547. }
  548. .aui-loading.aui-loading-squarefour .aui-loading-animate{
  549. width: 30px;
  550. height: 30px;
  551. display: block;
  552. margin: auto;
  553. position: absolute;
  554. top: -webkit-calc(50% - 15px);
  555. top: calc(40% - 25px);
  556. left: -webkit-calc(50% - 15px);
  557. left: calc(50% - 15px);
  558. -ms-animation: aui-loading-squarefour-animate 1s infinite;
  559. -webkit-animation: aui-loading-squarefour-animate 1s infinite;
  560. animation: aui-loading-squarefour-animate 1s infinite;
  561. }
  562. .aui-loading.aui-loading-squarefour .aui-loading-animate view{
  563. width: 12px;
  564. height: 12px;
  565. display: block;
  566. border-radius: 2px;
  567. background: #2cb0b2;
  568. position: absolute;
  569. }
  570. .aui-loading.aui-loading-squarefour .aui-loading-animate .span1{
  571. background: #8BC34A;
  572. left: 0px;
  573. -ms-animation: aui-loading-square-span1-animate 2s linear 0s infinite normal;
  574. -webkit-animation: aui-loading-square-span1-animate 2s linear 0s infinite normal;
  575. animation: aui-loading-square-span1-animate 2s linear 0s infinite normal;
  576. }
  577. .aui-loading.aui-loading-squarefour .aui-loading-animate .span2{
  578. background: #F44336;
  579. right: 0;
  580. -ms-animation: aui-loading-square-span2-animate 2s linear 0s infinite normal;
  581. -webkit-animation: aui-loading-square-span2-animate 2s linear 0s infinite normal;
  582. animation: aui-loading-square-span2-animate 2s linear 0s infinite normal;
  583. }
  584. .aui-loading.aui-loading-squarefour .aui-loading-animate .span3{
  585. background: #FFB74D;
  586. bottom: 0;
  587. -ms-animation: aui-loading-square-span3-animate 2s linear 0s infinite normal;
  588. -webkit-animation: aui-loading-square-span3-animate 2s linear 0s infinite normal;
  589. animation: aui-loading-square-span3-animate 2s linear 0s infinite normal;
  590. }
  591. .aui-loading.aui-loading-squarefour .aui-loading-animate .span4{
  592. background: #82bcf9;
  593. right: 0;
  594. bottom: 0;
  595. -ms-animation: aui-loading-square-span4-animate 2s linear 0s infinite normal;
  596. -webkit-animation: aui-loading-square-span4-animate 2s linear 0s infinite normal;
  597. animation: aui-loading-square-span4-animate 2s linear 0s infinite normal;
  598. }
  599. .aui-loading.aui-loading-squarefour .aui-loading-msg{
  600. width: 100%;
  601. height: 50px;
  602. line-height: 60px;
  603. font-size: 13px;
  604. color: #909090;
  605. text-align: center;
  606. position: absolute;
  607. top: 50%;
  608. left: 0;
  609. }
  610. .aui-loading.aui-loading-squarefour.aui-loading-squarefour-style-2{
  611. z-index: 996;
  612. }
  613. .aui-loading.aui-loading-squarefour.aui-loading-squarefour-style-1{
  614. z-index: 999;
  615. }
  616. .aui-loading.aui-loading-squarefour.aui-loading-squarefour-style-1 .aui-loading-main{
  617. width: auto;
  618. height: auto;
  619. min-width: 54px;
  620. min-height: 54px;
  621. background: rgba(0,0,0,.8);
  622. border-radius: 10px;
  623. box-shadow: 0 0 1px rgba(100,100,100,.3) inset;
  624. padding: 15px;
  625. box-sizing: border-box;
  626. top: 50%;
  627. left: 50%;
  628. z-index: 999;
  629. -ms-transform: translate(-50%, -50%);
  630. -webkit-transform: translate(-50%, -50%);
  631. transform: translate(-50%, -50%);
  632. }
  633. .aui-loading.aui-loading-squarefour.aui-loading-squarefour-style-1 .aui-loading-main .aui-loading-animate{
  634. position: relative;
  635. top: 0;
  636. left: 0;
  637. }
  638. .aui-loading.aui-loading-squarefour.aui-loading-squarefour-style-1 .aui-loading-main .aui-loading-msg{
  639. height: 22px;
  640. line-height: 20px;
  641. padding: 0 10px;
  642. box-sizing: border-box;
  643. font-size: 14px;
  644. color: #FFF;
  645. opacity: 0.9;
  646. position: relative;
  647. top: 6px;
  648. left: 0;
  649. }
  650. /* 三平行四边形放大缩小动画放大缩小动画(全屏首次加载过度动画) */
  651. .aui-loading.aui-loading-dots{background-color: #FFF; height: 100%; width: 100%; position: fixed; z-index: 996; margin-top: 0px; top: 0px;}
  652. .aui-loading.aui-loading-dots .aui-loading-main{width: 100%;height: 100%;position: relative;}
  653. .aui-loading.aui-loading-dots .aui-loading-dot-items {position: absolute;left: 50%;top: 50%;height: 60px;width: 120px; text-align: center; margin-top: -30px;margin-left: -60px;}
  654. .aui-loading.aui-loading-dots .aui-loading-dot-item{width: 10px;height: 10px; background-color: #ec2b45; display: inline-block; margin-right: 6px; margin-top: 20px; border-radius: 2px; -webkit-transform: scale(1) skewX(-30deg); transform: scale(1) skewX(-30deg);}
  655. .aui-loading.aui-loading-dots .dot_one {background: #197DE0; -webkit-animation: dot_one 1.5s infinite; animation: dot_one 1.5s infinite;}
  656. .aui-loading.aui-loading-dots .dot_two {background: #2CB0B2; -webkit-animation: dot_two 1.5s infinite; animation: dot_two 1.5s infinite; -webkit-animation-delay: 0.2s; animation-delay: 0.2s;}
  657. .aui-loading.aui-loading-dots .dot_three {background: #4CD964; margin-right: 0; -webkit-animation: dot_three 1.5s infinite; animation: dot_three 1.5s infinite; -webkit-animation-delay: 0.4s; animation-delay: 0.4s;}
  658. /* 圆点背景过度动画-微信小程序效果(全屏首次加载过度动画) */
  659. .aui-loading.aui-loading-dots-opacity{background-color: #FFF; height: 100%; width: 100%; position: fixed; z-index: 996; margin-top: 0px; top: 0px;}
  660. .aui-loading.aui-loading-dots-opacity .aui-loading-main{width: 100%;height: 100%;position: relative;}
  661. .aui-loading.aui-loading-dots-opacity .aui-loading-dot-items {position: absolute;left: 50%;top: 50%;height: 60px;width: 80px; text-align: center; margin-top: -30px;margin-left: -40px;}
  662. .aui-loading.aui-loading-dots-opacity .aui-loading-dot-item{width: 9px;height: 9px; opacity: 1; background-color: #ec2b45; display: inline-block; margin-right: 8px;margin-top: 30px;-moz-border-radius: 50% 50% 50% 50%;-webkit-border-radius: 50% 50% 50% 50%;border-radius: 50% 50% 50% 50%;}
  663. .aui-loading.aui-loading-dots-opacity .dot_one {background: #197DE0;-webkit-animation: dot-opacity 1.5s infinite; animation: dot-opacity 1.5s infinite;}
  664. .aui-loading.aui-loading-dots-opacity .dot_two {background: #2CB0B2;-webkit-animation: dot-opacity 1.5s infinite; animation: dot-opacity 1.5s infinite; -webkit-animation-delay: 0.25s; animation-delay: 0.25s;}
  665. .aui-loading.aui-loading-dots-opacity .dot_three {background: #4CD964;margin-right: 0; -webkit-animation: dot-opacity 1.5s infinite; animation: dot-opacity 1.5s infinite; -webkit-animation-delay: 0.5s; animation-delay: 0.5s;}
  666. @-webkit-keyframes dot-opacity {
  667. 50% {opacity: 0.1; }
  668. }
  669. @keyframes dot-opacity {
  670. 50% {opacity: 0.1; }
  671. }
  672. @-webkit-keyframes dot_one {
  673. 75% {-webkit-transform: scale(0) skewX(-30deg); }
  674. }
  675. @keyframes dot_one {
  676. 75% {transform: scale(0) skewX(-30deg); -webkit-transform: scale(0) skewX(-30deg);}
  677. }
  678. @-webkit-keyframes dot_two {
  679. 75% {-webkit-transform: scale(0) skewX(-30deg); }
  680. }
  681. @keyframes dot_two {
  682. 75% {transform: scale(0) skewX(-30deg); -webkit-transform: scale(0) skewX(-30deg);}
  683. }
  684. @-webkit-keyframes dot_three {
  685. 75% {-webkit-transform: scale(0) skewX(-30deg); }
  686. }
  687. @keyframes dot_three {
  688. 75% {transform: scale(0) skewX(-30deg);-webkit-transform: scale(0) skewX(-30deg);}
  689. }
  690. /* loading加载弹窗 load-button 动画 */
  691. @-ms-keyframes load-button {
  692. 0% {opacity: 1;}
  693. 100% {opacity: 0.3;}
  694. }
  695. @-webkit-keyframes load-button {
  696. 0% {opacity: 1;}
  697. 100% {opacity: 0.3;}
  698. }
  699. @keyframes load-button {
  700. 0% {opacity: 1;}
  701. 100% {opacity: 0.3;}
  702. }
  703. /* loading加载弹窗 aui-loading-squarefour 动画 */
  704. @-ms-keyframes aui-loading-squarefour-animate{
  705. 0%{-ms-transform: rotate(0deg); -webkit-transform: rotate(0deg); transform: rotate(0deg);}
  706. 100%{-ms-transform: rotate(360deg); -webkit-transform: rotate(360deg); transform: rotate(360deg);}
  707. }
  708. @-webkit-keyframes aui-loading-squarefour-animate{
  709. 0%{-ms-transform: rotate(0deg); -webkit-transform: rotate(0deg); transform: rotate(0deg);}
  710. 100%{-ms-transform: rotate(360deg); -webkit-transform: rotate(360deg); transform: rotate(360deg);}
  711. }
  712. @keyframes aui-loading-squarefour-animate{
  713. 0%{-ms-transform: rotate(0deg); -webkit-transform: rotate(0deg); transform: rotate(0deg);}
  714. 100%{-ms-transform: rotate(360deg); -webkit-transform: rotate(360deg); transform: rotate(360deg);}
  715. }
  716. @-ms-keyframes aui-loading-square-span1-animate{
  717. 0%{-ms-transform: translate(0, 0); -webkit-transform: translate(0, 0); transform: translate(0, 0);}
  718. 25%{-ms-transform: translate(0, 18px); -webkit-transform: translate(0, 18px); transform: translate(0, 18px);}
  719. 50%{-ms-transform: translate(18px, 18px); -webkit-transform: translate(18px, 18px); transform: translate(18px, 18px);}
  720. 75%{-ms-transform: translate(18px, 0); -webkit-transform: translate(18px, 0); transform: translate(18px, 0);}
  721. }
  722. @-webkit-keyframes aui-loading-square-span1-animate{
  723. 0%{-ms-transform: translate(0, 0); -webkit-transform: translate(0, 0); transform: translate(0, 0);}
  724. 25%{-ms-transform: translate(0, 18px); -webkit-transform: translate(0, 18px); transform: translate(0, 18px);}
  725. 50%{-ms-transform: translate(18px, 18px); -webkit-transform: translate(18px, 18px); transform: translate(18px, 18px);}
  726. 75%{-ms-transform: translate(18px, 0); -webkit-transform: translate(18px, 0); transform: translate(18px, 0);}
  727. }
  728. @keyframes aui-loading-square-span1-animate{
  729. 0%{-ms-transform: translate(0, 0); -webkit-transform: translate(0, 0); transform: translate(0, 0);}
  730. 25%{-ms-transform: translate(0, 18px); -webkit-transform: translate(0, 18px); transform: translate(0, 18px);}
  731. 50%{-ms-transform: translate(18px, 18px); -webkit-transform: translate(18px, 18px); transform: translate(18px, 18px);}
  732. 75%{-ms-transform: translate(18px, 0); -webkit-transform: translate(18px, 0); transform: translate(18px, 0);}
  733. }
  734. @-ms-keyframes aui-loading-square-span2-animate{
  735. 0%{-ms-transform: translate(0, 0); -webkit-transform: translate(0, 0); transform: translate(0, 0);}
  736. 25%{-ms-transform: translate(-18px, 0); -webkit-transform: translate(-18px, 0); transform: translate(-18px, 0);}
  737. 50%{-ms-transform: translate(-18px, 18px); -webkit-transform: translate(-18px, 18px); transform: translate(-18px, 18px);}
  738. 75%{-ms-transform: translate(0, 18px); -webkit-transform: translate(0, 18px); transform: translate(0, 18px);}
  739. }
  740. @-webkit-keyframes aui-loading-square-span2-animate{
  741. 0%{-ms-transform: translate(0, 0); -webkit-transform: translate(0, 0); transform: translate(0, 0);}
  742. 25%{-ms-transform: translate(-18px, 0); -webkit-transform: translate(-18px, 0); transform: translate(-18px, 0);}
  743. 50%{-ms-transform: translate(-18px, 18px); -webkit-transform: translate(-18px, 18px); transform: translate(-18px, 18px);}
  744. 75%{-ms-transform: translate(0, 18px); -webkit-transform: translate(0, 18px); transform: translate(0, 18px);}
  745. }
  746. @keyframes aui-loading-square-span2-animate{
  747. 0%{-ms-transform: translate(0, 0); -webkit-transform: translate(0, 0); transform: translate(0, 0);}
  748. 25%{-ms-transform: translate(-18px, 0); -webkit-transform: translate(-18px, 0); transform: translate(-18px, 0);}
  749. 50%{-ms-transform: translate(-18px, 18px); -webkit-transform: translate(-18px, 18px); transform: translate(-18px, 18px);}
  750. 75%{-ms-transform: translate(0, 18px); -webkit-transform: translate(0, 18px); transform: translate(0, 18px);}
  751. }
  752. @-ms-keyframes aui-loading-square-span3-animate{
  753. 0%{-ms-transform: translate(0, 0); -webkit-transform: translate(0, 0); transform: translate(0, 0);}
  754. 25%{-ms-transform: translate(18px, 0); -webkit-transform: translate(18px, 0); transform: translate(18px, 0);}
  755. 50%{-ms-transform: translate(18px, -18px); -webkit-transform: translate(18px, -18px); transform: translate(18px, -18px);}
  756. 75%{-ms-transform: translate(0, -18px); -webkit-transform: translate(0, -18px); transform: translate(0, -18px);}
  757. }
  758. @-webkit-keyframes aui-loading-square-span3-animate{
  759. 0%{-ms-transform: translate(0, 0); -webkit-transform: translate(0, 0); transform: translate(0, 0);}
  760. 25%{-ms-transform: translate(18px, 0); -webkit-transform: translate(18px, 0); transform: translate(18px, 0);}
  761. 50%{-ms-transform: translate(18px, -18px); -webkit-transform: translate(18px, -18px); transform: translate(18px, -18px);}
  762. 75%{-ms-transform: translate(0, -18px); -webkit-transform: translate(0, -18px); transform: translate(0, -18px);}
  763. }
  764. @keyframes aui-loading-square-span3-animate{
  765. 0%{-ms-transform: translate(0, 0); -webkit-transform: translate(0, 0); transform: translate(0, 0);}
  766. 25%{-ms-transform: translate(18px, 0); -webkit-transform: translate(18px, 0); transform: translate(18px, 0);}
  767. 50%{-ms-transform: translate(18px, -18px); -webkit-transform: translate(18px, -18px); transform: translate(18px, -18px);}
  768. 75%{-ms-transform: translate(0, -18px); -webkit-transform: translate(0, -18px); transform: translate(0, -18px);}
  769. }
  770. @-ms-keyframes aui-loading-square-span4-animate{
  771. 0%{-ms-transform: translate(0, 0); -webkit-transform: translate(0, 0); transform: translate(0, 0);}
  772. 25%{-ms-transform: translate(0, -18px); -webkit-transform: translate(0, -18px); transform: translate(0, -18px);}
  773. 50%{-ms-transform: translate(-18px, -18px); -webkit-transform: translate(-18px, -18px); transform: translate(-18px, -18px);}
  774. 75%{-ms-transform: translate(-18px, 0); -webkit-transform: translate(-18px, 0); transform: translate(-18px, 0);}
  775. }
  776. @-webkit-keyframes aui-loading-square-span4-animate{
  777. 0%{-ms-transform: translate(0, 0); -webkit-transform: translate(0, 0); transform: translate(0, 0);}
  778. 25%{-ms-transform: translate(0, -18px); -webkit-transform: translate(0, -18px); transform: translate(0, -18px);}
  779. 50%{-ms-transform: translate(-18px, -18px); -webkit-transform: translate(-18px, -18px); transform: translate(-18px, -18px);}
  780. 75%{-ms-transform: translate(-18px, 0); -webkit-transform: translate(-18px, 0); transform: translate(-18px, 0);}
  781. }
  782. @keyframes aui-loading-square-span4-animate{
  783. 0%{-ms-transform: translate(0, 0); -webkit-transform: translate(0, 0); transform: translate(0, 0);}
  784. 25%{-ms-transform: translate(0, -18px); -webkit-transform: translate(0, -18px); transform: translate(0, -18px);}
  785. 50%{-ms-transform: translate(-18px, -18px); -webkit-transform: translate(-18px, -18px); transform: translate(-18px, -18px);}
  786. 75%{-ms-transform: translate(-18px, 0); -webkit-transform: translate(-18px, 0); transform: translate(-18px, 0);}
  787. }
  788. </style>