mirror of
https://github.com/wmn1525/grasscutterTools.git
synced 2024-11-25 09:27:27 +00:00
48 lines
961 B
Plaintext
48 lines
961 B
Plaintext
{
|
|
"store新建页面": {
|
|
"scope": "typescript",
|
|
"prefix": "store",
|
|
"body": [
|
|
"import { defineStore } from 'pinia'",
|
|
"import { piniaStore } from '@store'",
|
|
"",
|
|
"export const use$1Store = defineStore(",
|
|
" '${1/(.*)/${1:/camelcase}/}',",
|
|
" {",
|
|
" state: () => ({}),",
|
|
" getters: {},",
|
|
" actions: {}",
|
|
" }",
|
|
")",
|
|
"",
|
|
"export function use$1OutsideStore() {",
|
|
" return use$1Store(piniaStore)",
|
|
"}"
|
|
],
|
|
"description": "store page"
|
|
},
|
|
"vue新建页面": {
|
|
"scope": "vue",
|
|
"prefix": "page",
|
|
"body": [
|
|
"<template>",
|
|
" <div>",
|
|
" $3",
|
|
" </div>",
|
|
"</template>",
|
|
"",
|
|
"<script setup name='$1'>",
|
|
"// const { proxy } = getCurrentInstance()",
|
|
"// const router = useRouter()",
|
|
"// const route = useRoute()",
|
|
" $2",
|
|
"</script>",
|
|
"",
|
|
"<style lang='less' scoped>",
|
|
" $4",
|
|
"</style>"
|
|
],
|
|
"description": "vue page"
|
|
}
|
|
}
|