新建vue代码片段

    科技2024-04-18  12

    在文件首选项中选择用户片段,点击新建全局片段,添加代码如下

    { "Print to console": { "prefix": "vue", "body": [ "<template>", " <div>\n", " </div>", "</template>\n", "<script>", "export default {", " name:'',", " components: {\n", " },", " props: {\n", " },", " data() {", " return {\n", " };", " },", " computed: {\n", " },", " watch: {\n", " },", " created() {\n", " },", " mounted() {\n", " },", " methods: {\n", " },", " };", "</script>\n", "<style scoped>\n", "</style>\n", ], "description": "Create vue template" } }
    prefix就是使用的快捷方式,在需要用到的地方输入vue,按下tab就能快捷添加代码
    Processed: 0.014, SQL: 8