创建用户片段
一.创建代码模板
<!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"></div>
<template id = "my-app">
<h2>{{message}}</h2>
</template>
<script src="../js/vue.js"></script>
<script>
const App =
{
template:'#my-app',
data(){
return {
message:"Hello World",
}
}
}
Vue.createApp(App).mount('#app');
</script>
</body>
</html>
二.添加用户片段
1.找到用户片段

2.自动编辑代码片段
https://snippet-generator.app
进入网站

复制粘贴即可


浙公网安备 33010602011771号