cipchk / nz-schema-form

ng-zorro-antd form generation based on JSON-Schema
MIT License
40 stars 14 forks source link

select部件使用远程数据时,出现如下错误 #51

Closed iwantacook closed 6 years ago

iwantacook commented 6 years ago

Property 'refreshSchema' does not exist on type 'FormComponent'

<nz-sf [schema]="schema" [model]="model" [actions]="actions">
        </nz-sf>

@ViewChild('sf') sf: FormComponent;

this.schema.properties.ic_id.enum = res;
this.sf.refreshSchema();

ic_id: {
                type: 'string',
                title: '物料',
                description: '请选择物料名称。',
                widget: 'select',
                enum: []
            },

还有两个问题: 1、是否需要添加#sf到html代码中去? 2、Property 'refreshSchema' does not exist on type 'FormComponent'

版本: "ng-alain": "0.8.0", "nz-schema-form": "^0.0.1",

cipchk commented 6 years ago

当然。

iwantacook commented 6 years ago

补充一下,应该是版本需要更新到0.1.0 "nz-schema-form": "0.1.0",