• uniapp 代码片段


    uni-app 代码片段

    方便在 vscode 中使用 uni-app 开发。

    {
        "#ifdef": {
            "body": [
                "<!-- #ifdef ${1:APP-PLUS/APP-VUE/APP-NVUE/APP/VUE2/VUE3/MP-ALIPAY/MP-BAIDU/MP-WEIXIN/MP-QQ/MP-TOUTIAO/MP-360/MP-KUAISHOU/MP-LARK/MP-JD/MP/H5/QUICKAPP-WEBVIEW-HUAWEI/QUICKAPP-WEBVIEW-UNION/QUICKAPP-WEBVIEW} -->",
                "$0",
                "<!-- #endif -->"
            ],
            "prefix": "ifdef",
            "project": "uni-app",
            "scope": "text.html.vue"
        },
        "#ifndef": {
            "body": [
                "<!-- #ifndef ${1:APP-PLUS/APP-VUE/APP-NVUE/APP/VUE2/VUE3/MP-ALIPAY/MP-BAIDU/MP-WEIXIN/MP-QQ/MP-TOUTIAO/MP-360/MP-KUAISHOU/MP-LARK/MP-JD/MP/H5/QUICKAPP-WEBVIEW-HUAWEI/QUICKAPP-WEBVIEW-UNION/QUICKAPP-WEBVIEW} -->",
                "$0",
                "<!-- #endif -->"
            ],
            "prefix": "ifndef",
            "project": "uni-app",
            "scope": "text.html.vue"
        },
        "&lt;!--[if IE]&gt;": {
            "body": [
                "<!--[if IE]>",
                "\t$1",
                "<![endif]-->"
            ],
            "prefix": "ifie",
            "project": "Web",
            "scope": "text.html.vue"
        },
        "&lt;!--[if lte IE 6]&gt;": {
            "body": [
                "<!--[if lte IE 6]>",
                "\t$1",
                "<![endif]-->"
            ],
            "prefix": "ifie6",
            "project": "Web",
            "scope": "text.html.vue"
        },
        "Non-Breaking Space": {
            "body": [
                "&nbsp;"
            ],
            "prefix": "space",
            "project": "Web",
            "scope": "text.html.vue"
        },
        "Vue Base": {
            "body": [
                "<template>",
                "\t<${1:div}>",
                "",
                "\t</${1:div}>",
                "</template>",
                "",
                "<script>",
                "\texport default {",
                "\t\t${0}",
                "\t}",
                "</script>",
                "",
                "<style scoped>",
                "",
                "</style>"
            ],
            "description": "Base for Vue File",
            "prefix": "vbase",
            "scope": "text.html.vue ! expression"
        },
        "Vue Class Binding": {
            "body": [
                "<${1:div} :class=\"{ ${2:className}: ${3:data} }\"></${1:div}>"
            ],
            "description": "vue class binding",
            "prefix": "vclass",
            "scope": "text.html.vue ! (expression , meta.tag)"
        },
        "Vue Class Binding Object": {
            "body": [
                "<${1:div} :class=\"[${2:classNameA}, ${3:classNameB}]\"></${1:div}>"
            ],
            "description": "vue class binding",
            "prefix": "vclass-obj",
            "scope": "text.html.vue ! (expression , meta.tag)"
        },
        "Vue Component with Props Binding": {
            "body": [
                "<${1:component} :${1:propName}=\"${0}\"></${1:component}>"
            ],
            "description": "component element with props",
            "prefix": "vel-props",
            "scope": "text.html.vue ! (expression , meta.tag)"
        },
        "Vue Image Source Binding": {
            "body": [
                "<img :src=\"'/path/to/images/' + ${1:fileName}\" alt=\"${2:altText}\"/>"
            ],
            "description": "image source binding",
            "prefix": "vsrc",
            "scope": "text.html.vue ! (expression , meta.tag)"
        },
        "Vue Multiple Conditional Class Bindings": {
            "body": [
                "<${1:div} :class=\"[${2:classNameA}, {${3:classNameB} : ${4:condition}}]\"></${1:div}>"
            ],
            "description": "vue multiple conditional class bindings",
            "prefix": "vclass-obj-mult",
            "scope": "text.html.vue ! (expression , meta.tag)"
        },
        "Vue Nuxt Routing Link": {
            "body": [
                "<nuxt-link to=\"/${1:page}\">${1:page}</nuxt-link>"
            ],
            "description": "nuxt routing link",
            "prefix": "vnuxtl",
            "scope": "text.html.vue ! (expression , meta.tag)"
        },
        "Vue Style Binding": {
            "body": [
                "<${1:div} :style=\"{ fontSize: ${2:data} + 'px' }\"></${1:div}>"
            ],
            "description": "vue inline style binding",
            "prefix": "vstyle",
            "scope": "text.html.vue ! (expression , meta.tag)"
        },
        "Vue Style Binding Object": {
            "body": [
                "<${1:div} :style=\"[${2:styleObjectA}, ${3:styleObjectB]}\"></${1:div}>"
            ],
            "description": "vue inline style binding, objects",
            "prefix": "vstyle-obj",
            "scope": "text.html.vue ! (expression , meta.tag)"
        },
        "Vue Transition Component with JavaScript Hooks": {
            "body": [
                "<transition",
                "\tmode=\"out-in\"",
                "\t@before-enter=\"beforeEnter\"",
                "\t@enter=\"enter\"",
                "",
                "\t@before-leave=\"beforeLeave\"",
                "\t@leave=\"leave\"",
                "\t:css=\"false\">",
                "",
                "</transition>"
            ],
            "description": "transition component js hooks",
            "prefix": "vanim",
            "scope": "text.html.vue ! (expression , meta.tag)"
        },
        "Vue v-for": {
            "body": [
                "<${1:div} v-for=\"${2:item} in ${2:item}s\" :key=\"${2:item}.id\">",
                "\t{{ ${2:item} }}",
                "</${1:div}>"
            ],
            "description": "vfor statement",
            "prefix": "vfor",
            "scope": "text.html.vue ! (expression , meta.tag)"
        },
        "Vue v-model Directive": {
            "body": [
                "<input v-model=\"${1:data}\" type=\"text\" />"
            ],
            "description": "v-model directive",
            "prefix": "vmodel",
            "scope": "text.html.vue ! (expression , meta.tag)"
        },
        "Vue v-model Number Directive": {
            "body": [
                "<input v-model.number=\"${1:numData}\" type=\"number\" step=\"1\" />"
            ],
            "description": "v-model directive number input",
            "prefix": "vmodel-num",
            "scope": "text.html.vue ! (expression , meta.tag)"
        },
        "Vue v-on Shortcut Directive": {
            "body": [
                "@click=\"${1:handler}(${2:arg}, $event)\""
            ],
            "description": "v-on click handler with arguments",
            "prefix": "von",
            "scope": "text.html.vue ! (expression , meta.tag)"
        },
        "a_href": {
            "body": [
                "<a href=\"$1\">$0</a>"
            ],
            "prefix": "ahref",
            "project": "Web",
            "scope": "text.html.vue",
            "triggerAssist": true
        },
        "applet (code width height)": {
            "body": [
                "<applet code=\"$1\" width=\"$2\" height=\"$3\">\n$0\n</applet>"
            ],
            "prefix": "applet",
            "project": "Web",
            "scope": "text.html.vue"
        },
        "base": {
            "body": [
            ],
            "prefix": "base",
            "project": "Web",
            "scope": "text.html.vue"
        },
        "basefont_color_size": {
            "body": [
                "<basefont color=\"$0\" size=\"$1\" />"
            ],
            "prefix": "basefont",
            "project": "Web",
            "scope": "text.html.vue"
        },
        "button_type": {
            "body": [
                "<button type=\"button\">$0</button>"
            ],
            "prefix": "button",
            "project": "Web",
            "scope": "text.html.vue"
        },
        "canvas (id width height)": {
            "body": [
                "<canvas id=\"$1\" width=\"$2\" height=\"$3\"></canvas>"
            ],
            "prefix": "canvas",
            "project": "Web",
            "scope": "text.html.vue"
        },
        "data-": {
            "body": [
                "data-${1:type} = \"$2\""
            ],
            "prefix": "data-",
            "project": "Web",
            "scope": "text.html.basic meta.tag.structure punctuation.definition.tag.end.html,text.html.basic meta.tag.structure"
        },
        "div_class": {
            "body": [
                "<div class=\"$1\">",
                "\t$0",
                "</div>"
            ],
            "prefix": "divc",
            "project": "Web",
            "scope": "text.html.vue",
            "triggerAssist": true
        },
        "div_id": {
            "body": [
                "<div id=\"$1\">",
                "\t$0",
                "</div>"
            ],
            "prefix": "div",
            "project": "Web",
            "scope": "text.html.vue",
            "triggerAssist": true
        },
        "dl_dt_dd": {
            "body": [
                "<dl>",
                "\t<dt>$1</dt>",
                "\t<dd>$2</dd>",
                "</dl>"
            ],
            "prefix": "dl",
            "project": "Web",
            "scope": "text.html.vue"
        },
        "fieldset_id": {
            "body": [
                "<fieldset id=\"$2\">",
                "\t<legend>$1</legend>",
                "\t",
                "\t$0",
                "</fieldset>"
            ],
            "prefix": "fieldset",
            "project": "Web",
            "scope": "text.html.vue"
        },
        "font_size_color": {
            "body": [
                "<font size=\"$1\" color=\"$2\">$0</font>"
            ],
            "prefix": "font",
            "project": "Web",
            "scope": "text.html.vue"
        },
        "form_action_method": {
            "body": [
                "<form action=\"$1\" method=\"$2\">",
                "\t$0",
                "</form>"
            ],
            "prefix": "form",
            "project": "Web",
            "scope": "text.html.vue"
        },
        "form_submit": {
            "body": [
                "<form action=\"$1\" method=\"${2:post}\">",
                "\t$0",
                "\t<input type=\"submit\" value=\"$3\"/>",
                "</form>"
            ],
            "prefix": "form",
            "project": "Web",
            "scope": "text.html.vue",
            "triggerAssist": true
        },
        "frame_src": {
            "body": [
                "<frame src=\"$0\" >"
            ],
            "prefix": "frame",
            "project": "Web",
            "scope": "text.html.vue"
        },
        "frameset_cols": {
            "body": [
                "<frameset cols=\"$1\">",
                "\t$0",
                "</frameset>"
            ],
            "prefix": "frameset",
            "project": "Web",
            "scope": "text.html.vue"
        },
        "head_structure": {
            "body": [
                "<head>",
                "\t<meta charset=\"utf-8\"/>",
                "\t<title>$1</title>",
                "\t",
                "</head>"
            ],
            "prefix": "head",
            "project": "Web",
            "scope": "text.html.vue"
        },
        "html_5": {
            "body": [
                "<!DOCTYPE HTML>"
            ],
            "prefix": "dochtml5",
            "project": "Web",
            "scope": "text.html.vue"
        },
        "html_structure": {
            "body": [
                "<!DOCTYPE html>",
                "<html>",
                "\t<head>",
                "\t\t<meta charset=\"utf-8\" />",
                "\t\t<meta name=\"viewport\" content=\"width=device-width, initial-scale=1\">",
                "\t\t<title>$0</title>",
                "\t</head>",
                "\t<body>",
                "\t\t",
                "\t</body>",
                "</html>"
            ],
            "prefix": "html",
            "project": "Web",
            "scope": "text.html.vue"
        },
        "iframe_src_width_height": {
            "body": [
                "<iframe src=\"$1\" width=\"$2\" height=\"$3\"></iframe>"
            ],
            "prefix": "iframe",
            "project": "Web",
            "scope": "text.html.vue",
            "triggerAssist": true
        },
        "input_lable": {
            "body": [
                "<input type=\"${1:radio}\" name=\"$2\" id=\"$2\" value=\"$3\"/><label for=\"$2\">$4</label>"
            ],
            "prefix": "inputlable",
            "project": "Web",
            "scope": "text.html.vue"
        },
        "input_reset": {
            "body": [
                "<input type=\"reset\" value=\"$1\" />"
            ],
            "prefix": "inreset",
            "project": "Web",
            "scope": "text.html.vue"
        },
        "input_search": {
            "body": [
                "<input type=\"search\" name=\"$1\" required=\"$2\" placeholder=\"Search\" x-webkit-speech=\"$3\" x-webkit-grammar=\"builtin:search\" lang=\"zh-CN\">"
            ],
            "prefix": "insearch",
            "project": "Web",
            "scope": "text.html.vue"
        },
        "input_structure": {
            "body": [
                "<input type=\"$1\" name=\"$2\" id=\"$2\" value=\"$3\" />"
            ],
            "prefix": "input",
            "project": "Web",
            "scope": "text.html.vue",
            "triggerAssist": true
        },
        "input_submit": {
            "body": [
                "<input type=\"submit\" id=\"$1\" name=\"$2\" />"
            ],
            "prefix": "insubmit",
            "project": "Web",
            "scope": "text.html.vue"
        },
        "input_text": {
            "body": [
                "<input type=\"text\" id=\"$1\" value=\"$2\" />"
            ],
            "prefix": "intext",
            "project": "Web",
            "scope": "text.html.vue",
            "triggerAssist": true
        },
        "meta_GB2312": {
            "body": [
                "<meta charset=\"GB2312\"/>"
            ],
            "prefix": "metagb",
            "project": "Web",
            "scope": "text.html.vue"
        },
        "meta_keywords": {
            "body": [
                "<meta name=\"Keywords\" content=\"$1\"/>"
            ],
            "prefix": "metakeywords",
            "project": "Web",
            "scope": "text.html.vue"
        },
        "meta_name_content": {
            "body": [
                "<meta name=\"$1\" content=\"$2\"/>"
            ],
            "prefix": "meta",
            "project": "Web",
            "scope": "text.html.vue",
            "triggerAssist": true
        },
        "meta_nocache": {
            "body": [
                "<meta http-equiv=\"Pragma\" content=\"no-cache\" />"
            ],
            "prefix": "metanocache",
            "project": "Web",
            "scope": "text.html.vue"
        },
        "meta_viewport": {
            "body": [
                "<meta name=\"viewport\" content=\"width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no\" />"
            ],
            "prefix": "metaviewport",
            "project": "Web",
            "scope": "text.html.vue"
        },
        "ng-": {
            "body": [
                "ng-${1:app}=\"$2\""
            ],
            "prefix": "ng-",
            "project": "Web",
            "scope": "text.html.basic meta.tag.structure punctuation.definition.tag.end.html,text.html.basic meta.tag.structure"
        },
        "ng-pluralize": {
            "body": [
                "<ng-pluralize>$1</ng-pluralize>"
            ],
            "prefix": "ngp",
            "project": "Web",
            "scope": "text.html.vue"
        },
        "script html5plus": {
            "body": [
                "<script src=\"html5plus://ready\"></script>"
            ],
            "description": "html5plus提前注入时需要加上此script块",
            "prefix": "sctplus",
            "project": "Web",
            "scope": "text.html.vue"
        },
        "script_src_type": {
            "body": [
                "<script src=\"$1\" type=\"text/javascript\" charset=\"${3:utf-8}\"></script>"
            ],
            "prefix": "scsrc",
            "project": "Web",
            "scope": "text.html.vue",
            "triggerAssist": true
        },
        "script_type": {
            "body": [
                "<script type=\"text/javascript\">",
                "\t$0",
                "</script>"
            ],
            "prefix": "script",
            "project": "Web",
            "scope": "text.html.vue"
        },
        "select_option": {
            "body": [
                "<select name=\"$1\">",
                "\t<option value=\"$2\">$3</option>",
                "</select>"
            ],
            "prefix": "select",
            "project": "Web",
            "scope": "text.html.vue"
        },
        "span_id": {
            "body": [
                "<span id=\"$1\">",
                "\t$0",
                "</span>"
            ],
            "prefix": "span",
            "project": "Web",
            "scope": "text.html.vue",
            "triggerAssist": true
        },
        "style_type": {
            "body": [
                "<style type=\"text/css\">",
                "\t$0",
                "</style>"
            ],
            "prefix": "style",
            "project": "Web",
            "scope": "text.html.vue"
        },
        "table_structure": {
            "body": [
                "<table border=\"$1\" cellspacing=\"$2\" cellpadding=\"$3\">",
                "\t<tr><th>${4:Header}</th></tr>",
                "\t<tr><td>${5:Data}</td></tr>",
                "</table>"
            ],
            "prefix": "table",
            "project": "Web",
            "scope": "text.html.vue"
        },
        "uAudio": {
            "body": [
                "<audio :src=\"$1\" :poster=\"$0\" :name=\"$2\" :author=\"$3\" :action=\"$4\" controls></audio>"
            ],
            "prefix": "uaudio",
            "project": "uni-app",
            "scope": "text.html.vue ! (expression , meta.tag)"
        },
        "uBadge": {
            "body": [
                "<uni-badge text=\"$1\" type=\"$2\"></uni-badge>"
            ],
            "prefix": "ubadge",
            "project": "uni-app",
            "scope": "text.html.vue ! (expression , meta.tag)"
        },
        "uButton": {
            "body": [
                "<button type=\"default\">$1</button>"
            ],
            "prefix": "ubutton",
            "project": "uni-app",
            "scope": "text.html.vue ! (expression , meta.tag)"
        },
        "uCalendar": {
            "body": [
                "<uni-calendar lunar=\"\" @change=\"$1\"></uni-calendar>"
            ],
            "prefix": "ucalendar",
            "project": "uni-app",
            "scope": "text.html.vue ! (expression , meta.tag)"
        },
        "uCard": {
            "body": [
                "<uni-card title=\"标题文字\" thumbnail=\"$1\" extra=\"额外信息$2\" note=\"Tips$3\">",
                "\t内容主体,可自定义内容及样式$4",
                "</uni-card>"
            ],
            "prefix": "ucard",
            "project": "uni-app",
            "scope": "text.html.vue ! (expression , meta.tag)"
        },
        "uCheckbox": {
            "body": [
                "<label>",
                "\t<checkbox :value=\"$1\" /><text>$0</text>",
                "</label>"
            ],
            "prefix": "ucheckbox",
            "project": "uni-app",
            "scope": "text.html.vue ! (expression , meta.tag)"
        },
        "uCheckboxGroup": {
            "body": [
                "<checkbox-group name=\"$1\">",
                "\t<label>",
                "\t\t<checkbox :value=\"$2\" /><text>$0</text>",
                "\t</label>",
                "</checkbox-group>"
            ],
            "prefix": "ucheckboxgroup",
            "project": "uni-app",
            "scope": "text.html.vue ! (expression , meta.tag)"
        },
        "uCol": {
            "body": [
                "<uni-col$1>$2</uni-col>"
            ],
            "prefix": "ucol",
            "project": "uni-app",
            "scope": "text.html.vue ! (expression , meta.tag)"
        },
        "uCollapse": {
            "body": [
                "<uni-collapse>",
                "\t<uni-collapse-item title=\"$2\">",
                "\t\t内容$3",
                "\t</uni-collapse-item>",
                "</uni-collapse>"
            ],
            "prefix": "ucollapse",
            "project": "uni-app",
            "scope": "text.html.vue ! (expression , meta.tag)"
        },
        "uCombox": {
            "body": [
                "<uni-combox label=\"$1\" :candidates=\"$2\" placeholder=\"$3\" v-model=\"$4\"></uni-combox>"
            ],
            "prefix": "ucombox",
            "project": "uni-app",
            "scope": "text.html.vue ! (expression , meta.tag)"
        },
        "uCountDown": {
            "body": [
                "<uni-countdown color=\"$1\" background-color=\"$2\" :day=\"$3\" :hour=\"$4\" :minute=\"$5\" :second=\"$6\"></uni-countdown>"
            ],
            "prefix": "ucountdown",
            "project": "uni-app",
            "scope": "text.html.vue ! (expression , meta.tag)"
        },
        "uCustomTabBar": {
            "body": [
                "<custom-tab-bar direction=\"$1\" :show-icon=\"$2\" :selected=\"$3\" @onTabItemTap=\"$4\" />"
            ],
            "prefix": "customtabbar",
            "project": "uni-app",
            "scope": "text.html.vue ! (expression , meta.tag)",
            "triggerAssist": true
        },
        "uDataCheckbox": {
            "body": [
                "<uni-data-checkbox  v-model=\"$1\" :multiple=\"$2\" :localdata=\"$3\" />"
            ],
            "prefix": "uDataCheckbox",
            "project": "uni-app",
            "scope": "text.html.vue ! (expression , meta.tag)"
        },
        "uDateformat": {
            "body": [
                "<uni-dateformat date=\"$1\" />"
            ],
            "prefix": "udateformat",
            "project": "uni-app",
            "scope": "text.html.vue ! (expression , meta.tag)"
        },
        "uDrawer": {
            "body": [
                "<uni-drawer :visible=\"$1\">",
                "\t<view style=\"padding:30rpx;\">",
                "\t\t$2",
                "\t</view>",
                "</uni-drawer>"
            ],
            "prefix": "udrawer",
            "project": "uni-app",
            "scope": "text.html.vue ! (expression , meta.tag)"
        },
        "uEasyinput": {
            "body": [
                "<uni-easyinput  v-model=\"$1\" placeholder=\"$2\" />"
            ],
            "prefix": "uEasyinput",
            "project": "uni-app",
            "scope": "text.html.vue ! (expression , meta.tag)"
        },
        "uEditor": {
            "body": [
                "<editor placeholder=\"$1\"></editor>"
            ],
            "prefix": "uEditor",
            "project": "uni-app",
            "scope": "text.html.vue ! (expression , meta.tag)"
        },
        "uFab": {
            "body": [
                "<uni-fab @fabClick=\"$6\"></uni-fab>"
            ],
            "prefix": "ufab",
            "project": "uni-app",
            "scope": "text.html.vue ! (expression , meta.tag)"
        },
        "uFav": {
            "body": [
                "<uni-fav :checked=\"$1\" @click=\"$2\"></uni-fav>"
            ],
            "prefix": "ufav",
            "project": "uni-app",
            "scope": "text.html.vue ! (expression , meta.tag)"
        },
        "uField": {
            "body": [
                "<uni-field label=\"$1\" name=\"$2\" v-model=\"$3\" placeholder=\"$4\" />"
            ],
            "prefix": "ufield",
            "project": "uni-app",
            "scope": "text.html.vue ! (expression , meta.tag)"
        },
        "uFilePicker": {
            "body": [
                "<uni-file-picker v-model=\"$1\" title=\"$2\" limit=\"$3\" file-mediatype=\"$4\"></uni-file-picker>"
            ],
            "prefix": "uFilePicker",
            "project": "uni-app",
            "scope": "text.html.vue ! (expression , meta.tag)"
        },
        "uForms": {
            "body": [
                "<uni-forms ref=\"form\" :rules=\"\">",
                "\t<uni-forms-item label=\"\" name=\"\">",
                "\t\t$1",
                "\t</uni-forms-item>",
                "</uni-forms>"
            ],
            "prefix": "uforms",
            "project": "uni-app",
            "scope": "text.html.vue ! (expression , meta.tag)"
        },
        "uFormsItem": {
            "body": [
                "<uni-forms-item label=\"\" name=\"\">",
                "\t$1",
                "</uni-forms-item>"
            ],
            "prefix": "uformsItem",
            "project": "uni-app",
            "scope": "text.html.vue ! (expression , meta.tag)"
        },
        "uGoodsNav": {
            "body": [
                "<uni-goods-nav :fill=\"$1\" :options=\"$2\" :button-group=\"$3\" @click=\"$4\" @buttonClick=\"$5\" />"
            ],
            "prefix": "ugoodsnav",
            "project": "uni-app",
            "scope": "text.html.vue ! (expression , meta.tag)"
        },
        "uGrid": {
            "body": [
                "<uni-grid :column=\"$1\">",
                "\t<uni-grid-item>$2</uni-grid-item>",
                "\t<uni-grid-item>$3</uni-grid-item>",
                "</uni-grid>"
            ],
            "prefix": "ugrid",
            "project": "uni-app",
            "scope": "text.html.vue ! (expression , meta.tag)"
        },
        "uGroup": {
            "body": [
                "<uni-group title=\"$1\" margin-top=\"$2\">",
                "\t内容主体,可自定义内容及样式$3",
                "</uni-group>"
            ],
            "prefix": "ugroup",
            "project": "uni-app",
            "scope": "text.html.vue ! (expression , meta.tag)"
        },
        "uIcons": {
            "body": [
                "<uni-icons type=\"$1\"></uni-icons>"
            ],
            "prefix": "uicons",
            "project": "uni-app",
            "scope": "text.html.vue ! (expression , meta.tag)"
        },
        "uImage": {
            "body": [
                "<image src=\"$1\" mode=\"$2\"></image>"
            ],
            "prefix": "uimage",
            "project": "uni-app",
            "scope": "text.html.vue ! (expression , meta.tag)",
            "triggerAssist": true
        },
        "uIndexedList": {
            "body": [
                "<uni-indexed-list :options=\"$1\" :showSelect=\"$1\" @click=\"$1\"></uni-indexed-list>"
            ],
            "prefix": "uindexedlist",
            "project": "uni-app",
            "scope": "text.html.vue ! (expression , meta.tag)"
        },
        "uInput": {
            "body": [
                "<input type=\"text\" value=\"$0\" />"
            ],
            "prefix": "uinput",
            "project": "uni-app",
            "scope": "text.html.vue ! (expression , meta.tag)"
        },
        "uLink": {
            "body": [
                "<uni-link href=\"$1\" text=\"$2\">$3</uni-link>"
            ],
            "prefix": "ulink",
            "project": "uni-app",
            "scope": "text.html.vue ! (expression , meta.tag)"
        },
        "uList": {
            "body": [
                "<uni-list>",
                "\t<uni-list-item title=\"$1\" note=\"$2\"></uni-list-item>",
                "\t<uni-list-item title=\"$3\" note=\"$4\"></uni-list-item>",
                "</uni-list>"
            ],
            "prefix": "ulist",
            "project": "uni-app",
            "scope": "text.html.vue ! (expression , meta.tag)"
        },
        "uListFor": {
            "body": [
                "<uni-list>",
                "\t<uni-list-item v-for=\"$1\" :key=\"$2\" title=\"$3\"></uni-list-item>",
                "</uni-list>"
            ],
            "prefix": "ulistfor",
            "project": "uni-app",
            "scope": "text.html.vue ! (expression , meta.tag)"
        },
        "uLoadMore": {
            "body": [
                "<uni-load-more :status=\"$1\"></uni-load-more>"
            ],
            "prefix": "uloadmore",
            "project": "uni-app",
            "scope": "text.html.vue ! (expression , meta.tag)"
        },
        "uMap": {
            "body": [
                "<map :latitude=\"$1\" :longitude=\"$0\"></map>"
            ],
            "prefix": "umap",
            "project": "uni-app",
            "scope": "text.html.vue ! (expression , meta.tag)"
        },
        "uNavBar": {
            "body": [
                "<uni-nav-bar left-icon=\"back\" left-text=\"返回\" right-text=\"菜单\" title=\"标题$1\"></uni-nav-bar>"
            ],
            "prefix": "unavbar",
            "project": "uni-app",
            "scope": "text.html.vue ! (expression , meta.tag)"
        },
        "uNavigationBar": {
            "body": [
                "<navigation-bar :title=\"$0\"/>"
            ],
            "prefix": "navigationbar",
            "project": "uni-app",
            "scope": "text.html.vue ! (expression , meta.tag)",
            "triggerAssist": true
        },
        "uNavigator": {
            "body": [
                "<navigator url=\"$1\">$0</navigator>"
            ],
            "prefix": "unavigator",
            "project": "uni-app",
            "scope": "text.html.vue ! (expression , meta.tag)",
            "triggerAssist": true
        },
        "uNoticeBar": {
            "body": [
                "<uni-notice-bar single=\"$1\" text=\"$2\"></uni-notice-bar>"
            ],
            "prefix": "unoticebar",
            "project": "uni-app",
            "scope": "text.html.vue ! (expression , meta.tag)"
        },
        "uNumberBox": {
            "body": [
                "<uni-number-box @change=\"$1\"></uni-number-box>"
            ],
            "prefix": "unumberbox",
            "project": "uni-app",
            "scope": "text.html.vue ! (expression , meta.tag)"
        },
        "uPageMeta": {
            "body": [
                "<page-meta :background-text-style=\"$0\" :background-color=\"$1\">",
                "\t$0",
                "</page-meta>"
            ],
            "prefix": "pagemeta",
            "project": "uni-app",
            "scope": "text.html.vue ! (expression , meta.tag)",
            "triggerAssist": true
        },
        "uPagination": {
            "body": [
                "<uni-pagination title=\"$1\" show-icon=\"$2\" total=\"$3\" current=\"$4\"></uni-pagination>"
            ],
            "prefix": "upagination",
            "project": "uni-app",
            "scope": "text.html.vue ! (expression , meta.tag)"
        },
        "uPicker": {
            "body": [
                "<picker mode=\"$1\" :range=\"$2\" @change=\"$3\">",
                "\t<view>{{$0}}</view>",
                "</picker>"
            ],
            "prefix": "upicker",
            "project": "uni-app",
            "scope": "text.html.vue ! (expression , meta.tag)",
            "triggerAssist": true
        },
        "uPickerView": {
            "body": [
                "<picker-view indicator-style=\"height: 50px;\" :value=\"value$1\" @change=\"bindChange\">",
                "\t<picker-view-column>",
                "\t\t$0",
                "\t</picker-view-column>",
                "\t<picker-view-column>",
                "\t\t$2",
                "\t</picker-view-column>",
                "\t<picker-view-column>",
                "\t\t",
                "\t</picker-view-column>",
                "</picker-view>"
            ],
            "prefix": "upickerview",
            "project": "uni-app",
            "scope": "text.html.vue ! (expression , meta.tag)"
        },
        "uPopup": {
            "body": [
                "<uni-popup ref=\"popup\" type=\"top$1\"></uni-popup>"
            ],
            "prefix": "upopup",
            "project": "uni-app",
            "scope": "text.html.vue ! (expression , meta.tag)"
        },
        "uProgress": {
            "body": [
                "<progress percent=\"$1\" show-info$0 />"
            ],
            "prefix": "uprogress",
            "project": "uni-app",
            "scope": "text.html.vue ! (expression , meta.tag)"
        },
        "uRadio": {
            "body": [
                "<label class=\"radio\">",
                "\t<radio value=\"$1\" /><text>$0</text>",
                "</label>"
            ],
            "prefix": "uradio",
            "project": "uni-app",
            "scope": "text.html.vue ! (expression , meta.tag)"
        },
        "uRadioGroup": {
            "body": [
                "<radio-group name=\"$1\">",
                "\t<label>",
                "\t\t<radio :value=\"$2\" /><text>$3</text>",
                "\t</label>",
                "\t<label>",
                "\t\t<radio :value=\"$4\" /><text>$5</text>",
                "\t</label>",
                "</radio-group>"
            ],
            "prefix": "uradiogroup",
            "project": "uni-app",
            "scope": "text.html.vue ! (expression , meta.tag)"
        },
        "uRate": {
            "body": [
                "<uni-rate value=\"$1\"></uni-rate>"
            ],
            "prefix": "uRate",
            "project": "uni-app",
            "scope": "text.html.vue ! (expression , meta.tag)"
        },
        "uRichText": {
            "body": [
                "<rich-text :nodes=\"$1\"></rich-text>"
            ],
            "prefix": "urichtext",
            "project": "uni-app",
            "scope": "text.html.vue ! (expression , meta.tag)"
        },
        "uRow": {
            "body": [
                "<uni-row$1>",
                "\t<uni-col$2>$3</uni-col>",
                "</uni-row>"
            ],
            "prefix": "urow",
            "project": "uni-app",
            "scope": "text.html.vue ! (expression , meta.tag)"
        },
        "uScrollView": {
            "body": [
                "<scroll-view scroll-y=\"true\" $1>",
                "\t<view>$0</view>",
                "</scroll-view>"
            ],
            "prefix": "uscrollview",
            "project": "uni-app",
            "scope": "text.html.vue ! (expression , meta.tag)"
        },
        "uSearchBar": {
            "body": [
                "<uni-search-bar @confirm=\"$1\" @input=\"$2\" />"
            ],
            "prefix": "usearchbar",
            "project": "uni-app",
            "scope": "text.html.vue ! (expression , meta.tag)"
        },
        "uSection": {
            "body": [
                "<uni-section title=\"$1\" sub-title=\"$2\" type=\"$3\">",
                "\t内容主体,可自定义内容及样式$4",
                "</uni-section>"
            ],
            "prefix": "usection",
            "project": "uni-app",
            "scope": "text.html.vue ! (expression , meta.tag)"
        },
        "uSegmentedControl": {
            "body": [
                "<uni-segmented-control :current=\"current$1\" :values=\"$0\" @clickItem=\"$2\"></uni-segmented-control>",
                "<view class=\"content\">",
                "\t<view v-show=\"current === 0\">",
                "\t\t选项卡1的内容",
                "\t</view>",
                "\t<view v-show=\"current === 1\">",
                "\t\t选项卡2的内容",
                "\t</view>",
                "\t<view v-show=\"current === 2\">",
                "\t\t选项卡3的内容",
                "\t</view>",
                "</view>"
            ],
            "prefix": "usegmentedcontrol",
            "project": "uni-app",
            "scope": "text.html.vue ! (expression , meta.tag)"
        },
        "uSlider": {
            "body": [
                "<slider @change=\"$1\"/>"
            ],
            "prefix": "uslider",
            "project": "uni-app",
            "scope": "text.html.vue ! (expression , meta.tag)"
        },
        "uSteps": {
            "body": [
                "<uni-steps :options=\"$1\" :active=\"0$2\"></uni-steps>"
            ],
            "prefix": "usteps",
            "project": "uni-app",
            "scope": "text.html.vue ! (expression , meta.tag)"
        },
        "uSwipeAction": {
            "body": [
                "<uni-swipe-action>",
                "\t<uni-swipe-action-item :options=\"$1\" @click=\"$2\"></uni-swipe-action-item>",
                "</uni-swipe-action>"
            ],
            "prefix": "uswipeaction",
            "project": "uni-app",
            "scope": "text.html.vue ! (expression , meta.tag)"
        },
        "uSwiper": {
            "body": [
                "<swiper :indicator-dots=\"true\" :autoplay=\"true\" :interval=\"3000\" :duration=\"1000\">",
                "\t<swiper-item>",
                "\t\t<view class=\"swiper-item\">$1</view>",
                "\t</swiper-item>",
                "\t<swiper-item>",
                "\t\t<view class=\"swiper-item\">$2</view>",
                "\t</swiper-item>",
                "</swiper>"
            ],
            "prefix": "uswiper",
            "project": "uni-app",
            "scope": "text.html.vue ! (expression , meta.tag)"
        },
        "uSwiperDot": {
            "body": [
                "<uni-swiper-dot :info=\"$1\" :current=\"$2\" field=\"$3\" :mode=\"$4\"></uni-swiper-dot>"
            ],
            "prefix": "uswiperdot",
            "project": "uni-app",
            "scope": "text.html.vue ! (expression , meta.tag)"
        },
        "uSwitch": {
            "body": [
                "<switch checked=\"true\" @change=\"$1\" />"
            ],
            "prefix": "uswitch",
            "project": "uni-app",
            "scope": "text.html.vue ! (expression , meta.tag)"
        },
        "uTable": {
            "body": [
                "<uni-table stripe emptyText=\"暂无更多数据\">",
                "\t<uni-tr>",
                "\t\t<uni-th align=\"center\">$1</uni-th>",
                "\t</uni-tr>",
                "\t<uni-tr>",
                "\t\t<uni-td>$2</uni-td>",
                "\t</uni-tr>",
                "</uni-table>"
            ],
            "prefix": "uTable",
            "project": "uni-app",
            "scope": "text.html.vue ! (expression , meta.tag)"
        },
        "uTag": {
            "body": [
                "<uni-tag text=\"$1\" type=\"$2\"></uni-tag>"
            ],
            "prefix": "utag",
            "project": "uni-app",
            "scope": "text.html.vue ! (expression , meta.tag)"
        },
        "uTemplate": {
            "body": [
                "<template>",
                "\t<view>$0</view>",
                "</template>"
            ],
            "prefix": "utemplate",
            "project": "uni-app",
            "scope": "text.html.vue ! (expression , meta.tag)"
        },
        "uText": {
            "body": [
                "<text>$0</text>"
            ],
            "prefix": "utext",
            "project": "uni-app",
            "scope": "text.html.vue ! (expression , meta.tag)"
        },
        "uTextarea": {
            "body": [
                "<textarea value=\"$1\" placeholder=\"$0\" />"
            ],
            "prefix": "utextarea",
            "project": "uni-app",
            "scope": "text.html.vue ! (expression , meta.tag)"
        },
        "uTitle": {
            "body": [
                "<uni-title title=\"$1\"></uni-title>"
            ],
            "prefix": "utitle",
            "project": "uni-app",
            "scope": "text.html.vue ! (expression , meta.tag)"
        },
        "uTransition": {
            "body": [
                "<uni-transition :mode-class=\"$1\" :show=\"$2\" />"
            ],
            "prefix": "utransition",
            "project": "uni-app",
            "scope": "text.html.vue ! (expression , meta.tag)"
        },
        "uVideo": {
            "body": [
                "<video src=\"$1\" controls></video>"
            ],
            "prefix": "uvideo",
            "project": "uni-app",
            "scope": "text.html.vue ! (expression , meta.tag)"
        },
        "uView": {
            "body": [
                "<view class=\"$1\">$0</view>"
            ],
            "prefix": "uview",
            "project": "uni-app",
            "scope": "text.html.vue ! (expression , meta.tag)"
        },
        "uWebView": {
            "body": [
                "<web-view src=\"$1\"></web-view>"
            ],
            "prefix": "uwebview",
            "project": "uni-app",
            "scope": "text.html.vue ! (expression , meta.tag)"
        },
        "ul_li": {
            "body": [
                "<ul>",
                "\t<li>$1</li>",
                "</ul>"
            ],
            "prefix": "ul",
            "project": "Web",
            "scope": "text.html.vue"
        },
        "uniClouddb": {
            "body": [
                "<unicloud-db v-slot:default=\"{data, loading, error, options}\" collection=\"$0\">",
                "\t<view v-if=\"error\">{{error.message}}</view>",
                "\t<view v-else>",
                "\t\t",
                "\t</view>",
                "</unicloud-db>"
            ],
            "prefix": "udb",
            "project": "uni-app",
            "scope": "text.html.vue ! (expression , meta.tag)",
            "triggerAssist": true
        },
        "v-for": {
            "body": [
                "v-for=\"(${1:item},${2:index}) in ${3:Data}\""
            ],
            "prefix": "v-for",
            "project": "Web",
            "scope": "text.html.basic meta.tag.structure punctuation.definition.tag.end.html,text.html.basic meta.tag.structure"
        },
        "video_structure": {
            "body": [
                "<video width=\"${1:800}\" height=\"$2\">",
                "\t<source src=\"${3:myvideo.mp4}\" type=\"video/mp4\"></source>",
                "\t<source src=\"${4:myvideo.ogv}\" type=\"video/ogg\"></source>",
                "\t<source src=\"${5:myvideo.webm}\" type=\"video/webm\"></source>",
                "\t<object width=\"$6\" height=\"$7\" type=\"application/x-shockwave-flash\" data=\"${8:myvideo.swf}\">",
                "\t\t<param name=\"movie\" value=\"$8\" />",
                "\t\t<param name=\"flashvars\" value=\"autostart=true&amp;file=$8\" />",
                "\t</object>",
                "\t当前浏览器不支持 video直接播放,点击这里下载视频: <a href=\"${9:myvideo.webm}\">下载视频</a>",
                "</video>"
            ],
            "prefix": "video",
            "project": "Web",
            "scope": "text.html.vue"
        },
        "view for": {
            "body": [
                "<view v-for=\"(item,index) in ${1:data}\" :key=\"index\">",
                "\t$0",
                "</view>"
            ],
            "description": "view带for循环",
            "prefix": "viewfor",
            "project": "uni-app",
            "scope": "text.html.vue ! expression"
        },
        "view_class": {
            "body": [
                "<view class=\"$1\">",
                "\t$0",
                "</view>"
            ],
            "prefix": "viewclass",
            "scope": "text.html.vue ! expression",
            "triggerAssist": true
        }
    }
    
    
  • 相关阅读:
    面向对象三大特性:封装,继承,多态(三、多态的进一步讲解)
    面向对象三大特性:封装,继承,多态(二、多态)
    面向对象三大特性:封装,继承,多态(一,封装和继承)
    zookeeper+dubbo+demo
    Eclipse常见版本和JDK常用版本对应关系
    Navicat 连接MySQL 8.0.11 出现2059错误
    Neo4j elk Elasticsearch kibana kettle
    jvm垃圾回收机制GC
    jvm 这我就能会了 擦
    spring的4种事务特性,4种隔离级别,7种传播行为
  • 原文地址:https://www.cnblogs.com/Megasu/p/16398539.html
Copyright © 2020-2023  润新知