-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feat/collection templates #1124
Conversation
## Register | ||
|
||
```ts | ||
yarn pm add custom-collection-template |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yarn pm add sample-custom-collection-template
## Activate | ||
|
||
```bash | ||
yarn pm enable scustom-collection-template |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yarn pm enable sample-custom-collection-template
}; | ||
}; | ||
|
||
const useDefaltCollectionFields = (fields, values) => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
拼写错误 Default
} else { | ||
return typeof values[v.name] === 'boolean' ? values[v.name] : true; | ||
} | ||
}); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
useDefaultCollectionFields 的逻辑不对
const useDefaultCollectionFields = (fields, options) => {
let defaults = [];
const { autoGenId = true, createdAt = true } = options;
if (autoGenId) {
const pk = fields.find((f) => f.primaryKey);
if (!pk) {
defaults.push({
name: 'id',
});
}
}
if (createdAt) {
defaults.push({
name: 'createdAt',
});
}
// 其他
return defaults;
}
"UpdatedBy":"UpdatedBy", | ||
"CreatedAt":"CreatedAt", | ||
"UpdatedAt":"UpdatedAt", | ||
"Sortable":"Sortable", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
上面这几个要改成通俗的英文文案
|
No description provided.