-
Notifications
You must be signed in to change notification settings - Fork 333
feat(modal): supports setting the headerDragable property #3918
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
base: dev
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -7,7 +7,15 @@ | |||||||||||||||||||||||||||||
| <h2>标签式调用</h2> | ||||||||||||||||||||||||||||||
| <div class="content"> | ||||||||||||||||||||||||||||||
| <tiny-button @click="openModal">自定义弹窗标题</tiny-button> | ||||||||||||||||||||||||||||||
| <tiny-modal v-model="show" title="自定义弹窗标题" message="窗口内容" show-header show-footer> </tiny-modal> | ||||||||||||||||||||||||||||||
| <tiny-modal | ||||||||||||||||||||||||||||||
| v-model="show" | ||||||||||||||||||||||||||||||
| title="自定义弹窗标题" | ||||||||||||||||||||||||||||||
| message="窗口内容" | ||||||||||||||||||||||||||||||
| show-header | ||||||||||||||||||||||||||||||
| show-footer | ||||||||||||||||||||||||||||||
| :header-dragable="false" | ||||||||||||||||||||||||||||||
| > | ||||||||||||||||||||||||||||||
| </tiny-modal> | ||||||||||||||||||||||||||||||
| </div> | ||||||||||||||||||||||||||||||
| </div> | ||||||||||||||||||||||||||||||
| </template> | ||||||||||||||||||||||||||||||
|
|
@@ -27,7 +35,13 @@ export default { | |||||||||||||||||||||||||||||
| }, | ||||||||||||||||||||||||||||||
| methods: { | ||||||||||||||||||||||||||||||
| btnClick() { | ||||||||||||||||||||||||||||||
| Modal.alert({ message: '窗口内容', title: '自定义弹窗标题', showHeader: true, showFooter: true }) | ||||||||||||||||||||||||||||||
| Modal.alert({ | ||||||||||||||||||||||||||||||
| message: '窗口内容', | ||||||||||||||||||||||||||||||
| title: '自定义弹窗标题', | ||||||||||||||||||||||||||||||
| showHeader: true, | ||||||||||||||||||||||||||||||
| showFooter: true, | ||||||||||||||||||||||||||||||
| headerDragable: false | ||||||||||||||||||||||||||||||
| }) | ||||||||||||||||||||||||||||||
|
Comment on lines
+38
to
+44
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Demo disables the feature in functional call as well. Similar to the template usage, the functional call also sets 🔎 Consider enabling the feature: Modal.alert({
message: '窗口内容',
title: '自定义弹窗标题',
showHeader: true,
showFooter: true,
- headerDragable: false
+ headerDragable: true
})📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents |
||||||||||||||||||||||||||||||
| }, | ||||||||||||||||||||||||||||||
| openModal() { | ||||||||||||||||||||||||||||||
| this.show = true | ||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||
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.
Demo disables the feature it's meant to showcase.
The demo sets
:header-dragable="false", which disables header dragging. If the purpose of this demo is to showcase the newheader-dragablefeature, it would be more intuitive to demonstrate the feature enabled (set totrue) so users can interact with draggable headers.Recommendation: Consider one of these approaches:
header-dragable="true"to demonstrate the dragging capability🔎 Option 1: Enable the feature in the demo:
<tiny-modal v-model="show" title="自定义弹窗标题" message="窗口内容" show-header show-footer - :header-dragable="false" + :header-dragable="true" > </tiny-modal>📝 Committable suggestion
🤖 Prompt for AI Agents