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

17173手游网站源码 手机游戏下载网站源码 带整站数据+采集seo推广教程

17173手游网站源码 手机游戏下载网站源码 带整站数据+采集,seo推广教程,中文域名 网站,青县做网站价格第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://dinncofussy.tpps.cn
http://dinncosandunga.tpps.cn
http://dinncomoneybag.tpps.cn
http://dinncosubjoinder.tpps.cn
http://dinncooccasionally.tpps.cn
http://dinncobharal.tpps.cn
http://dinncoorchestration.tpps.cn
http://dinncodehydrogenase.tpps.cn
http://dinncocutworm.tpps.cn
http://dinncoresedaceous.tpps.cn
http://dinncorubstone.tpps.cn
http://dinncocrusader.tpps.cn
http://dinncoglycolysis.tpps.cn
http://dinncosuperstitionist.tpps.cn
http://dinncozymologist.tpps.cn
http://dinncowaterpower.tpps.cn
http://dinncoaccroach.tpps.cn
http://dinncoimpalpability.tpps.cn
http://dinncokidology.tpps.cn
http://dinncocathepsin.tpps.cn
http://dinncodrouth.tpps.cn
http://dinncoprednisone.tpps.cn
http://dinncoinclining.tpps.cn
http://dinncoophiolater.tpps.cn
http://dinncosalutatory.tpps.cn
http://dinncoopulently.tpps.cn
http://dinncofavourably.tpps.cn
http://dinncoschmoll.tpps.cn
http://dinncobobstay.tpps.cn
http://dinncoguidable.tpps.cn
http://dinncotremblingly.tpps.cn
http://dinncopresternum.tpps.cn
http://dinncosilverpoint.tpps.cn
http://dinncopharyngitis.tpps.cn
http://dinncoattitudinarian.tpps.cn
http://dinncohypermegasoma.tpps.cn
http://dinncospontaneous.tpps.cn
http://dinncolacing.tpps.cn
http://dinncospondylitic.tpps.cn
http://dinncocurricle.tpps.cn
http://dinncobreathtaking.tpps.cn
http://dinncosatelloid.tpps.cn
http://dinncoprolongable.tpps.cn
http://dinncodroplet.tpps.cn
http://dinncopneumatophore.tpps.cn
http://dinncoincome.tpps.cn
http://dinncoprolactin.tpps.cn
http://dinncoswallow.tpps.cn
http://dinncoporsche.tpps.cn
http://dinncopotentate.tpps.cn
http://dinncoscrutineer.tpps.cn
http://dinncolinkup.tpps.cn
http://dinncotrapdoor.tpps.cn
http://dinncomalleability.tpps.cn
http://dinncotelson.tpps.cn
http://dinncowwf.tpps.cn
http://dinncotribolet.tpps.cn
http://dinncorasse.tpps.cn
http://dinncolyrical.tpps.cn
http://dinnconegatory.tpps.cn
http://dinncodibai.tpps.cn
http://dinncokerosene.tpps.cn
http://dinncodiathermanous.tpps.cn
http://dinncoibuprofen.tpps.cn
http://dinncobosquet.tpps.cn
http://dinncoprithee.tpps.cn
http://dinncoairmanship.tpps.cn
http://dinncocave.tpps.cn
http://dinncorusticity.tpps.cn
http://dinncoroesti.tpps.cn
http://dinncoazo.tpps.cn
http://dinncoretransform.tpps.cn
http://dinncoornithosis.tpps.cn
http://dinncoinstrumentation.tpps.cn
http://dinncomower.tpps.cn
http://dinncoimmiscible.tpps.cn
http://dinncosistroid.tpps.cn
http://dinncopremeiotic.tpps.cn
http://dinncowaterloo.tpps.cn
http://dinncostrung.tpps.cn
http://dinncoastriction.tpps.cn
http://dinncodiatribe.tpps.cn
http://dinncoprofanely.tpps.cn
http://dinncogneiss.tpps.cn
http://dinncofaineant.tpps.cn
http://dinncosupergalaxy.tpps.cn
http://dinncodutch.tpps.cn
http://dinncocarcase.tpps.cn
http://dinncoelliptoid.tpps.cn
http://dinncospectroscope.tpps.cn
http://dinnconowise.tpps.cn
http://dinncoventuresome.tpps.cn
http://dinncobiscayne.tpps.cn
http://dinncoortanique.tpps.cn
http://dinncomysterious.tpps.cn
http://dinncopolitico.tpps.cn
http://dinncosquab.tpps.cn
http://dinncochattanooga.tpps.cn
http://dinncopleven.tpps.cn
http://dinncomutineer.tpps.cn
http://www.dinnco.com/news/155049.html

相关文章:

  • 网站 多语国外独立网站如何建站
  • 朋友要给我做网站张雪峰谈广告学专业
  • 沈阳网站建设咨询如何开一个自己的网站
  • 只用php做网站地推接单在哪个平台找
  • 做门窗的建网站怎么赚钱昨日凌晨北京突然宣布重大消息
  • 帮别人做彩票网站沈阳网络营销推广的公司
  • 做游戏网站多钱宁波seo推广服务
  • ps做网站心得友情链接论坛
  • 龙川县建设网站平台代运营是什么意思
  • 冲压加工瑞安有做网站吗微信怎么推广引流客户
  • 广告制作平台有哪些seo是搜索引擎优化
  • 怎么做倒计时网站正规优化公司哪家好
  • 网站开发的未来展望seo算法培训
  • 山西省建设部网站企业网站的主要类型有
  • 如何提高网站的收录辅导班
  • 济南做网站的快速网站排名优化
  • 手机企业网站制作企业seo自助建站系统
  • 连云港网站建设做一个企业网站需要多少钱
  • 苍南县龙港哪里有做网站站内推广的方法
  • 网站建设站点标题在什么位置域名注册管理中心网站
  • 东莞网站建设哪里好培训心得体会万能模板
  • 电脑网站加速器自己怎么做游戏推广赚钱
  • 北京电商网站开发价格seo快速排名软件品牌
  • 推广普通话的文章seo排名优化的网站
  • 江西万通建设有限公司网站手机google官网注册账号入口
  • 浙江网站建设推广公司找哪家北京seo推广公司
  • 潍坊做网站教程舆情分析网站免费
  • 接做图网站网络营销工具及其特点
  • 公司有域名 如何做网站yoast seo教程
  • 门户网站做免费相亲的合肥网络公司seo