-
Notifications
You must be signed in to change notification settings - Fork 7.2k
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: form colon
support, update docs
#5156
Conversation
|
Warning There were issues while running some tools. Please review the errors and either fix the tool’s configuration or disable the tool if it’s a critical failure. 🔧 eslint
packages/@core/ui-kit/form-ui/src/form-render/form-field.vueOops! Something went wrong! :( ESLint: 9.16.0 Error [ERR_MODULE_NOT_FOUND]: Cannot find module '/node_modules/@vben/eslint-config/dist/index.mjs' imported from /eslint.config.mjs WalkthroughThis pull request introduces enhancements to the Vben Form component documentation and implementation. The changes focus on improving form configuration flexibility, particularly by adding a new Changes
Possibly related PRs
Suggested labels
Suggested reviewers
Poem
Tip CodeRabbit's docstrings feature is now available as part of our Early Access Program! Simply use the command Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
colon
supportcolon
support, update docs
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.
Actionable comments posted: 1
🧹 Nitpick comments (1)
packages/@core/ui-kit/form-ui/src/form-render/form-field.vue (1)
29-29
: Consider adding explicit type definition for thecolon
prop.The
colon
prop would benefit from an explicit boolean type definition with JSDoc comments explaining its purpose.- colon, + /** Whether to display a colon after the label */ + colon?: boolean,
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (5)
docs/src/components/common-ui/vben-form.md
(6 hunks)packages/@core/ui-kit/form-ui/src/form-render/form-field.vue
(2 hunks)packages/@core/ui-kit/form-ui/src/form-render/form.vue
(2 hunks)packages/@core/ui-kit/form-ui/src/types.ts
(1 hunks)playground/src/views/examples/form/basic.vue
(2 hunks)
🔇 Additional comments (9)
packages/@core/ui-kit/form-ui/src/form-render/form.vue (2)
89-91
: LGTM: Colon property initialization looks good
The colon property is properly initialized with a sensible default value of false and correctly merged from both commonConfig and globalCommonConfig.
114-114
: LGTM: Proper property propagation
The colon property is correctly propagated to individual form fields while maintaining the ability to override at the schema level.
packages/@core/ui-kit/form-ui/src/types.ts (1)
139-142
: LGTM: Well-documented type definition
The colon property is properly typed as an optional boolean with clear JSDoc documentation explaining its purpose.
playground/src/views/examples/form/basic.vue (1)
19-20
: LGTM: Clear example implementation
The colon property is properly demonstrated with a helpful comment explaining its purpose.
packages/@core/ui-kit/form-ui/src/form-render/form-field.vue (1)
304-307
: LGTM! Clean implementation of the colon feature.
The conditional rendering and spacing are well implemented, ensuring the colon only appears when appropriate.
docs/src/components/common-ui/vben-form.md (4)
316-316
: LGTM! Clear documentation of the collapsed
prop dependency.
The documentation effectively communicates the relationship between collapsed
and showCollapseButton
props.
319-319
: LGTM! Clear explanation of the fieldMappingTime
mapping functionality.
The documentation effectively describes how the time range values are mapped to separate fields.
321-323
: LGTM! Clear documentation of form submission behavior.
The documentation effectively describes the schema type and form submission triggers.
364-367
: LGTM! Well-documented colon property in FormCommonConfig.
The documentation clearly explains the purpose of the colon property for form labels.
Description
表单支持配置是否在label后显示一个冒号
Type of change
Please delete options that are not relevant.
pnpm-lock.yaml
unless you introduce a new test example.Checklist
pnpm run docs:dev
command.pnpm test
.feat:
,fix:
,perf:
,docs:
, orchore:
.Summary by CodeRabbit
New Features
colon
to control the display of colons after form labels.Documentation
Bug Fixes
Chores