From 10f4419f8afca329b67473373ab8a70fa9e46939 Mon Sep 17 00:00:00 2001 From: "daniel.xiao" Date: Thu, 28 Feb 2019 18:48:32 +0800 Subject: [PATCH] docs: translate standard components doc --- .../examples/control-comps/checkbox.html | 465 +++++---- .../examples/control-comps/color-picker.html | 251 ++--- .../examples/control-comps/date-picker.html | 346 ++++--- .../examples/control-comps/input-number.html | 334 ++++--- .../examples/control-comps/input.html | 907 ++++++++++-------- .../examples/control-comps/label.html | 227 +++-- .../examples/control-comps/radio.html | 398 ++++---- .../examples/control-comps/rate.html | 688 +++++++------ .../examples/control-comps/select.html | 643 +++++++------ .../examples/control-comps/slider.html | 362 +++---- .../examples/control-comps/textarea.html | 321 ++++--- .../examples/control-comps/upload.html | 822 ++++++++-------- .../examples/index.html | 106 +- .../examples/layout-comps/object.html | 431 +++++---- 14 files changed, 3468 insertions(+), 2833 deletions(-) diff --git a/packages/ncform-theme-elementui/examples/control-comps/checkbox.html b/packages/ncform-theme-elementui/examples/control-comps/checkbox.html index 913f4ab..022a07f 100755 --- a/packages/ncform-theme-elementui/examples/control-comps/checkbox.html +++ b/packages/ncform-theme-elementui/examples/control-comps/checkbox.html @@ -1,247 +1,300 @@ + + + + checkbox widget - - - - checkbox widget + + + + - - - - - - - - -
-
-

{{item.title}}

-
-
- - value: {{item.schema.value}} -
-
-
{{JSON.stringify(originFormSchemas[idx].schema.properties, null, 2)}}
-
-
-
{{item.detail}}
+ + +
+
+

{{ item.title }}

+
+
+ + value: {{ item.schema.value }} +
+
+
{{ JSON.stringify(originFormSchemas[idx].schema.properties, null, 2) }}
+
+
+
{{ item.detail }}
+
-
- - - - - - - - - - + + + + + + + + + + - - - - + + diff --git a/packages/ncform-theme-elementui/examples/control-comps/color-picker.html b/packages/ncform-theme-elementui/examples/control-comps/color-picker.html index 2839350..9b8f3e9 100755 --- a/packages/ncform-theme-elementui/examples/control-comps/color-picker.html +++ b/packages/ncform-theme-elementui/examples/control-comps/color-picker.html @@ -1,130 +1,151 @@ + + + + color-picker widget - - - - color-picker widget + - + + + - - - - - - - - -
-
-

{{item.title}}

-
-
- - value: {{item.schema.value}} -
-
-
{{JSON.stringify(originFormSchemas[idx].schema.properties, null, 2)}}
-
-
-
{{item.detail}}
+ + +
+
+

{{ item.title }}

+
+
+ + value: {{ item.schema.value }} +
+
+
{{ JSON.stringify(originFormSchemas[idx].schema.properties, null, 2) }}
+
+
+
{{ item.detail }}
+
-
- - - - - - - - + + + + + + + + - - + Vue.use(vueNcform, { extComponents: { object: object.default, colorPicker: colorPicker.default } }); + let formSchemas = [ + { + title: { + cn: '默认状态', + en: 'Default' + }, + schema: { + type: 'object', + properties: { + color: { + type: 'string', + ui: { + widget: 'color-picker' + } + } + } + } + }, + { + title: { + cn: '提供值', + en: 'Provide value' + }, + schema: { + type: 'object', + properties: { + color: { + type: 'string', + value: '#ccffff', + ui: { + widget: 'color-picker' + } + } + }, + ui: { + widgetConfig: { + layout: 'h' + } + } + } + }, + { + title: { + cn: '[属性] readonly: 只读状态', + en: '[ATTR] readonly: read-only state' + }, + schema: { + type: 'object', + properties: { + color: { + type: 'string', + value: '#ccffff', + ui: { + widget: 'color-picker', + readonly: true + } + } + } + } + }, + { + title: { + cn: '[属性] disabled: 禁用状态', + en: '[ATTR] disabled: disable state' + }, + schema: { + type: 'object', + properties: { + color: { + type: 'string', + value: '#ccffff', + ui: { + widget: 'color-picker', + disabled: true + } + } + } + } + } + ]; + + // Bootstrap the app + new Vue({ + el: '#demo', + data: { + formSchemas: getFormSchemas(), + originFormSchemas: getFormSchemas() + } + }); + + function getFormSchemas() { + return formSchemas.map(item => ({ + title: item.title[lang], + schema: item.schema, + detail: item.detail ? item.detail[lang] : '' + })); + } + + diff --git a/packages/ncform-theme-elementui/examples/control-comps/date-picker.html b/packages/ncform-theme-elementui/examples/control-comps/date-picker.html index 6533779..32472ad 100755 --- a/packages/ncform-theme-elementui/examples/control-comps/date-picker.html +++ b/packages/ncform-theme-elementui/examples/control-comps/date-picker.html @@ -1,182 +1,218 @@ + + + + date-picker widget - - - - date-picker widget + - + + + - - - - - - - - -
-
-

