Files
qhmes/JeecgUniapp-master/.vscode/vue3.code-snippets
2026-07-20 14:10:39 +08:00

63 lines
1.9 KiB
Plaintext
Raw Permalink Blame History

This file contains invisible Unicode characters
This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
{
"Print unibest Vue3 SFC": {
"scope": "vue",
"prefix": "v3",
"body": [
"<route lang=\"json5\" type=\"page\">",
"{",
" layout: 'default',",
" style: {",
" navigationBarTitleText: '',",
" navigationStyle: 'custom',",
" disableScroll: true, // 微信禁止页面滚动",
" 'app-plus': {",
" bounce: 'none', // 禁用 iOS 弹性效果",
" },",
" },",
"}",
"</route>\n",
"<template>",
" <PageLayout navTitle=\"页面标题\" backRouteName=\"index\"></PageLayout>",
"</template>\n",
"<script lang=\"ts\" setup>",
"import { ref, reactive } from 'vue'",
"import { onShow, onHide, onLoad, onReady } from '@dcloudio/uni-app'",
"import { useMessage, useToast } from 'wot-design-uni'",
"import { useRouter } from '@/plugin/uni-mini-router'",
"import { useUserStore } from '@/store/user'",
"import { http } from '@/utils/http'",
"import { useParamsStore } from '@/store/page-params'\n",
"defineOptions({",
" name: '组件名',",
" options: {",
" styleIsolation: 'shared',",
" },",
"})",
"const router = useRouter()",
"const paramsStore = useParamsStore()",
"const userStore = useUserStore()",
"const toast = useToast()",
"const message = useMessage()",
"</script>\n",
"<style lang=\"scss\" scoped>",
"//",
"</style>\n",
],
},
"Print unibest style": {
"scope": "vue",
"prefix": "st",
"body": ["<style lang=\"scss\" scoped>", "//", "</style>\n"],
},
"Print unibest script": {
"scope": "vue",
"prefix": "sc",
"body": ["<script lang=\"ts\" setup>", "//$3", "</script>\n"],
},
"Print unibest template": {
"scope": "vue",
"prefix": "te",
"body": ["<template>", " <view class=\"\">$1</view>", "</template>\n"],
},
}