<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Vue制作模板</title>
<script type="text/javascript" src="../assets/js/vue.js"></script>
</head>
<body>
<h1>Vue制作模板 三种写法</h1>
<hr>
<h2>1.直接在构造器中创建模板</h2>
<div id="app">
</div>
<h2>2.在标签里建模板</h2>
<template id="temp">
<h1>我是标签模板</h1>
</template>
</body>
</html>
<script type="x-template" id="scriptTemp" src="路径">
<h1>我是script标签模板</h1>
</script>
<script>
var app = new Vue({
el:'#app',
data:{
},
template:"#scriptTemp"
// template:`
// <h1>我是选项模板</h1>
// `
})
</script>