pub struct ModalProps<'a> {
pub children: Vec<AnyElement<'a>>,
pub style: Style,
pub placement: Placement,
pub open: bool,
pub margin: Margin,
pub offset: Offset,
pub width: Constraint,
pub height: Constraint,
}Expand description
Modal 组件属性。
Fields§
§children: Vec<AnyElement<'a>>弹窗内容。
style: Style弹窗样式。
placement: Placement弹窗位置。
open: bool是否显示弹窗。
margin: Margin§offset: Offset§width: Constraint§height: ConstraintImplementations§
Source§impl<'a> ModalProps<'a>
impl<'a> ModalProps<'a>
Sourcepub fn layout_style(&self) -> LayoutStyle
pub fn layout_style(&self) -> LayoutStyle
Returns the layout style based on the layout-related fields of this struct.
Trait Implementations§
Source§impl<'a> Default for ModalProps<'a>
impl<'a> Default for ModalProps<'a>
Source§fn default() -> ModalProps<'a>
fn default() -> ModalProps<'a>
Returns the “default value” for a type. Read more
impl<'a> Props for ModalProps<'a>
Auto Trait Implementations§
impl<'a> Freeze for ModalProps<'a>
impl<'a> !RefUnwindSafe for ModalProps<'a>
impl<'a> Send for ModalProps<'a>
impl<'a> Sync for ModalProps<'a>
impl<'a> Unpin for ModalProps<'a>
impl<'a> !UnwindSafe for ModalProps<'a>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more