WebStorm快速生成Vue模版
[外链图片转存失败,源站可能有防盗链机制,建议将图片保存下来直接上传(img-5KzoItXx-1651248708176)(https://cdn.jsdelivr.net/gh/Jonny-Chi/picgo_imgs/BLog/202204292357510.png)]
[外链图片转存失败,源站可能有防盗链机制,建议将图片保存下来直接上传(img-7VImcSg8-1651248708179)(https://cdn.jsdelivr.net/gh/Jonny-Chi/picgo_imgs/BLog/202204292359274.png)]
Mac用户
- WebStorm ?? Preferences
- 选择Editor
- 找到LiveTemplates
- 下滑找到Vue
- 点击右边的?,选择Live Template
- Abbreviation(快捷键缩写):可以写vue也可以自定义
- Template text(模版文本)
- Define(作用视图):选择Vue
Windows用户
- 打开settings
- 选择Editor
- 找到LiveTemplates
- 下滑找到Vue
- 点击右边的?,选择Live Template
- Abbreviation(快捷键缩写):可以写vue也可以自定义
- Template text(模版文本)
- Define(作用视图):选择Vue
下面是本人写的Vue3.x模版
<template>
<div></div>
</template>
<script>
export default {
components: {},
props: {},
data () {
return {}
},
computed: {},
watch: {},
methods: {},
setup () {
},
onMounted () {
},
onBeforeMount () {
},
onBeforeUpdate () {
},
onUpdated () {
},
onBeforeUnmount () {
},
onUnmounted () {
},
onErrorCaptured () {
}
}
</script>
<style scoped>
</style>
Vue2.x模「如果认可的话可以用我写的这个模版」
<template>
<div></div>
</template>
<script>
export default {
components: {},
props: {},
data () {
return {}
},
computed: {},
watch: {},
methods: {},
created () {
},
mounted () {
},
beforeCreate (){
},
beforeMount () {
},
beforeUpdate () {
},
updated () {
},
beforeDestroy () {
},
destroyed () {
},
activated () {
}
}
</script>
<style scoped>
</style>
|