跳到正文

SecureField

隐藏输入内容的原生编辑器,受控约定与 TextField 相同。

#导入

从 quickgui 导入 SwiftUiTextField。

use quickgui::*;

#用法

SwiftUiTextField::new(1, secret).placeholder("Password").secure(true)

#API 参考

展开条目查看说明和完整签名。短横线表示声明中未记录默认值。

SwiftUiTextField

查看源码
pub fn new(id: u64, text: impl Into<Arc<str>>) -> Self
placeholderpub fn placeholder(mut self, placeholder: impl Into<Arc<str>>) -> Self—

Configures placeholder for this part.

pub fn placeholder(mut self, placeholder: impl Into<Arc<str>>) -> Self
查看源码
securepub fn secure(mut self, secure: bool) -> Self—

Configures secure for this part.

pub fn secure(mut self, secure: bool) -> Self
查看源码
test_idpub fn test_id(mut self, test_id: impl Into<Arc<str>>) -> Self—

Configures test id for this part.

pub fn test_id(mut self, test_id: impl Into<Arc<str>>) -> Self
查看源码
modifierpub fn modifier(mut self, modifier: SwiftUiModifier) -> Self—

Configures modifier for this part.

pub fn modifier(mut self, modifier: SwiftUiModifier) -> Self
查看源码
modifierspub fn modifiers(mut self, modifiers: impl IntoIterator<Item = SwiftUiModifier>) -> Self—

Configures modifiers for this part.

pub fn modifiers(mut self, modifiers: impl IntoIterator<Item = SwiftUiModifier>) -> Self
查看源码
on_value_changepub fn on_value_change(mut self, enabled: bool) -> Self—

Configures on value change for this part.

pub fn on_value_change(mut self, enabled: bool) -> Self
查看源码
on_submitpub fn on_submit(mut self, enabled: bool) -> Self—

Configures on submit for this part.

pub fn on_submit(mut self, enabled: bool) -> Self
查看源码