当前位置:网站首页>动态组件-component
动态组件-component
2022-08-02 12:49:00 【给我来个鸡腿】
效果
代码结构
代码
app.vue
<template>
<div id="nav">
<h1>动态组件</h1>
<component :is="news"></component>
</div>
</template>
<script setup>
// import NewsImage from './components/NewsImage.vue'
import NewsText from './components/NewsText.vue'
// import NewsVideo from './components/NewsVideo.vue'
import { ref } from '@vue/reactivity'
const news = ref(NewsText)
</script>
<style>
</style>
边栏推荐
- np.nan, np.isnan, None, pd.isnull, pd.isna 整理与小结
- How to use the database like tap water?|Tencent Cloud Database TDSQL-C
- Process finished with exit code 1
- MFC入门教程(深入浅出MFC)
- Intouch System Platform IDE-1
- 数据湖(二):什么是Hudi
- zabbix自动化监控脚本
- 以Boost为例的type3电压环补偿器实例
- svg实现的树木四季变化
- MD5 detailed explanation (check file integrity)
猜你喜欢
随机推荐
一款强大的js弹出alert插件
Chapter 11 Documents
To eliminate air bubbles to save the mushroom h5 small game source code
网络流详解(流网图一般能够反映什么信息)
第11章 文件
7种最常用数据分析思维,解决95%的分析难题
Chapter 14 Manually create a REST service (2)
js真3d柱状图插件
智能图像分析-智能家用电器图像目标检测统计计数检测与识别-艾科瑞特科技(iCREDIT)
photo-sphere-viewer Chinese documentation
Swiper系列之轮播图
以Boost为例的type3电压环补偿器实例
svg气球升起爆炸js特效
手撸架构,Mysql 面试126问
Taurus.MVC V3.0.3 Microservice Open Source Framework Released: Make the evolution of .NET architecture easier in large concurrency.
如何关闭开启硬件加速[通俗易懂]
Openlayers 快速上手教程
Software component analysis: 5 major capabilities to protect software supply chain security
ssm访问数据库数据报错
numpy&pands 中的unique