0
点赞
收藏
分享

微信扫一扫

vue 模板下只能有一个跟节点 根节点一定要是个div

古得曼_63b6 2022-08-29 阅读 76

<template>
<div>
简单说就是里面只能有一个跟的div

button1.vue

<template>
<div>
<Button>Default</Button>
<Button type="primary">Primary</Button>
<Button type="dashed">Dashed</Button>
<Button type="text">Text</Button>
<br><br>
<Button type="info">Info</Button>
<Button type="success">Success</Button>
<Button type="warning">Warning</Button>
<Button type="error">Error</Button>
</div>
</template>

<script>
export default {
name: "button1"
}
</script>

<style scoped>

</style>

  

app.vue

<template>
<div id="app">
<img src="./assets/logo.png">
<br><br>

<button1></button1>
<router-view/>
</div>
</template>

<script>
import button1 from './components/button1';
export default {
name: 'App',
components: {
button1
}
}
</script>

<style>
#app {
font-family: 'Avenir', Helvetica, Arial, sans-serif;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
text-align: center;
color: #2c3e50;
margin-top: 60px;
}
</style>

  

---------------------------------------------
生活的意义并不是与他人争高下,而在于享受努力实现目标的过程,结果是对自己行动的嘉奖。
↑面的话,越看越不痛快,应该这么说:

生活的意义就是你自己知道你要做什么,明确目标。没有目标,后面都是瞎扯!

新博客 ​​​https://www.VuejsDev.com​​ 用于梳理知识点



举报

相关推荐

0 条评论