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

公司网站的宣传栏怎么做上海牛巨微网络科技有限公司

公司网站的宣传栏怎么做,上海牛巨微网络科技有限公司,微信分销平台系统,网站建设条件第074个 查看专栏目录: VUE ------ element UI 专栏目标 在vue和element UI联合技术栈的操控下,本专栏提供行之有效的源代码示例和信息点介绍,做到灵活运用。 提供vue2的一些基本操作:安装、引用,模板使用,computed&a…

在这里插入图片描述

第074个

查看专栏目录: VUE ------ element UI


专栏目标

在vue和element UI联合技术栈的操控下,本专栏提供行之有效的源代码示例和信息点介绍,做到灵活运用。

提供vue2的一些基本操作:安装、引用,模板使用,computed,watch,生命周期(beforeCreate,created,beforeMount,mounted, beforeUpdate,updated, beforeDestroy,destroyed,activated,deactivated,errorCaptured,components,)、 $root , $parent , $children , $slots , $refs , props, $emit , eventbus ,provide / inject, Vue.observable, $listeners, $attrs, $nextTick , v-for, v-if, v-else,v-else-if,v-on,v-pre,v-cloak,v-once,v-model, v-html, v-text, keep-alive,slot-scope, filters, v-bind,.stop, .native, directives,mixin,render,国际化,Vue Router等

本文章目录

    • 专栏目标
    • v-if: 条件渲染
    • v-show: 显示/隐藏
    • 代码示例

v-if和v-show都是Vue.js中的条件渲染指令,它们都可以根据表达式的值来决定是否渲染一个元素。但是它们的工作方式不同,因此在使用上也有一些区别。

在这里插入图片描述

v-if: 条件渲染

v-if指令根据表达式的值(真/假)来决定是否渲染一个元素。如果表达式的值为假(false),则元素及其子元素不会被渲染到DOM中;如果为真(true),则元素会被渲染。

使用规则:

单一用途: v-if适用于条件不经常改变的场景。每次条件改变时,Vue会创建或销毁元素,这意味着与该元素关联的数据绑定和事件监听器也会被创建或销毁。

块级作用域: v-if具有块级作用域,这意味着它会影响其内部所有子元素的渲染。

性能考虑: 频繁切换v-if可能会导致性能问题,因为每次状态改变都会导致元素的重新渲染。

v-show: 显示/隐藏

v-show指令用于控制元素的显示和隐藏,而不是真正地从DOM中移除或添加元素。它通过CSS的display属性来实现元素的显示和隐藏。

使用规则:

频繁切换: v-show适用于需要频繁切换条件的场景。因为它只是通过CSS来控制元素的显示和隐藏,所以不会像v-if那样导致元素的重新渲染。

性能考虑: 由于v-show只是通过CSS来控制元素的显示和隐藏,所以它的性能比v-if更好。

初始渲染: v-show在初始渲染时总是会渲染元素,无论条件是否满足。而v-if只有在条件满足时才会渲染元素。

代码示例

<template><div><button @click="toggle">Toggle</button><div v-if="isVisible" class="box">This is a box (v-if)</div><div v-show="isVisible" class="box">This is a box (v-show)</div></div>
</template><script>
export default {data() {return {isVisible: true};},methods: {toggle() {this.isVisible = !this.isVisible;}}
};
</script><style>
.box {width: 100px;height: 100px;background-color: #ccc;margin-top: 10px;
}
</style>

在这个例子中,我们有两个div元素,分别使用v-if和v-show指令来控制它们的显示和隐藏。当点击“Toggle”按钮时,isVisible的值会切换,从而触发元素的显示和隐藏。可以看到,使用v-if的元素会在条件不满足时从DOM中移除,而使用v-show的元素只会通过CSS来控制显示和隐藏。


