-
Notifications
You must be signed in to change notification settings - Fork 300
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(TinyTabs): 选项卡组件配置项的modelValue改为select组件,且其options随着选项卡而变化 #439
base: develop
Are you sure you want to change the base?
feat(TinyTabs): 选项卡组件配置项的modelValue改为select组件,且其options随着选项卡而变化 #439
Conversation
…lace input with select and options vary by tabs;
…abs-modelValue-select
…abs-modelValue-select
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.
solved |
|
WalkthroughThe recent updates include improvements to event handling, property configurations, and component settings across various files. Key changes involve modifying event handlers, refactoring component properties, and introducing new utility functions for managing properties. These enhancements aim to streamline the initialization and manipulation of component properties and values, offering better alignment and dynamic default settings. Changes
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 as PR comments)
Additionally, you can add CodeRabbit Configration File (
|
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: 0
Review Details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (9)
- mockServer/assets/json/bundle.json (6 hunks)
- packages/common/component/ConfigItem.vue (2 hunks)
- packages/common/component/MetaContainer.vue (5 hunks)
- packages/common/component/MetaSelect.vue (3 hunks)
- packages/controller/src/useProperties.js (3 hunks)
- packages/design-core/public/mock/bundle.json (7 hunks)
- packages/utils/src/utils/index.js (2 hunks)
- packages/utils/test/delNullKey.test.js (1 hunks)
- packages/utils/test/isOmitValue.test.js (1 hunks)
Files not reviewed due to errors (5)
- packages/common/component/MetaSelect.vue (no review received)
- packages/common/component/MetaContainer.vue (no review received)
- packages/controller/src/useProperties.js (no review received)
- packages/utils/src/utils/index.js (no review received)
- packages/common/component/ConfigItem.vue (no review received)
Files skipped from review due to trivial changes (1)
- packages/utils/test/delNullKey.test.js
Additional comments not posted (16)
packages/utils/test/isOmitValue.test.js (3)
4-8
: The test cases for null, undefined, and empty string are correctly implemented.
10-13
: The test cases for empty and non-empty arrays are correctly implemented, respecting thekeepRef
parameter.
15-18
: The test cases for empty and non-empty objects are correctly implemented.mockServer/assets/json/bundle.json (6)
4321-4321
: Update inonBeforeMount
looks good.
5835-5835
: Addition ofonChange
handler to dynamically update options is crucial for the feature.Verification successful
The
onChange
handler added inmockServer/assets/json/bundle.json
is correctly integrated and follows the expected pattern. The handler dynamically updates themodelValue
property's options, which aligns with the intended functionality.
- The
onChange
handler is used in multiple places within themockServer/assets/json/bundle.json
file.- The specific handler in question is correctly formatted and integrated.
Scripts Executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify the integration of the `onChange` function. # Test: Search for the usage of `onChange` in the project. Expect: Proper integration and no errors. rg --type json $'onChange'Length of output: 6574
Script:
#!/bin/bash # Description: Extract and review the specific `onChange` handlers in `mockServer/assets/json/bundle.json`. # Extract lines containing `onChange` handlers in the specified file. rg --json --pretty --context 5 'onChange' mockServer/assets/json/bundle.jsonLength of output: 31032
5846-5846
: Change inlabelPosition
to "top" aligns with UI improvements.
5860-5873
: Introduction ofMetaSelect
with predefined options enhances user interaction.Verification successful
The predefined options for the
MetaSelect
component are consistent and correctly implemented across multiple instances in the project.
- Instances of
MetaSelect
with predefined options were found in various JSON files, includingmockServer/assets/json/bundle.json
,mockServer/src/services/appinfo.json
, and others.- The options include values like "标签页1", "标签页2", "top", "right", "left", "card", "checkbox", "button", "medium", "mini", "large", "integer", "index", "ellipsis", "selection", "date", etc.
Scripts Executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify the predefined options for `MetaSelect`. # Test: Search for the predefined options in the project. Expect: Correct and consistent options. rg --type json $'MetaSelect'Length of output: 13951
Script:
#!/bin/bash # Description: Extract and review the predefined options for `MetaSelect` in the identified files. # Extract instances of `MetaSelect` and their options. rg --json --pretty --context 5 '"component": "MetaSelect"' packages/settings/design/src/schemas/gridcolumn.json packages/settings/design/src/schemas/input.json packages/settings/design/src/schemas/tabs.json packages/settings/design/src/schemas/tooltip.json packages/settings/design/src/schemas/popover.json packages/settings/design/src/schemas/grid.json packages/settings/design/src/schemas/form.json packages/settings/design/src/schemas/checkboxgroup.json packages/settings/design/src/schemas/button.json packages/settings/design/src/assets/materials/ng-bundle.json packages/design-core/public/mock/bundle.json packages/canvas/src/components/builtin/builtin.json mockServer/src/services/appinfo.json mockServer/assets/json/bundle.json packages/builtinComponent/src/meta/CanvasRow.json packages/builtinComponent/src/meta/CanvasCol.jsonLength of output: 368272
7552-7552
: EnhancedonBeforeMount
with multiple initializations improves setup efficiency.
9835-9845
: SettingmodelValue
andtabs
forTinyTabs
supports dynamic updates as intended.packages/design-core/public/mock/bundle.json (7)
7038-7038
: The update to theonBeforeMount
event handler looks good and aligns with the PR's objectives.
8532-8540
: The introduction ofMetaSwitch
and the update tolabelPosition
are noted. Please confirm that theMetaSwitch
component aligns with the intended functionality.Verification successful
The introduction of the
MetaSwitch
component in thebundle.json
file is consistent with its extensive usage across the codebase. No issues were found with this change.
- packages/design-core/public/mock/bundle.json
- packages/settings/design/src/schema/carousel.json
- packages/settings/design/src/schemas/form.json
- packages/settings/design/src/schemas/input.json
- packages/settings/design/src/schemas/search.json
- packages/settings/design/src/schemas/tabs.json
- packages/settings/design/src/schemas/time-line.json
- packages/settings/design/src/schemas/switch.json
- packages/settings/design/src/schemas/tree.json
- packages/settings/design/src/schemas/select.json
- packages/settings/design/src/schemas/radio.json
- packages/settings/design/src/schemas/gridcolumn.json
- packages/settings/design/src/schemas/grid.json
- packages/settings/design/src/schemas/popover.json
- packages/settings/design/src/schemas/formitem.json
- packages/settings/design/src/schemas/dialogbox.json
- packages/settings/design/src/schemas/popeditor.json
- packages/settings/design/src/schemas/checkboxgroup.json
- packages/settings/design/src/schemas/checkboxbutton.json
- packages/settings/design/src/schemas/checkbox.json
- packages/settings/design/src/schemas/button.json
- packages/settings/design/src/assets/materials/ng-components/checkbox.json
- packages/settings/design/src/assets/materials/ng-components/image.json
- packages/settings/design/src/assets/materials/ng-bundle.json
- packages/settings/design/src/assets/materials/ng-components/tablefilter.json
- packages/settings/design/src/assets/materials/ng-components/tag.json
- packages/settings/design/src/assets/materials/ng-components/tab.json
- packages/settings/design/src/assets/materials/ng-components/table.json
- packages/settings/design/src/assets/materials/ng-components/swiper.json
- packages/settings/design/src/assets/materials/ng-components/select.json
- packages/settings/design/src/assets/materials/ng-components/radio.json
- packages/settings/design/src/assets/materials/ng-components/halfmodal.json
- packages/settings/design/src/assets/materials/ng-components/formfield.json
- packages/settings/design/src/assets/materials/ng-components/form.json
- packages/settings/design/src/assets/materials/ng-components/date.json
- packages/settings/design/src/assets/materials/ng-components/daterange.json
- packages/settings/design/src/assets/materials/ng-components/button.json
- packages/settings/design/src/assets/materials/ng-components/container.json
- packages/settings/design/src/assets/materials/ng-components/alert.json
- packages/settings/design/src/assets/materials/ng-components/accordion.json
- packages/settings/design/src/assets/materials/ng-components/switch.json
- packages/builtinComponent/src/meta/CanvasCol.json
- packages/canvas/test/form.json
- mockServer/src/services/appinfo.json
- packages/canvas/src/components/builtin/builtin.json
- mockServer/assets/json/bundle.json
Scripts Executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify the introduction of `MetaSwitch` in other parts of the codebase. # Test: Search for `MetaSwitch` usage. Expect: Consistent usage across the application. rg --type json $'MetaSwitch'Length of output: 47845
8552-8552
: The addition of theonChange
event handler to dynamically updatemodelValue
properties is a solid enhancement.
8563-8563
: SettinglabelPosition
to "top" formodelValue
enhances UI consistency.
8577-8595
: The introduction ofMetaSelect
with predefined options for tabs aligns perfectly with the PR's objectives to enhance user experience.
10269-10269
: The update to theonBeforeMount
event handler to initialize multiple properties is a good optimization.
13622-13632
: Setting predefined values formodelValue
andtabs
enhances the dynamic configuration capabilities of the component.
English | 简体中文
PR
PR Checklist
Please check if your PR fulfills the following requirements:
PR Type
What kind of change does this PR introduce?
Background and solution
What is the current behavior?
选项卡tabs组件默认选中的标签页modelValue需要用户手动填写,体验不友好
Issue Number: N/A
What is the new behavior?
选项卡tabs组件默认选中的标签页modelValue改为下拉选择,且options随着新增或删除选项卡时同步变化
Does this PR introduce a breaking change?
Other information
Summary by CodeRabbit
New Features
Bug Fixes
Improvements
Tests