加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
js.code-snippets 52.99 KB
一键复制 编辑 原始数据 按行查看 历史
凌雲 提交于 2020-07-10 21:37 . 主要文件
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055
{
"#ifdef": {
"body": [
"// #ifdef ${1|APP-PLUS,APP-PLUS-NVUE,MP,MP-ALIPAY,MP-BAIDU,MP-WEIXIN,MP-QQ,H5|}",
"$0",
"// #endif"
],
"prefix": "ifdef",
"project": "uni-app",
"scope": "typescript,javascript"
},
"#ifndef": {
"body": [
"// #ifndef ${1|APP-PLUS,APP-PLUS-NVUE,MP,MP-ALIPAY,MP-BAIDU,MP-WEIXIN,MP-QQ,H5|}",
"$0",
"// #endif"
],
"prefix": "ifndef",
"project": "uni-app",
"scope": "typescript,javascript"
},
"$ (document.getElementById)": {
"body": [
"document.getElementById(\"$1\")"
],
"prefix": "$$$",
"project": "Web,App,Wap2App",
"scope": "typescript,javascript",
"triggerAssist": true
},
"$(\"\")": {
"body": [
"$(\"$1\")"
],
"prefix": "dl",
"scope": "typescript,javascript",
"triggerAssist": true
},
"$(\"#\")": {
"body": [
"$(\"#$1\")"
],
"prefix": "dlid",
"scope": "typescript,javascript",
"triggerAssist": true
},
"$(\".\")": {
"body": [
"$(\".$1\")"
],
"prefix": "dlclass",
"project": "Web,App,Wap2App",
"scope": "typescript,javascript",
"triggerAssist": true
},
"@alias": {
"body": [
"@alias $0"
],
"prefix": "@alias",
"scope": "comment.block.js"
},
"@description": {
"body": [
"@description $0"
],
"prefix": "@description",
"scope": "comment.block.js"
},
"@event": {
"body": [
"@event {Function(${1})} ${2:name} $0"
],
"prefix": "@event",
"scope": "comment.block.js"
},
"@example": {
"body": [
"@example $0"
],
"prefix": "@example",
"scope": "comment.block.js"
},
"@extends": {
"body": [
"@extends {${1:parent_type}}"
],
"prefix": "@extends",
"scope": "comment.block.js"
},
"@param": {
"body": [
"@param {${1:type}} ${2:$FN_PARAMS} $0"
],
"prefix": "@param",
"scope": "comment.block.js"
},
"@param with values": {
"body": [
"@param {${1:type}} ${2:$FN_PARAMS} = [${3:value}] $0"
],
"prefix": "@paramvalues",
"scope": "comment.block.js"
},
"@property": {
"body": [
"@property {${1:type}} ${2:prop_name} $0"
],
"prefix": "@property",
"scope": "comment.block.js"
},
"@property with values": {
"body": [
"@property {${1:type}} ${2:prop_name} = [${3:value}] $0"
],
"prefix": "@propertyvalues",
"scope": "comment.block.js"
},
"@return": {
"body": [
"@return {${1:type}}"
],
"prefix": "@return",
"scope": "comment.block.js"
},
"@tutorial": {
"body": [
"@tutorial ${1:url}"
],
"prefix": "@tutorial",
"scope": "comment.block.js"
},
"@type": {
"body": [
"@type {${1:type}}"
],
"prefix": "@type",
"scope": "comment.doc.js"
},
"Arrow function": {
"body": [
"($1) => {",
"\t$0",
"}"
],
"prefix": "arrow",
"scope": "typescript,javascript"
},
"Class": {
"body": [
"class ${1:name} {",
"\tconstructor(${2:arg}) {",
"\t\t$0",
"\t}",
"\t",
"}"
],
"prefix": "class",
"scope": "typescript,javascript"
},
"Class Extends": {
"body": [
"class ${1:name} extends ${2:AnotherClass} {",
"\tconstructor(${3:arg}) {",
"\t\t$0",
"\t}",
"\t",
"}"
],
"prefix": "classextends",
"scope": "typescript,javascript"
},
"Decrementer": {
"body": [
"return ${1:this.num} -= ${2:1}"
],
"description": "decrement",
"prefix": "vdec",
"scope": "typescript,javascript"
},
"Export": {
"body": [
"export ${1:default} ${2:bar}"
],
"prefix": "export",
"scope": "typescript,javascript"
},
"Export Class": {
"body": [
"export class ${1:name} {",
"\t$0",
"}"
],
"prefix": "exportclass",
"scope": "typescript,javascript"
},
"Getter": {
"body": [
"get ${1:name}() {",
"\t$0",
"}"
],
"prefix": "getter",
"scope": "JS_INCLASSBODY"
},
"Import": {
"body": [
"import ${1:foo} from \"${2:bar}\""
],
"prefix": "imfrom",
"scope": "typescript,javascript"
},
"Incrementer": {
"body": [
"return ${1:this.num} += ${2:1}"
],
"description": "increment",
"prefix": "vinc",
"scope": "typescript,javascript"
},
"Key:Value": {
"body": [
"${1:key} : ${2:value},"
],
"prefix": "kv",
"scope": "object.property.js"
},
"Object Method": {
"body": [
"${1:method_name}: function(${2:attribute}){",
"\t$0",
"}${3:,}"
],
"prefix": ":f",
"scope": "typescript,javascript"
},
"Object Method String": {
"body": [
"'${1:${2:#thing}:${3:click}}': function(element){",
"\t$0",
"}${4:,}"
],
"prefix": ":f",
"scope": "typescript,javascript"
},
"Object Value JS": {
"body": [
"${1:value_name}:${0:value},"
],
"prefix": ":,",
"scope": "typescript,javascript"
},
"Object key - key: \"value\"": {
"body": [
"${1:key}: ${2:\"${3:value}\"}${4:, }"
],
"prefix": ":",
"scope": "typescript,javascript"
},
"Prototype": {
"body": [
"${1:class_name}.prototype.${2:method_name} = function(${3:first_argument}) {",
"\t${0|,, body...|}",
"};"
],
"prefix": "proto",
"scope": "typescript,javascript"
},
"Setter": {
"body": [
"set ${1:property}(${2:value}) {",
"\t$0",
"}"
],
"prefix": "setter",
"scope": "class.body.js"
},
"Unit Test": {
"body": [
"import Vue from 'vue'",
"import ${1|HelloWorld|} from '.,components,${1:HelloWorld}'",
"",
"describe('${1:HelloWorld}.vue', () => {",
"\tit('${2:should render correct contents}', () => {",
"\t\tconst Constructor = Vue.extend(${1:HelloWorld})",
"\t\tconst vm = new Constructor().$mount()",
"\t\texpect(vm.$el.querySelector('.hello h1').textContent)",
"\t\t\t.to.equal(${3:'Welcome to Your Vue.js App'})",
"\t})",
"})"
],
"description": "unit test component",
"prefix": "vtest",
"scope": "typescript,javascript"
},
"Vue Commit Vuex Store in Methods": {
"body": [
"${1:mutationName}() {",
"\tthis.\\$store.commit('${1:mutationName}', ${2:payload})",
"}"
],
"description": "commit to vuex store in methods for mutation",
"prefix": "vcommit",
"scope": "vue.property.js"
},
"Vue Components": {
"body": [
"components: {",
"\t$1",
"},"
],
"description": "注册vue组件",
"prefix": "vcomponents",
"scope": "vue.property.js"
},
"Vue Computed": {
"body": [
"computed: {",
"\t${1:name}() {",
"\t\treturn this.${2:data} ${0}",
"\t}",
"},"
],
"description": "computed value",
"prefix": "vcomputed",
"scope": "vue.property.js"
},
"Vue Custom Directive": {
"body": [
"Vue.directive('${1:directiveName}', {",
"\tbind(el, binding, vnode) {",
"\t\tel.style.${2:arg} = binding.value.${2:arg};",
"\t}",
"});"
],
"description": "vue custom directive",
"prefix": "vc-direct",
"scope": "typescript,javascript"
},
"Vue Data": {
"body": [
"data() {",
"\treturn {",
"\t\t${1:key}: ${2:value}",
"\t}",
"},"
],
"description": "Vue Component Data",
"prefix": "vdata",
"scope": "vue.property.js"
},
"Vue Dispatch Vuex Store in Methods": {
"body": [
"${1:actionName}() {",
"\tthis.\\$store.dispatch('${1:actionName}', ${2:payload})",
"}"
],
"description": "dispatch to vuex store in methods for action",
"prefix": "vdispatch",
"scope": "vue.property.js"
},
"Vue Filter": {
"body": [
"filters: {",
"\t${1:fnName}: function(${2:value}) {",
"\t\treturn ${2:value}${0};",
"\t}",
"}"
],
"description": "vue filter",
"prefix": "vfilter",
"scope": "vue.property.js"
},
"Vue Import Export": {
"body": [
"import ${1|Name|} from '.,components,${1:Name}.vue'",
"",
"export default {",
"\tcomponents: {",
"\t\t${1:Name}",
"\t},",
"}"
],
"description": "import a component and include it in export default",
"prefix": "vimport-export",
"scope": "typescript,javascript"
},
"Vue Import File": {
"body": [
"import ${1|New|} from ',components,${1:New}.vue';"
],
"description": "Import one component into another",
"prefix": "vimport",
"scope": "typescript,javascript"
},
"Vue Import GSAP": {
"body": [
"import { TimelineMax, ${1:Ease} } from 'gsap'"
],
"description": "component methods options that dispatch an action from vuex store.",
"prefix": "vimport-gsap",
"scope": "typescript,javascript"
},
"Vue Import Library": {
"body": [
"import { ${1:libName} } from '${1:libName}'"
],
"description": "import a library",
"prefix": "vimport-lib",
"scope": "typescript,javascript"
},
"Vue Import into the Component": {
"body": [
"components: {",
"\t${1:New},",
"}"
],
"description": "Import one component into another, within export statement",
"prefix": "vcomponents",
"scope": "typescript,javascript"
},
"Vue Methods": {
"body": [
"methods: {",
"\t${1:name}() {",
"\t\t${0}",
"\t}",
"},"
],
"description": "vue method",
"prefix": "vmethod",
"scope": "vue.property.js"
},
"Vue Mixin": {
"body": [
"const ${1:mixinName} = {",
"\tmounted() {",
"\t\tconsole.log('hello from mixin!')",
"\t},",
"}"
],
"description": "vue mixin",
"prefix": "vmixin",
"scope": "typescript,javascript"
},
"Vue Props with Default": {
"body": [
"props: {",
"\t${1:propName}: {",
"\t\ttype: ${2:Number},",
"\t\tdefault: ${0}",
"\t},",
"},"
],
"description": "Vue Props with Default",
"prefix": "vprops",
"scope": "vue.property.js"
},
"Vue Transition Methods with JavaScript Hooks": {
"body": [
"beforeEnter(el) {",
"\tconsole.log('beforeEnter');",
"},",
"enter(el, done) {",
"\tconsole.log('enter');",
"\tdone();",
"},",
"beforeLeave(el) {",
"\tconsole.log('beforeLeave');",
"},",
"leave(el, done) {",
"\tconsole.log('leave');",
"\tdone();",
"},"
],
"description": "transition component js hooks",
"prefix": "vanimhook-js",
"scope": "typescript,javascript"
},
"Vue Use Mixin": {
"body": [
"mixins: [${1:mixinName}]"
],
"description": "vue use mixin",
"prefix": "vmixin-use",
"scope": "typescript,javascript"
},
"Vue Watchers": {
"body": [
"watch: {",
"\t${1:data}(${2:newValue}, ${3:oldValue}) {",
"\t\t${0}",
"\t}",
"},"
],
"description": "vue watcher",
"prefix": "vwatcher",
"scope": "vue.property.js"
},
"clog": {
"body": [
"console.log($1);"
],
"description": "打印变量",
"prefix": "clog",
"scope": "typescript,javascript"
},
"clogios": {
"body": [
"console.log(JSON.stringify(${1:e}));",
"console.log('${2:e}');"
],
"prefix": "cloios",
"project": "Web,App,Wap2App",
"scope": "typescript,javascript",
"triggerAssist": true
},
"clogjson": {
"body": [
"console.log(\"$1: \" + JSON.stringify($1));"
],
"description": "打印JSON字符串",
"prefix": "clogjson",
"scope": "typescript,javascript"
},
"clogvar": {
"body": [
"console.log(\"$1: \" + $1);"
],
"description": "打印变量",
"prefix": "clogvar",
"scope": "typescript,javascript"
},
"console.dir": {
"body": [
"console.dir($1)"
],
"prefix": "cdir",
"scope": "typescript,javascript",
"triggerAssist": true
},
"console.log();": {
"body": [
"console.log($1);"
],
"prefix": "clog",
"project": "Web,App,Wap2App",
"scope": "typescript,javascript"
},
"constructor": {
"body": [
"constructor(${1:arg}) {",
" $0",
"}"
],
"prefix": "cons",
"scope": "class.body.js"
},
"document.getElementById": {
"body": [
"document.getElementById(\"$1\")"
],
"prefix": "dg",
"scope": "typescript,javascript",
"triggerAssist": true
},
"document.querySelectorAll": {
"body": [
"document.querySelectorAll(\"$1\")"
],
"prefix": "dqs",
"scope": "typescript,javascript",
"triggerAssist": true
},
"document.write": {
"body": [
"document.write(\"$1\")"
],
"prefix": "dw",
"scope": "typescript,javascript"
},
"documentaddEventListener": {
"body": [
"document.addEventListener('${1:scroll}',function ($2) {",
" $0",
"})"
],
"prefix": "dad",
"project": "Web,App,Wap2App",
"scope": "typescript,javascript",
"triggerAssist": true
},
"export default": {
"body": [
"export default {",
"\t$0",
"}"
],
"prefix": "edefault",
"scope": "typescript,javascript"
},
"for (...) {...}": {
"body": [
"for ($1) {",
"\t$0",
"}"
],
"prefix": "forr",
"scope": "typescript,javascript"
},
"for let": {
"body": [
"for (let i = 0; i < ${1:Things}.length; i++) {",
"\t${1:Things}[i]",
"}"
],
"prefix": "forl",
"scope": "typescript,javascript"
},
"for let in": {
"body": [
"for (let ${1:var1} in ${2:var2}) {",
"\t$0",
"}"
],
"prefix": "forli",
"scope": "typescript,javascript"
},
"for...of": {
"body": [
"for (let ${1:s} of ${2:sequence}) {",
"\t$0",
"}"
],
"prefix": "forof",
"scope": "typescript,javascript"
},
"fori": {
"body": [
"for (var i = 0; i < ${1:Things}.length; i++) {",
"\t${1:Things}[i]",
"}"
],
"prefix": "fori",
"scope": "typescript,javascript"
},
"function": {
"body": [
"function ${1:function_name} ($2) {",
"\t$0",
"}"
],
"prefix": "funn",
"scope": "typescript,javascript"
},
"function*": {
"body": [
"function* ${1:name}($2) {",
"\tyield $0;",
"}"
],
"prefix": "fung",
"scope": "typescript,javascript"
},
"function_anonymous": {
"body": [
"function ($1) {",
"\t$0",
"}"
],
"prefix": "funan",
"scope": "typescript,javascript"
},
"function_closures": {
"body": [
"(function ($1) {",
"\t$0",
"})($2)"
],
"prefix": "funcl",
"scope": "typescript,javascript"
},
"getElementByIdaddEventListener": {
"body": [
"document.getElementById('$1').addEventListener('${2:tap}',function ($3) {",
" $0",
"})"
],
"prefix": "dga",
"project": "Web,App,Wap2App",
"scope": "typescript,javascript",
"triggerAssist": true
},
"if": {
"body": [
"if ($1) {",
"\t$0",
"}"
],
"prefix": "iff",
"scope": "typescript,javascript"
},
"if ... else": {
"body": [
"if ($1) {",
"\t$0",
"} else{",
"\t",
"}"
],
"prefix": "ife",
"scope": "typescript,javascript"
},
"ifAndroid": {
"body": [
"if (uni.getSystemInfoSync().platform == \"android\") {",
"\t$1",
"}"
],
"prefix": "ifandroid",
"project": "uni-app",
"scope": "typescript,javascript"
},
"if_compare": {
"body": [
"if ($1 == ${2:true}) {",
"\t$0",
"} else{",
"\t",
"}"
],
"prefix": "ifc",
"scope": "typescript,javascript"
},
"ifiOS": {
"body": [
"if (uni.getSystemInfoSync().platform == \"ios\") {",
"\t$1",
"}"
],
"prefix": "ifios",
"project": "uni-app",
"scope": "typescript,javascript"
},
"module.exports": {
"body": [
"module.exports = {",
"\t$0",
"}"
],
"prefix": "mexports",
"scope": "typescript,javascript"
},
"mui": {
"body": [
"mui."
],
"prefix": "mui",
"project": "Web,App,Wap2App",
"scope": "typescript,javascript",
"triggerAssist": true
},
"mui('').pullRefresh": {
"body": [
"mui('#${1:refreshContainer}').pullRefresh().$2"
],
"prefix": "mmpullrefresh",
"project": "Web,App,Wap2App",
"scope": "typescript,javascript",
"triggerAssist": true
},
"mui('').scroll": {
"body": [
"mui('.${1:mui-scroll-wrapper}').scroll({$2})$0"
],
"prefix": "mmscroll",
"project": "Web,App,Wap2App",
"scope": "typescript,javascript",
"triggerAssist": true
},
"mui('').slider": {
"body": [
"mui('.${1:mui-slider}').slider({$2})$0"
],
"prefix": "mmslider",
"project": "Web,App,Wap2App",
"scope": "typescript,javascript",
"triggerAssist": true
},
"mui()": {
"body": [
"mui('$1')"
],
"prefix": "mmui",
"project": "Web,App,Wap2App",
"scope": "typescript,javascript",
"triggerAssist": true
},
"mui().each()": {
"body": [
"mui('$1').each(function (${3:index},${4:element}) {",
"\t$0",
"})"
],
"prefix": "mmeach",
"project": "Web,App,Wap2App",
"scope": "typescript,javascript"
},
"mui.ajax()": {
"body": [
"mui.ajax('$1',{",
"\tdata:{",
"\t\t$2",
"\t},",
"\tdataType:'${3:json}',//服务器返回json格式数据",
"\ttype:'${4:post}',//HTTP请求类型",
"\ttimeout:${5:10000},//超时时间设置为10秒;",
"\tsuccess:function(${6:data}){",
"\t\t$7",
"\t},",
"\terror:function(${8:xhr,type,errorThrown}){",
"\t\t$9",
"\t}",
"});$0"
],
"prefix": "majax",
"project": "Web,App,Wap2App",
"scope": "typescript,javascript",
"triggerAssist": true
},
"mui.alert()": {
"body": [
"mui.alert('${1:message}','${2:title}','${3:btnValue}',function (${4:e}) {",
" ${4:e}.index$0",
"}${5:,'div'})"
],
"prefix": "mdalert",
"project": "Web,App,Wap2App",
"scope": "typescript,javascript"
},
"mui.back()(返回上级页面)": {
"body": [
"mui.back()$0"
],
"prefix": "mback",
"project": "Web,App,Wap2App",
"scope": "typescript,javascript"
},
"mui.backDouble(双击退出应用)": {
"body": [
"//首页返回键处理",
"//处理逻辑:1秒内,连续两次按返回键,则退出应用;",
"var first = null;",
"mui.back = function() {",
"\t//首次按键,提示‘再按一次退出应用’",
"\tif (!first) {",
"\t\tfirst = new Date().getTime();",
"\t\tmui.toast('再按一次退出应用');",
"\t\tsetTimeout(function() {",
"\t\t\tfirst = null;",
"\t\t}, 1000);",
"\t} else {",
"\t\tif (new Date().getTime() - first < 1000) {",
"\t\t\tplus.runtime.quit();",
"\t\t}",
"\t}",
"};"
],
"prefix": "mbackDouble",
"project": "Web,App,Wap2App",
"scope": "typescript,javascript"
},
"mui.backFunction(重写返回逻辑)": {
"body": [
"mui.back=function () {",
" $0\t",
"}"
],
"prefix": "mbackfunction",
"project": "Web,App,Wap2App",
"scope": "typescript,javascript"
},
"mui.backTask(双击进入后台)": {
"body": [
"//首页返回键处理",
"//处理逻辑:1秒内,连续两次按返回键,则进入后台;",
"var first = null;",
"mui.back = function() {",
"\t//首次按键,提示‘再按一次退出应用’",
"\tif (!first) {",
"\t\tfirst = new Date().getTime();",
"\t\tmui.toast('再按一次退出应用');",
"\t\tsetTimeout(function() {",
"\t\t\tfirst = null;",
"\t\t}, 1000);",
"\t} else {",
"\t\tif (new Date().getTime() - first < 1000) {",
"\t\t\tvar main = plus.android.runtimeMainActivity();",
" main.moveTaskToBack(false);",
"\t\t}",
"\t}",
"};"
],
"prefix": "mbackMoveTaskToBack",
"project": "Web,App,Wap2App",
"scope": "typescript,javascript"
},
"mui.closePopup()": {
"body": [
"mui.closePopup()$0"
],
"prefix": "mdclosePopup",
"project": "Web,App,Wap2App",
"scope": "typescript,javascript"
},
"mui.closePopups()": {
"body": [
"mui.closePopups()$0"
],
"prefix": "mdclosePopups",
"project": "Web,App,Wap2App",
"scope": "typescript,javascript"
},
"mui.confirm()": {
"body": [
"mui.confirm('${1:message}','${2:title}',['${3:取消}','${4:确认}'],function (${5:e}) {",
"\t${5:e}.index$0",
"}${6:,'div'})"
],
"prefix": "mdconfirm",
"project": "Web,App,Wap2App",
"scope": "typescript,javascript"
},
"mui.currentWebview": {
"body": [
"mui.currentWebview."
],
"prefix": "mcurrent",
"project": "Web,App,Wap2App",
"scope": "typescript,javascript",
"triggerAssist": true
},
"mui.each()": {
"body": [
"mui.each(${1:obj},function (${2:index},${3:element}) {",
"\t$0",
"})"
],
"prefix": "meach",
"project": "Web,App,Wap2App",
"scope": "typescript,javascript"
},
"mui.extend()": {
"body": [
"mui.extend(${1|'target'|},${2:'source'},${3:'deep',true,false})"
],
"prefix": "mextend",
"project": "Web,App,Wap2App",
"scope": "typescript,javascript"
},
"mui.fire()": {
"body": [
"mui.fire(${1:targetWebviewObj},'${2:event}',{${3:data}})"
],
"prefix": "mfire",
"project": "Web,App,Wap2App",
"scope": "typescript,javascript",
"triggerAssist": true
},
"mui.get()": {
"body": [
"mui.get('$1',{",
"\t\t$2",
"\t},function(${3:data}){",
"\t\t$0",
"\t},'${4:json}'",
");"
],
"prefix": "mget",
"project": "Web,App,Wap2App",
"scope": "typescript,javascript",
"triggerAssist": true
},
"mui.getJSON()": {
"body": [
"mui.getJSON('$1',{$2},function($3){",
"\t\t$4",
"\t}",
");$0"
],
"prefix": "mjson",
"project": "Web,App,Wap2App",
"scope": "typescript,javascript",
"triggerAssist": true
},
"mui.init": {
"body": [
"mui.init({$0})"
],
"prefix": "minit",
"project": "Web,App,Wap2App",
"scope": "typescript,javascript"
},
"mui.init({侧滑返回})": {
"body": [
"mui.init({",
"\tswipeBack:${1|true,false|} ",
");$0"
],
"prefix": "minswipeback",
"project": "Web,App,Wap2App",
"scope": "typescript,javascript"
},
"mui.init({刷新组件})": {
"body": [
"mui.init({",
" pullRefresh : {",
" container:'#${1:refreshContainer}',",
" down : {",
" callback :${2:pullfresh}",
" },",
" up : {",
" callback :${3:pullfresh} ",
" }",
" }",
"});$0"
],
"prefix": "minpullRefresh",
"project": "Web,App,Wap2App",
"scope": "typescript,javascript",
"triggerAssist": true
},
"mui.init({子页面})": {
"body": [
"mui.init({",
"\tsubpages:[{",
"\t url:'${1:url}',",
" id:'${2:id}',",
" styles:{",
" $3",
" },",
" extras:{$4}",
"\t}]",
"})$0"
],
"prefix": "minsubpage",
"project": "Web,App,Wap2App",
"scope": "typescript,javascript",
"triggerAssist": true
},
"mui.init({手势事件})": {
"body": [
"mui.init({",
" \tgestureConfig:{",
"\t tap: ${1|true,false|}, ",
"\t doubletap: ${2|true,false|}, ",
"\t longtap: ${3|true,false|}, ",
"\t swipe: ${4|true,false|}, ",
"\t drag: ${5|true,false|}, ",
"\t hold:${6|false,true|},",
"\t release:${7|false,true|}",
" \t}",
"});$0"
],
"prefix": "mingesture",
"project": "Web,App,Wap2App",
"scope": "typescript,javascript"
},
"mui.init({按键绑定})": {
"body": [
"mui.init({",
"\tkeyEventBind: {",
"\t\tbackbutton: ${1|true,false|}, ",
"\t\tmenubutton: ${2|true,false|} ",
"\t},",
"})"
],
"prefix": "minkeyevent",
"project": "Web,App,Wap2App",
"scope": "typescript,javascript"
},
"mui.init({设置状态栏颜色})": {
"body": [
"mui.init({",
"\tstatusBarBackground:'#${1:FFFFFF}'",
"})"
],
"prefix": "minstatusbar",
"project": "Web,App,Wap2App",
"scope": "typescript,javascript",
"triggerAssist": true
},
"mui.init({重写窗口关闭逻辑})": {
"body": [
"mui.init({",
"\tbeforeback:function () {",
"\t\t$0",
"\t}",
"})"
],
"prefix": "minbeforeback",
"project": "Web,App,Wap2App",
"scope": "typescript,javascript"
},
"mui.init({预加载})": {
"body": [
"mui.init({",
"\tpreloadPages:[{",
"\t url:'${1:url}',",
" id:'${2:id}',",
" styles:{",
" $3",
" },",
" extras:{$4}",
"\t}]",
"})$0"
],
"prefix": "minpreload",
"project": "Web,App,Wap2App",
"scope": "typescript,javascript",
"triggerAssist": true
},
"mui.init({预加载数量})": {
"body": [
"preloadLimit:${1:5}"
],
"prefix": "minprelimit",
"project": "Web,App,Wap2App",
"scope": "typescript,javascript",
"triggerAssist": true
},
"mui.later()": {
"body": [
"mui.later(function(){",
"\t$2 ",
"},${1|500,1000,1500,2000|})"
],
"prefix": "mlater",
"project": "Web,App,Wap2App",
"scope": "typescript,javascript"
},
"mui.mask": {
"body": [
"var ${1:mask} = mui.createMask(function () {",
"\t$2",
"})",
"${1:mask}.show()"
],
"prefix": "mmask",
"project": "Web,App,Wap2App",
"scope": "typescript,javascript"
},
"mui.off": {
"body": [
"mui('$1').off('${2:tap}','$3',function($4){",
" $0",
"}) "
],
"prefix": "mmoff",
"project": "Web,App,Wap2App",
"scope": "typescript,javascript",
"triggerAssist": true
},
"mui.on": {
"body": [
"mui('$1').on('${2:tap}','$3',function($4){",
" $0",
"}) "
],
"prefix": "mmon",
"project": "Web,App,Wap2App",
"scope": "typescript,javascript",
"triggerAssist": true
},
"mui.open": {
"body": [
"mui.openWindow('${1:url}','${2:id}',{$3})"
],
"prefix": "mopen",
"project": "Web,App,Wap2App",
"scope": "typescript,javascript",
"triggerAssist": true
},
"mui.os": {
"body": [
"mui.os."
],
"prefix": "mos",
"project": "Web,App,Wap2App",
"scope": "typescript,javascript",
"triggerAssist": true
},
"mui.plusReady()": {
"body": [
"mui.plusReady(function () {",
" $1",
"})$0"
],
"prefix": "mplusready",
"project": "Web,App,Wap2App",
"scope": "typescript,javascript"
},
"mui.post()": {
"body": [
"mui.post('$1',{",
"\t\t$2",
"\t},function(${3:data}){",
"\t\t$0",
"\t},'${4:json}'",
");"
],
"prefix": "mpost",
"project": "Web,App,Wap2App",
"scope": "typescript,javascript",
"triggerAssist": true
},
"mui.preload()": {
"body": [
"mui.preload({",
"\turl:'${1:url}',",
"\tid:'${2:id}',",
"\tstyles:{$3},//窗口参数",
"\textras:{$4}//自定义扩展参数",
"})$0"
],
"prefix": "mpreload",
"project": "Web,App,Wap2App",
"scope": "typescript,javascript",
"triggerAssist": true
},
"mui.prompt()": {
"body": [
" mui.prompt('${1:text}','${2:defaultText}','${3:title}',['${4:取消}','${5:确认}'],function (${6:e}) {",
" ${6:e}.index$0",
"}${7:,'div'})"
],
"prefix": "mdprompt",
"project": "Web,App,Wap2App",
"scope": "typescript,javascript"
},
"mui.ready": {
"body": [
"mui.ready(function () {",
"\t$0",
"})"
],
"prefix": "mready",
"project": "Web,App,Wap2App",
"scope": "typescript,javascript"
},
"mui.scrollTo()": {
"body": [
"mui.scrollTo(${1:ypos},${2:duration},${3:/function () {",
" \t",
"}}$0"
],
"prefix": "mscrollto",
"project": "Web,App,Wap2App",
"scope": "typescript,javascript"
},
"mui.toast()": {
"body": [
"mui.toast('${1:message}')$0"
],
"prefix": "mdtoast",
"project": "Web,App,Wap2App",
"scope": "typescript,javascript"
},
"mui.trigger()": {
"body": [
"mui.trigger(${1:dom},'${3:tap}'${4:,{a:'as'}})"
],
"prefix": "mtrigger",
"project": "Web,App,Wap2App",
"scope": "typescript,javascript"
},
"navigator.userAgent;": {
"body": [
"navigator.userAgent"
],
"prefix": "nuser",
"scope": "typescript,javascript"
},
"plus.Screen": {
"body": [
"plus.Screen."
],
"prefix": "pScreen",
"project": "Web,App,Wap2App",
"scope": "typescript,javascript",
"triggerAssist": true
},
"plus.accelerometer": {
"body": [
"plus.accelerometer."
],
"prefix": "pacce",
"project": "Web,App,Wap2App",
"scope": "typescript,javascript",
"triggerAssist": true
},
"plus.android": {
"body": [
"plus.android."
],
"prefix": "pandroid",
"project": "Web,App,Wap2App",
"scope": "typescript,javascript",
"triggerAssist": true
},
"plus.audio": {
"body": [
"plus.audio."
],
"prefix": "paudio",
"project": "Web,App,Wap2App",
"scope": "typescript,javascript",
"triggerAssist": true
},
"plus.barcode": {
"body": [
"plus.barcode."
],
"prefix": "pbarcode",
"project": "Web,App,Wap2App",
"scope": "typescript,javascript",
"triggerAssist": true
},
"plus.camera": {
"body": [
"plus.camera."
],
"prefix": "pcamera",
"project": "Web,App,Wap2App",
"scope": "typescript,javascript",
"triggerAssist": true
},
"plus.contacts": {
"body": [
"plus.contacts."
],
"prefix": "pcontacts",
"project": "Web,App,Wap2App",
"scope": "typescript,javascript",
"triggerAssist": true
},
"plus.device": {
"body": [
"plus.device."
],
"prefix": "pdevice",
"project": "Web,App,Wap2App",
"scope": "typescript,javascript",
"triggerAssist": true
},
"plus.display": {
"body": [
"plus.display."
],
"prefix": "pdisplay",
"project": "Web,App,Wap2App",
"scope": "typescript,javascript",
"triggerAssist": true
},
"plus.downloader": {
"body": [
"plus.downloader."
],
"prefix": "pdown",
"project": "Web,App,Wap2App",
"scope": "typescript,javascript",
"triggerAssist": true
},
"plus.gallery": {
"body": [
"plus.gallery."
],
"prefix": "pgallery",
"project": "Web,App,Wap2App",
"scope": "typescript,javascript",
"triggerAssist": true
},
"plus.geolocation": {
"body": [
"plus.geolocation."
],
"prefix": "pgeolocation",
"project": "Web,App,Wap2App",
"scope": "typescript,javascript",
"triggerAssist": true
},
"plus.io": {
"body": [
"plus.io."
],
"prefix": "pio",
"project": "Web,App,Wap2App",
"scope": "typescript,javascript",
"triggerAssist": true
},
"plus.ios": {
"body": [
"plus.ios."
],
"prefix": "pios",
"project": "Web,App,Wap2App",
"scope": "typescript,javascript",
"triggerAssist": true
},
"plus.key": {
"body": [
"plus.key."
],
"prefix": "pkey",
"project": "Web,App,Wap2App",
"scope": "typescript,javascript",
"triggerAssist": true
},
"plus.maps": {
"body": [
"plus.maps."
],
"prefix": "pmaps",
"project": "Web,App,Wap2App",
"scope": "typescript,javascript",
"triggerAssist": true
},
"plus.messaging": {
"body": [
"plus.messaging."
],
"prefix": "pmessaging",
"project": "Web,App,Wap2App",
"scope": "typescript,javascript",
"triggerAssist": true
},
"plus.nativeObj": {
"body": [
"plus.nativeObj."
],
"prefix": "pnativeObj",
"project": "Web,App,Wap2App",
"scope": "typescript,javascript",
"triggerAssist": true
},
"plus.nativeUI": {
"body": [
"plus.nativeUI."
],
"prefix": "pnativeUI",
"project": "Web,App,Wap2App",
"scope": "typescript,javascript",
"triggerAssist": true
},
"plus.nativeUI.alert": {
"body": [
"plus.nativeUI.alert($1)"
],
"prefix": "pnalert",
"project": "uni-app,App,Wap2App",
"scope": "typescript,javascript"
},
"plus.navigator": {
"body": [
"plus.navigatorsc."
],
"prefix": "pnavigator",
"project": "Web,App,Wap2App",
"scope": "typescript,javascript",
"triggerAssist": true
},
"plus.net": {
"body": [
"plus.net."
],
"prefix": "pnet",
"project": "Web,App,Wap2App",
"scope": "typescript,javascript",
"triggerAssist": true
},
"plus.networkinfo": {
"body": [
"plus.networkinfo."
],
"prefix": "pnetworkinfo",
"project": "Web,App,Wap2App",
"scope": "typescript,javascript",
"triggerAssist": true
},
"plus.oauth": {
"body": [
"plus.oauth."
],
"prefix": "poauth",
"project": "Web,App,Wap2App",
"scope": "typescript,javascript",
"triggerAssist": true
},
"plus.orientation": {
"body": [
"plus.orientation."
],
"prefix": "porientation",
"project": "Web,App,Wap2App",
"scope": "typescript,javascript",
"triggerAssist": true
},
"plus.os": {
"body": [
"plus.os."
],
"prefix": "pos",
"project": "Web,App,Wap2App",
"scope": "typescript,javascript",
"triggerAssist": true
},
"plus.payment": {
"body": [
"plus.payment."
],
"prefix": "ppayment",
"project": "Web,App,Wap2App",
"scope": "typescript,javascript",
"triggerAssist": true
},
"plus.proximity": {
"body": [
"plus.proximity."
],
"prefix": "pproximity",
"project": "Web,App,Wap2App",
"scope": "typescript,javascript",
"triggerAssist": true
},
"plus.push": {
"body": [
"plus.push."
],
"prefix": "ppush",
"project": "Web,App,Wap2App",
"scope": "typescript,javascript",
"triggerAssist": true
},
"plus.runtime": {
"body": [
"plus.runtime."
],
"prefix": "pruntime",
"project": "Web,App,Wap2App",
"scope": "typescript,javascript",
"triggerAssist": true
},
"plus.share": {
"body": [
"plus.share."
],
"prefix": "pshare",
"project": "Web,App,Wap2App",
"scope": "typescript,javascript",
"triggerAssist": true
},
"plus.speech": {
"body": [
"plus.speech.$0"
],
"prefix": "pspeech",
"project": "Web,App,Wap2App",
"scope": "typescript,javascript",
"triggerAssist": true
},
"plus.statistic": {
"body": [
"plus.statistic."
],
"prefix": "pstatistic",
"project": "Web,App,Wap2App",
"scope": "typescript,javascript",
"triggerAssist": true
},
"plus.storage": {
"body": [
"plus.storage."
],
"prefix": "pstorage",
"project": "Web,App,Wap2App",
"scope": "typescript,javascript",
"triggerAssist": true
},
"plus.uploader": {
"body": [
"plus.uploader."
],
"prefix": "puploader",
"project": "Web,App,Wap2App",
"scope": "typescript,javascript",
"triggerAssist": true
},
"plus.webview": {
"body": [
"plus.webview."
],
"prefix": "pweb",
"project": "uni-app,App,Wap2App",
"scope": "typescript,javascript",
"triggerAssist": true
},
"plus.zip": {
"body": [
"plus.zip."
],
"prefix": "pzip",
"project": "Web,App,Wap2App",
"scope": "typescript,javascript",
"triggerAssist": true
},
"plusReady": {
"body": [
"function plusReady(){",
" $0",
"}",
"if (window.plus) {",
" plusReady()",
"} else{",
" document.addEventListener('plusready',plusReady,false);",
"}"
],
"prefix": "pready",
"project": "Web,App,Wap2App",
"scope": "typescript,javascript",
"triggerAssist": true
},
"querySelector": {
"body": [
"document.querySelector('$1').$0"
],
"prefix": "ds",
"project": "Web,App,Wap2App",
"scope": "typescript,javascript",
"triggerAssist": true
},
"querySelectoraddEventListener": {
"body": [
"document.querySelector('$1').addEventListener('${2:tap}',function ($3) {",
" $0",
"})"
],
"prefix": "dsa",
"project": "Web,App,Wap2App",
"scope": "typescript,javascript",
"triggerAssist": true
},
"redirectTo({...})": {
"body": [
"redirectTo({",
"\turl: '$1'",
"});$0"
],
"prefix": "redirectTo",
"scope": "uni.method.js"
},
"return false": {
"body": [
"return false;"
],
"prefix": "rfalse",
"scope": "typescript,javascript"
},
"return false;": {
"body": [
"return false;"
],
"prefix": "rfalse",
"project": "Web,App,Wap2App",
"scope": "typescript,javascript"
},
"return true": {
"body": [
"return true;"
],
"prefix": "rtrue",
"scope": "typescript,javascript"
},
"return true;": {
"body": [
"return true;"
],
"prefix": "rtrue",
"project": "Web,App,Wap2App",
"scope": "typescript,javascript"
},
"setTimeout function": {
"body": [
"setTimeout(function() {$0}, ${1:10});"
],
"prefix": "settimeout",
"scope": "typescript,javascript"
},
"switch_case": {
"body": [
"switch (${1}){",
"\tcase ${2:value}:",
"\t\tbreak;",
"\tdefault:",
"\t\tbreak;",
"}"
],
"prefix": "switchcase",
"scope": "typescript,javascript"
},
"try{}catch(e)": {
"body": [
"try{",
"\t$0",
"}catch(e){",
"\t//TODO handle the exception",
"}"
],
"prefix": "trycatch",
"scope": "typescript,javascript"
},
"typeof": {
"body": [
"typeof($1)==\"${2:undefined}\""
],
"prefix": "typeoff",
"scope": "typescript,javascript"
},
"typeof!": {
"body": [
"typeof($1)!=\"${2:undefined}\""
],
"prefix": "typeof!",
"scope": "typescript,javascript"
},
"uAlert": {
"body": [
"uni.showModal({",
"\tcontent: '$1',",
"\tshowCancel: false",
"});"
],
"prefix": "ualert",
"project": "uni-app",
"scope": "typescript,javascript"
},
"uConfirm": {
"body": [
"uni.showModal({",
"\tcontent: '$1',",
"\tsuccess: function (res) {",
"\t\tif (res.confirm) {",
"\t\t\t$2",
"\t\t} else if (res.cancel) {",
"\t\t\t$3",
"\t\t}",
"\t}",
"});"
],
"prefix": "uconfirm",
"project": "uni-app",
"scope": "typescript,javascript"
},
"uGetLocation": {
"body": [
"uni.getLocation({",
"\ttype: 'wgs84',",
"\tsuccess: res => {$0}",
"\tfail: () => {},",
"\tcomplete: () => {}",
"});"
],
"prefix": "ugetlocation",
"project": "uni-app",
"scope": "typescript,javascript"
},
"uLogin": {
"body": [
"uni.login({",
"\tprovider: '$1',",
"\tsuccess: res => {},",
"\tfail: () => {},",
"\tcomplete: () => {}",
"});"
],
"prefix": "ulogin",
"project": "uni-app",
"scope": "typescript,javascript"
},
"uNavigateBack": {
"body": [
"uni.navigateBack({",
"\tdelta: $1",
"});"
],
"prefix": "unavigateback",
"project": "uni-app",
"scope": "typescript,javascript"
},
"uNavigateTo": {
"body": [
"uni.navigateTo({",
"\turl: '$1',",
"\tsuccess: res => {},",
"\tfail: () => {},",
"\tcomplete: () => {}",
"});"
],
"prefix": "unavigateto",
"project": "uni-app",
"scope": "typescript,javascript"
},
"uPay": {
"body": [
"uni.requestPayment({",
"\tprovider: '$1',",
"\torderInfo: '$2',",
"\tsuccess: res => {},",
"\tfail: () => {},",
"\tcomplete: () => {}",
"});"
],
"prefix": "upay",
"project": "uni-app",
"scope": "typescript,javascript"
},
"uRedirectTo": {
"body": [
"uni.redirectTo({",
"\turl: '$1',",
"\tsuccess: res => {},",
"\tfail: () => {},",
"\tcomplete: () => {}",
"});"
],
"prefix": "uredirectto",
"project": "uni-app",
"scope": "typescript,javascript"
},
"uRequest": {
"body": [
"uni.request({",
"\turl: '$1',",
"\tmethod: 'GET$2',",
"\tdata: {$3},",
"\tsuccess: res => {$0},",
"\tfail: () => {},",
"\tcomplete: () => {}",
"});"
],
"prefix": "urequest",
"project": "uni-app",
"scope": "typescript,javascript"
},
"uRequestPayment": {
"body": [
"uni.requestPayment({",
"\tprovider: '$1',",
"\torderInfo: '$2',",
"\tsuccess: res => {},",
"\tfail: () => {},",
"\tcomplete: () => {}",
"});"
],
"prefix": "urequestpayment",
"project": "uni-app",
"scope": "typescript,javascript"
},
"uShare": {
"body": [
"uni.share({",
"\tprovider: '$1',",
"\ttype: 0$2,",
"\ttitle: '$3',",
"\thref: '$4',",
"\timageUrl: '$5',",
"\tsuccess: res => {},",
"\tfail: () => {},",
"\tcomplete: () => {}",
"});"
],
"prefix": "ushare",
"project": "uni-app",
"scope": "typescript,javascript"
},
"uShowActionSheet": {
"body": [
"uni.showActionSheet({",
"\titemList: $1,",
"\tsuccess: res => {},",
"\tfail: () => {},",
"\tcomplete: () => {}",
"});"
],
"prefix": "ushowactionsheet",
"project": "uni-app",
"scope": "typescript,javascript"
},
"uShowLoading": {
"body": [
"uni.showLoading({",
"\ttitle: '$1',",
"\tmask: false",
"});"
],
"prefix": "ushowloading",
"project": "uni-app",
"scope": "typescript,javascript"
},
"uShowModal": {
"body": [
"uni.showModal({",
"\ttitle: '$1',",
"\tcontent: '$2',",
"\tshowCancel: false$3,",
"\tcancelText: '$4',",
"\tconfirmText: '$5',",
"\tsuccess: res => {$0},",
"\tfail: () => {},",
"\tcomplete: () => {}",
"});"
],
"prefix": "ushowmodal",
"project": "uni-app",
"scope": "typescript,javascript"
},
"uShowToast": {
"body": [
"uni.showToast({",
"\ttitle: '$1'",
"});"
],
"prefix": "ushowtoast",
"project": "uni-app",
"scope": "typescript,javascript"
},
"uShowToastNoIcon": {
"body": [
"uni.showToast({",
"\ttitle: '$1',",
"\ticon: 'none'",
"});"
],
"prefix": "ushowtoastnoicon",
"project": "uni-app",
"scope": "typescript,javascript"
},
"uStartPullDownRefresh": {
"body": [
"uni.startPullDownRefresh({",
"\tsuccess: res => {},",
"\tfail: () => {},",
"\tcomplete: () => {}",
"});"
],
"prefix": "ustartpulldownrefresh",
"project": "uni-app",
"scope": "typescript,javascript"
},
"uStopPullDownRefresh": {
"body": [
"uni.stopPullDownRefresh();"
],
"prefix": "ustoppulldownrefresh",
"project": "uni-app",
"scope": "typescript,javascript"
},
"use strict": {
"body": [
"\"use strict\""
],
"prefix": "use",
"scope": "typescript,javascript"
},
"var a=[];": {
"body": [
"var ${1:a}=[$2];"
],
"prefix": "vara",
"scope": "typescript,javascript"
},
"var c = canvas": {
"body": [
"var ${2:c} = document.getElementById(\"$1\").getContext(\"2d\");"
],
"prefix": "varc",
"scope": "typescript,javascript",
"triggerAssist": true
},
"var currentWebview": {
"body": [
"var currentWebview = this.\\$mp.page.\\$getAppWebview()"
],
"prefix": "varcw",
"project": "uni-app",
"scope": "typescript,javascript"
},
"var i=0;": {
"body": [
"var ${1:i}=${2:0};"
],
"prefix": "vari",
"scope": "typescript,javascript"
},
"var l=a.length;": {
"body": [
"var ${1:l}=${2:a}.length;"
],
"prefix": "varl",
"scope": "typescript,javascript"
},
"var s=\"\";": {
"body": [
"var ${1:s}=\"$2\";"
],
"prefix": "vars",
"scope": "typescript,javascript"
},
"var xhr": {
"body": [
"var ${1:xhr} = new XMLHttpRequest();",
"xhr.open(\"${2:POST}\",\"$3\",${4:true});"
],
"prefix": "varxhr",
"scope": "typescript,javascript"
},
"while": {
"body": [
"while (${1:condition}){",
"\t$0",
"}"
],
"prefix": "whilee",
"scope": "typescript,javascript"
},
"windowaddEventListener": {
"body": [
"window.addEventListener('${1:scroll}',function ($2) {",
" $0",
"})"
],
"prefix": "wad",
"project": "Web,App,Wap2App",
"scope": "typescript,javascript",
"triggerAssist": true
},
"with": {
"body": [
"with ($1){",
"\t$0",
"}"
],
"prefix": "withh",
"scope": "typescript,javascript"
}
}
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化