Elemnt ui 组件封装(form)






formConfig配置

formConfig: {
        inline: true,
        size: "normal",
        labelWidth: '100',
        width: '180',
        formItemList: [
          {label: '商品名称',prop: 'name',type: 'input', placeholder: '请输入商品名称'},
          {label: '进价',prop: 'incode',type: 'input', placeholder: '请输入进价'},
          {label: '售价',prop: 'expend',type: 'input', placeholder: '请输入售价'},
          {label: '库存数量',prop: 'number',type: 'input', placeholder: '请输入库存数量'},
          {label: '商品描述',prop: 'remark',type: 'input', placeholder: '请输入商品描述'},
          {label: '供应商',prop: 'resource',type: 'input', placeholder: '请输入供应商'}
        ],
        operate: [
          {type: 'primary',icon: '',name: '取消',size: 'normal',handleClick: function() {}},
          {type: 'primary',icon: '',name: '确定',size: 'normal',handleClick: (form) => {
            this.handleSubmit(form);
          }},
        ]
      }