What's wrong with vue code?

Failed to mount component: template or render function not defined.
<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <title>Document</title>
  <script src="vue.js"></script>
</head>
<body>
  <template id="test">
    <div>
       aaaa<slot name="age"></slot>
    </div>
  </template>

  <div id="app">
    <show>
       <span slot="age">{{age}}</span>
    </show>
  </div>
  <script>
  var user={
      template:"-sharptest",
  }
  new Vue({
    el:"-sharpapp",
    data:{
       age:22
    },
    components:{
      "show":test,
    },
  })
  </script>
</body>
</html>
Mar.29,2021

ide/components.html" rel=" nofollow noreferrer "> component Foundation-- Vue.js

it looks like you didn't register the component, or

  

A page all html should be written to template . The div above you is written outside

.
Menu