zoukankan      html  css  js  c++  java
  • 自定义编辑器代码块

    1、初始创建html-vue

    "vue-component": {
            "prefix": "vue-component",
            "body": [
                "<template>",
                "	<div>
    ",
                "	</div>",
                "</template>
    ",
                "<script>",
                "	export default {",
                "		props: {
    ",
                "		},",
                "		components: {
    ",
                "		},",
                "		data(){",
                "			return {
    				$0",
                "			}",
                "		},",
                "		methods: {
    ",
                "		}",
                "	}",
                "</script>
    ",
                "<style lang="scss">
    ",
                "</style>"
            ],
            "description": "vue componemt"
        }
    }

    创建vue项目后输入vue-component,输入过程中就有提示,选择就好了

    <template>
        <div>
    
        </div>
    </template>
    
    <script>
        export default {
            props: {
    
            },
            components: {
    
            },
            data(){
                return {
                    
                }
            },
            methods: {
    
            }
        }
    </script>
    
    <style lang="scss">
    
    </style>

    3、在vue项目上创建div加点击事件

        "div@": {
            "prefix": "div@",
            "body": [
                "<div @click="$0"></div>"
            ],
            "descripation": "div的@简写"
        }
    <div @click=""></div>
  • 相关阅读:
    Apple Tree(树状数组+线段树)
    平衡阵容(RMQ st表算法)
    一起去打CS
    夜归

    淋雨
    大马戏
    雨中行船
    弄堂里
    夜游天安门
  • 原文地址:https://www.cnblogs.com/aidixie/p/12060527.html
Copyright © 2011-2022 走看看