{{item.title}}

-
-
- - value: {{item.schema.value}} -
-
-
{{JSON.stringify(originFormSchemas[idx].schema.properties, null, 2)}}
-
-
-
{{item.detail}}
+ + +
+
+

{{ item.title }}

+
+
+ + value: {{ item.schema.value }} +
+
+
{{ JSON.stringify(originFormSchemas[idx].schema.properties, null, 2) }}
+
+
+
{{ item.detail }}
+
-
- - - - - - - - + + + + + + + + - - - - + + diff --git a/packages/ncform-theme-elementui/examples/control-comps/input-number.html b/packages/ncform-theme-elementui/examples/control-comps/input-number.html index dd3d6ab..4f794b4 100755 --- a/packages/ncform-theme-elementui/examples/control-comps/input-number.html +++ b/packages/ncform-theme-elementui/examples/control-comps/input-number.html @@ -1,179 +1,209 @@ + + + + input-number widget - - - - input-number widget + - + + + - - - - - - - - -
-
-

{{item.title}}

-
-
- - value: {{item.schema.value}} -
-
-
{{JSON.stringify(originFormSchemas[idx].schema.properties, null, 2)}}
-
-
-
{{item.detail}}
+ + +
+
+

{{ item.title }}

+
+
+ + value: {{ item.schema.value }} +
+
+
{{ JSON.stringify(originFormSchemas[idx].schema.properties, null, 2) }}
+
+
+
{{ item.detail }}
+
-
- - - - - - - - + + + + + + + + - - - - + + diff --git a/packages/ncform-theme-elementui/examples/control-comps/input.html b/packages/ncform-theme-elementui/examples/control-comps/input.html index 5d69bb5..d9c9e33 100755 --- a/packages/ncform-theme-elementui/examples/control-comps/input.html +++ b/packages/ncform-theme-elementui/examples/control-comps/input.html @@ -1,274 +1,316 @@ + + + + input widget - - - - input widget + - + + + - - - - - - - - -
-
-

{{item.title}}

-
-
- - value: {{item.schema.value}} -
-
-
{{JSON.stringify(originFormSchemas[idx].schema.properties, null, 2)}}
-
-
-
{{item.detail}}
+ + +
+
+

{{ item.title }}

+
+
+ + value: {{ item.schema.value }} +
+
+
{{ JSON.stringify(originFormSchemas[idx].schema.properties, null, 2) }}
+
+
+
{{ item.detail }}
+
-
- - - - - - - - - - + + + + + + + + + + - - - - + + diff --git a/packages/ncform-theme-elementui/examples/control-comps/label.html b/packages/ncform-theme-elementui/examples/control-comps/label.html index c97100b..54c3c99 100755 --- a/packages/ncform-theme-elementui/examples/control-comps/label.html +++ b/packages/ncform-theme-elementui/examples/control-comps/label.html @@ -1,117 +1,136 @@ + + + + label widget - - - - label widget + - + + + - - + + +
+
+

{{ item.title }}

+
+
+ + value: {{ item.schema.value }} +
+
+
{{ JSON.stringify(originFormSchemas[idx].schema.properties, null, 2) }}
+
+
+
{{ item.detail }}
+
+
+
+
- + + + + + + + + - + - - - - - - - + Vue.use(vueNcform, { extComponents: { object: object.default, label: label.default } }); - - - + // Bootstrap the app + new Vue({ + el: '#demo', + data: { + formSchemas: getFormSchemas(), + originFormSchemas: getFormSchemas() + } + }); + function getFormSchemas() { + return formSchemas.map(item => ({ + title: item.title[lang], + schema: item.schema, + detail: item.detail ? item.detail[lang] : '' + })); + } + + diff --git a/packages/ncform-theme-elementui/examples/control-comps/radio.html b/packages/ncform-theme-elementui/examples/control-comps/radio.html index 19d2234..41dda2f 100755 --- a/packages/ncform-theme-elementui/examples/control-comps/radio.html +++ b/packages/ncform-theme-elementui/examples/control-comps/radio.html @@ -1,195 +1,223 @@ + + + + radio widget - - - - radio widget + - + + + - - - - - - - - -
-
-

