-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* docs(zh): sync to 02a476d * docs(zh): translate the new docs * docs(zh): update the checkpoint * docs(zh): make up the vscode snippets page
- Loading branch information
Showing
15 changed files
with
241 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
{ | ||
"zh": { | ||
"hash": "c67a5c9", | ||
"date": "2023-12-07" | ||
"hash": "02a476d", | ||
"date": "2024-05-20" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
# VS Code 代码片段 | ||
|
||
有一些代码片段可以让你在 VS Code 中更轻松地使用 Pinia。 | ||
|
||
通过 <kbd>⇧</kbd> <kbd>⌘</kbd> <kbd>P</kbd> / <kbd>⇧</kbd> <kbd>⌃</kbd> <kbd>P</kbd> 然后输入 `Snippets: Configure User Snippets` 就可以管理用户代码片段。 | ||
|
||
```json | ||
{ | ||
"Pinia Options Store Boilerplate": { | ||
"scope": "javascript,typescript", | ||
"prefix": "pinia-options", | ||
"body": [ | ||
"import { defineStore, acceptHMRUpdate } from 'pinia'", | ||
"", | ||
"export const use${TM_FILENAME_BASE/^(.*)$/${1:/pascalcase}/}Store = defineStore('$TM_FILENAME_BASE', {", | ||
" state: () => ({", | ||
" $0", | ||
" }),", | ||
" getters: {},", | ||
" actions: {},", | ||
"})", | ||
"", | ||
"if (import.meta.hot) {", | ||
" import.meta.hot.accept(acceptHMRUpdate(use${TM_FILENAME_BASE/^(.*)$/${1:/pascalcase}/}Store, import.meta.hot))", | ||
"}", | ||
"" | ||
], | ||
"description": "Bootstrap the code needed for a Vue.js Pinia Options Store file" | ||
}, | ||
"Pinia Setup Store Boilerplate": { | ||
"scope": "javascript,typescript", | ||
"prefix": "pinia-setup", | ||
"body": [ | ||
"import { defineStore, acceptHMRUpdate } from 'pinia'", | ||
"", | ||
"export const use${TM_FILENAME_BASE/^(.*)$/${1:/pascalcase}/}Store = defineStore('$TM_FILENAME_BASE', () => {", | ||
" $0", | ||
" return {}", | ||
"})", | ||
"", | ||
"if (import.meta.hot) {", | ||
" import.meta.hot.accept(acceptHMRUpdate(use${TM_FILENAME_BASE/^(.*)$/${1:/pascalcase}/}Store, import.meta.hot))", | ||
"}", | ||
"" | ||
], | ||
"description": "Bootstrap the code needed for a Vue.js Pinia Setup Store file" | ||
} | ||
} | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.