mirror of
https://github.com/youzan/vant.git
synced 2025-10-21 03:11:15 +00:00
feat(Dialog): add width prop (#4687)
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import { createNamespace } from '../utils';
|
||||
import { createNamespace, addUnit } from '../utils';
|
||||
import { BORDER_TOP, BORDER_LEFT } from '../utils/constant';
|
||||
import { PopupMixin } from '../mixins/popup';
|
||||
import { CloseOnPopstateMixin } from '../mixins/close-on-popstate';
|
||||
@@ -11,6 +11,7 @@ export default createComponent({
|
||||
|
||||
props: {
|
||||
title: String,
|
||||
width: [Number, String],
|
||||
message: String,
|
||||
className: null,
|
||||
callback: Function,
|
||||
@@ -153,6 +154,7 @@ export default createComponent({
|
||||
role="dialog"
|
||||
aria-labelledby={this.title || message}
|
||||
class={[bem(), this.className]}
|
||||
style={{ width: addUnit(this.width) }}
|
||||
>
|
||||
{Title}
|
||||
{Content}
|
||||
|
Reference in New Issue
Block a user