{{item.title}}

-
-
- - value: {{item.schema.value}} -
-
-
{{JSON.stringify(originFormSchemas[idx].schema.properties, null, 2)}}
-
-
-
{{item.detail}}
+ + +
+
+

{{ item.title }}

+
+
+ + value: {{ item.schema.value }} +
+
+
{{ JSON.stringify(originFormSchemas[idx].schema.properties, null, 2) }}
+
+
+
{{ item.detail }}
+
-
- - - - - - - - - - + + + + + + + + + + - - - - + + diff --git a/packages/ncform-theme-elementui/examples/control-comps/rate.html b/packages/ncform-theme-elementui/examples/control-comps/rate.html index ccf81ea..4161270 100755 --- a/packages/ncform-theme-elementui/examples/control-comps/rate.html +++ b/packages/ncform-theme-elementui/examples/control-comps/rate.html @@ -1,339 +1,401 @@ + + + + rate widget - - - - rate widget + - + + + - - - - - - - - -
-
-

{{item.title}}

-
-
- - value: {{item.schema.value}} -
-
-
{{JSON.stringify(originFormSchemas[idx].schema.properties, null, 2)}}
-
-
-
{{item.detail}}
+ + +
+
+

{{ item.title }}

+
+
+ + value: {{ item.schema.value }} +
+
+
{{ JSON.stringify(originFormSchemas[idx].schema.properties, null, 2) }}
+
+
+
{{ item.detail }}
+
-
- - - - - - - - + + + + + + + + - - - - + + diff --git a/packages/ncform-theme-elementui/examples/control-comps/select.html b/packages/ncform-theme-elementui/examples/control-comps/select.html index 6e7fbf0..a6d44f4 100755 --- a/packages/ncform-theme-elementui/examples/control-comps/select.html +++ b/packages/ncform-theme-elementui/examples/control-comps/select.html @@ -1,304 +1,369 @@ + + + + select widget - - - - select widget + - + + + - - - - - - - - -
-
-

{{item.title}}

-
-
- - value: {{item.schema.value}} -
-
-
{{JSON.stringify(originFormSchemas[idx].schema.properties, null, 2)}}
-
-
-
{{item.detail}}
+ + +
+
+

{{ item.title }}

