mirror of
https://gitee.com/fantastic-admin/basic.git
synced 2024-12-05 05:27:39 +08:00
useCurrentInstance() 重命名为 useGlobalProperties()
This commit is contained in:
parent
ebf0ceeb90
commit
21477cf630
@ -1,13 +1,13 @@
|
||||
<script lang="ts" setup{{#if isGlobal}} name="{{ properCase name }}"{{/if}}>
|
||||
// const proxy = useCurrentInstance()
|
||||
// 逻辑代码
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div>
|
||||
<!-- 内容区 -->
|
||||
<!-- 布局 -->
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
// scss
|
||||
// 样式
|
||||
</style>
|
||||
|
@ -1,15 +1,13 @@
|
||||
<script lang="ts" setup name="{{ properCase componentName }}">
|
||||
// const proxy = useCurrentInstance()
|
||||
// const router = useRouter()
|
||||
// const route = useRoute()
|
||||
// 逻辑代码
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div>
|
||||
页面内容区域
|
||||
<!-- 布局 -->
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
// scss
|
||||
// 样式
|
||||
</style>
|
||||
|
2
src/auto-imports.d.ts
vendored
2
src/auto-imports.d.ts
vendored
@ -60,7 +60,7 @@ declare global {
|
||||
const useAuth: typeof import('./utils/composables/useAuth')['default']
|
||||
const useCssModule: typeof import('vue')['useCssModule']
|
||||
const useCssVars: typeof import('vue')['useCssVars']
|
||||
const useCurrentInstance: typeof import('./utils/composables/useCurrentInstance')['default']
|
||||
const useGlobalProperties: typeof import('./utils/composables/useGlobalProperties')['default']
|
||||
const useMainPage: typeof import('./utils/composables/useMainPage')['default']
|
||||
const useMenu: typeof import('./utils/composables/useMenu')['default']
|
||||
const useRoute: typeof import('vue-router')['useRoute']
|
||||
|
@ -1,6 +1,6 @@
|
||||
import type { ComponentInternalInstance } from 'vue'
|
||||
|
||||
export default function useCurrentInstance() {
|
||||
export default function useGlobalProperties() {
|
||||
const { appContext } = getCurrentInstance() as ComponentInternalInstance
|
||||
return appContext.config.globalProperties
|
||||
}
|
Loading…
Reference in New Issue
Block a user