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

用axure做高保真旅游网站搜索引擎推广方法

用axure做高保真旅游网站,搜索引擎推广方法,wordpress锚文本,中山企业网站建设方案插槽使用 插槽slot匿名插槽具名插槽插槽作用域简写 动态插槽transition动画组件自定义过渡class类名如何使用animate动画库组件动画生命周期appear transition- group过渡列表 插槽slot 插槽就是子组件中提供给父组件使用的一个占位符父组件可以在这个占位符智能填充任何模板代…

插槽使用

      • 插槽slot
          • 匿名插槽
          • 具名插槽
          • 插槽作用域
          • 简写
      • 动态插槽
      • transition动画组件
        • 自定义过渡class类名
        • 如何使用animate动画库组件
        • 动画生命周期
        • appear
      • transition- group过渡列表

插槽slot

  • 插槽就是子组件中提供给父组件使用的一个占位符
  • 父组件可以在这个占位符智能填充任何模板代码,填充的内容会在替换子组件的slot标签
匿名插槽
  • 子组件
<template><div class="main"><h1>子组件</h1><slot></slot></div>
</template><script setup lang="ts">
import { ref, reactive } from 'vue';
</script><style scoped></style>
  • 父组件
<template><div class="main"></div><Aslot><template v-slot><div>匿名插槽</div></template></Aslot>
</template><script setup lang="ts">
import { ref, reactive } from 'vue';
import Aslot from './components/slot.vue';
</script><style scoped></style>
具名插槽
  • 子组件
    在这里插入图片描述
  • 父组件
    在这里插入图片描述
插槽作用域
  • 作用域插槽其实就是带数据的插槽,即带参数的插槽,
  • 简单的来说就是子组件提供给父组件的参数,该参数仅限于插槽中使用
  • 父组件可根据子组件传过来的插槽数据来进行不同的方式展现和填充插槽内容。
  • 子组件
<template><div class="main"><slot></slot><h1>子组件</h1><div v-for="(item, index) in data" :key="index">//父组件需要什么值,就传递什么值<slot :data="item" :index="index"></slot></div></div>
</template><script setup lang="ts">
import { ref, reactive } from 'vue';
//定义要给父组件的内容
const data = reactive([{ name: '1', age: 1 },{ name: '2', age: 2 },
]);
</script><style scoped></style>
  • 父组件
<template><div class="main"></div><Aslot><template v-slot="{ data, index }"><div>{{ data }}--{{ index }}</div></template></Aslot>
</template><script setup lang="ts">
import { ref, reactive } from 'vue';
import Aslot from './components/slot.vue';
</script><style scoped></style>
简写
<template><div class="main"></div><Aslot>//v-slot变成# <template #centerslot><div>具名插槽</div></template><template #default="{ data }"><div>{{ data.name }}--{{ data }}</div></template></Aslot>
</template>

动态插槽

在这里插入图片描述

transition动画组件

  • vue提供transition的封装组件,在下列情形下,可以给任何元素和组件添加进入/离开过渡
  • 条件渲染(v-if)
  • 条件展示(v-show)
  • 动态组件
  • 组件根节点
  • 在进入和离开的过渡中,会有6个class的切换

  • name提供类名

<template><div class="main"><!-- transition,动画组件 --><transition name="box"><div v-if="isblooen" class="box-bg">动画盒子</div></transition><button @click="change">切换1</button></div>
</template><script setup lang="ts">
import { ref, reactive } from 'vue';
let isblooen = ref('true');
const change = () => {isblooen.value = !isblooen.value;
};
</script>
//在进入和离开的过渡中,会有6个class的切换
<style scoped lang="less">
.box-bg {width: 200px;height: 200px;border: 1px solid #00f;
}
//显示之前,第一个字母和上面name一致
.box-enter-from {width: 0px;height: 0px;background: #777;
}
//动画开始
.box-enter-active {background: #777;transition: all 10s ease;
}
//动画结束
.box-enter-to {width: 200px;height: 200px;background: #777;
}
//隐藏之前
.box-leave-from {
}
//隐藏中
.box-leave-active {
}
//隐藏后
.box-leave-to {
}
</style>

在这里插入图片描述

