diff --git a/CHANGELOG.md b/CHANGELOG.md index 11dac7afda36e517c30682808e264eff80110bfa..0a4bd92f679bca32c98659074eb132ba88372995 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,10 @@ ## [Unreleased] +### Added + +- 轮播图适配注入属性配置 + ### Change - 日历模式日期选择公共组件新增支持单个日期选择 diff --git a/src/common/carousel/carousel.tsx b/src/common/carousel/carousel.tsx index bb5c7ca51753d1981093493088c96321a785fe48..01170ab06f80fa661d7bc56de0e8dd08121db9d8 100644 --- a/src/common/carousel/carousel.tsx +++ b/src/common/carousel/carousel.tsx @@ -26,6 +26,10 @@ export const IBizCarousel = defineComponent({ images: { type: Object as PropType>, }, + attrs: { + type: Object as PropType, + required: false, + }, }, setup() { const ns = useNamespace('carousel'); @@ -45,6 +49,7 @@ export const IBizCarousel = defineComponent({ lazy-render show-indicators={this.showIndicators} touchable={this.touchable} + {...this.attrs} > {this.images && this.images.map(image => { diff --git a/src/editor/upload/ibiz-carousel/ibiz-carousel.tsx b/src/editor/upload/ibiz-carousel/ibiz-carousel.tsx index 56158a8c0a7c51e1f0092c85aae1ffd8fe501355..d18fc01fb669ce2485735e6359cdd5934e091ff6 100644 --- a/src/editor/upload/ibiz-carousel/ibiz-carousel.tsx +++ b/src/editor/upload/ibiz-carousel/ibiz-carousel.tsx @@ -79,6 +79,7 @@ export const IBizEditorCarousel = defineComponent({ duration={this.duration} showIndicators={this.showIndicators} touchable={this.touchable} + attrs={this.$attrs} > ); diff --git a/src/panel-component/panel-carousel/panel-carousel.tsx b/src/panel-component/panel-carousel/panel-carousel.tsx index 1de26e8adf5985c2a83ebcc912a68a84a418babf..f0e87a8ee72665e72ba38d964bf899954145826a 100644 --- a/src/panel-component/panel-carousel/panel-carousel.tsx +++ b/src/panel-component/panel-carousel/panel-carousel.tsx @@ -1,5 +1,5 @@ import { useNamespace } from '@ibiz-template/vue3-util'; -import { defineComponent } from 'vue'; +import { defineComponent, PropType } from 'vue'; import { PanelCarouselController } from './panel-carousel.controller'; import './panel-carousel.scss'; @@ -10,6 +10,10 @@ export const PanelCarousel = defineComponent({ type: PanelCarouselController, required: true, }, + attrs: { + type: Object as PropType, + required: false, + }, }, setup(_props) { const ns = useNamespace('panel-carousel'); @@ -42,6 +46,7 @@ export const PanelCarousel = defineComponent({ duration={this.duration} showIndicators={this.showIndicators} touchable={this.touchable} + attrs={this.attrs} > );