+
+
+ + value: {{ item.schema.value }} +
+
+
{{ JSON.stringify(originFormSchemas[idx].schema.properties, null, 2) }}
+
+
+
{{ item.detail }}
+
-
- - - - - - - - - - + + + + + + + + + + - - + Mock.mock(/getMoney/, function(options) { + let params = url('?', options.url) || {}; + let result = [{ id: 1, name: '1 yuan' }, { id: 2, name: '2 yuan' }]; + return result.filter(item => !params.keyword || item.name.indexOf(params.keyword) >= 0); + }); + Vue.use(vueNcform, { extComponents: { object: object.default, select: select.default } }); + + let formSchemas = [ + { + title: { + cn: '默认状态', + en: 'Default' + }, + schema: { + type: 'object', + properties: { + choice: { + type: 'boolean', + ui: { + widget: 'select' + } + } + } + } + }, + { + title: { + cn: '提供值', + en: 'Provide value' + }, + schema: { + type: 'object', + properties: { + choice: { + type: 'boolean', + value: true, + ui: { + widget: 'select' + } + } + } + } + }, + { + title: { + cn: '[属性] readonly: 只读状态', + en: '[ATTR] readonly: read-only state' + }, + schema: { + type: 'object', + properties: { + choice: { + type: 'boolean', + ui: { + widget: 'select', + readonly: true + } + } + } + } + }, + { + title: { + cn: '[属性] disabled: 禁用状态', + en: '[ATTR] disabled: disable state' + }, + schema: { + type: 'object', + properties: { + choice: { + type: 'boolean', + ui: { + widget: 'select', + disabled: true + } + } + } + } + }, + { + title: { + cn: '[属性] placeholder: 占位显示', + en: '[ATTR] placeholder: placeholder display' + }, + schema: { + type: 'object', + properties: { + choice: { + type: 'string', + ui: { + widget: 'select', + widgetConfig: { + placeholder: 'select your choice', + enumSource: [{ value: 1, label: 'option1' }, { value: 2, label: 'option2' }] + } + } + } + } + } + }, + { + title: { + cn: '[属性] clearable: 带清除按钮。默认值是false', + en: '[ATTR] clearable: With clear button. Default is false' + }, + schema: { + type: 'object', + properties: { + choice: { + type: 'string', + ui: { + widget: 'select', + widgetConfig: { + clearable: true, + enumSource: [{ value: 1, label: 'option1' }, { value: 2, label: 'option2' }] + } + } + } + } + } + }, + { + title: { + cn: '[属性] multiple: 是否支持多选. 默认值: false', + en: '[ATTR] multiple: Whether to support multiple selection. Default is false' + }, + schema: { + type: 'object', + properties: { + choice: { + type: 'array', + ui: { + widget: 'select', + widgetConfig: { + multiple: true, + enumSource: [{ value: 1, label: 'option1' }, { value: 2, label: 'option2' }, { value: 3, label: 'option3' }] + } + } + } + } + } + }, + { + title: { + cn: '[属性] filterable: 过滤器. 默认值: false', + en: '[ATTR] filterable: filter options. Default is false' + }, + schema: { + type: 'object', + properties: { + choice: { + type: 'string', + ui: { + widget: 'select', + widgetConfig: { + filterable: true, + enumSource: [{ value: 1, label: 'option1' }, { value: 2, label: 'option2' }, { value: 3, label: 'option3' }] + } + } + } + } + } + }, + { + title: { + cn: '[属性] itemTemplate: 自定义模板', + en: '[ATTR] itemTemplate: item custom template' + }, + schema: { + type: 'object', + properties: { + choice: { + type: 'string', + ui: { + widget: 'select', + widgetConfig: { + itemTemplate: '{{item.label}} : {{item.value}}', + enumSource: [{ value: 1, label: 'option1' }, { value: 2, label: 'option2' }, { value: 3, label: 'option3' }] + } + } + } + } + } + }, + { + title: { + cn: '[属性] enumSource: 可选项使用本地数据源.', + en: '[ATTR] enumSource: use local data source as option items data source' + }, + schema: { + type: 'object', + properties: { + choice: { + type: 'string', + ui: { + widget: 'select', + widgetConfig: { + enumSource: [{ value: 1, label: 'option1' }, { value: 2, label: 'option2' }, { value: 3, label: 'option3' }] + } + } + } + } + } + }, + { + title: { + cn: '[属性] enumSourceRemote: 使用远程数据源', + en: '[ATTR] enumSourceRemote: use remote data source' + }, + schema: { + type: 'object', + properties: { + choice: { + type: 'number', + ui: { + widget: 'select', + widgetConfig: { + itemLabelField: 'name', // 项数据表示label的字段 + itemValueField: 'id', // 项数据表示value的字段 + enumSourceRemote: { + // 远程数据源 + remoteUrl: '/api/test/getMoney', // 如果是远程访问,则填写该url + paramName: 'keyword', // 请求参数名,默认是keyword + otherParams: {}, // 其它请求的参数,支持字符串表达式 + resField: '', // 响应结果的字段 + selectFirstItem: true + } + } + } + } + } + }, + detail: { + cn: ` + itemLabelField: 数据源的每一项显示的标签的字段,默认值是label. 例子中就是name + + itemValueField: 数据源的每一项显示的值的字段,默认值是value. 例子中就是id + + remoteUrl: 远程接口url + + paramName: 请求参数名,默认是keyword + + otherParams: 其它请求参数,值支持 dx表达式 。如{countryId: 'dx: {{$root.countryId}}'} + + resField: 数据源读取返回数据的哪个字段,如例子返回[{ id: 1, name: '1元' }, ...],则填写空字符串 + + selectFirstItem: 默认选中第一项, 默认值是false + `, + en: ` + itemLabelField: The field of the label displayed by each item of the data source. default is "label". In the example is "name" + + itemValueField: The field of the value displayed by each item of the data source. default is "value". In the example is "id" + + remoteUrl: remote api url + + paramName: request parameter name, default is "keyword" + + otherParams: Other request parameters, support dx expressions. Such as {countryId: 'dx: {{$root.countryId}}'} + + resField: Which field of the response data as the data source, as the example returns [{ id: 1, name: '1 yuan' }, ...], then fill in "" + + selectFirstItem: whether tp selecte the first item by default, default is false +          ` + } + }, + { + title: { + cn: '[属性] filterLocal: 只搜索本地数据. 默认值: true', + en: '[ATTR] filterLocal: only searches for local data. Default is true' + }, + schema: { + type: 'object', + properties: { + choice: { + type: 'array', + ui: { + widget: 'select', + widgetConfig: { + filterLocal: true, + filterable: true, + itemLabelField: 'name', // 项数据表示label的字段 + itemValueField: 'id', // 项数据表示value的字段 + enumSourceRemote: { + // 远程数据源 + remoteUrl: '/api/test/getMoney' // 如果是远程访问,则填写该url + } + } + } + } + } + }, + detail: { + cn: `例子中数据源是远程数据源,但输入keyword时不会每次都从远程加载数据,只会从第一次从远程加载的数据源中进行筛选`, + en: `The data source in the example is a remote data source, but when you enter the keyword, it will not load the data from the remote every time, only from the data source that is loaded remotely from the first time.` + } + } + ]; + + // Bootstrap the app + new Vue({ + el: '#demo', + data: { + formSchemas: getFormSchemas(), + originFormSchemas: getFormSchemas() + } + }); + + function getFormSchemas() { + return formSchemas.map(item => ({ + title: item.title[lang], + schema: item.schema, + detail: item.detail ? item.detail[lang] : '' + })); + } + + diff --git a/packages/ncform-theme-elementui/examples/control-comps/slider.html b/packages/ncform-theme-elementui/examples/control-comps/slider.html index f9ae667..0159168 100755 --- a/packages/ncform-theme-elementui/examples/control-comps/slider.html +++ b/packages/ncform-theme-elementui/examples/control-comps/slider.html @@ -1,181 +1,211 @@ + + + + slider widget - - - - slider widget + - + + + - - - - - - - - -
-
-

{{item.title}}

-
-
- - value: {{item.schema.value}} -
-
-
{{JSON.stringify(originFormSchemas[idx].schema.properties, null, 2)}}
-
-
-
{{item.detail}}
+ + +
+
+

{{ item.title }}

+
+
+ + value: {{ item.schema.value }} +
+
+
{{ JSON.stringify(originFormSchemas[idx].schema.properties, null, 2) }}
+
+
+
{{ item.detail }}
+
-
- - - - - - - - + + + + + + + + - - + Vue.use(vueNcform, { extComponents: { object: object.default, slider: slider.default } }); + let formSchemas = [ + { + title: { + cn: '默认状态', + en: 'Default' + }, + schema: { + type: 'object', + properties: { + age: { + type: 'number', + ui: { + widget: 'slider' + } + } + } + } + }, + { + title: { + cn: '提供值', + en: 'Provide value' + }, + schema: { + type: 'object', + properties: { + age: { + type: 'number', + value: 20, + ui: { + widget: 'slider' + } + } + }, + ui: { + widgetConfig: { + layout: 'h' + } + } + } + }, + { + title: { + cn: '[属性] readonly: 只读状态', + en: '[ATTR] readonly: read-only state' + }, + schema: { + type: 'object', + properties: { + age: { + type: 'number', + value: 20, + ui: { + widget: 'slider', + readonly: true + } + } + } + } + }, + { + title: { + cn: '[属性] disabled: 禁用状态', + en: '[ATTR] disabled: disable state' + }, + schema: { + type: 'object', + properties: { + age: { + type: 'number', + value: 20, + ui: { + widget: 'slider', + disabled: true + } + } + } + } + }, + { + title: { + cn: '[属性] min: 最小值. 默认值: 0', + en: '[ATTR] min: minimum. Default is 0' + }, + schema: { + type: 'object', + properties: { + age: { + type: 'number', + ui: { + widget: 'slider', + widgetConfig: { + min: -2 + } + } + } + } + } + }, + { + title: { + cn: '[属性] max: 最大值. 默认值: Infinity', + en: '[ATTR] max: maximum. Default is Infinity' + }, + schema: { + type: 'object', + properties: { + age: { + type: 'number', + ui: { + widget: 'slider', + widgetConfig: { + max: 2 + } + } + } + } + } + }, + { + title: { + cn: '[属性] step: 步长. 默认值: 1', + en: '[ATTR] step: step. Default is 1' + }, + schema: { + type: 'object', + properties: { + age: { + type: 'number', + ui: { + widget: 'slider', + widgetConfig: { + step: 2 + } + } + } + } + } + } + ]; + + // Bootstrap the app + new Vue({ + el: '#demo', + data: { + formSchemas: getFormSchemas(), + originFormSchemas: getFormSchemas() + } + }); + + function getFormSchemas() { + return formSchemas.map(item => ({ + title: item.title[lang], + schema: item.schema, + detail: item.detail ? item.detail[lang] : '' + })); + } + + diff --git a/packages/ncform-theme-elementui/examples/control-comps/textarea.html b/packages/ncform-theme-elementui/examples/control-comps/textarea.html index d0bd12b..5781cf3 100755 --- a/packages/ncform-theme-elementui/examples/control-comps/textarea.html +++ b/packages/ncform-theme-elementui/examples/control-comps/textarea.html @@ -1,181 +1,190 @@ + + + + textarea widget - - - - textarea widget + - + + + - - - - - - - - -
-
-

{{item.title}}

-
-
- - value: {{item.schema.value}} -
-
-
{{JSON.stringify(originFormSchemas[idx].schema.properties, null, 2)}}
-
-
-
{{item.detail}}
+ + +
+
+

{{ item.title }}

+
+
+ + value: {{ item.schema.value }} +
+
+
{{ JSON.stringify(originFormSchemas[idx].schema.properties, null, 2) }}
+
+
+
{{ item.detail }}
+
-
- - - - - - - - + + + + + + + + - - - - + + diff --git a/packages/ncform-theme-elementui/examples/control-comps/upload.html b/packages/ncform-theme-elementui/examples/control-comps/upload.html index 8937b0f..dd29d2c 100755 --- a/packages/ncform-theme-elementui/examples/control-comps/upload.html +++ b/packages/ncform-theme-elementui/examples/control-comps/upload.html @@ -1,417 +1,487 @@ + + + + Component Example - - - - Component Example + + + + - - - - + + +
+
+

{{ item.title }}

+
+
+ + value: {{ item.schema.value }} +
+
+
{{ JSON.stringify(originFormSchemas[idx].schema.properties, null, 2) }}
+ +
- - - -
-
-

{{item.title}}

-
-
- - value: {{item.schema.value}} -
-
-
{{JSON.stringify(originFormSchemas[idx].schema.properties, null, 2)}}
- -
- -
-
{{item.detail}}
+
+
{{ item.detail }}
+
-
- - - - - - - - - - + + + + + + + + + + - - - - + + diff --git a/packages/ncform-theme-elementui/examples/index.html b/packages/ncform-theme-elementui/examples/index.html index cb7bcb7..68b0630 100755 --- a/packages/ncform-theme-elementui/examples/index.html +++ b/packages/ncform-theme-elementui/examples/index.html @@ -12,46 +12,74 @@ -

ncform standard components

+
+

+ ncform standard components -
-
-
    -
  • -
    Controls
    -
      -
    • - {{item.name}} -
    • - -
    -
  • -
  • -
    Layouts
    -
      -
    • - {{item.name}} -
    • - -
    -
  • -
-
-
- +
+ + +
+ +

+ +
+
+
    +
  • +
    Controls
    +
      +
    • + {{item.name}} +
    • + +
    +
  • +
  • +
    Layouts +
    +
      +
    • + {{item.name}} +
    • + +
    +
  • +
+
+
+ +
+ + diff --git a/packages/ncform-theme-elementui/examples/layout-comps/object.html b/packages/ncform-theme-elementui/examples/layout-comps/object.html index b70a562..1ed929c 100755 --- a/packages/ncform-theme-elementui/examples/layout-comps/object.html +++ b/packages/ncform-theme-elementui/examples/layout-comps/object.html @@ -1,233 +1,266 @@ + + + object widget - - - object widget + - + + + - - - - - - - -
-
-

{{item.title}}

-
-
- - value: {{item.schema.value}} -
-
-
{{JSON.stringify(originFormSchemas[idx].schema.properties, null, 2)}}
-
-
-
{{item.detail}}
+ + +
+
+

{{ item.title }}

+
+
+ + value: {{ item.schema.value }} +
+
+
{{ JSON.stringify(originFormSchemas[idx].schema.properties, null, 2) }}
+
+
+
{{ item.detail }}
+
-
- - - - - - - + + + + + + + - - + // Bootstrap the app + new Vue({ + el: '#demo', + data: { + formSchemas: getFormSchemas(), + originFormSchemas: getFormSchemas() + } + }); + function getFormSchemas() { + return formSchemas.map(item => ({ + title: item.title[lang], + schema: item.schema, + detail: item.detail ? item.detail[lang] : '' + })); + } + +