Skip to content

Commit 32fdcfd

Browse files
committed
update dependencies
1 parent 4986b8c commit 32fdcfd

File tree

18 files changed

+4033
-9659
lines changed

18 files changed

+4033
-9659
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,4 @@ node_modules
33
dist
44
dist-ssr
55
*.local
6+
cache

carousel/index.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import { App } from 'vue'
2-
import { usePage } from 'vueuse-components'
2+
// import { usePage } from 'vueuse-components'
3+
import usePage from './src/composables/use-page'
34
import DCarousel from './src/carousel'
45
import DCarouselIndicator from './src/components/carousel-indicator'
56
import DCarouselPrev from './src/components/carousel-prev'

carousel/src/carousel.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import { defineComponent, renderSlot, useSlots, watch, toRefs, ref } from 'vue'
2-
import { usePage } from 'vueuse-components'
2+
// import { usePage } from 'vueuse-components'
3+
import usePage from './composables/use-page'
34

45
// Components
56
import DCarouselIndicator from './components/carousel-indicator'

carousel/src/components/carousel-indicator.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import { defineComponent, toRefs, watch } from 'vue'
2-
import { usePage } from 'vueuse-components'
2+
// import { usePage } from 'vueuse-components'
3+
import usePage from '../composables/use-page'
34
import './carousel-indicator.scss'
45

56
export default defineComponent({

docs/.vitepress/config.mts

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
import { demoBlockPlugin, demoblockVitePlugin } from 'vitepress-theme-demoblock'
2+
3+
const sidebar = [
4+
{ text: "快速开始", link: "/" },
5+
{
6+
text: "特性", items: [
7+
{ text: "基本用法", link: "/features/basic/" },
8+
{ text: "自动播放", link: "/features/autoplay/" },
9+
{ text: "掘金活动", link: "/features/juejin-events/" },
10+
{ text: "指示器位置", link: "/features/indicator-position/" },
11+
{ text: "自定义指示器", link: "/features/custom-indicator/" },
12+
{ text: "分页器位置", link: "/features/pagination-position/" },
13+
{ text: "自定义分页器", link: "/features/custom-pagination/" },
14+
{ text: "手风琴式折叠卡片", link: "/features/collapse-card/" },
15+
{ text: "华为", link: "/features/huawei-events/" },
16+
{ text: "B站", link: "/features/bilibili-events/" },
17+
{ text: "QQ音乐", link: "/features/qqmusic/" },
18+
{ text: "LeetCode", link: "/features/leetcode-card/" },
19+
]
20+
}
21+
]
22+
23+
const nav = [
24+
{ text: 'Github', link: 'https://github.com/kagol/vue-carousel' }
25+
]
26+
27+
const config = {
28+
base: '/vue-carousel/',
29+
title: 'Vue Carousel',
30+
head: [
31+
['link', { rel: 'icon', type: 'image/svg+xml', href: '/assets/logo.svg' }],
32+
],
33+
themeConfig: {
34+
sidebar,
35+
nav,
36+
logo: '/assets/logo.svg',
37+
},
38+
markdown: {
39+
config: (md) => {
40+
// 这里可以使用 markdown-it 插件,vitepress-theme-demoblock就是基于此开发的
41+
md.use(demoBlockPlugin, {
42+
cssPreprocessor: 'scss'
43+
})
44+
}
45+
},
46+
vite: {
47+
plugins: [demoblockVitePlugin()]
48+
}
49+
}
50+
51+
export default config

docs/.vitepress/config.ts

Lines changed: 0 additions & 50 deletions
This file was deleted.

docs/.vitepress/theme/index.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
import Theme from 'vitepress/dist/client/theme-default'
1+
import Theme from 'vitepress/dist/client/theme-default/index'
22
import DCarousel from '../../../carousel'
33

44
import { registerComponents } from './register-components.js'
5-
import 'vitepress-theme-demoblock/theme/styles/index.css'
5+
import 'vitepress-theme-demoblock/dist/theme/styles/index.css'
66
import './index.scss'
77

88
export default {

docs/.vitepress/theme/register-components.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import Demo from 'vitepress-theme-demoblock/components/Demo.vue'
2-
import DemoBlock from 'vitepress-theme-demoblock/components/DemoBlock.vue'
1+
import Demo from 'vitepress-theme-demoblock/dist/client/components/Demo.vue'
2+
import DemoBlock from 'vitepress-theme-demoblock/dist/client/components/DemoBlock.vue'
33
export function registerComponents(app) {
44
app.component('Demo', Demo)
55
app.component('DemoBlock', DemoBlock)

docs/features/autoplay/index.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
# 自动播放
22

3-
:::demo `autoplay`可以设置是否需要自动播放,默认值为`true`,默认每隔3000毫秒切换一次,可以通过设置`interval`自定义自动播放的间隔时间。
3+
`autoplay`可以设置是否需要自动播放,默认值为`true`,默认每隔3000毫秒切换一次,可以通过设置`interval`自定义自动播放的间隔时间。
4+
5+
:::demo
6+
47

58
```vue
69
<template>

docs/features/basic/index.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
# 基本用法
22

3-
:::demo `Carousel`组件提供了默认插槽,直接将元素放在`<DCarousel>`即可实现轮播效果。
3+
4+
`Carousel`组件提供了默认插槽,直接将元素放在`<DCarousel>`即可实现轮播效果。
5+
6+
:::demo
7+
48

59
```vue
610
<template>

docs/features/collapse-card/index.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
### 手风琴式折叠卡片
22

3-
:::demo `DCarouselIndicator`指示器组件提供了默认插槽,可以单独使用它实现自定义指示器效果,比如手风琴式折叠卡片。
3+
`DCarouselIndicator`指示器组件提供了默认插槽,可以单独使用它实现自定义指示器效果,比如手风琴式折叠卡片。
4+
5+
:::demo
46

57
```vue
68
<template>

docs/features/custom-indicator/index.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
# 自定义指示器
22

3-
:::demo 如果`Carousel`内置的`CarouselIndicator`指示器不满足你的要求,还可以定制自己的指示器。
3+
如果`Carousel`内置的`CarouselIndicator`指示器不满足你的要求,还可以定制自己的指示器。
4+
5+
:::demo
46

57
```vue
68
<template>

docs/features/indicator-position/index.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
# 指示器位置
22

3-
:::demo `<DCarousel>`组件将其中的指示器子组件暴露出来,并提供了`indicator`插槽,因此可以随意调整`DCarouselIndicator`的位置,比如放在左下角。
3+
`<DCarousel>`组件将其中的指示器子组件暴露出来,并提供了`indicator`插槽,因此可以随意调整`DCarouselIndicator`的位置,比如放在左下角。
4+
5+
:::demo
46

57
```vue
68
<template>

docs/features/juejin-events/index.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
# 掘金活动
22

3-
:::demo `<DCarousel>`元素里面可以放任意元素,比如放上两张图片就是掘金活动的效果。
3+
`<DCarousel>`元素里面可以放任意元素,比如放上两张图片就是掘金活动的效果。
4+
5+
:::demo
46

57
```vue
68
<template>

docs/features/leetcode-card/index.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,9 @@
22

33
### 首页轮播
44

5-
:::demo `DCarousel``DCarouselIndicator`组合使用,可以很方便地实现 LeetCode 的卡片轮播效果。
5+
`DCarousel``DCarouselIndicator`组合使用,可以很方便地实现 LeetCode 的卡片轮播效果。
6+
7+
:::demo
68

79
```vue
810
<template>

0 commit comments

Comments
 (0)