-
Notifications
You must be signed in to change notification settings - Fork 330
fix(auto-tip): add popperClass for AutoTip directive #3836
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
WalkthroughAdds an optional Changes
Sequence Diagram(s)sequenceDiagram
participant Config as Directive Config
participant Directive as v-auto-tip Directive
participant Tooltip as Tooltip Component
participant Popper as Popper (DOM)
Config->>Directive: provide popperClass (string)
Directive->>Tooltip: create Tooltip (propsData includes popperClass)
Tooltip->>Popper: render with initial classes
Directive->>Directive: cache classes -> oldPopperClass
Note over Directive,Popper: On subsequent show/update
Directive->>Popper: remove classes in oldPopperClass
Directive->>Directive: getPopperClass(currentTarget) -> newClasses
Directive->>Directive: update oldPopperClass = newClasses
Directive->>Popper: add newClasses
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes
Poem
Pre-merge checks and finishing touches✅ Passed checks (3 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
📜 Recent review detailsConfiguration used: CodeRabbit UI Review profile: CHILL Plan: Pro 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
| <li><code>content</code>属性,指定提示的内容,支持传入<code>string</code>,<code>VNode</code> 或<code>VNode 数组</code>。不传入值时,使用当前<code>Dom</code>元素的内容。 </li> | ||
| <li><code>effect</code> 属性,指定提示的效果,支持 <code>light</code> 和 <code>dark</code> ,默认是<code>light</code>亮色主题 </li> | ||
| <li><code>placement</code> 属性,指定提示的位置,默认值为<code>top</code> 。参见<code>tooltip</code> 组件的<code>placement</code> 属性。 </li> | ||
| <li><code>popperClass</code> 属性,设置弹出层的class 。参见<code>tooltip</code> 组件的<code>popperClass</code> 属性。 </li> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这里需要标注下是什么版本添加的此特性
PR
auto-tip指令,添加 popperClass的属性。 发包81
PR Checklist
Please check if your PR fulfills the following requirements:
PR Type
What kind of change does this PR introduce?
What is the current behavior?
Issue Number: N/A
What is the new behavior?
Does this PR introduce a breaking change?
Other information
Summary by CodeRabbit
New Features
Documentation
✏️ Tip: You can customize this high-level summary in your review settings.