当前位置:网站首页>动态组件-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>
边栏推荐
猜你喜欢
MyCat2 introduction and installation and basic use
【The 6th Strong Net Cup CTF-Wp】
SQL Server 2014安装教程(保姆级图解教程)
Data Lake (3): Hudi Concept Terminology
FreeRTOS--栈实验
汉源高科千兆12光12电管理型工业以太网交换机 12千兆光12千兆电口宽温环网交换机
Technology sharing | Description of the electronic fence function in the integrated dispatching system
手撸架构,Mysql 面试126问
OpenFeign设置header的3种方式
SQL Server 数据库之生成与执行 SQL 脚本
随机推荐
js semi-circle loading progress animation js special effects
photo-sphere-viewer中文文档
SQL Server 2019安装错误0x80004005 服务没有及时响应启动或控制请求详细解决方法
How to implement waterfall flow layout (what is waterfall flow layout)
SQL Server 2014安装教程(保姆级图解教程)
svg实现的树木四季变化
js源码跳转的几种方式,在当前页面跳转,在空白页跳转
liunx基础命令讲解
package.json and package-lock.json
【The 6th Strong Net Cup CTF-Wp】
DTG-SSOD: The latest semi-supervised detection framework, Dense Teacher (with paper download)
FreeRTOS--stack experiment
干测试这些年,去过阿里也去过小公司,给年轻测试员们一个忠告...
消除气泡解救蘑菇h5小游戏源码
SQL Server2019安装步骤及脱机安装Microsoft机器学习组件下一步不能继续的问题
sql concat()函数
simulink PID auto-tuning
看我如何用多线程,帮助运营小姐姐解决数据校对系统变慢!
LeetCode_139_单词拆分
LeetCode_377_Combination Sum IV