Vue.js cannot add code

I added demo and reported an error. If you remove it, it"s all right

.

do not allow other things to be added. If you add something, you will report an error

.

did you encounter this situation again?

The contents of

template need to be wrapped in a unique label. You can OK span and button by wrapping them in a div


.

try to write it this way:

components: {
    'bottom': Bottom
}
< hr >
there is also a suggestion: don't name the component with such an intuitive name, it is recommended to name the component with more than two words

for example:

//template
<my-bottom></my-bottom>

//script
components: {
    'my-bottom': Bottom
}

The

error message has already explained to you why, in the vue component, all node elements can only be wrapped by one parent node.

If,else if judgment can be used to display one of the

when there are multiple ways.
so the correct way to write it is:

<template>
  <div>
    <span>demo</span>
    <button></button>
  </div>
</template>
There can be only one root node element in

template. If you need more than one root node, use the render function, jump door

.
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1bf7a7d-3208c.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1bf7a7d-3208c.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?