Skip to content

Feat/web swiper indicator style - #2558

Open
yandadaFreedom wants to merge 4 commits into
masterfrom
feat/web-swiper-indicator-style
Open

Feat/web swiper indicator style#2558
yandadaFreedom wants to merge 4 commits into
masterfrom
feat/web-swiper-indicator-style

Conversation

@yandadaFreedom

Copy link
Copy Markdown
Collaborator

No description provided.

style: {
backgroundColor: i === this.currentIndex ? this.indicatorActiveColor : this.indicatorColor
backgroundColor: i === this.currentIndex ? this.indicatorActiveColor : this.indicatorColor,
margin: `${this.indicatorSpacing}px`,

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

indicator-spacing 表示相邻指示点的间距,但这里给每个指示点四周都设置了 margin。Flex 子项的 margin 不会折叠,因此 indicator-spacing="4" 实际会产生 8px 的点间距;首尾 margin 还会叠加到 indicator-margin,导致两个属性无法独立控制。建议改为在 dots 容器设置准确的 gap,或只给相邻方向设置单侧 margin,并补充横向、纵向用例。

type: String,
default: '#000000'
},
indicatorMargin: {

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这里新增了 indicator-marginindicator-spacingindicator-radiusindicator-widthindicator-heightindicator-alignmentindicator-offset 七个用户可见属性,但 PR 最后的提交撤销了对应文档,最终变更中没有说明 Web 端支持范围、默认值及数组语义。按照仓库对公开 API/跨端行为的文档同步约束,请恢复 docs-vitepress/guide/advance/platform.md 中的 swiper 文档更新。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants