Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ export default defineComponent({
props: ['options'],
setup (props, ctx) {
const instance = getCurrentInstance()
const instance = getCurrentInstance().proxy
const placeholder = ref(undefined)
Expand Down
2 changes: 1 addition & 1 deletion packages/vuepress-theme-reco/components/Common.vue
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ export default defineComponent({
},
setup (props, ctx) {
const instance = getCurrentInstance()
const instance = getCurrentInstance().proxy
const isSidebarOpen = ref(false)
const isHasKey = ref(true)
Expand Down
2 changes: 1 addition & 1 deletion packages/vuepress-theme-reco/components/Footer.vue
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ import { version } from '../package.json'
export default defineComponent({
components: { RecoIcon },
setup (props, ctx) {
const instance = getCurrentInstance()
const instance = getCurrentInstance().proxy
const showAccessNumber = computed(() => {
const {
$themeConfig: { valineConfig },
Expand Down
4 changes: 2 additions & 2 deletions packages/vuepress-theme-reco/components/FriendLink.vue
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ import md5 from 'md5'
import { getOneColor } from '@theme/helpers/other'

const useDetail = () => {
const instance = getCurrentInstance()
const instance = getCurrentInstance().proxy
const isPC = ref(true)

const popupWindowStyle = reactive({
Expand Down Expand Up @@ -115,7 +115,7 @@ const useDetail = () => {

export default defineComponent({
setup (props, ctx) {
const instance = getCurrentInstance()
const instance = getCurrentInstance().proxy

const { popupWindowStyle, showDetail, hideDetail } = useDetail()

Expand Down
2 changes: 1 addition & 1 deletion packages/vuepress-theme-reco/components/Home.vue
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ export default defineComponent({
components: { NavLink, ModuleTransition },

setup (props, ctx) {
const instance = getCurrentInstance()
const instance = getCurrentInstance().proxy
const recoShowModule = computed(() => instance && instance.$parent.recoShowModule)
const actionLink = computed(() => instance && {
link: instance.$frontmatter.actionLink,
Expand Down
2 changes: 1 addition & 1 deletion packages/vuepress-theme-reco/components/HomeBlog/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ import { getOneColor } from '@theme/helpers/other'
export default defineComponent({
components: { NoteAbstract, TagList, FriendLink, ModuleTransition, PersonalInfo, RecoIcon },
setup (props, ctx) {
const instance = getCurrentInstance()
const instance = getCurrentInstance().proxy
const state = reactive({
recoShow: false,
Expand Down
2 changes: 1 addition & 1 deletion packages/vuepress-theme-reco/components/NavLink.vue
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ export default defineComponent({
},
setup (props, ctx) {
const instance = getCurrentInstance()
const instance = getCurrentInstance().proxy
const { item } = toRefs(props)
Expand Down
2 changes: 1 addition & 1 deletion packages/vuepress-theme-reco/components/NavLinks.vue
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ export default defineComponent({
components: { NavLink, DropdownLink, RecoIcon },

setup (props, ctx) {
const instance = getCurrentInstance()
const instance = getCurrentInstance().proxy

const userNav = computed(() => {
return instance.$themeLocaleConfig.nav || instance.$themeConfig.nav || []
Expand Down
2 changes: 1 addition & 1 deletion packages/vuepress-theme-reco/components/Navbar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ export default defineComponent({
components: { SidebarButton, NavLinks, SearchBox, AlgoliaSearchBox, Mode },

setup (props, ctx) {
const instance = getCurrentInstance()
const instance = getCurrentInstance().proxy
const linksWrapMaxWidth = ref(null)

const algolia = computed(() => {
Expand Down
2 changes: 1 addition & 1 deletion packages/vuepress-theme-reco/components/NoteAbstract.vue
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ export default defineComponent({
props: ['data', 'currentTag'],
setup (props, ctx) {
const instance = getCurrentInstance()
const instance = getCurrentInstance().proxy
const { data } = toRefs(props)
Expand Down
2 changes: 1 addition & 1 deletion packages/vuepress-theme-reco/components/Page.vue
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ export default defineComponent({
props: ['sidebarItems'],
setup (props, ctx) {
const instance = getCurrentInstance()
const instance = getCurrentInstance().proxy
const { sidebarItems } = toRefs(props)
Expand Down
2 changes: 1 addition & 1 deletion packages/vuepress-theme-reco/components/PageInfo.vue
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ export default defineComponent({
},
setup (props, ctx) {
const instance = getCurrentInstance()
const instance = getCurrentInstance().proxy
const numStyle = {
fontSize: '.9rem',
Expand Down
2 changes: 1 addition & 1 deletion packages/vuepress-theme-reco/components/Password.vue
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ export default defineComponent({
}
},
setup (props, ctx) {
const instance = getCurrentInstance()
const instance = getCurrentInstance().proxy
const year = new Date().getFullYear()
Expand Down
2 changes: 1 addition & 1 deletion packages/vuepress-theme-reco/components/PersonalInfo.vue
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ import { getOneColor } from '@theme/helpers/other'
export default defineComponent({
components: { RecoIcon },
setup (props, ctx) {
const instance = getCurrentInstance()
const instance = getCurrentInstance().proxy
const socialLinks = computed(() => (instance.$themeConfig.blogConfig && instance.$themeConfig.blogConfig.socialLinks || []).map(item => {
if (!item.color) item.color = getOneColor()
return item
Expand Down
2 changes: 1 addition & 1 deletion packages/vuepress-theme-reco/components/SearchBox.vue
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ import { RecoIcon } from '@vuepress-reco/core/lib/components'
export default defineComponent({
components: { RecoIcon },
setup (props, ctx) {
const instance = getCurrentInstance()
const instance = getCurrentInstance().proxy
const state = reactive({
query: '',
Expand Down
2 changes: 1 addition & 1 deletion packages/vuepress-theme-reco/components/SidebarGroup.vue
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ export default defineComponent({
components: { DropdownTransition },
setup (props, ctx) {
const instance = getCurrentInstance()
const instance = getCurrentInstance().proxy
instance.$options.components.SidebarLinks = require('./SidebarLinks.vue').default
Expand Down
2 changes: 1 addition & 1 deletion packages/vuepress-theme-reco/components/SidebarLinks.vue
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ export default defineComponent({
],
setup (props, ctx) {
const instance = getCurrentInstance()
const instance = getCurrentInstance().proxy
const { items } = toRefs(props)
Expand Down
2 changes: 1 addition & 1 deletion packages/vuepress-theme-reco/components/SubSidebar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { isActive } from '@theme/helpers/utils'

export default defineComponent({
setup (props, ctx) {
const instance = getCurrentInstance()
const instance = getCurrentInstance().proxy

const headers = computed(() => {
return instance.$showSubSideBar ? instance.$page.headers : []
Expand Down
2 changes: 1 addition & 1 deletion packages/vuepress-theme-reco/components/TagList.vue
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ export default defineComponent({
}
},
setup (props, ctx) {
const instance = getCurrentInstance()
const instance = getCurrentInstance().proxy
const tags = computed(() => {
return [{ name: instance.$recoLocales.all, path: '/tag/' }, ...instance.$tagesList]
})
Expand Down
2 changes: 1 addition & 1 deletion packages/vuepress-theme-reco/layouts/404.vue
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ const msgs = [

export default defineComponent({
setup (props, ctx) {
const instance = getCurrentInstance()
const instance = getCurrentInstance().proxy

const noFoundPageByTencent = computed(() => {
return instance.$themeConfig.noFoundPageByTencent !== false
Expand Down
2 changes: 1 addition & 1 deletion packages/vuepress-theme-reco/layouts/Category.vue
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ export default defineComponent({
components: { Common, NoteAbstract, ModuleTransition },

setup (props, ctx) {
const instance = getCurrentInstance()
const instance = getCurrentInstance().proxy

const posts = computed(() => {
let posts = instance.$currentCategories.pages
Expand Down
2 changes: 1 addition & 1 deletion packages/vuepress-theme-reco/layouts/Layout.vue
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ export default defineComponent({
mixins: [moduleTransitonMixin],
components: { HomeBlog, Home, Page, Common, Footer },
setup (props, ctx) {
const instance = getCurrentInstance()
const instance = getCurrentInstance().proxy

const sidebarItems = computed(() => {
if (instance.$page) {
Expand Down
2 changes: 1 addition & 1 deletion packages/vuepress-theme-reco/layouts/Tag.vue
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ export default defineComponent({
components: { Common, NoteAbstract, TagList, ModuleTransition },
setup (props, ctx) {
const instance = getCurrentInstance()
const instance = getCurrentInstance().proxy
// 时间降序后的博客列表
const posts = computed(() => {
Expand Down
2 changes: 1 addition & 1 deletion packages/vuepress-theme-reco/layouts/Tags.vue
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ export default defineComponent({
components: { Common, NoteAbstract, TagList, ModuleTransition },

setup (props, ctx) {
const instance = getCurrentInstance()
const instance = getCurrentInstance().proxy

const tagClick = (tagInfo) => {
if (instance.$route.path !== tagInfo.path) {
Expand Down
2 changes: 1 addition & 1 deletion packages/vuepress-theme-reco/layouts/TimeLines.vue
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ export default defineComponent({
mixins: [moduleTransitonMixin],
components: { Common, ModuleTransition },
setup (props, ctx) {
const instance = getCurrentInstance()
const instance = getCurrentInstance().proxy

const go = (url) => {
instance.$router.push({ path: url })
Expand Down