美文网首页
vs code 用户代码片段

vs code 用户代码片段

作者: locky丶 | 来源:发表于2019-04-03 10:44 被阅读0次

    JavaScript 代码片段 ( javascript.json )

    {
        "Print to console": {
            "prefix": "cs",
            "body": [
                "console.log($1)"
            ],
            "description": "打印调试日志"
        },
            "validate Phone": {
            "prefix": "vPhone",
            "body": "var reg = /^1[34578]\d{9}$/",
            "description": "正则验证手机格式"
        },
        "validate Telephone": {
            "prefix": "vTel",
            "body": "var reg = /^0\d{2,3}-?\d{7,8}$/",
            "description": "正则验证固定电话"
        },
        "validate Password": {
            "prefix": "vPassword",
            "body": "var reg = /(?!^(\d+|[a-zA-Z]+|[~!@#$%^&*?]+)$)^[\w~!@#$%^&*?]+$/",
            "description": "正则验证密码,必须大小写英文,可带特殊字符"
        }
    }
    

    less代码片段 ( less.json )

    {
        "Print to console": {
            "prefix": "rr",
            "body": [
                "/@r;"
            ],
            "description": "px to rem"
        }
    }
    

    相关文章

      网友评论

          本文标题:vs code 用户代码片段

          本文链接:https://www.haomeiwen.com/subject/jpdabqtx.html