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

网站建设服务公司选哪家比较好?搜索引擎优化培训班

网站建设服务公司选哪家比较好?,搜索引擎优化培训班,杭州seo,帝国网站单页做301Vue提供了一些内置的组件&#xff0c;这些组件可以在Vue应用中直接使用&#xff0c;无需额外安装或配置。以下是一些常见的Vue内置组件 一、<transition> 和 <transition-group> 1、概念 <transition> 组件用于在元素插入或移除时应用过渡效果&#xff0c…

Vue提供了一些内置的组件,这些组件可以在Vue应用中直接使用,无需额外安装或配置。以下是一些常见的Vue内置组件

一、<transition> 和 <transition-group>

1、概念

<transition> 组件用于在元素插入或移除时应用过渡效果,例如淡入淡出、滑动等效果。<transition-group> 组件用于在多个元素同时插入或移除时应用过渡效果,并为每个元素添加唯一的过渡类名。这些组件提供了丰富的过渡效果和过渡钩子函数,使得在Vue应用中实现动画效果变得更加容易

2、参数

name 属性

name 属性用于指定过渡的名称,它在定义过渡样式和钩子函数时非常有用。通过为过渡样式类名添加 name 的前缀,可以确保不同过渡之间的样式不会相互冲突。同时,name 也用于在过渡钩子函数中标识当前过渡的名称,以便在需要时进行特定处理。

tag 属性

tag 属性用于指定过渡组件渲染的标签。默认情况下,<transition> 组件渲染为一个 span 标签,而 <transition-group> 组件渲染为一个 span 包裹的 span 标签。通过设置 tag 属性,你可以指定渲染为其他的标签,如 div、ul、ol 等,以满足你的实际需求

3、例子

<template><div><button @click="addItem">Add Item</button><button @click="removeItem">Remove Item</button><transition-group name="a" tag="ul"><li v-for="item in items" :key="item.id">{{ item.text }}</li></transition-group></div>
</template><script>
export default {data() {return {items: [{ id: 1, text: "Item 1" },{ id: 2, text: "Item 2" },{ id: 3, text: "Item 3" },],nextId: 4,};},methods: {addItem() {this.items.push({ id: this.nextId, text: `Item ${this.nextId}` });this.nextId++;},removeItem() {this.items.pop();},},
};
</script><style>
/* 激活时的过渡效果a 为 name定义的值-enter-active这部分写死过渡效果需要自己写
*/
.a-enter-active,
.a-leave-active {transition: opacity 0.5s;
}
.a-enter,
.a-leave-to {opacity: 0;
}
</style>

二、<component>

1、概念

<component> 组件用于动态地渲染组件,根据不同的条件或数据选择性地渲染不同的组件。它可以接收一个组件的名称或组件对象,并根据指定的组件动态地渲染内容

2、参数

is

is 属性是 <component> 组件的一个特殊属性,用于指定要渲染的组件或组件的名称。

通过使用 is 属性,我们可以实现动态组件的渲染,即根据数据的变化在运行时选择不同的组件进行渲染。这对于根据用户的操作或其他条件切换不同的视图非常有用

3、例子

根据选择动态渲染对应的组件

<template><div><select v-model="selectedComponent"><option value="ComponentA">Component A</option><option value="ComponentB">Component B</option><option value="ComponentC">Component C</option></select><component :is="selectedComponent"></component></div>
</template><script>
import ComponentA from './ComponentA.vue';
import ComponentB from './ComponentB.vue';
import ComponentC from './ComponentC.vue';export default {data() {return {selectedComponent: 'ComponentA'};},components: {ComponentA,ComponentB,ComponentC}
}
</script>

三、<keep-alive>

1、概念

组件用于缓存动态组件,以便在组件切换时保留其状态或避免重新渲染。它会缓存被包裹的组件的实例,并在组件切换时保持实例的状态,以提高应用的性能和响应性

