Skip to content

Commit

Permalink
fix: #52
Browse files Browse the repository at this point in the history
  • Loading branch information
zuofenghua committed Jan 24, 2022
1 parent 04b4a0e commit 0839035
Show file tree
Hide file tree
Showing 8 changed files with 20 additions and 14 deletions.
2 changes: 1 addition & 1 deletion src/client/app/components/Demo/OnlineEdit/OnlineEdit.vue
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
</template>

<script lang="ts" setup>
import { computed, defineProps } from 'vue'
import { computed } from 'vue'
const sfcBaseUrl = 'https://sfc.vuejs.org/'
Expand Down
2 changes: 1 addition & 1 deletion src/client/theme-default/components/AlgoliaSearchBox.vue
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<script setup lang="ts">
import '@docsearch/css'
import { useRoute, useRouter } from 'vitepress'
import { defineProps, getCurrentInstance, onMounted, watch } from 'vue'
import { getCurrentInstance, onMounted, watch } from 'vue'
import docsearch from '@docsearch/js'
import type { DefaultTheme } from '../config'
import type { DocSearchHit } from '@docsearch/react/dist/esm/types'
Expand Down
10 changes: 6 additions & 4 deletions src/client/theme-default/components/BuySellAds.vue
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
</template>

<script setup lang="ts">
import { defineProps, onMounted } from 'vue'
import { onMounted } from 'vue'
// global _bsa
const ID = 'bsa-cpc-script'
Expand Down Expand Up @@ -41,7 +41,9 @@ onMounted(() => {
document.head.appendChild(s)
s.onload = () => { load() }
s.onload = () => {
load()
}
} else {
load()
}
Expand All @@ -62,7 +64,7 @@ function load() {
.buy-sell-ads {
margin: 0 auto;
padding-top: 2rem;
font-size: .85rem;
font-size: 0.85rem;
}
.bsa-cpc {
Expand Down Expand Up @@ -111,7 +113,7 @@ function load() {
margin-left: 36px;
padding: 0 8px;
line-height: 22px;
font-size: .85em;
font-size: 0.85em;
font-weight: 500;
color: #1c90f3;
content: 'Sponsored';
Expand Down
2 changes: 1 addition & 1 deletion src/client/theme-default/components/CarbonAds.vue
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
</template>

<script setup lang="ts">
import { defineProps, ref, onMounted } from 'vue'
import { ref, onMounted } from 'vue'
const { code, placement } = defineProps<{
code: string
Expand Down
11 changes: 8 additions & 3 deletions src/client/theme-default/components/NavDropdownLink.vue
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
</template>

<script setup lang="ts">
import { defineProps, ref, watch } from 'vue'
import { ref, watch } from 'vue'
import { useRoute } from 'vitepress'
import type { DefaultTheme } from '../config'
import NavDropdownLinkItem from './NavDropdownLinkItem.vue'
Expand All @@ -27,7 +27,12 @@ const route = useRoute()
const open = ref(false)
watch(() => route.path, () => { open.value = false })
watch(
() => route.path,
() => {
open.value = false
}
)
function toggle() {
open.value = !open.value
Expand Down Expand Up @@ -82,7 +87,7 @@ function toggle() {
border-bottom: 2px solid transparent;
padding: 0;
line-height: 24px;
font-size: .9rem;
font-size: 0.9rem;
font-weight: 500;
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
</template>

<script setup lang="ts">
import { defineProps, toRefs } from 'vue'
import { toRefs } from 'vue'
import type { DefaultTheme } from '../config'
import { useNavLink } from '../composables/navLink'
import OutboundLink from './icons/OutboundLink.vue'
Expand Down
4 changes: 2 additions & 2 deletions src/client/theme-default/components/NavLink.vue
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,13 @@
</template>

<script setup lang="ts">
import { defineProps, toRefs } from 'vue'
import { toRefs } from 'vue'
import type { DefaultTheme } from '../config'
import { useNavLink } from '../composables/navLink'
import OutboundLink from './icons/OutboundLink.vue'
const props = defineProps<{
item: DefaultTheme.NavItemWithLink,
item: DefaultTheme.NavItemWithLink
}>()
const propsRefs = toRefs(props)
Expand Down
1 change: 0 additions & 1 deletion src/client/theme-default/components/SideBar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
</template>

<script setup lang="ts">
import { defineProps } from 'vue'
import NavLinks from './NavLinks.vue'
import SideBarLinks from './SideBarLinks.vue'
import Slugs from './Slugs.vue'
Expand Down

0 comments on commit 0839035

Please sign in to comment.