侧边栏壁纸
博主头像
落叶人生博主等级

走进秋风,寻找秋天的落叶

  • 累计撰写 130562 篇文章
  • 累计创建 28 个标签
  • 累计收到 9 条评论
标签搜索

目 录CONTENT

文章目录

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

2023-01-12 星期四 / 0 评论 / 0 点赞 / 61 阅读 / 1436 字

<template> <div>简单说就是里面只能有一个跟的divbutton1.vue <template> <div> <Button>Default</Button> <Bu

... .

<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>
. . .. ...

广告 广告

评论区