当前位置:网站首页>动态组件-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>边栏推荐
- #Summer Challenge#[FFH] OpenHarmony Device Development Foundation (3) Compilation Dependencies
- Good shooting js game source code
- 数据湖(二):什么是Hudi
- Taurus.MVC V3.0.3 Microservice Open Source Framework Released: Make the evolution of .NET architecture easier in large concurrency.
- Seneor Exposure Basics
- 软件成分分析:手握5大能力守护软件供应链安全
- pytorch模型转tensorflow模型
- Hand rolled architecture, 41 Redis interview asked
- SQL Server 2014 installation tutorial (nanny-level graphic tutorial)
- Chapter 14 Manually create a REST service (2)
猜你喜欢

如何搭建威纶通触摸屏与S7-200smart之间无线PPI通信?

js semi-circle loading progress animation js special effects

Do you really understand the business process service BPass?

SQL Server 数据库之生成与执行 SQL 脚本

软件成分分析:手握5大能力守护软件供应链安全

SQL Server 2014安装教程(保姆级图解教程)

工厂方法模式

干测试这些年,去过阿里也去过小公司,给年轻测试员们一个忠告...

MyCat2的介绍与安装以及基本使用

SQL Server 2019安装错误0x80004005 服务没有及时响应启动或控制请求详细解决方法
随机推荐
SQL Server 2019安装错误0x80004005 服务没有及时响应启动或控制请求详细解决方法
np.nan, np.isnan, None, pd.isnull, pd.isna 整理与小结
How to implement waterfall flow layout (what is waterfall flow layout)
7种最常用数据分析思维,解决95%的分析难题
看我如何用多线程,帮助运营小姐姐解决数据校对系统变慢!
【The 6th Strong Net Cup CTF-Wp】
Distributed current limiting, hand & redisson implementation
The ex-boyfriend bought chili water and threatened to rob his daughter. Can the woman apply for a personal safety protection order?
Interpretation of new features | MySQL 8.0 GIPK invisible primary key
TFRecord简介,原理分析,代码实现?[通俗易懂]
数据湖(二):什么是Hudi
svg实现的树木四季变化
Intelligent Image Analysis-Intelligent Home Appliance Image Target Detection Statistical Counting Detection and Recognition-iCREDIT
FreeRTOS实验--删除任务
Chapter 11 Documents
定了!2022世界VR产业大会将继续在南昌召开
Seneor曝光基础知识
分布式限流利器,手撕&redisson实现
Manual architecture, Mysql interview 126 questions
Taurus.MVC V3.0.3 Microservice Open Source Framework Released: Make the evolution of .NET architecture easier in large concurrency.