当前位置: 首页 > 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.tj-hxxt.cn/news/51525.html

相关文章:

  • 东莞网站建设管理宝鸡百度seo
  • 网站开发具体的工作内容百度seo最新算法
  • 网站开发英文seo兼职论坛
  • 中企高呈建设网站搜索词热度查询
  • 做一个学校网站怎么做百度云网盘免费资源
  • 网站怎么做移动适配北京网
  • 东莞响应式网站实力乐云seo怎样做百度推广
  • 抚顺市住房和城乡建设委员会网站全球十大网站排名
  • 怎样制作自己公司的网站网络营销
  • 上海网站建设的seo怎么优化武汉厂商
  • 深圳找工作的网站网页怎么做出来的
  • 中山市住房和城乡建设局网站网站提交收录入口链接
  • 网络营销企业网站怎么做盲盒
  • 如何攻击织梦做的网站方法百度权重高的网站有哪些
  • 为企业规划网站注意什么武汉seo首页
  • html5 jq做电脑网站全球搜索引擎
  • 不想使用wordpressseo赚钱培训课程
  • 怎样建设一个游戏网站通州区网站快速排名方案
  • 网站建设进度计划表八百客crm系统登录入口
  • javaee做网站建设成都seo工程师
  • 合肥网页设计工资一般多少衡阳有实力seo优化
  • 网易企业邮箱登入路口上海哪家优化公司好
  • 网站百度地图怎么做免费投放广告的平台
  • wordpress 时间线插件seo快速排名软件网站
  • 做邮箱网站站长工具seo
  • 快速做效果图的网站叫什么区别最近国家新闻
  • wordpress做seo好做广州推广seo
  • 阿里云虚拟主机做2个网站吗seo可以提升企业网站的
  • 如何做一个论坛网站网络营销的市场背景
  • b站黄页推广重庆森林经典台词梁朝伟