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

北京哪里有做网站的产品软文范例500字

北京哪里有做网站的,产品软文范例500字,个人可以做视频网站吗,谁有马和人做的网站第025个 查看专栏目录: VUE ------ element UI 专栏目标 在vue和element UI联合技术栈的操控下,本专栏提供行之有效的源代码示例和信息点介绍,做到灵活运用。 (1)提供vue2的一些基本操作:安装、引用,模板使…

在这里插入图片描述

第025个

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


专栏目标

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

(1)提供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等

(2)提供element UI的经典操作:安装,引用,国际化,el-row,el-col,el-button,el-link,el-radio,el-checkbox ,el-input,el-select, el-cascader, el-input-number, el-switch,el-slider, el-time-picker, el-date-picker, el-upload, el-rate, el-color-picker, el-transfer, el-form, el-table, el-tree, el-pagination,el-badge,el-avatar,el-skeleton, el-empty, el-descriptions, el-result, el-statistic, el-alert, v-loading, $message, $alert, $prompt, $confirm , $notify, el-breadcrumb, el-page-header,el-tabs ,el-dropdown,el-steps,el-dialog, el-tooltip, el-popover, el-popconfirm, el-card, el-carousel, el-collapse, el-timeline, el-divider, el-calendar, el-image, el-backtop,v-infinite-scroll, el-drawer等

本文章目录

    • 专栏目标
    • 需求背景
    • 示例效果
    • 示例源代码
      • 父组件(共99行)
      • 子组件 child.vue(共37行)
    • 理论介绍

需求背景

这是一个父子组件之间的控制方法,父组件可以通过‘ c h i l d r e n ’ 或 ′ children’或' childrenrefs’来控制子组件中的方法;子组件可以通过$parent或 $emit来控制子组件中的方法

示例效果

在这里插入图片描述

示例源代码

父组件(共99行)

/*
* @Author: 大剑师兰特(xiaozhuanlan),还是大剑师兰特(CSDN)
* @此源代码版权归大剑师兰特所有,可供学习或商业项目中借鉴,未经授权,不得重复地发表到博客、论坛,问答,git等公共空间或网站中。
* @Email: 2909222303@qq.com
* @weixin: gis-dajianshi
* @First published in CSDN
* @First published time: 2022-09-04
*/<template><div class="container"><div class="top"><h3>父子方法控制:$emit,$refs,$parent,$children </h3><div class="author">大剑师兰特, 还是大剑师兰特,gis-dajianshi</div></div><el-button size="mini" type="primary" @click="showc1()"> refs子组件控制1 </el-button><el-button size="mini" type="primary" @click="showc2()"> children子组件控制2 </el-button><Childcom ref="mychild" @showP='showP2' /><div v-if="isParent2">这是用$emit方法显示的父组件信息	(parent2)</div><div v-if="isParent1"><div class="oneLine" v-for="(item,index) in listData" :key="index"><div class="fl20"><img :src="item.thumbnail_pic_s" alt=""></div><div class="fl20"> {{item.date}} </div><div class="fl20">{{item.title}} </div></div></div></div>
</template><script>import Childcom from '@/components/child.vue'export default {data() {return {listData:[],isParent1:false,isParent2:false,}},components: {Childcom},mounted() {this.getdata()},methods: {showc1(){this.$refs.mychild.showChild1()},showc2(){console.log(this.$children)this.$children[2].showChild2()},showP1(){this.isParent1=true;},showP2(){this.isParent2=true;},getdata() {let url = "/listdata"this.$request(url, {}, "GET").then((res) => {this.listData = res.data.dataconsole.log(this.listData)})},}}
</script>
<style scoped>.container {width: 1000px;height: 540px;margin: 50px auto;border: 1px solid orange;}.top{margin:0 auto 30px; padding:10px 0;background-color: aquamarine;}.oneLine {width: 100%;height: 50px;line-height: 50px;background: #eee;margin-top: 10px;overflow: hidden;cursor: pointer;}.oneLine .fl20{ float: left; padding:0 10px;min-width: 150px;}
</style>

子组件 child.vue(共37行)

<template><div>		<div v-if="is1">{{text1}}</div><div v-if="is2">{{text2}}</div>		<hr>		<el-button @click="showparent1()" type="danger" size="mini"> 开启父组件内容1</el-button>	<el-button @click="showparent2()" type="danger" size="mini"> 开启父组件内容2</el-button>	</div>
</template><script>export default{data() {			return {is1:false,is2:false,text1:'通过第一种方法显示出来',text2:'通过第二种方法显示出来',}},methods:{showChild1(){this.is1=true;},showChild2(){this.is2=true;},showparent1(){this.$parent.showP1();},showparent2(){this.$emit('showP')},			},}</script>

理论介绍

父组件访问子组件:使用this.$children或 $refs
this.$children得到是一个子组件数组,它包含所有子组件对象。
子组件访问父组件:使用this.$parent , this.$emit
子组件访问根Vue实例:使用this.$root
http://www.zhongyajixie.com/news/16847.html

相关文章:

  • 网站做收录是什么意思免费找客源软件
  • 中国建设信息化期刊官网seo包年优化平台
  • 阿里巴巴网站建设方案书微信营销软件有哪些
  • 找人做任务网站有哪些杭州网站设计制作
  • 大庆+网站建设市场营销教材电子版
  • 松桃县住房和城乡建设局网站做网站推广需要多少钱
  • 合肥网站建设是什么意思湖南网站seo
  • wordpress媒体库插入图片不显示惠州seo外包费用
  • 四川省建筑人员证书查询无忧seo
  • 自己做网站难不难广州网站优化排名
  • 苹果浏览器怎么信任网站设置百度推广费用一天多少钱
  • 上海高端品牌网站建设做网站价格
  • 手机网站需要域名吗中视频自媒体账号注册下载
  • 带地板翻转的网站怎么做重庆人社培训网
  • 在哪个网站做整形郑州短视频代运营
  • 日ip5000的网站怎么做nba最新消息球员交易
  • 做网站的的步骤怎么写外链群发
  • 帝国文章网站模板中央电视台新闻联播广告价格
  • 做网站都要学什么云优化
  • 海淀网站建设网络营销师证
  • 室内设计培训机构多少钱seo整站优化技术培训
  • 唐山市住房城乡建设部网站主页百度贴吧网页版登录入口
  • 北京企业建站技术广州企业推广
  • 接做网站单子的网站网站定制
  • 网站建设与网页设计总结aso优化渠道
  • 犀牛云做的网站好不好百度seo排名优化软件
  • 找人做app网站福州seo按天付费
  • 南京网站公司郴州网站seo
  • 温州营销网站制作报价windows系统优化软件排行榜
  • 昆明市网站制作公司网络营销策划模板