#列表参照组件

使用referDataUrl设置数据源地地。

使用referConditions设置数据请求的参数,详见属性说明

使用defaultSelected设置默认值,值为一个json数组,当是单选时只有一个item,设置为多选时为多个

需要引用本模块样式,如import 'ssc-refer/css/referStyle.css';

#表格参照组件

使用referDataUrl设置数据源地地。

使用referConditions设置数据请求的参数,详见属性说明

使用defaultSelected设置默认值,值为一个json数组,当是单选时只有一个item,设置为多选时为多个

需要引用本模块样式,如import 'ssc-refer/css/referStyle.css';

作老师×
显示源代码

#树表形参照组件

使用referDataUrl设置数据源地地。

使用referConditions设置数据请求的参数,详见属性说明

使用defaultSelected设置默认值,值为一个json数组,当是单选时只有一个item,设置为多选时为多个

需要引用本模块样式,如import 'ssc-refer/css/referStyle.css';

二车间×
显示源代码

#属性

名称类型默认值描述
allowNew
boolean
false

Allows the creation of new selections on the fly. Note that any new items will be added to the list of selections, but not the list of original options unless handled as such by Typeahead's parent.

autoFocus
boolean
false

Autofocus the input when the component initially mounts.

bodyContainer
boolean
false

Whether to render the menu inline or attach to document.body.

caseSensitive
boolean
false

Whether or not filtering should be case-sensitive.

clearButton
boolean
false

Displays a button to clear the input when there are selections.

debugMode
boolean
false

Is debug mode.

defaultSelected
array<>
[]

Specify any pre-selected options. Use only if you want the component to be uncontrolled.

dropup
boolean
false

Specify whether the menu should appear above the input.

filterBy
array<string> | function
[]

Either an array of fields in option to search, or a custom filtering callback.

ignoreDiacritics
boolean
true

Whether the filter should ignore accents and other diacritical marks.

isLoading
boolean
false

Indicate whether an asynchromous data fetch is happening.

labelKey
string | function
'label'

Specify the option key to use for display or a function returning the display string. By default, the selector will use the label key.

maxResults
number
100

Maximum number of results to display by default. Mostly done for performance reasons so as not to render too many DOM nodes in the case of large data sets.

minLength
number
0

Number of input characters that must be entered before showing results.

multiple
boolean
false

Whether or not multiple selections are allowed.

onBlur
function
noop

Callback fired when the input is blurred. Receives an event.

onChange
function
noop

Callback fired whenever items are added or removed. Receives an array of the selected options.

onFocus
function
noop

Callback fired when the input is focused. Receives an event.

onInputChange
function
noop

Callback for handling changes to the user-input text.

paginate
boolean
true

Give user the ability to display additional results if the number of results exceeds maxResults.

referConditions required
object
{}

set refOptions ,for example {"refCode":"dept","refType":"tree","rootName":"部门"}

referDataUrl required
string
'http://172.20.4.220/ficloud/refbase_ctr/queryRefJSON'

set refer data url ,for example http://YOURHOST/queryRefJSON

referType required
string
'list'

set refer type, for example: list, cascader, table, treetable, default type is list.

renderMenu
function

Callback for custom menu rendering.

requestHeader
object
{}

Is debug mode.

searchIcon
string
'glyphicon glyphicon-search refer-search-icon'

search icon style

selected
array<>
[]

The selected option(s) displayed in the input. Use this prop if you want to control the component via its parent.

showDisabled
boolean
false

set refer whether to display Disabled data

showDisabledBtn
boolean
true

set refer whether to display the Disabled button

showDisabledBtnText
string
'显示停用'

显示停用按钮名称,默认值:'显示停用'

showDisabledBtnText_Not
string
'隐藏停用'

隐藏停用按钮名称,默认值:'隐藏停用'

tableColumns
array<>

set custom columns for table display, for example [{"field":"name", "label":"名称"},{"field":"code","label":"编码"},{"field":"addr","label":"地址"}]