Skip to content

Commit

Permalink
docs: update README
Browse files Browse the repository at this point in the history
  • Loading branch information
kagol committed May 10, 2024
1 parent d49a510 commit d3c101e
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 12 deletions.
18 changes: 9 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,19 @@
一个简单、灵活的`Vue3`走马灯组件,非常轻量,只有`5kB`

预览地址:
[https://kagol.gitee.io/vue-carousel/](https://kagol.gitee.io/vue-carousel/)
[https://kagol.github.io/vue-carousel/](https://kagol.github.io/vue-carousel/)

## 快速开始

创建一个vite工程:

```
yarn create vite vite-demo --template vue-ts
npm create vite vite-demo --template vue-ts
```

安装`Carousel`
```
yarn add @kagol/vue-carousel
npm install @kagol/vue-carousel
```

`main.ts`中引入`Carousel`
Expand All @@ -31,11 +31,11 @@ createApp(App)
`App.vue`中使用:

```
<DCarousel>
<Carousel>
<div class="carousel-item">page 1</div>
<div class="carousel-item">page 2</div>
<div class="carousel-item">page 3</div>
</DCarousel>
</Carousel>
```

## 效果动图
Expand Down Expand Up @@ -82,7 +82,7 @@ B站:

## API

### DCarousel 组件
### Carousel 组件

props

Expand All @@ -100,7 +100,7 @@ props
| indicator | -- | -- | 可选,指示器插槽 |
| pagination | -- | -- | 可选,分页器插槽 |

### DCarouselIndicator 组件
### CarouselIndicator 组件

props

Expand All @@ -115,15 +115,15 @@ props
| ------- | ------ | ---- | -------------- |
| default | ({ pageIndex, setPageIndex }) => {} | -- | 可选,默认插槽 |

### DCarouselPrev 组件
### CarouselPrev 组件

插槽

| 属性 | 类型 | 默认 | 说明 |
| ------- | ------ | ---- | -------------- |
| default | -- | -- | 可选,默认插槽 |

### DCarouselNext 组件
### CarouselNext 组件

插槽

Expand Down
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"name": "@kagol/vue-carousel",
"version": "0.0.1",
"description": "Vue3 Carousel",
"homepage": "https://kagol.gitee.io/vue-carousel/",
"version": "0.1.0",
"description": "Vue3 Carousel: A simple and flexible carousel component for Vue3, extremely lightweight with only 5kB.",
"homepage": "https://kagol.github.io/vue-carousel/",
"files": [
"dist"
],
Expand Down

0 comments on commit d3c101e

Please sign in to comment.