nocobase/docs/en-US/development/server/collections/field-extension.md
chenos 98259e88a1
feat: update docs (#1006)
* feat: update docs

* feat: update docs

* feat: update docs
2022-11-02 11:33:07 +08:00

1.1 KiB

字段扩展

在 NocoBase 中 Collection Field 的构成包括:

Field Type 扩展

例如扩展密码类型字段 type: 'password'

export class MyPlugin extends Plugin {
  beforeLoad() {
    this.db.registerFieldTypes({
      password: PasswordField
    });
  }
}

export class PasswordField extends Field {
  get dataType() {
    return DataTypes.STRING;
  }
}

Field Component 扩展

相关扩展文档查看:

Field Interface 扩展