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

新手如何自己建网站外链怎么发

新手如何自己建网站,外链怎么发,中国空间站有哪些国家加入,打开网站很慢1.component介绍 说明: Type: string | ComponentDefinition | ComponentConstructor Explanation: String: 如果你传递一个字符串给 is,它会被视为组件的名称,用于动态地渲染不同类型的组件。这是一个在运行时动态切换组件类型的常见用例。…

1.component介绍

说明:

  • Type: string | ComponentDefinition | ComponentConstructor

  • Explanation:

    • String: 如果你传递一个字符串给 is,它会被视为组件的名称,用于动态地渲染不同类型的组件。这是一个在运行时动态切换组件类型的常见用例。
    • ComponentDefinition: 你也可以传递组件定义对象,这是一个包含组件选项的对象。
    • ComponentConstructor: 可以传递组件的构造函数。

2.is写法

2.1 is

说明:加载单个组件直接可以不加:

<component is="DynamicMorning"></component>

组件 

<script>
export default {name: "morning"
}
</script><template>
<div>我是早上组件</div>
</template><style scoped></style>

2.2 :is 

说明:动态加载组件写法

    <template v-for="item in DynamicComponent"><component :is="item.type"></component></template>

2.3源码

<script>
import Dynamic from "@/components/Dynamic/index.vue";
import DynamicMorning  from "@/views/Dynamic/morning.vue";
import DynamicAfternoon from "@/views/Dynamic/afternoon.vue";
import DynamicEvening from "@/views/Dynamic/evening.vue";
export default {name: "index",components: {Dynamic,DynamicMorning,DynamicAfternoon,DynamicEvening},data() {return {// 组件数组componentArr: [{id: 1,type: 'Morning'}, {id: 2,type: 'Afternoon'}, {id: 3,type: 'Evening'}]}},computed:{// map遍历同时生成组件名字(类型是个数组)DynamicComponent(){return  this.componentArr.map(item=>{return {...item,type:'Dynamic'+item.type}})}}
}
</script><template><div><h1>我是动态组件父组件</h1><template v-for="item in DynamicComponent"><component :is="item.type"></component></template></div>
</template><style scoped></style>

 

3.源码

<script>
import Dynamic from "@/components/Dynamic/index.vue";
import DynamicMorning from "@/views/Dynamic/morning.vue";
import DynamicAfternoon from "@/views/Dynamic/afternoon.vue";
import DynamicEvening from "@/views/Dynamic/evening.vue";export default {name: "index",components: {Dynamic,DynamicMorning,DynamicAfternoon,DynamicEvening},data() {return {// 组件数组componentArr: [{id: 1,type: 'Morning'}, {id: 2,type: 'Afternoon'}, {id: 3,type: 'Evening'}]}},computed: {// map遍历同时生成组件名字(类型是个数组)DynamicComponent() {return this.componentArr.map(item => {return {...item,type: 'Dynamic' + item.type}})}}
}
</script><template><div><h1>我是动态组件父组件</h1><template v-for="item in DynamicComponent"><component :is="item.type"></component></template><!--    <component is="DynamicMorning"></component>--></div>
</template><style scoped></style>

http://www.dt0577.cn/news/2408.html

相关文章:

  • 电商设计的工作内容seo优化官网
  • 西安做网站的公司排名做外贸推广
  • 如何优化关键词的排名上海短视频seo优化网站
  • 外贸综合服务网站建设分类达人介绍
  • 集团网站建设服务公司电商线上推广
  • 学校网站怎么做推广方案百度推广售后
  • 免费网站模板建站abc国家免费技能培训
  • 网上如何做网站百度客服怎么转人工
  • server2008 做网站百度学术论文查重官网
  • 域名注册和网站哪个好百度里面的站长工具怎么取消
  • 网站怎么换空间商电子制作网站
  • wordpress安装php5.4seo关键词优化费用
  • 做seo哪些网站会好点免费视频外链生成推荐
  • 可做ppt的长篇英文阅读网站百度关键词价格
  • 网站建设职业发展前景网站优化搜索排名
  • 医疗美容建网站黄金网站app视频播放画质选择
  • 片头网站如何让百度快速收录
  • wordpress修改底部版权免费网站建设seo
  • 有赞微商城官网珠海网站seo
  • 重庆b2c网站制作网站更新seo
  • 做家纺的主要国际网站全网整合营销推广
  • 建站公司 phpwind淄博搜索引擎优化
  • 做网站搞笑口号杭州seo按天计费
  • 放单网站建设互联网推广怎么找客户
  • 电商网站可以用dw做今日中国新闻
  • 淄博网站制作平台形象app投放渠道有哪些
  • 微信做的团购网站seo推广优化平台
  • 用PS怎么做网站界面免费自助建站网站
  • 人民日报网站谁做的网站建设是什么工作
  • 做单平台网站制作阻断艾滋病的药有哪些