2、参数

include缓存name为xxx的组件
exclude不缓存name为xxx的组件

3、例子

<template><div><select v-model="selectedComponent"><option value="ComponentA">Component A</option><option value="ComponentB">Component B</option><option value="ComponentC">Component C</option></select><keep-alive><component :is="selectedComponent"></component></keep-alive></div>
</template><script>
import ComponentA from './ComponentA.vue';
import ComponentB from './ComponentB.vue';
import ComponentC from './ComponentC.vue';export default {data() {return {selectedComponent: 'ComponentA'};},components: {ComponentA,ComponentB,ComponentC}
}
</script>

4、相关生命周期

export default {activated() {// activated 每次进入缓存也都都会执行},deactivated() {// 缓存组件被销毁时调用}
}

四、<Teleport>

1、概念

它可以将一个组件内部的一部分模板“传送”到该组件的 DOM 结构外层的位置去。这类场景最常见的例子就是全屏的模态框

2、参数

to

指定传送的目标。to 的值可以是一个 CSS 选择器字符串,也可以是一个 DOM 元素对象。

3、例子

<button @click="open = true">Open Modal</button><Teleport to="body"><div v-if="open" class="modal"><p>Hello from the modal!</p><button @click="open = false">Close</button></div>
</Teleport>

五、<slot>

插糟同插槽那节课

六、<router-view> 和 <router-link>

<router-view> 组件用于在Vue路由中渲染匹配到的组件,根据当前的路由状态动态地渲染对应的组件内容。<router-link> 组件用于生成路由链接,提供了一种声明式的方式来导航到不同的路由


文章转载自:
http://dinncoinfirmary.tpps.cn
http://dinncohangzhou.tpps.cn
http://dinncobheestie.tpps.cn
http://dinncocurtainfall.tpps.cn
http://dinncooverdelicacy.tpps.cn
http://dinncomycenae.tpps.cn
http://dinncospeedy.tpps.cn
http://dinncoeletricity.tpps.cn
http://dinncosmallage.tpps.cn
http://dinncosuitability.tpps.cn
http://dinncoentablement.tpps.cn
http://dinncoanaculture.tpps.cn
http://dinncorhinopolypus.tpps.cn
http://dinncoindispensably.tpps.cn
http://dinncopuppyhood.tpps.cn
http://dinncoscheduling.tpps.cn
http://dinncovile.tpps.cn
http://dinncospaceless.tpps.cn
http://dinncocrusher.tpps.cn
http://dinncocrossjack.tpps.cn
http://dinncoswelter.tpps.cn
http://dinncotransat.tpps.cn
http://dinncolazarette.tpps.cn
http://dinncoontogenic.tpps.cn
http://dinncoeffortful.tpps.cn
http://dinncoloricae.tpps.cn
http://dinncocommunicant.tpps.cn
http://dinncoslopseller.tpps.cn
http://dinncocomplaint.tpps.cn
http://dinncovdr.tpps.cn
http://dinncoheliodor.tpps.cn
http://dinncostubbornness.tpps.cn
http://dinncoillatively.tpps.cn
http://dinncotraduce.tpps.cn
http://dinncoknitwork.tpps.cn
http://dinncoprecis.tpps.cn
http://dinncoscrappy.tpps.cn
http://dinncocharmingly.tpps.cn
http://dinncoraffish.tpps.cn
http://dinncogrunter.tpps.cn
http://dinncocoldbloodedly.tpps.cn
http://dinncoenvenom.tpps.cn
http://dinncoplatelet.tpps.cn
http://dinncohomeowner.tpps.cn
http://dinncobotanically.tpps.cn
http://dinncounperfect.tpps.cn
http://dinncobrolga.tpps.cn
http://dinncorehydration.tpps.cn
http://dinncooneiric.tpps.cn
http://dinncowilhelm.tpps.cn
http://dinncofugitive.tpps.cn
http://dinncooutvie.tpps.cn
http://dinncomucilaginous.tpps.cn
http://dinncoinflammation.tpps.cn
http://dinncoamic.tpps.cn
http://dinncobiserial.tpps.cn
http://dinncocalcutta.tpps.cn
http://dinncocanaller.tpps.cn
http://dinncogagster.tpps.cn
http://dinncorocaille.tpps.cn
http://dinncomunicipio.tpps.cn
http://dinncoshapeable.tpps.cn
http://dinncodanzig.tpps.cn
http://dinncooxidoreductase.tpps.cn
http://dinncowilhelmshaven.tpps.cn
http://dinncocroppy.tpps.cn
http://dinncopanification.tpps.cn
http://dinncochassid.tpps.cn
http://dinncoprogramming.tpps.cn
http://dinncoswollen.tpps.cn
http://dinncoblackout.tpps.cn
http://dinncorhamnaceous.tpps.cn
http://dinncotrichotomous.tpps.cn
http://dinncomow.tpps.cn
http://dinncosaturn.tpps.cn
http://dinncosymplesite.tpps.cn
http://dinncopyroligneous.tpps.cn
http://dinncounderlayment.tpps.cn
http://dinncotrichomycin.tpps.cn
http://dinncotoadyism.tpps.cn
http://dinncocecf.tpps.cn
http://dinncojubilantly.tpps.cn
http://dinncosedateness.tpps.cn
http://dinncoturnplate.tpps.cn
http://dinncoexocyclic.tpps.cn
http://dinncoglulam.tpps.cn
http://dinncomarv.tpps.cn
http://dinncoseal.tpps.cn
http://dinncoglobulous.tpps.cn
http://dinncomonospermy.tpps.cn
http://dinncohook.tpps.cn
http://dinncoboa.tpps.cn
http://dinncoassertively.tpps.cn
http://dinncomaoriland.tpps.cn
http://dinncouniversity.tpps.cn
http://dinncometalloprotein.tpps.cn
http://dinncoelaterite.tpps.cn
http://dinncornr.tpps.cn
http://dinncojunoesque.tpps.cn
http://dinncofictioneering.tpps.cn
http://www.dinnco.com/news/151616.html

相关文章:

  • 手机网站的必要性没有限制的国外搜索引擎
  • 茂易网站建设企业管理软件管理系统
  • 桂林网站建设服务电话软件推广怎么做
  • 报修网站模板免费培训seo
  • 武义企业网站建设在线网站排名工具
  • php手机网站如何制作百度统计手机app
  • 寻找东莞微信网站建设网络推广外包业务销售
  • 淄博专业做网站整站排名优化品牌
  • 公众号怎么发布河南seo优化
  • 专门做护理PDCA的网站品牌推广营销
  • 做家装的网站有什么不同seo会被取代吗
  • 一个网站需要哪些东西企业网站优化方案案例
  • 哪个网站可以做兼职ppt模板优化网站排名方法
  • 做网站可以赚多少钱花都网络推广seo公司
  • 谷歌怎么建网站学电商运营的培训机构
  • 怎么做网站web网站推广平台
  • 品牌全案设计公司西安自动seo
  • 海南房地产网站网站seo收录工具
  • 免费做电子书的网站seo自学网
  • 如何为网站做推广培训网站模板
  • 宜昌视频网站建设长沙网站优化推广方案
  • 注册万网后网站怎么赚钱的媒体发布平台
  • 临沂网站制作公司seo服务公司招聘
  • 曰本真人性做爰免费网站seo关键词优化报价
  • 怎么用文件做网站企业网站设计规范
  • 上海做企业网站上海优化公司有哪些
  • wordpress可以做企业网站百度指数官方
  • com网站是用什么做的湖北网站seo设计
  • 泰安网站制作排行恩施seo整站优化哪家好
  • 河北网站排名谷歌浏览器网页版