diff --git a/packages/docs/src/App.vue b/packages/docs/src/App.vue index c88b89b4de2d39368670bf25e13681a840f56ee6..a932b36818bf4cc93ee454f32c12e518870bb77f 100644 --- a/packages/docs/src/App.vue +++ b/packages/docs/src/App.vue @@ -9,6 +9,7 @@ import TheAnchor from './components/TheAnchor'; import { getHeads } from './utils/getHeads'; import { useScreen } from './utils/useScreen'; import { useThemeStore } from '@/stores/theme'; +import DocConfigProvide from './components/DocConfigProvide.vue'; const route = useRoute(); const router = useRouter(); @@ -89,18 +90,20 @@ watchEffect(() => { diff --git a/packages/opendesign/src/carousel/__docs__/__case__/SkinCarousel1.vue b/packages/opendesign/src/carousel/__docs__/__case__/SkinCarousel1.vue new file mode 100644 index 0000000000000000000000000000000000000000..067f7f0fea200971a5888b60e3ccc02b44e03dda --- /dev/null +++ b/packages/opendesign/src/carousel/__docs__/__case__/SkinCarousel1.vue @@ -0,0 +1,59 @@ + + + +### 鲲鹏、昇腾、欧拉主题规范 + +规范定义了三种轮播: + +- 首页轮播:该轮播指示器具有标题和正文,轮播组件未实现该功能,但可以通过 `indicator` 插槽手动实现,因此该皮肤由社区自己实现 +- 内页轮播 +- 楼层轮播:目前楼层轮播与内页轮播的区别仅仅是视口小于等于 840px 时指示器宽度不同,添加 `carousel-floor` 类名应用该样式 + +#### 内页轮播 + + + +### Kunpeng, Ascend, OpenEuler Theme Specifications + +The specifications define three types of carousels: + +- Homepage Carousel: This carousel indicator includes a title and body text. + The carousel component does not natively implement this feature, but it can be manually implemented using the `indicator` slot. + Therefore, this skin should be implemented by the community. +- Inner Page Carousel +- Floor Carousel: Currently, the only difference between the floor carousel and the inner page carousel is the indicator width + when the viewport is less than or equal to 840px. Apply the `carousel-floor` class name to use this style. + +#### Inner Page Carousel + + + + diff --git a/packages/opendesign/src/carousel/__docs__/__case__/SkinCarousel2.vue b/packages/opendesign/src/carousel/__docs__/__case__/SkinCarousel2.vue new file mode 100644 index 0000000000000000000000000000000000000000..a9269b559438fd059435b1096b7158a62e6f4da0 --- /dev/null +++ b/packages/opendesign/src/carousel/__docs__/__case__/SkinCarousel2.vue @@ -0,0 +1,40 @@ + + + +#### 楼层轮播 + + + +#### Floor Carousel + + + + diff --git a/packages/opendesign/src/carousel/__docs__/__case__/ThemeSwitch.vue b/packages/opendesign/src/carousel/__docs__/__case__/ThemeSwitch.vue new file mode 100644 index 0000000000000000000000000000000000000000..28c29d662b30fa7545a30ca4f62480b686eed091 --- /dev/null +++ b/packages/opendesign/src/carousel/__docs__/__case__/ThemeSwitch.vue @@ -0,0 +1,59 @@ + + + +### 明暗色切换 + +在深色背景图中往往需要使用浅色文字及控件,在浅色背景图中往往需要使用深色文字及控件。这样的明暗色切换可以通过给组件设置 `data-o-theme="ThemeValue"` 来实现。 + + + +### Light/Dark Theme Switching + +In dark background images, light-colored text and controls are often required, +while in light background images, dark-colored text and controls are typically used. +This light/dark theme switching can be achieved by setting the `data-o-theme="ThemeValue"` attribute for the component. + + + + diff --git a/packages/opendesign/src/carousel/__docs__/__case__/half.en-US.png b/packages/opendesign/src/carousel/__docs__/__case__/half.en-US.png new file mode 100644 index 0000000000000000000000000000000000000000..ca03bb116dcc3e9b12643d3d9fc63fa168ebdf8b Binary files /dev/null and b/packages/opendesign/src/carousel/__docs__/__case__/half.en-US.png differ diff --git a/packages/opendesign/src/carousel/__docs__/__case__/half.zh-CN.png b/packages/opendesign/src/carousel/__docs__/__case__/half.zh-CN.png new file mode 100644 index 0000000000000000000000000000000000000000..bdefcd216a819e5783b11a1e0a8e3ea00997a865 Binary files /dev/null and b/packages/opendesign/src/carousel/__docs__/__case__/half.zh-CN.png differ diff --git a/packages/opendesign/src/carousel/__docs__/index.en-US.md b/packages/opendesign/src/carousel/__docs__/index.en-US.md index 854ed8db9d3205130ac16e5b3eab0c57a47dcc2c..84ee6b24b7b90a725228dc3f70a4c54aa7c3325a 100644 --- a/packages/opendesign/src/carousel/__docs__/index.en-US.md +++ b/packages/opendesign/src/carousel/__docs__/index.en-US.md @@ -3,14 +3,34 @@ sidebar: OCarousel --- # Carousel + ## Demo - + + + ## API +### CSS Variables + +| CSS Variable | Description | +| --- | --- | +| \-\-carousel-arrow-size | Pagination arrow size | +| \-\-carousel-arrow-color | Pagination arrow color | +| \-\-carousel-arrow-color-hover | Pagination arrow hover color | +| \-\-carousel-arrow-color-active | Pagination arrow active color | +| \-\-carousel-indicator-width | Indicator width | +| \-\-carousel-indicator-height | Indicator height | +| \-\-carousel-indicator-gap | Indicator spacing | +| \-\-carousel-indicator-offset | Distance from indicator hot zone to container bottom | +| \-\-carousel-indicator-bg-color | Indicator background color | +| \-\-carousel-indicator-bg-color-hover | Indicator hover background color | +| \-\-carousel-indicator-bg-color-active | Indicator active background color | +| \-\-carousel-indicator-bg-color-selected | Indicator pressed background color | + diff --git a/packages/opendesign/src/carousel/__docs__/index.zh-CN.md b/packages/opendesign/src/carousel/__docs__/index.zh-CN.md index db2755b7fb27bf6798a5b090ab56febb3b054fe1..b651612657aa4ce4a409c4d30134d15a3300cd70 100644 --- a/packages/opendesign/src/carousel/__docs__/index.zh-CN.md +++ b/packages/opendesign/src/carousel/__docs__/index.zh-CN.md @@ -3,14 +3,34 @@ sidebar: OCarousel 幻灯片 --- # 幻灯片 + ## 示例 - + + + ## API +### CSS 变量 + +| CSS 变量 | 描述 | +| --- | --- | +| \-\-carousel-arrow-size | 翻页箭头大小 | +| \-\-carousel-arrow-color | 翻页箭头颜色 | +| \-\-carousel-arrow-color-hover | 翻页箭头hover颜色 | +| \-\-carousel-arrow-color-active | 翻页箭头按下颜色 | +| \-\-carousel-indicator-width | 指示器宽度 | +| \-\-carousel-indicator-height | 指示器高度 | +| \-\-carousel-indicator-gap | 指示器间距 | +| \-\-carousel-indicator-offset | 指示器热区距离容器底部的距离 | +| \-\-carousel-indicator-bg-color | 指示器背景色 | +| \-\-carousel-indicator-bg-color-hover | 指示器 hover 背景色 | +| \-\-carousel-indicator-bg-color-active | 指示器激活背景色 | +| \-\-carousel-indicator-bg-color-selected | 指示器按下背景色 | + diff --git a/packages/opendesign/src/carousel/types.ts b/packages/opendesign/src/carousel/types.ts index c27990323132becbadb24495705685c2d1b9c42f..c5fab7713c1f2291b6245ca82f9ac82fbb94e250 100644 --- a/packages/opendesign/src/carousel/types.ts +++ b/packages/opendesign/src/carousel/types.ts @@ -25,8 +25,9 @@ export const carouselProps = { type: Boolean, }, /** - * @zh-CN 播放间隔 - * @en-US Play interval + * @zh-CN 播放间隔(ms) + * @en-US Play interval(ms) + * @default 5000 * @default 5000 */ interval: {