FriedRiceNoodles / banana-ui

基于Web Components,跨框架可用的现代化组件库。https://banana-ui.com
https://banana-ui.com
MIT License
88 stars 10 forks source link

feat(marquee): add 'fixed' property for marquee #143

Closed 563316158 closed 2 months ago

563316158 commented 5 months ago

新增fixed参数,传递了fixed参数后,如果文本内容宽度小于容器宽度,则文本会固定不动,而不会有跑马灯的效果。

changeset-bot[bot] commented 5 months ago

⚠️ No Changeset found

Latest commit: d728fdba5f270ccce72083f6b30ec5549d8783b2

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

FriedRiceNoodles commented 5 months ago
  1. 不需要无缝首尾相接,而是滚动完成后内容的头部从容器的尾部出现。
  2. 判断是否文案内容宽度小于容器宽度的逻辑,只需要监听容器的resize;对于内容宽度的变化,使用lit的生命周期方法,在content参数变化时做判断。
  3. ~fixed生效时直接移除动画即可?~
  4. 新demo的html示例代码
  5. changeset