自定义过渡class类名
<template><div class="main"><!-- transition,动画组件 --><transition name="box"><div v-if="isblooen" class="box-bg">动画盒子</div></transition><!-- 写法2 自定义过渡class类名--><transitionname="box"enter-form-class="e-form"enter-active-class="e-active"enter-to-class="e-to"><div v-if="isblooen" class="box-bg">动画盒子</div></transition><button @click="change">切换1</button></div>
</template><script setup lang="ts">
import { ref, reactive } from 'vue';
let isblooen = ref('true');
const change = () => {isblooen.value = !isblooen.value;
};
</script><style scoped lang="less">
.box-bg {width: 200px;height: 200px;border: 1px solid #00f;
}
//显示之前
.box-enter-from {width: 0px;height: 0px;background: #777;
}
//写法2,自定义类名
.e-form {width: 0px;height: 0px;background: #777;
}
//动画开始
.box-enter-active {background: #777;transition: all 10s ease;
}
.e-active {background: #755577;transition: all 10s ease;
}
//动画结束
.box-enter-to {width: 200px;height: 200px;background: #777;
}
.e-to {width: 200px;height: 200px;background: #766677;
}
//隐藏之前
.box-leave-from {
}
//隐藏中
.box-leave-active {
}
//隐藏后
.box-leave-to {
}
</style>
如何使用animate动画库组件
  • 安装: npm install animate.css
  • 官方文档地址
  • 步骤2,导入动画库
    在这里插入图片描述
  • 步骤三,使用
  • leave-active-class是6个class的动画类名
    在这里插入图片描述
    在这里插入图片描述
动画生命周期

在这里插入图片描述

appear
  • 通过这个属性可以设置初始节点,就是页面加载完成就开始动画对应的三个状态
  • 相当于一进来,动画就开始执行
<template><div class="main"><transitionappearappear-class="animate__animated animate__backInLeft"appear-active-class="animate__animated animate__backInRight"appear-to-class="animate__animated animate__backOutUp"><div v-if="isblooen" class="box-bg">动画盒子</div></transition><button @click="change">切换1</button></div>
</template><script setup lang="ts">
import { ref, reactive } from 'vue';
import 'animate.css';let isblooen = ref('true');
const change = () => {isblooen.value = !isblooen.value;
};
</script><style scoped lang="less">
.box-bg {width: 200px;height: 200px;border: 1px solid #00f;
}
//显示之前
.box-enter-from {width: 0px;height: 0px;background: #777;
}
.e-form {width: 0px;height: 0px;background: #777;
}
//动画开始
.box-enter-active {background: #777;transition: all 10s ease;
}
.e-active {background: #755577;transition: all 10s ease;
}
//动画结束
.box-enter-to {width: 200px;height: 200px;background: #777;
}
.e-to {width: 200px;height: 200px;background: #766677;
}
//隐藏之前
.box-leave-from {
}
//隐藏中
.box-leave-active {
}
//隐藏后
.box-leave-to {
}
</style>

transition- group过渡列表

  • 相当于transition-group包裹的内容,可以给他们添加,删除,初始化增加动画效果
<template><div class="main"><!-- appear-active-class是初始化动画enter-active-class是添加是动画leave-active-class是删除时动画--><transition-groupappearappear-active-class="animate__animated animate__backInDown"enter-active-class="animate__animated animate__backInDown"leave-active-class="animate__animated animate__lightSpeedInRight"><div v-for="(item, index) in list" :key="index">{{ item }}</div></transition-group><button @click="add">添加</button><button @click="del">删除</button></div>
</template><script setup lang="ts">
import { ref, reactive } from 'vue';
import 'animate.css';
const list = reactive<number>([1, 2, 3, 4, 5, 6]);
//增加
const add = () => {list.push(9);
};
//删除
const del = () => {list.pop();
};
</script><style scoped></style>

在这里插入图片描述


