FieldInput

AMD: require(["geoscene/widgets/FeatureForm/FieldInput"], (FieldInput) => { /* code goes here */ });
ESM: import FieldInput from "@geoscene/core/widgets/FeatureForm/FieldInput.js";
类: geoscene/widgets/FeatureForm/FieldInput
继承于:FieldInput Accessor
起始版本:GeoScene Maps SDK for JavaScript 4.27

这是一个只读支持类,表示字段输入。它有助于为 FeatureForm 微件使用的不同类型输入提供一致的 API。这些值由 FeatureFormViewModel 在内部计算。

另请参阅

属性概述

所有属性都可以设置、获取和监听。请参阅使用属性主题。
显示继承属性 隐藏继承属性
名称 类型 描述
String

字段输入显示的数据类型。

更多详情
FieldInput
String

类的名称。

更多详情
Accessor
CodedValueDomain|RangeDomain

输入值的域。

更多详情
FieldInput
Boolean

指示字段是否可编辑。

更多详情
FieldInput
String

如果输入字段的值无效,则此属性将返回验证错误代码。

更多详情
FieldInput
Field

关联的字段。

更多详情
FieldInput
GroupInput

包含字段输入的组。

更多详情
FieldInput
String

字段值的提示。

更多详情
FieldInput
Boolean

指示是否包含日期输入的日期信息。

更多详情
FieldInput
String

指示是否包含日期输入的时间信息。

更多详情
FieldInput
Boolean

指示是否包含日期输入的时间戳信息。

更多详情
FieldInput
String

处理 string 字段时,使用的编辑器类型。

更多详情
FieldInput
String

字段的标注。

更多详情
FieldInput
Number

限制输入长度。

更多详情
FieldInput
Number

限制输入长度。

更多详情
FieldInput
String

关联的字段名称。

更多详情
FieldInput
Boolean

指示该字段是否为必填字段。

更多详情
FieldInput
Boolean

指示是否可以在不引入数据验证问题的情况下提交字段的值。

更多详情
FieldInput
String

输入的类型。

更多详情
FieldInput
Boolean

指示字段是否正在更新。

更多详情
FieldInput
Boolean

指示输入值是否有效。

更多详情
FieldInput
Number|String|null

字段输入的值。

更多详情
FieldInput
Boolean

指示字段是否可见。

更多详情
FieldInput

属性详细信息

dataType Stringreadonly

字段输入显示的数据类型。下面列出了可能的值。

描述
number 输入表示一个数字。
text 输入表示文本。
date 输入表示日期。
unsupported 该字段表示不受支持的值。blob 字段类型就是一个示例。

可能值"number"|"text"|"date"|"unsupported"

declaredClass Stringreadonly inherited

类的名称。声明的类名称格式化为 geoscene.folder.className

输入值的域。这用于约束图层的允许值。

editable Booleanreadonly

指示字段是否可编辑。

error Stringreadonly

如果输入字段的值无效,则此属性将返回验证错误代码。否则,它是 null

field Fieldreadonly

关联的字段。

group GroupInputreadonly

包含字段输入的组。

hint Stringreadonly

字段值的提示。这是 TextAreaInputTextBoxInput 中的临时占位符输入。

includeDate Booleanreadonly

指示是否包含日期输入的日期信息。

默认值:true
includeTime Stringreadonly

指示是否包含日期输入的时间信息。

默认值:true
includeTimestamp Booleanreadonly

指示是否包含日期输入的时间戳信息。

默认值:false
inputType Stringreadonly

处理 string 字段时,使用的编辑器类型。下表列出了可能的值。

描述
text-box 用于捕获输入的 HTML 文本框。
text-area 用于捕获输入的 HTML 文本区域。

可能值"text-box"|"text-area"

默认值:text-box
label Stringreadonly

字段的标注。

maxLength Numberreadonly

限制输入长度。

minLength Numberreadonly

限制输入长度。

name Stringreadonly

关联的字段名称。

required Booleanreadonly

指示该字段是否为必填字段。

submittable Booleanreadonly

指示是否可以在不引入数据验证问题的情况下提交字段的值。

type Stringreadonly

输入的类型。此值总是 "field"。

对于 FieldInput,类型总是 "field"

updating Booleanreadonly

指示字段是否正在更新。如果字段具有为 FieldElement 或 @link geoscene/form/elements/FieldElement#editableExpression} 定义的值,则此项适用。每当处理这两个表达式中的一个或两个时,该属性都返回 true

valid Booleanreadonly

指示输入值是否有效。

value Number|String|nullreadonly

字段输入的值。

visible Booleanreadonly

指示字段是否可见。

方法概述

显示继承的方法 隐藏继承的方法
名称 返回值类值 描述

添加一个或多个与对象生命周期相关联的句柄

更多详情
Accessor
Boolean

如果存在指定的句柄组,则返回 true。

更多详情
Accessor

移除对象拥有的句柄组。

更多详情
Accessor

方法详细说明

addHandles(handleOrHandles, groupKey)inherited

添加一个或多个与对象的生命周期相关联的句柄。当对象被销毁时,将移除句柄。

// Manually manage handles
const handle = reactiveUtils.when(
  () => !view.updating,
  () => {
    wkidSelect.disabled = false;
  },
  { once: true }
);

this.addHandles(handle);

// Destroy the object
this.destroy();
参数
handleOrHandles WatchHandle|WatchHandle[]

对象销毁后,标记为要移除的句柄。

groupKey *
optional

标识句柄应添加到的组的键。组中的所有句柄稍后都可使用 Accessor.removeHandles() 进行删除。如果未提供键,则句柄将被添加到默认组。

hasHandles(groupKey){Boolean}inherited

如果存在指定的句柄组,则返回 true。

参数
groupKey *
optional

组键。

返回
类型 描述
Boolean 如果存在指定的句柄组,则返回 true
示例
// Remove a named group of handles if they exist.
if (obj.hasHandles("watch-view-updates")) {
  obj.removeHandles("watch-view-updates");
}
removeHandles(groupKey)inherited

移除对象拥有的句柄组。

参数
groupKey *
optional

要移除的组键或组键的数组或集合。

示例
obj.removeHandles(); // removes handles from default group

obj.removeHandles("handle-group");
obj.removeHandles("other-handle-group");

您的浏览器不再受支持。请升级您的浏览器以获得最佳体验。