亚洲乱码中文字幕综合,中国熟女仑乱hd,亚洲精品乱拍国产一区二区三区,一本大道卡一卡二卡三乱码全集资源,又粗又黄又硬又爽的免费视频

Vue加載中動(dòng)畫組件使用方法詳解

 更新時(shí)間:2022年03月04日 14:26:46   作者:theMuseCatcher  
這篇文章主要為大家詳細(xì)介紹了Vue加載中動(dòng)畫組件使用方法,文中示例代碼介紹的非常詳細(xì),具有一定的參考價(jià)值,感興趣的小伙伴們可以參考一下

本文實(shí)例為大家分享了Vue加載中動(dòng)畫組件的使用,供大家參考,具體內(nèi)容如下

(模仿ant-design加載中樣式)效果圖如下:

①創(chuàng)建Loading.vue組件:

<template>
? <div class="m-spin-dot">
? ? <span class="u-dot-item"></span>
? ? <span class="u-dot-item"></span>
? ? <span class="u-dot-item"></span>
? ? <span class="u-dot-item"></span>
? </div>
</template>
<script>
export default {
? name: 'Loading'
}
</script>
<style lang="less" scoped>
.m-spin-dot {
? // 水平垂直居中
? position: relative;
? top: calc(50% - 18px);
? margin: 0 auto;
? width: 36px;
? height: 36px;
? transform: rotate(45deg);
? -ms-transform: rotate(45deg); /* Internet Explorer */
? -moz-transform: rotate(45deg); /* Firefox */
? -webkit-transform: rotate(45deg); /* Safari 和 Chrome */
? -o-transform: rotate(45deg); /* Opera */
? animation: rotate 1.2s linear infinite;
? -webkit-animation: rotate 1.2s linear infinite;
? @keyframes rotate {
? ? 100% {transform: rotate(405deg);}
? }
? .u-dot-item { // 單個(gè)圓點(diǎn)樣式
? ? position: absolute;
? ? width: 10px;
? ? height: 10px;
? ? background: @mainColor;
? ? border-radius: 50%;
? ? opacity: .3;
? ? animation: spinMove 1s linear infinite alternate;
? ? -webkit-animation: spinMove 1s linear infinite alternate;
? ? @keyframes spinMove {
? ? ? 100% {opacity: 1;}
? ? }
? }
? .u-dot-item:first-child {
? ? top: 0;
? ? left: 0;
? }
? .u-dot-item:nth-child(2) {
? ? top: 0;
? ? right: 0;
? ? animation-delay: .4s;
? ? -webkit-animation-delay: .4s;
? }
? .u-dot-item:nth-child(3) {
? ? bottom: 0;
? ? right: 0;
? ? animation-delay: .8s;
? ? -webkit-animation-delay: .8s;
? }
? .u-dot-item:last-child {
? ? bottom: 0;
? ? left: 0;
? ? animation-delay: 1.2s;
? ? -webkit-animation-delay: 1.2s;
? }
}
</style>

②在要使用的頁面引用:

import Loading from '@/components/Loading'
components: {
? ? Loading
}
<div :class="['m-area', {'loading': isLoading}]"
?? ?<Loading />
</div>
.m-area {
?? ?margin: 0 auto;
?? ?width: 500px;
?? ?height: 400px;
?? ?background: #FFFFFF;
}
.loading { // 加載過程背景虛化
?? ?background: #fafafa;
?? ?pointer-events: none; // 屏蔽鼠標(biāo)事件
}

以上就是本文的全部?jī)?nèi)容,希望對(duì)大家的學(xué)習(xí)有所幫助,也希望大家多多支持腳本之家。