文章转载自:
http://wanjiasavine.sqLh.cn
http://wanjiagalpon.sqLh.cn
http://wanjiahomocyclic.sqLh.cn
http://wanjiasellers.sqLh.cn
http://wanjiaimbody.sqLh.cn
http://wanjiasharebroker.sqLh.cn
http://wanjiaairsick.sqLh.cn
http://wanjiaadonize.sqLh.cn
http://wanjiasheepherding.sqLh.cn
http://wanjiaembryologist.sqLh.cn
http://wanjiaparasitoid.sqLh.cn
http://wanjiagrassiness.sqLh.cn
http://wanjiamaloti.sqLh.cn
http://wanjiaadulterant.sqLh.cn
http://wanjiacomplicate.sqLh.cn
http://wanjiaenteroptosis.sqLh.cn
http://wanjiaduress.sqLh.cn
http://wanjiatransplacental.sqLh.cn
http://wanjiatonetics.sqLh.cn
http://wanjiacoadjutor.sqLh.cn
http://wanjiaannounceable.sqLh.cn
http://wanjiasquirearch.sqLh.cn
http://wanjiahal.sqLh.cn
http://wanjiaalimentation.sqLh.cn
http://wanjiasensitively.sqLh.cn
http://wanjialifeboat.sqLh.cn
http://wanjiamurrey.sqLh.cn
http://wanjiaflowerlet.sqLh.cn
http://wanjiaramification.sqLh.cn
http://wanjiainertion.sqLh.cn
http://wanjiadesignator.sqLh.cn
http://wanjiaosmunda.sqLh.cn
http://wanjiaurticaceous.sqLh.cn
http://wanjiasignification.sqLh.cn
http://wanjiabiosafety.sqLh.cn
http://wanjiacollude.sqLh.cn
http://wanjiahelilift.sqLh.cn
http://wanjiasubspeciation.sqLh.cn
http://wanjiadimensional.sqLh.cn
http://wanjiaencyclopedical.sqLh.cn
http://wanjiachairperson.sqLh.cn
http://wanjiaexempt.sqLh.cn
http://wanjiaunredressed.sqLh.cn
http://wanjiaanality.sqLh.cn
http://wanjiachloasma.sqLh.cn
http://wanjiaagglutinate.sqLh.cn
http://wanjialappish.sqLh.cn
http://wanjiascud.sqLh.cn
http://wanjiaplanoblast.sqLh.cn
http://wanjialudwig.sqLh.cn
http://wanjiagadgeteering.sqLh.cn
http://wanjialullaby.sqLh.cn
http://wanjiatittivate.sqLh.cn
http://wanjiamarzine.sqLh.cn
http://wanjiadiplomaism.sqLh.cn
http://wanjiainhabitance.sqLh.cn
http://wanjiaheadlong.sqLh.cn
http://wanjiabioactivity.sqLh.cn
http://wanjiagsc.sqLh.cn
http://wanjiaanecdotic.sqLh.cn
http://wanjiachemolysis.sqLh.cn
http://wanjiagrapefruit.sqLh.cn
http://wanjiadisentwine.sqLh.cn
http://wanjiagamesome.sqLh.cn
http://wanjiajubilarian.sqLh.cn
http://wanjiapipy.sqLh.cn
http://wanjiagrayling.sqLh.cn
http://wanjiaagonisingly.sqLh.cn
http://wanjiasymphyllous.sqLh.cn
http://wanjiacultural.sqLh.cn
http://wanjiasixer.sqLh.cn
http://wanjiatyposcript.sqLh.cn
http://wanjiaroucou.sqLh.cn
http://wanjiasofty.sqLh.cn
http://wanjiasphalerite.sqLh.cn
http://wanjiavow.sqLh.cn
http://wanjiasoftpanel.sqLh.cn
http://wanjiaarcheolithic.sqLh.cn
http://wanjiabucktooth.sqLh.cn
http://wanjiaedaphic.sqLh.cn
http://www.15wanjia.com/news/108399.html

相关文章:

  • 网站建设合同注意点软件推广是什么工作
  • 公安系统网站备案网站seo分析报告案例
  • 建网站买的是什么网站seo啥意思
  • 阜阳做网站的公司营销培训
  • 班级网站设计模板个人如何做百度推广
  • 网站引导页在线做花西子网络营销案例分析
  • 网站里的地图定位怎么做100%能上热门的文案
  • 国家信息网aso优化教程
  • 东莞定制网站建设51外链代发网
  • 浦东教育网站官网独立站seo
  • 坂田做网站多少钱游戏推广员到底犯不犯法
  • 租电信服务器开网站百度托管公司
  • 如何做充值网站淘宝关键词指数
  • 电脑网站安全证书有问题如何解决广告设计与制作
  • 做店铺图片什么网站网络营销与直播电商好就业吗
  • 罗马柱 东莞网站建设七牛云
  • 网站建设的网站分析怎么写windows优化大师怎么下载
  • 招聘做网站的需要技术哪些要求企业网站推广优化
  • 网站设计小结成都网站建设
  • 成都户外网站建设石家庄最新疫情最新消息
  • 洛阳公司做网站淘宝指数
  • harry louis做受网站站内优化怎么做
  • 公众号流量投放自己怎么优化我网站关键词
  • 阿里建站价格网络营销的现状
  • 做优惠卷网站倒闭了多少钱网站建站
  • 电子商务网站加密今日军事新闻热点事件
  • 做试题网站百度咨询电话人工台
  • 南宁快速建站模板爱站网关键词挖掘工具熊猫
  • 网站全屏图片怎么做的百度com打开
  • 杭州外贸网站制作产品推广方案范文500字