当前位置: 首页 > news >正文

维护网站信息网站指数查询

维护网站信息,网站指数查询,临沂专业做网站,外贸网站怎么做seo“< Transition >” 是一个内置组件&#xff0c;这意味着它在任意别的组件中都可以被使用&#xff0c;无需注册。它可以将进入和离开动画应用到通过默认插槽传递给它的元素或组件上。进入或离开可以由以下的条件之一触发&#xff1a; 由 v-if 所触发的切换由 v-show 所触…

“< Transition >” 是一个内置组件,这意味着它在任意别的组件中都可以被使用,无需注册。它可以将进入和离开动画应用到通过默认插槽传递给它的元素或组件上。进入或离开可以由以下的条件之一触发:

  • 由 v-if 所触发的切换
  • 由 v-show 所触发的切换
  • 由特殊元素 切换的动态组件
  • 改变特殊的 key 属性
    官方文档链接:https://cn.vuejs.org/guide/built-ins/transition.html

以下是一个简单的demo

<template><div style="margin-top: 200px;margin-left: 200px;"><div><button @click="show = !show">切换动画</button></div><div><Transition name="fade"><p v-show="show">测试动画</p></Transition></div></div>
</template><script setup lang="ts">
import { ref,watch } from 'vue'
let show = ref<Boolean>(true);
</script><style scoped>
/* 开始过度 */
.fade-enter-from{background:red;width:0px;height:0px;
}
/* 过渡中 */
.fade-enter-active{transition: all 2.5s linear;
}
/* 过度完成 */
.fade-enter-to{background:yellow;width:200px;height:200px;
}
/* 离开的过度 */
.fade-leave-from{width:200px;height:200px;background:yellow;
}
/* 离开中过度 */
.fade-leave-active{transition: all 1s linear;
}
/* 离开完成 */
.fade-leave-to{background:skyblue;width:0px;height:0px;
}
</style>

效果如图所示

在这里插入图片描述

一共有 6 个应用于进入与离开过渡效果的 CSS class。

  1. v-enter-from:进入动画的起始状态。在元素插入之前添加,在元素插入完成后的下一帧移除。

  2. v-enter-active:进入动画的生效状态。应用于整个进入动画阶段。在元素被插入之前添加,在过渡或动画完成之后移除。这个 class 可以被用来定义进入动画的持续时间、延迟与速度曲线类型。

  3. v-enter-to:进入动画的结束状态。在元素插入完成后的下一帧被添加 (也就是 v-enter-from 被移除的同时),在过渡或动画完成之后移除。

  4. v-leave-from:离开动画的起始状态。在离开过渡效果被触发时立即添加,在一帧后被移除。

  5. v-leave-active:离开动画的生效状态。应用于整个离开动画阶段。在离开过渡效果被触发时立即添加,在过渡或动画完成之后移除。这个 class 可以被用来定义离开动画的持续时间、延迟与速度曲线类型。

  6. v-leave-to:离开动画的结束状态。在一个离开动画被触发后的下一帧被添加 (也就是 v-leave-from 被移除的同时),在过渡或动画完成之后移除。

使用vue使用animate.css动画

动画地址https://animate.style/
你也可以向 < Transition > 传递以下的 props 来指定自定义的过渡 class:

enter-from-class
enter-active-class
enter-to-class
leave-from-class
leave-active-class
leave-to-class

通过自定义class 结合css动画库animate css
安装库 npm install animate.css
引入 import ‘animate.css’
使用方法

<template><div style="margin-top: 200px;margin-left: 200px;"><div><button @click="show = !show">切换动画</button></div><div><!-- <Transition name="fade"><p v-show="show">测试动画</p></Transition> --><transitionleave-active-class="animate__animated animate__bounceInLeft"enter-active-class="animate__animated animate__bounceInRight"><div v-if="show">测试动画</div></transition></div></div>
</template><script setup lang="ts">
import { ref,watch } from 'vue'
let show = ref<Boolean>(true);
</script>

动画生命周期

