mirror of
https://github.com/nocobase/nocobase
synced 2024-11-15 21:37:15 +00:00
1.2 KiB
1.2 KiB
How to extend fields
The composition of a Collection Field in NocoBase consists of
Extend Field Type
For example, to extend the password type field ``type: 'password'`
export class MyPlugin extends Plugin {
beforeLoad() {
this.db.registerFieldTypes({
password: PasswordField
});
}
}
export class PasswordField extends Field {
get dataType() {
return DataTypes.STRING;
}
}
- More implementations of the built-in field types can be found here
- Also see the full samples plugin packages/samples/shop-modeling
Extend Field Component
Related extension documentation can be found at