Skip to content

Commit ebe8884

Browse files
committed
add xui
1 parent 4ea8560 commit ebe8884

File tree

16 files changed

+39
-69
lines changed

16 files changed

+39
-69
lines changed

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,13 @@ yarn create vite vite-demo --template vue-ts
1515

1616
安装`Carousel`
1717
```
18-
yarn add vue-devui-carousel
18+
yarn add @kagol/vue-carousel
1919
```
2020

2121
`main.ts`中引入`Carousel`
2222
```
23-
import Carousel from 'vue-devui-carousel'
24-
import 'vue-devui-carousel/dist/style.css'
23+
import Carousel from '@kagol/vue-carousel'
24+
import '@kagol/vue-carousel/dist/style.css'
2525
2626
createApp(App)
2727
.use(Carousel)

carousel/src/carousel.scss

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
1-
.devui-carousel {
1+
.xui-carousel {
22
position: relative;
33
overflow: hidden;
44

5-
.devui-carousel-indicator {
5+
.xui-carousel-indicator {
66
position: absolute;
77
}
88
}
99

10-
.devui-carousel-item-container {
10+
.xui-carousel-item-container {
1111
display: flex;
1212
position: relative;
1313
transition: left 500ms ease 0s; // 内容切换时的动效
@@ -17,22 +17,22 @@
1717
}
1818
}
1919

20-
.devui-arrow {
20+
.xui-arrow {
2121
position: absolute;
2222
top: 50%;
2323
margin-top: -18px;
2424
cursor: pointer;
2525
width: 36px;
2626
height: 36px;
2727
border-radius: 18px;
28-
background: var(--devui-highlight-overlay, rgba(255, 255, 255, .8));
29-
box-shadow: var(--devui-shadow-length-hover, 0 4px 16px 0) var(--devui-light-shadow, rgba(0, 0, 0, .1));
28+
background: var(--xui-highlight-overlay, rgba(255, 255, 255, .8));
29+
box-shadow: var(--xui-shadow-length-hover, 0 4px 16px 0) var(--xui-light-shadow, rgba(0, 0, 0, .1));
3030
display: inline-flex;
3131
align-items: center;
3232
justify-content: center;
33-
transition: background-color var(--devui-animation-duration-slow, .3s) var(--devui-animation-ease-in-out-smooth, cubic-bezier(.645, .045, .355, 1));
33+
transition: background-color var(--xui-animation-duration-slow, .3s) var(--xui-animation-ease-in-out-smooth, cubic-bezier(.645, .045, .355, 1));
3434

3535
&:hover {
36-
background: var(--devui-area, #f8f8f8);
36+
background: var(--xui-area, #f8f8f8);
3737
}
3838
}

carousel/src/carousel.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,9 +66,9 @@ export default defineComponent({
6666

6767
return () => {
6868
return (
69-
<div class="devui-carousel">
69+
<div class="xui-carousel">
7070
<div
71-
class="devui-carousel-item-container"
71+
class="xui-carousel-item-container"
7272
style={{
7373
width: count * 100 + '%',
7474
left: -(formattedPageIndex.value - 1) * 100 + '%',
Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,22 @@
1-
.devui-carousel-indicator {
1+
.xui-carousel-indicator {
22
display: flex;
33
position: relative;
44
bottom: 12px;
55
justify-content: center;
66
width: 100%;
77

8-
.devui-carousel-indicator-item {
8+
.xui-carousel-indicator-item {
99
cursor: pointer;
1010
width: 6px;
1111
height: 6px;
1212
border-radius: 3px;
1313
margin-right: 8px;
14-
background: var(--devui-icon-fill, #d3d5d9);
14+
background: var(--xui-icon-fill, #d3d5d9);
1515

1616
&.active {
1717
width: 24px;
18-
background: var(--devui-list-item-active-bg, #5e7ce0);
19-
transition: all var(--devui-animation-duration-slow, .3s) var(--devui-animation-ease-in-smooth, cubic-bezier(.645, .045, .355, 1));
18+
background: var(--xui-list-item-active-bg, #5e7ce0);
19+
transition: all var(--xui-animation-duration-slow, .3s) var(--xui-animation-ease-in-smooth, cubic-bezier(.645, .045, .355, 1));
2020
}
2121
}
2222
}

carousel/src/components/carousel-indicator.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,15 +27,15 @@ export default defineComponent({
2727
})
2828

2929
return () => {
30-
return <div class="devui-carousel-indicator">
30+
return <div class="xui-carousel-indicator">
3131
{
3232
slots.default
3333
? slots.default({
3434
pageIndex: pageIndex.value,
3535
setPageIndex
3636
})
3737
: indicatorArr.map((item, index) => {
38-
return <div class={`devui-carousel-indicator-item${pageIndex.value === index+1 ? ' active' : ''}`} onClick={() => setPageIndex(index + 1)}></div>
38+
return <div class={`xui-carousel-indicator-item${pageIndex.value === index+1 ? ' active' : ''}`} onClick={() => setPageIndex(index + 1)}></div>
3939
})
4040
}
4141
</div>
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
.devui-arrow-right {
1+
.xui-arrow-right {
22
right: 20px;
33
}

carousel/src/components/carousel-next.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ export default defineComponent({
1111
slots.default
1212
? renderSlot(slots, 'default')
1313
: <>
14-
<div class="devui-arrow devui-arrow-right" {...attrs}>
14+
<div class="xui-arrow xui-arrow-right" {...attrs}>
1515
<DArrowRight />
1616
</div>
1717
</>
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
.devui-arrow-left {
1+
.xui-arrow-left {
22
left: 20px;
33
}

carousel/src/components/carousel-prev.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ export default defineComponent({
1111
slots.default
1212
? renderSlot(slots, 'default')
1313
: <>
14-
<div class="devui-arrow devui-arrow-left" {...attrs}>
14+
<div class="xui-arrow xui-arrow-left" {...attrs}>
1515
<DArrowLeft />
1616
</div>
1717
</>

docs/.vitepress/dist/assets/index.md.81baa307.js

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)