Config Provider

Config Provider is used for providing global configurations, which enables your entire application to access these configurations everywhere.

i18n Configurations

Configure i18n related properties via Config Provider, to get language switching feature.

Use two attributes to provide i18n related config


暂无数据
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 10
前往
共 100 条

Button Configurations

Message Configurations

Empty Values Configurations 2.7.0

Supported components list
  • Cascader
  • DatePicker
  • Select
  • SelectV2
  • TimePicker
  • TimeSelect
  • TreeSelect

Set empty-values to support empty values of components. The fallback value is ['', null, undefined]. If you think the empty string is meaningful, write [undefined, null].

Set value-on-clear to set the return value when cleared. The fallback value is undefined. In the date component is null. If you want to set undefined, use () => undefined.

Experimental features

In this section, you can learn how to use Config Provider to provide experimental features. For now, we haven't added any experimental features, but in the feature roadmap, we will add some experimental features. You can use this config to manage the features you want or not.

API

Config Provider Attributes

NameDescriptionTypeDefault
localeLocale Objectobject languagesen
sizeglobal component sizeenumdefault
zIndexglobal Initial zIndexnumber
namespaceglobal component className prefix (cooperated with $namespace)stringel
buttonbutton related configuration, see the following tableobjectsee the following table
messagemessage related configuration, see the following tableobjectsee the following table
experimental-featuresfeatures at experimental stage to be added, all features are default to be set to falseobject
empty-values 2.7.0global empty values of componentsarray
value-on-clear 2.7.0global clear return valuestring / number / boolean / Function

Button Attribute

AttributeDescriptionTypeDefault
autoInsertSpaceautomatically insert a space between two chinese charactersbooleanfalse

Message Attribute

AttributeDescriptionTypeDefault
maxthe maximum number of messages that can be displayed at the same timenumber
grouping 2.8.2merge messages with the same content, type of VNode message is not supportedboolean
duration 2.8.2display duration, millisecond. If set to 0, it will not turn off automaticallynumber
showClose 2.8.2whether to show a close buttonboolean
offset 2.8.2set the distance to the top of viewportnumber

Config Provider Slots

NameDescriptionScope
defaultcustomize default contentconfig: provided global config (inherited from the top)

Source

ComponentStyleDocs

Contributors