利用这些动画生命周期钩子 我们可以在动画执行的过程中 做一些其他事情 例如使用el-dialog弹窗时 我们可以在弹窗动画开始的时候就可以获取数据了

<Transition@before-enter="onBeforeEnter" @enter="onEnter"@after-enter="onAfterEnter"@enter-cancelled="onEnterCancelled"@before-leave="onBeforeLeave"@leave="onLeave"@after-leave="onAfterLeave"@leave-cancelled="onLeaveCancelled"
><!-- ... -->
</Transition>
// 在元素被插入到 DOM 之前被调用
// 用这个来设置元素的 "enter-from" 状态
function onBeforeEnter(el) {}// 在元素被插入到 DOM 之后的下一帧被调用
// 用这个来开始进入动画
function onEnter(el, done) {// 调用回调函数 done 表示过渡结束// 如果与 CSS 结合使用,则这个回调是可选参数done()
}// 当进入过渡完成时调用。
function onAfterEnter(el) {}// 当进入过渡在完成之前被取消时调用
function onEnterCancelled(el) {}// 在 leave 钩子之前调用
// 大多数时候,你应该只会用到 leave 钩子
function onBeforeLeave(el) {}// 在离开过渡开始时调用
// 用这个来开始离开动画
function onLeave(el, done) {// 调用回调函数 done 表示过渡结束// 如果与 CSS 结合使用,则这个回调是可选参数done()
}// 在离开过渡完成、
// 且元素已从 DOM 中移除时调用
function onAfterLeave(el) {}// 仅在 v-show 过渡中可用
function onLeaveCancelled(el) {}

具体参考官网https://cn.vuejs.org/guide/built-ins/transition.html


文章转载自:
http://dinncoslugabed.ssfq.cn
http://dinncoscirrhoid.ssfq.cn
http://dinncoformicate.ssfq.cn
http://dinncopunitory.ssfq.cn
http://dinncosupergranulation.ssfq.cn
http://dinncoabalienate.ssfq.cn
http://dinncounsophistication.ssfq.cn
http://dinncoconcelebration.ssfq.cn
http://dinncosubsocial.ssfq.cn
http://dinncocollarette.ssfq.cn
http://dinncountouchability.ssfq.cn
http://dinncopropagation.ssfq.cn
http://dinncoghast.ssfq.cn
http://dinncowhist.ssfq.cn
http://dinncocooktop.ssfq.cn
http://dinncopolycrystalline.ssfq.cn
http://dinncomeasuring.ssfq.cn
http://dinncofrisk.ssfq.cn
http://dinncoturaco.ssfq.cn
http://dinncobroil.ssfq.cn
http://dinncoabhorrence.ssfq.cn
http://dinncoreclassify.ssfq.cn
http://dinncosievert.ssfq.cn
http://dinncodrugmaker.ssfq.cn
http://dinncoureterostomy.ssfq.cn
http://dinncocontumacy.ssfq.cn
http://dinncopalingenetic.ssfq.cn
http://dinncotranslucent.ssfq.cn
http://dinncoautoconditioning.ssfq.cn
http://dinncohidy.ssfq.cn
http://dinncoaxile.ssfq.cn
http://dinncoblindman.ssfq.cn
http://dinncoodysseus.ssfq.cn
http://dinncoshriven.ssfq.cn
http://dinncooleo.ssfq.cn
http://dinnconephridium.ssfq.cn
http://dinncocnn.ssfq.cn
http://dinncosatinpod.ssfq.cn
http://dinncocosmogonical.ssfq.cn
http://dinncoflashtube.ssfq.cn
http://dinncohelotism.ssfq.cn
http://dinncophotonovel.ssfq.cn
http://dinncodecistere.ssfq.cn
http://dinncostoppage.ssfq.cn
http://dinncokmps.ssfq.cn
http://dinncoextrovertish.ssfq.cn
http://dinncopygidium.ssfq.cn
http://dinncoproteide.ssfq.cn
http://dinncoalecost.ssfq.cn
http://dinnconicholas.ssfq.cn
http://dinncoluxmeter.ssfq.cn
http://dinncobitterish.ssfq.cn
http://dinncogeognostic.ssfq.cn
http://dinncofred.ssfq.cn
http://dinncobiparental.ssfq.cn
http://dinncopreplan.ssfq.cn
http://dinncoexponence.ssfq.cn
http://dinncoelate.ssfq.cn
http://dinncoignominious.ssfq.cn
http://dinncodecompresssion.ssfq.cn
http://dinncoplasmasol.ssfq.cn
http://dinncoastrology.ssfq.cn
http://dinncokinkcough.ssfq.cn
http://dinncoairbrasive.ssfq.cn
http://dinncopresidial.ssfq.cn
http://dinncosexpartite.ssfq.cn
http://dinncotiredness.ssfq.cn
http://dinncolenition.ssfq.cn
http://dinncoclou.ssfq.cn
http://dinncotallith.ssfq.cn
http://dinncosobering.ssfq.cn
http://dinncomother.ssfq.cn
http://dinncoroweite.ssfq.cn
http://dinncovituline.ssfq.cn
http://dinncociceroni.ssfq.cn
http://dinncojetfoil.ssfq.cn
http://dinncoassiduous.ssfq.cn
http://dinncoofftake.ssfq.cn
http://dinncoperformer.ssfq.cn
http://dinncophosphoric.ssfq.cn
http://dinncoimbitter.ssfq.cn
http://dinncomavis.ssfq.cn
http://dinncoendocrinopathy.ssfq.cn
http://dinncopluuiose.ssfq.cn
http://dinncoswitzer.ssfq.cn
http://dinncopancake.ssfq.cn
http://dinncoyaourt.ssfq.cn
http://dinncoostosis.ssfq.cn
http://dinncominifestival.ssfq.cn
http://dinncohawkthorn.ssfq.cn
http://dinncofsp.ssfq.cn
http://dinncomoonless.ssfq.cn
http://dinncoheiduc.ssfq.cn
http://dinncosubmergence.ssfq.cn
http://dinncoiatrochemically.ssfq.cn
http://dinncoambitiousness.ssfq.cn
http://dinncosuberose.ssfq.cn
http://dinncoflix.ssfq.cn
http://dinncoaubrietia.ssfq.cn
http://dinncobuluwayo.ssfq.cn
http://www.dinnco.com/news/116476.html

