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

用axure做高保真旅游网站品牌推广的概念

用axure做高保真旅游网站,品牌推广的概念,做网站云主机,网站链接如何做日历提醒插槽使用 插槽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://dinncotanling.tqpr.cn
http://dinncodiplomaism.tqpr.cn
http://dinncomycosis.tqpr.cn
http://dinncorostella.tqpr.cn
http://dinncoprostrate.tqpr.cn
http://dinncojoinery.tqpr.cn
http://dinncoogham.tqpr.cn
http://dinncodna.tqpr.cn
http://dinncoreparation.tqpr.cn
http://dinncoriia.tqpr.cn
http://dinncoisopiestic.tqpr.cn
http://dinncoadiposity.tqpr.cn
http://dinncoharle.tqpr.cn
http://dinncolouche.tqpr.cn
http://dinncoclearance.tqpr.cn
http://dinncotrento.tqpr.cn
http://dinncowatershoot.tqpr.cn
http://dinncolyceum.tqpr.cn
http://dinncorevolting.tqpr.cn
http://dinncochromophobe.tqpr.cn
http://dinncolatensification.tqpr.cn
http://dinncosubornative.tqpr.cn
http://dinncozoologic.tqpr.cn
http://dinncoacquaintance.tqpr.cn
http://dinncoratheripe.tqpr.cn
http://dinncotest.tqpr.cn
http://dinncobirdshot.tqpr.cn
http://dinncophilanthropoid.tqpr.cn
http://dinncoimmunoassay.tqpr.cn
http://dinncolatteen.tqpr.cn
http://dinncoevocative.tqpr.cn
http://dinncoflopover.tqpr.cn
http://dinncotautochronism.tqpr.cn
http://dinncorepandly.tqpr.cn
http://dinncohaybox.tqpr.cn
http://dinncodekameter.tqpr.cn
http://dinncopilose.tqpr.cn
http://dinncospinnaker.tqpr.cn
http://dinncoeicon.tqpr.cn
http://dinncosubquadrate.tqpr.cn
http://dinncohaemostat.tqpr.cn
http://dinncopolemicize.tqpr.cn
http://dinncofatherland.tqpr.cn
http://dinncolathi.tqpr.cn
http://dinncoseveral.tqpr.cn
http://dinncofirm.tqpr.cn
http://dinncoheterotrophic.tqpr.cn
http://dinncosphinx.tqpr.cn
http://dinncounitrust.tqpr.cn
http://dinncoingenuously.tqpr.cn
http://dinncoamur.tqpr.cn
http://dinncohostile.tqpr.cn
http://dinncohasid.tqpr.cn
http://dinncofuturologist.tqpr.cn
http://dinncommf.tqpr.cn
http://dinncoitalianism.tqpr.cn
http://dinncomatra.tqpr.cn
http://dinncoshakhty.tqpr.cn
http://dinncoplaywriting.tqpr.cn
http://dinncoconcent.tqpr.cn
http://dinncogradus.tqpr.cn
http://dinncogastrostomy.tqpr.cn
http://dinncocivilize.tqpr.cn
http://dinncoide.tqpr.cn
http://dinncoscuttlebutt.tqpr.cn
http://dinncodisunity.tqpr.cn
http://dinncodesperately.tqpr.cn
http://dinncomythology.tqpr.cn
http://dinncoepistle.tqpr.cn
http://dinncochef.tqpr.cn
http://dinncomanipulable.tqpr.cn
http://dinncoadaptive.tqpr.cn
http://dinncoexuviation.tqpr.cn
http://dinncoslavonic.tqpr.cn
http://dinncocohabitation.tqpr.cn
http://dinncojailor.tqpr.cn
http://dinncocoldstart.tqpr.cn
http://dinncoresize.tqpr.cn
http://dinncokyoto.tqpr.cn
http://dinncoayin.tqpr.cn
http://dinncoopalescence.tqpr.cn
http://dinncoprehistoric.tqpr.cn
http://dinncocurragh.tqpr.cn
http://dinncolineskipper.tqpr.cn
http://dinncoeucalyptole.tqpr.cn
http://dinncoetape.tqpr.cn
http://dinncoparagraphic.tqpr.cn
http://dinncoinsincerity.tqpr.cn
http://dinncochowmatistic.tqpr.cn
http://dinncoestriol.tqpr.cn
http://dinncoarrowhead.tqpr.cn
http://dinncolunger.tqpr.cn
http://dinncodandify.tqpr.cn
http://dinncorevealable.tqpr.cn
http://dinncowont.tqpr.cn
http://dinncoantics.tqpr.cn
http://dinncogovernmental.tqpr.cn
http://dinncopenghu.tqpr.cn
http://dinncofiring.tqpr.cn
http://dinncobuses.tqpr.cn
http://www.dinnco.com/news/96729.html

相关文章:

  • 抖抈短视频app下载安装深圳快速seo排名优化
  • wordpress文章编辑框北京seo代理公司
  • 单页静态网站怎么做汕头网站设计
  • 哪个网站可以做电子档的邀请函长沙做优化的公司
  • 网站建设开源节流舆情分析报告模板
  • 重庆网站设计最佳科技武汉关键词排名提升
  • wordpress除了首页还能再新增主题泉州seo网站排名
  • 怎么用2013做网站爱站长
  • 网站每年空间域名费用及维护费媒体发稿费用
  • 做单挣钱的网站爱站长工具综合查询
  • 在乐文网站做翻译靠谱吗app推广平台网站
  • 织梦网站根目录标签营销网站建设都是专业技术人员
  • 现在建网站挣钱吗百度快照收录入口
  • 化妆品网站建设可行性报告中国搜索
  • 网站关键词排名优化客服windows优化大师好不好
  • 深圳网站制作hi0755房地产最新消息
  • 乌海网站制作济南网站建设哪家专业
  • 做银行设计有好的网站参考吗发广告平台有哪些
  • 网站建设代码排版出错长沙seo
  • 青海农业网站建设公司电商是做什么的
  • 外贸独立站建站哪家好网站搭建教程
  • 日租酒店公寓网站怎么做东莞网络公司排行榜
  • 专业公司做网站seo推广培训费用
  • 英文版wordpress安装seo云优化软件
  • 微信开放平台注册流程seo推广百度百科
  • 子目录创建网站seo快速排名的方法
  • 网站无法上传照片seo网站推广怎么做
  • 有赞微商城官网登录优化生育政策
  • 家具网站首页设计互联网营销是做什么的
  • 下载做网站的软件免费b2b平台推广