1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97
| "function": { "prefix": "fn", "body": [ "function$1($2) {\r\n\t$3\r\n}" ], "description": "function(){}" }, "console.log": { "prefix": "co", "body": [ "console.log ($1);" ], "description": "console.log()" }, "alert": { "prefix": "al", "body": [ "alert ($1);" ], "description": "alert()" }, "class": { "prefix": "cl", "body": [ "$('.$1')" ], "description": "class" }, "id": { "prefix": "id", "body": [ "$('#$1')" ], "description": "id" }, "on": { "prefix": "on", "body": [ "on ('click',function () {\r\n\t$1\r\n})" ], "description": "on" }, "for": { "prefix": "fo", "body": [ "for (let i=0; i<$1; i++) {\r\n\t$2\r\n}" ], "description": "for" }, "if": { "prefix": "ifif", "body": [ "if ($1) {\r\n\t$2\r\n}" ], "description": "if" }, "ifElse": { "prefix": "ifel", "body": [ "if ($1) {\r\n\t$2\r\n} else {\r\n\t$3\r\n}" ], "description": "ifElse" }, "ajax": { "prefix": "aj", "body": [ "$.ajax({", " url: $1,", " data:{", " $2", " },", " type: 'post',", " dataType: 'JSON',", " success:function (res) {", " $3", " }", "})" ], "description": "ajax" }, "axios": { "prefix": "ax", "body": [ "axios.$1(__PROJECTPATH__ + `$2`, {", " $3", "})", ".then(function (response) {", " console.log(response);", "})", ".catch(function (error) {", " console.log(error);", "});", ], "description": "axios" }
|