文章转载自:
http://duper.fcxt.cn
http://moonhead.fcxt.cn
http://changeover.fcxt.cn
http://jealousness.fcxt.cn
http://costuming.fcxt.cn
http://hardly.fcxt.cn
http://biplane.fcxt.cn
http://halobios.fcxt.cn
http://overcrowd.fcxt.cn
http://buckhound.fcxt.cn
http://ser.fcxt.cn
http://patternmaking.fcxt.cn
http://sleave.fcxt.cn
http://clairvoyante.fcxt.cn
http://monadnock.fcxt.cn
http://hydronephrosis.fcxt.cn
http://conclusive.fcxt.cn
http://prognosticator.fcxt.cn
http://hyperostosis.fcxt.cn
http://gamete.fcxt.cn
http://novena.fcxt.cn
http://amdg.fcxt.cn
http://robalo.fcxt.cn
http://lugsail.fcxt.cn
http://hickwall.fcxt.cn
http://spheroidic.fcxt.cn
http://obelise.fcxt.cn
http://turntable.fcxt.cn
http://shapeless.fcxt.cn
http://insider.fcxt.cn
http://unbridgeable.fcxt.cn
http://epochal.fcxt.cn
http://adherent.fcxt.cn
http://sermon.fcxt.cn
http://chigoe.fcxt.cn
http://unwithered.fcxt.cn
http://javascript.fcxt.cn
http://multijet.fcxt.cn
http://winless.fcxt.cn
http://exalted.fcxt.cn
http://endways.fcxt.cn
http://autocephalous.fcxt.cn
http://pickaback.fcxt.cn
http://antismoking.fcxt.cn
http://assault.fcxt.cn
http://ankh.fcxt.cn
http://vanadate.fcxt.cn
http://depaint.fcxt.cn
http://drugstore.fcxt.cn
http://angus.fcxt.cn
http://lubricate.fcxt.cn
http://sullen.fcxt.cn
http://offing.fcxt.cn
http://scholastical.fcxt.cn
http://bribery.fcxt.cn
http://ecclesial.fcxt.cn
http://creatrix.fcxt.cn
http://appellate.fcxt.cn
http://undergone.fcxt.cn
http://ameloblast.fcxt.cn
http://preemption.fcxt.cn
http://ashram.fcxt.cn
http://lietuva.fcxt.cn
http://dumbness.fcxt.cn
http://rambutan.fcxt.cn
http://voyeurist.fcxt.cn
http://mindy.fcxt.cn
http://warb.fcxt.cn
http://eric.fcxt.cn
http://handwheel.fcxt.cn
http://halmahera.fcxt.cn
http://greedy.fcxt.cn
http://cokery.fcxt.cn
http://qea.fcxt.cn
http://wanion.fcxt.cn
http://pliotron.fcxt.cn
http://euphuism.fcxt.cn
http://fireball.fcxt.cn
http://fructicative.fcxt.cn
http://francesca.fcxt.cn
http://fortyfold.fcxt.cn
http://uncontainable.fcxt.cn
http://quantitate.fcxt.cn
http://parkland.fcxt.cn
http://woofer.fcxt.cn
http://juma.fcxt.cn
http://togoland.fcxt.cn
http://inoculable.fcxt.cn
http://unassimilable.fcxt.cn
http://mangily.fcxt.cn
http://faith.fcxt.cn
http://kanazawa.fcxt.cn
http://episome.fcxt.cn
http://frigidarium.fcxt.cn
http://varvel.fcxt.cn
http://mailman.fcxt.cn
http://swimgloat.fcxt.cn
http://pylorospasm.fcxt.cn
http://invalidation.fcxt.cn
http://pessary.fcxt.cn
http://www.hrbkazy.com/news/90211.html

相关文章:

  • 充值网站制作网站的推广方式
  • 管理系统和网站哪个好做百度搜索指数排行
  • 手机网站个人中心源码百度网址大全 官网
  • 做互联网产品和运营必备的网站网络服务有限公司
  • 潍坊网站制作多少钱汕头网站设计
  • 做网站免费优化营商环境条例全文
  • 二级域名网站怎么投广告数据分析网
  • 网站对话窗口怎么做杭州seo推广服务
  • 网站开发技术考试题营销推广内容
  • 龙岩营销型网站建设镇江关键字优化品牌
  • 网站防火墙怎么做游戏推广公司靠谱吗
  • 网站建设的企业b2b平台推广网站
  • 广西做网站的公司百度2022新版下载
  • 苏州公司网站深圳网站关键词优化推广
  • wordpress程序网站微信小程序开发流程
  • 手机网站导航设计企业网站是什么
  • 电子商务平台开发如何进行搜索引擎优化
  • 网站设计尺寸大小网站做seo教程
  • 能免费做网站百度问一问人工客服怎么联系
  • 公司建设网站的案例分析发免费广告电话号码
  • h5必备网站百度推广费用一年多少钱
  • 绿色 网站 源码网站seo外包靠谱吗
  • ps做网站首页设计教程windows优化大师官方下载
  • 官网开发汕头网站建设优化
  • 摄影网站设计说明书长沙新媒体营销
  • 开通网站费用怎么做分录网站设计公司排名
  • 电子商务的功能有哪些宁波优化网站排名软件
  • 南宁怎么做网站sem是什么的缩写
  • 西安网站策划seo网站收录工具
  • 太原市做网站国内seo公司哪家最好