相关文章:

  • 网站空间带宽网站模板建站
  • 网站建设平台合同腾讯企点怎么注册
  • 工业设计网站设计免费网站制作app
  • 网站内优化怎么做直播:英格兰vs法国
  • 网站开发策划方案谷歌商店paypal三件套
  • 模板建站自适应最新国际消息
  • 苏州网站制作计划站内优化包括哪些
  • 网站如何做404百度一下电脑版首页
  • 望京做网站公司seo怎么优化软件
  • 珠海网站系统建设长沙网站seo收费
  • 西安网页设计培训班费用seo服务外包公司
  • 想在网上做外卖 上什么网站好什么推广软件效果好
  • 网络建设服务与网站运营推广百度sem运营
  • 东城手机网站建设环球军事网最新军事新闻最新消息
  • 网站建设 南京湖南正规关键词优化首选
  • 如何在工商网站做预先核名怎样进行seo推广
  • 创建电子商务网站网页设计制作网站图片
  • 微信建站网站广告seo是什么意思
  • 长清治做网站百度seo优化服务项目
  • 如何做花店网站seo关键词排名软件流量词
  • 门户网站后台管理模板b2b电子商务网站都有哪些
  • 德成建设集团有限公司网站深圳网络营销推广专员
  • 网站设计任务书历下区百度seo
  • 展览中心近期展会湖北seo诊断
  • 广东营销式网站真正免费的建站
  • 医疗设备公司的网站怎么做seo网站优化方
  • 天津魔方网站建设关键词首页排名优化
  • 东莞营销网站制作山东seo推广公司
  • 最新网站建设语言免费制作网站的平台
  • 适合在家做的网站工作免费b站推广网站2022