Skip to content

Commit f12c76b

Browse files
author
reco_luan
authored
Merge pull request #319 from LiDengHui/master
fix(vuepress-theme-reco): vuecomponsition-api接口升级方式修改
2 parents 8fefc9f + 898e610 commit f12c76b

25 files changed

+26
-26
lines changed

packages/vuepress-theme-reco/components/AlgoliaSearchBox.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ export default defineComponent({
2323
props: ['options'],
2424
2525
setup (props, ctx) {
26-
const instance = getCurrentInstance()
26+
const instance = getCurrentInstance().proxy
2727
2828
const placeholder = ref(undefined)
2929

packages/vuepress-theme-reco/components/Common.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ export default defineComponent({
7474
},
7575
7676
setup (props, ctx) {
77-
const instance = getCurrentInstance()
77+
const instance = getCurrentInstance().proxy
7878
7979
const isSidebarOpen = ref(false)
8080
const isHasKey = ref(true)

packages/vuepress-theme-reco/components/Footer.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ import { version } from '../package.json'
3636
export default defineComponent({
3737
components: { RecoIcon },
3838
setup (props, ctx) {
39-
const instance = getCurrentInstance()
39+
const instance = getCurrentInstance().proxy
4040
const showAccessNumber = computed(() => {
4141
const {
4242
$themeConfig: { valineConfig },

packages/vuepress-theme-reco/components/FriendLink.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ import md5 from 'md5'
4545
import { getOneColor } from '@theme/helpers/other'
4646
4747
const useDetail = () => {
48-
const instance = getCurrentInstance()
48+
const instance = getCurrentInstance().proxy
4949
const isPC = ref(true)
5050
5151
const popupWindowStyle = reactive({
@@ -115,7 +115,7 @@ const useDetail = () => {
115115
116116
export default defineComponent({
117117
setup (props, ctx) {
118-
const instance = getCurrentInstance()
118+
const instance = getCurrentInstance().proxy
119119
120120
const { popupWindowStyle, showDetail, hideDetail } = useDetail()
121121

packages/vuepress-theme-reco/components/Home.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ export default defineComponent({
5151
components: { NavLink, ModuleTransition },
5252
5353
setup (props, ctx) {
54-
const instance = getCurrentInstance()
54+
const instance = getCurrentInstance().proxy
5555
const recoShowModule = computed(() => instance && instance.$parent.recoShowModule)
5656
const actionLink = computed(() => instance && {
5757
link: instance.$frontmatter.actionLink,

packages/vuepress-theme-reco/components/HomeBlog/index.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ import { getOneColor } from '@theme/helpers/other'
7070
export default defineComponent({
7171
components: { NoteAbstract, TagList, FriendLink, ModuleTransition, PersonalInfo, RecoIcon },
7272
setup (props, ctx) {
73-
const instance = getCurrentInstance()
73+
const instance = getCurrentInstance().proxy
7474
7575
const state = reactive({
7676
recoShow: false,

packages/vuepress-theme-reco/components/NavLink.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ export default defineComponent({
3535
},
3636
3737
setup (props, ctx) {
38-
const instance = getCurrentInstance()
38+
const instance = getCurrentInstance().proxy
3939
4040
const { item } = toRefs(props)
4141

packages/vuepress-theme-reco/components/NavLinks.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ export default defineComponent({
3636
components: { NavLink, DropdownLink, RecoIcon },
3737
3838
setup (props, ctx) {
39-
const instance = getCurrentInstance()
39+
const instance = getCurrentInstance().proxy
4040
4141
const userNav = computed(() => {
4242
return instance.$themeLocaleConfig.nav || instance.$themeConfig.nav || []

packages/vuepress-theme-reco/components/Navbar.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ export default defineComponent({
4444
components: { SidebarButton, NavLinks, SearchBox, AlgoliaSearchBox, Mode },
4545
4646
setup (props, ctx) {
47-
const instance = getCurrentInstance()
47+
const instance = getCurrentInstance().proxy
4848
const linksWrapMaxWidth = ref(null)
4949
5050
const algolia = computed(() => {

packages/vuepress-theme-reco/components/NoteAbstract.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ export default defineComponent({
2727
props: ['data', 'currentTag'],
2828
2929
setup (props, ctx) {
30-
const instance = getCurrentInstance()
30+
const instance = getCurrentInstance().proxy
3131
3232
const { data } = toRefs(props)
3333

0 commit comments

Comments
 (0)