{
|
|
"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"],
|
|
},
|
|
}
|