Skip to content

Commit 8bd4e7a

Browse files
committed
feat: add vue ts snippet
1 parent a36b0b5 commit 8bd4e7a

File tree

3 files changed

+25
-2
lines changed

3 files changed

+25
-2
lines changed

packages/vscode-react-typescript-snippet/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "vscode-react-typescript-snippet",
3-
"version": "1.0.8",
3+
"version": "1.0.9",
44
"description": "Recent Code snippets for react in typescript",
55
"displayName": "React code snippets Typescript",
66
"publisher": "mrgaogang",

packages/vscode-react-typescript-snippet/snippets/snippets.json

Lines changed: 24 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,23 @@
11
{
2+
"Luckly Vue": {
3+
"prefix": "tsvue",
4+
"body": [
5+
" <template>",
6+
"</template>",
7+
"<script lang=\"ts\">",
8+
9+
"import { Component, Vue } from 'vue-property-decorator';",
10+
"@Component({ name: '${1:}' })",
11+
"export default class extends Vue {",
12+
"}",
13+
"</script>",
14+
15+
"<style lang=\"less\">",
16+
17+
"</style>"
18+
],
19+
"description": "Lucky tools Vue Component with typescript."
20+
},
221
"Luckly React Component": {
322
"prefix": "tslrcc",
423
"body": [
@@ -151,7 +170,11 @@
151170
},
152171
"Luckly componentWillReceiveProps": {
153172
"prefix": "tslcwrp",
154-
"body": ["public componentWillReceiveProps(nextProps: ${1:}): void {", " ${2:}", "}"],
173+
"body": [
174+
"public componentWillReceiveProps(nextProps: ${1:}): void {",
175+
" ${2:}",
176+
"}"
177+
],
155178
"description": "Lucky tools Invoked before a mounted component receives new props."
156179
},
157180
"Luckly shouldComponentUpdate": {
Binary file not shown.

0 commit comments

Comments
 (0)