admin_vue/10-组件化开发/01-组件的基本使用/练习简单组件的简单使用.html

28 lines
499 B
HTML

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
</head>
<body>
<div id="app">
<cpn></cpn>
</div>
</body>
<script src="../../JavaScript/vue.min.js"></script>
<script>
Vue.component(
'cpn', {
template: `
<h1>你好</h1>
`
}
)
const vue=new Vue({
el:"#app"
})
</script>
</html>