相關(guān)文章

  • Vue3中的h函數(shù)及使用小結(jié)

    Vue3中的h函數(shù)及使用小結(jié)

    這篇文章主要介紹了Vue3中的h函數(shù)及使用小結(jié),本文通過實(shí)例代碼給大家介紹的非常詳細(xì),對(duì)大家的學(xué)習(xí)或工作具有一定的參考借鑒價(jià)值,需要的朋友可以參考下
    2023-03-03
  • ubuntu中利用nginx部署vue項(xiàng)目的完整步驟

    ubuntu中利用nginx部署vue項(xiàng)目的完整步驟

    Nginx是一款輕量級(jí)的Web服務(wù)器/反向代理服務(wù)器及電子郵件(IMAP/POP3)代理服務(wù)器,在BSD-like 協(xié)議下發(fā)行,下面這篇文章主要給大家介紹了關(guān)于ubuntu中利用nginx部署vue項(xiàng)目的相關(guān)資料,需要的朋友可以參考下
    2022-02-02
  • Vue中如何給Window對(duì)象添加方法

    Vue中如何給Window對(duì)象添加方法

    這篇文章主要介紹了Vue中如何給Window對(duì)象添加方法,具有很好的參考價(jià)值,希望對(duì)大家有所幫助。如有錯(cuò)誤或未考慮完全的地方,望不吝賜教
    2022-04-04
  • vue3中的ref()詳解

    vue3中的ref()詳解

    ref對(duì)象可以通過.value屬性進(jìn)行修改,修改后的值也是響應(yīng)式的,并且修改后會(huì)觸發(fā)相關(guān)的副作用,這篇文章主要介紹了vue3中的ref(),需要的朋友可以參考下
    2023-05-05
  • Nuxt3嵌套路由,報(bào)錯(cuò)Failed?to?resolve?component:?NuxtChild的解決

    Nuxt3嵌套路由,報(bào)錯(cuò)Failed?to?resolve?component:?NuxtChild的解決

    這篇文章主要介紹了Nuxt3嵌套路由,報(bào)錯(cuò)Failed?to?resolve?component:?NuxtChild的解決方案,具有很好的參考價(jià)值,希望對(duì)大家有所幫助。如有錯(cuò)誤或未考慮完全的地方,望不吝賜教
    2023-06-06
  • Vue.js學(xué)習(xí)筆記之 helloworld

    Vue.js學(xué)習(xí)筆記之 helloworld

    vue是法語中視圖的意思,Vue.js是一個(gè)輕巧、高性能、可組件化的MVVM庫,同時(shí)擁有非常容易上手的API。有需要的小伙伴可以參考下
    2016-08-08
  • vue移動(dòng)端裁剪圖片結(jié)合插件Cropper的使用實(shí)例代碼

    vue移動(dòng)端裁剪圖片結(jié)合插件Cropper的使用實(shí)例代碼

    本篇文章主要介紹了vue移動(dòng)端裁剪圖片結(jié)合插件Cropper的使用實(shí)例代碼,具有一定的參考價(jià)值,感興趣的小伙伴們可以參考一下
    2017-07-07
  • Vue3中使用vuedraggable拖拽實(shí)戰(zhàn)教程

    Vue3中使用vuedraggable拖拽實(shí)戰(zhàn)教程

    這篇文章主要介紹了Vue3中使用vuedraggable拖拽實(shí)戰(zhàn)教程,文中通過示例介紹了vue3拖拽組件vuedraggable的使用demo,需要的朋友可以參考下
    2023-06-06
  • VUE常見知識(shí)疑點(diǎn)問題總結(jié)

    VUE常見知識(shí)疑點(diǎn)問題總結(jié)

    這篇文章主要介紹了VUE常見知識(shí)疑點(diǎn)問題總結(jié),詳細(xì)介紹了vue.js @click和v-on:click有什么區(qū)別,v-on和v-bind的區(qū)別,通過本文可以認(rèn)識(shí)Vue的export、export default、import的詳細(xì)介紹,感興趣的朋友一起看看吧
    2024-02-02
  • 如何在vue 中使用柱狀圖 并自修改配置

    如何在vue 中使用柱狀圖 并自修改配置

    這篇文章主要介紹了如何在vue 中使用柱狀圖 并自修改配置,幫助大家更好的理解和使用vue框架,感興趣的朋友可以了解下
    2021-01-01

最新評(píng)論