docs(STD-COMP): translate STD-COMP

This commit is contained in:
daniel.xiao
2019-02-27 17:31:53 +08:00
parent de8768e63f
commit ae16b2e72b
2 changed files with 91 additions and 87 deletions
+89 -87
View File
@@ -1,5 +1,7 @@
# Standard Components
[中文版](STD-COMP_CN.md)
If you don't like the cold text description, click on the [interactive version](https://ncform.github.io/ncform/ncform-theme-elementui/index.html).
## control components
@@ -125,11 +127,11 @@ If you don't like the cold text description, click on the [interactive version](
itemValueField: 'value', // Item data represents the field of value
enumSource: [{value: [String | Number | Boolean], label: ''}], // Local data source
enumSourceRemote: { // Remote data source
remoteUrl: '', // 如果是远程访问,则填写该url
paramName: 'keyword', // 请求参数名,默认是keyword
otherParams: {}, // 额外的请求参数。支持dx表达式
resField: '', // 响应结果的字段
selectFirstItem: false // 默认选中第一项
remoteUrl: '', // If it is remote call, fill in the url
paramName: 'keyword', // Request parameter name, default is keyword
otherParams: {}, // Additional request parameters. Support for dx expressions
resField: '', // Response result field
selectFirstItem: false // Whether the first item is selected by default
},
}
```
@@ -138,15 +140,15 @@ If you don't like the cold text description, click on the [interactive version](
```js
{
type: 'radio', // 显示类型,可选值:[radio | button]
arrangement: 'h', // 排列 可选值 [v | h]
type: 'radio', // Display type. optional values: [radio | button]
arrangement: 'h', // Arrange. optional values: [v | h]
itemValueField: '', // 值字段 默认值为value
itemLabelField: '' // 显示字段 默认值为label
enumSource: [{value: [String | Number | Boolean], label: ''}], // 可选项,默认[{value: true, label: '是'}, {value: false, label: '否'}]
enumSourceRemote: { // 远程数据源
remoteUrl: '', // 如果是远程访问,则填写该url
resField: '', // 响应结果的字段
itemValueField: '', // Value field. default value is "value"
itemLabelField: '' // Display field. default value is "label"
enumSource: [{value: [String | Number | Boolean], label: ''}], // Local data source. default: [{value: true, label: '是'}, {value: false, label: '否'}]
enumSourceRemote: { // Remote data source
remoteUrl: '', // If it is remote call, fill in the url
resField: '', // Response result field
},
}
```
@@ -155,16 +157,16 @@ If you don't like the cold text description, click on the [interactive version](
```js
{
selectAll: false, // 是否显示全选
arrangement: 'h', // 排列 可选值 [v | h]
type: 'checkbox', // 显示类型,可选值:[checkbox | button]
selectAll: false, // Whether to display all selections
arrangement: 'h', // Arrange. optional values: [v | h]
type: 'checkbox', // Display type, optional values: [checkbox | button]
itemValueField: '', // 值字段 默认值为value
itemLabelField: '' // 显示字段 默认值为label
enumSource: [{value: [String | Number | Boolean], label: ''}], // 可选项,默认值[{label: '是'}]
enumSourceRemote: { // 远程数据源
remoteUrl: '', // 如果是远程访问,则填写该url
resField: '', // 响应结果的字段
itemValueField: '', // Value field. default value is "value"
itemLabelField: '' // Display field. default value is "label"
enumSource: [{value: [String | Number | Boolean], label: ''}], // Local data source. default: [{label: '是'}]
enumSourceRemote: { // Remote data source
remoteUrl: '', // If it is remote call, fill in the url
resField: '', // Response result field
},
}
@@ -174,26 +176,26 @@ If you don't like the cold text description, click on the [interactive version](
```js
{
uploadUrl: '', // 上传的地址
resField: 'data', // 数据源读取返回文件数据的字段名
fileUrlField: 'url', // 数据源读取返回带有文件数据的字段resField下的 文件地址 字段. 默认 "url"
fileNameField: '', // 数据源读取返回带有文件数据的字段resField下的 文件名 字段. 默认 "name"
uploadUrl: '', // Uploaded address
resField: 'data', // The data source reads the field name of the returned file data
fileUrlField: 'url', // The data source reads the file address field under the field resField with the file data. Default "url"
fileNameField: '', // The data source reads the file name field under the field resField with the file data. Default "name"
multiple: false, // 是否支持多选
data: {}, // 上传时附带的额外参数
fileField: 'file', // 表示文件的字段,默认是file
showFileList: false, // 是否显示已上传文件列表
drag: false, // 是否启用拖拽上传
accept: '', // 接受上传的文件类型
listType: 'text', // 文件列表的类型。 可选值:text/picture/picture-card
autoUpload: false, // 是否在选取文件后立即进行上传
limit: -1, // 最大允许上传个数
constraint: { // 约束
width: 0, // 图片宽度 [仅图片有效]
height: 0, // 图片高度 [仅图片有效]
sizeFixed: true, // 图片尺寸约束的大小是否按固定值,当为false时按比例 [仅图片有效]
maxSize: 0, // 最大图片大小,单位KB0代表不限
minSize: 0 // 最小图片大小,单位KB0代表不限
multiple: false, // Whether to support multiple selection
data: {}, // Additional parameters attached when uploading
fileField: 'file', // The field representing the file, the default is file
showFileList: false, // Whether to display the list of uploaded files
drag: false, // Whether to enable drag and drop upload
accept: '', // Accept uploaded file types
listType: 'text', // The type of file list. Optional value: [ text | picture | picture-card ]
autoUpload: false, // Whether to upload immediately after selecting a file
limit: -1, // Maximum number of uploads allowed
constraint: { // constraint
width: 0, // Image width [image only]
height: 0, // Image height [image only]
sizeFixed: true, // Whether the size of the image size constraint is a fixed value, and when it is false, it is proportional [image only valid]
maxSize: 0, // Maximum picture size, in KB, 0 means no limit
minSize: 0 // Minimum picture size, in KB, 0 means no limit
}
}
```
@@ -202,20 +204,20 @@ If you don't like the cold text description, click on the [interactive version](
```js
{
max: 5, // 最大分值
allowHalf: false, // 是否允许半选
lowThreshold: 2, // 低分和中等分数的界限值,值本身被划分在低分中
highThreshold: 4, // 高分和中等分数的界限值,值本身被划分在高分中
colors: ['#F7BA2A', '#F7BA2A', '#F7BA2A'], // icon 的颜色数组,共有 3 个元素,为 3 个分段所对应的颜色
voidColor: '#C6D1DE', // 未选中 icon 的颜色
disabledVoidColor: '#EFF2F7', // 只读时未选中 icon 的颜色
iconClasses: ['el-icon-star-on', 'el-icon-star-on','el-icon-star-on'], // icon 的类名数组,共有 3 个元素,为 3 个分段所对应的类名
voidIconClass: 'el-icon-star-off', // 未选中 icon 的类名
disabledVoidIconClass: 'el-icon-star-on', // 只读时未选中 icon 的类名
showText: false, // 是否显示辅助文字,若为真,则会从 texts 数组中选取当前分数对应的文字内容
showScore: false, // 是否显示当前分数,showScore showText 不能同时为真
textColor: '#1F2D3D', // 辅助文字的颜色
texts: ['极差', '失望', '一般', '满意', '惊喜'] // 辅助文字数组
max: 5, // Maximum score
allowHalf: false, // Whether semi-selection is allowed
lowThreshold: 2, // The threshold of low and medium scores, the value itself is divided into low scores
highThreshold: 4, // The limit value of the high score and the medium score, the value itself is divided into high scores
colors: ['#F7BA2A', '#F7BA2A', '#F7BA2A'], // The color array of icon, with 3 elements, the color corresponding to 3 segments
voidColor: '#C6D1DE', // Unchecked icon color
disabledVoidColor: '#EFF2F7', // The color of the icon is not selected when read-only
iconClasses: ['el-icon-star-on', 'el-icon-star-on','el-icon-star-on'], // Icon's class name array, with 3 elements, the class name corresponding to 3 segments
voidIconClass: 'el-icon-star-off', // Class name of icon not selected
disabledVoidIconClass: 'el-icon-star-on', // Class name of icon is not selected when read-only
showText: false, // Whether to display auxiliary text, if true, the text content corresponding to the current score will be selected from the texts array
showScore: false, // Whether to display the current score, showScore and showText cannot be true at the same time
textColor: '#1F2D3D', // Auxiliary text color
texts: ['极差', '失望', '一般', '满意', '惊喜'] // Auxiliary text array
}
```
@@ -223,9 +225,9 @@ If you don't like the cold text description, click on the [interactive version](
```js
{
min: 0, // 最小值
max: 100, // 最大值
step: 1, // 步长
min: 0, // Minimum value
max: 100, // Maximum
step: 1, // Step size
}
```
@@ -233,9 +235,9 @@ If you don't like the cold text description, click on the [interactive version](
```js
{
clearable: false, // 是否显示清除按钮
clearable: false, // Whether to display the clear button
type: 'date', // year/month/date/week/datetime
format: '', // 格式显示
format: '', // Format display
}
```
@@ -252,10 +254,10 @@ If you don't like the cold text description, click on the [interactive version](
```js
{
layout: 'v', // 布局类型,垂直即为label上control下,水平即为label左control右,可选值:[v | h]
labelWidth: '100px', // 当布局类型为h时有效
collapsed: false, // 是否默认折叠
disableCollapse: false, // 是否允许折叠
layout: 'v', // Layout type, vertical is the control under label, horizontal is label left control right, optional values: [v | h]
labelWidth: '100px', // Valid when the layout type is h
collapsed: false, // Whether to fold by default
disableCollapse: false, // Whether to allow folding
}
```
@@ -263,15 +265,15 @@ If you don't like the cold text description, click on the [interactive version](
```js
{
disableAdd: true, // 是否禁止添加项
disableDel: true, // 是否禁止删除项
disableReorder: true, // 是否禁止排序
disableCollapse: false, // 是否允许折叠
collapsed: false, // 是否默认折叠
disableItemCollapse: false, // 是否允许项折叠
itemCollapse: false, // 项是否默认折叠
addTxt: 'Add', // 新建文字
delAllTxt: 'Del All' // 删除全部文字
disableAdd: true, // Whether to prohibit the addition of items
disableDel: true, // Whether to prohibit item deletion
disableReorder: true, // Whether to prohibit sorting
disableCollapse: false, // Whether to allow folding
collapsed: false, // Whether to fold by default
disableItemCollapse: false, // Whether to allow items to be folded
itemCollapse: false, // Whether the item is folded by default
addTxt: 'Add', // New display text
delAllTxt: 'Del All' // Delete all display text
}
```
@@ -279,13 +281,13 @@ If you don't like the cold text description, click on the [interactive version](
```js
{
disableAdd: true, // 是否禁止添加项
disableDel: true, // 是否禁止删除项
disableReorder: true, // 是否禁止排序
collapsed: false, // 是否默认折叠
disableCollapse: false, // 是否允许折叠
addTxt: 'Add', // 新建文字
delAllTxt: 'Del All' // 删除全部文字
disableAdd: true, // Whether to prohibit the addition of items
disableDel: true, // Whether to prohibit item deletion
disableReorder: true, // Whether to prohibit sorting
collapsed: false, // Whether to fold by default
disableCollapse: false, // Whether to allow folding
addTxt: 'Add', // New display text
delAllTxt: 'Del All' // Delete all display text
}
```
@@ -293,12 +295,12 @@ If you don't like the cold text description, click on the [interactive version](
```js
{
disableAdd: true, // 是否禁止添加项
disableDel: true, // 是否禁止删除项
tabPosition: 'top', // 可选值:left / top
collapsed: false, // 是否默认折叠
disableCollapse: false, // 是否允许折叠
addTxt: 'Add', // 新建文字
delAllTxt: 'Del All' // 删除全部文字
disableAdd: true, // Whether to prohibit the addition of items
disableDel: true, // Whether to prohibit item deletion
tabPosition: 'top', // Optional value[left | top]
collapsed: false, // Whether to fold by default
disableCollapse: false, // Whether to allow folding
addTxt: 'Add', // New display text
delAllTxt: 'Del All' // Delete all display text
}
```
+2
View File
@@ -1,5 +1,7 @@
# Standard Components
[English Version](STD-COMP.md)
如果你不太喜欢冷冰冰的文字描述,可点击 [互动版本](https://ncform.github.io/ncform/ncform-theme-elementui/index.html)
## control components