hook.code-snippets 465 B

12345678910111213141516
  1. {
  2. "Vue3 Hook 代码结构一键生成": {
  3. "prefix": "Vue3 Hook",
  4. "body": [
  5. "import { ref } from \"vue\"\n",
  6. "const refName1 = ref<string>(\"这是一个响应式变量\")\n",
  7. "export function useHookName() {",
  8. "\tconst refName2 = ref<string>(\"这是一个响应式变量\")\n",
  9. "\tconst fnName = () => {}\n",
  10. "\treturn { refName1, refName2, fnName }",
  11. "}",
  12. "$1"
  13. ],
  14. "description": "Vue3 Hook"
  15. }
  16. }