Reference Source
import MaskedTextBox from 'kqwebmap-project/src/ui/MaskedTextBox.js'
public class | source

MaskedTextBox

文本输入框

See:

Constructor Summary

Public Constructor
public

constructor(id: String, options: Object)

构造函数

Method Summary

Public Methods
public

enable(flag: Boolean): Null

启用或禁用控件

public

readonly(flag: Boolean): Null

设置控件是否为只读的

public

value(text: String): String

获取或设置控件的值

Public Constructors

public constructor(id: String, options: Object) source

构造函数

Params:

NameTypeAttributeDescription
id String

控件的id

options Object

配置参数

options.mask String

输入掩码

option.value String

控件的值

options.change function(e: Object): null

回调函数,用来响应控件的值改变的事件

Public Methods

public enable(flag: Boolean): Null source

启用或禁用控件

Params:

NameTypeAttributeDescription
flag Boolean

如果设置成false,控件将会被禁用,用户无法输入

Return:

Null

public readonly(flag: Boolean): Null source

设置控件是否为只读的

Params:

NameTypeAttributeDescription
flag Boolean

如果设置成true,控件将会被设置成只读的,用户无法输入

Return:

Null

public value(text: String): String source

获取或设置控件的值

Params:

NameTypeAttributeDescription
text String

设置控件的值

Return:

String

获取控件的值(没有传入参数的情况下)