Skip to content
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

Merged
merged 57 commits into from
Nov 29, 2022
Merged

Feat/collection templates #1124

merged 57 commits into from
Nov 29, 2022

Conversation

katherinehhh
Copy link
Contributor

No description provided.

## Register

```ts
yarn pm add custom-collection-template
Copy link
Contributor

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
Copy link
Contributor

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) => {
Copy link
Contributor

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;
}
});
Copy link
Contributor

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",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

上面这几个要改成通俗的英文文案

@CLAassistant
Copy link

CLAassistant commented Nov 28, 2022

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you all sign our Contributor License Agreement before we can accept your contribution.
3 out of 4 committers have signed the CLA.

✅ chenos
✅ katherinehhh
✅ chareice
❌ test555
You have signed the CLA already but the status is still pending? Let us recheck it.

@chenos chenos merged commit 4085ed0 into main Nov 29, 2022
@chenos chenos deleted the feat/collection-templates branch November 29, 2022 03:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants