tiny-engine icon indicating copy to clipboard operation
tiny-engine copied to clipboard

feat(TinyTabs): 选项卡组件配置项的modelValue改为select组件,且其options随着选项卡而变化

Open betterdancing opened this issue 1 year ago • 4 comments

English | 简体中文

PR

PR Checklist

Please check if your PR fulfills the following requirements:

  • [x] The commit message follows our Commit Message Guidelines
  • [ ] Tests for the changes have been added (for bug fixes / features)
  • [ ] Docs have been added / updated (for bug fixes / features)
  • [ ] Built its own designer, fully self-validated

PR Type

What kind of change does this PR introduce?

  • [ ] Bugfix
  • [x] Feature
  • [ ] Code style update (formatting, local variables)
  • [ ] Refactoring (no functional changes, no api changes)
  • [ ] Build related changes
  • [ ] CI related changes
  • [ ] Documentation content changes
  • [ ] Other... Please describe:

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?

  • [x] Yes
  • [ ] No

Other information

Summary by CodeRabbit

  • New Features

    • Enhanced property management with new functions for handling property values, visibility, and props.
    • Improved component configuration with dynamic default values and better alignment settings.
    • Added support for tabs configuration with predefined labels and values.
  • Bug Fixes

    • Fixed issues with property updates and event handling to ensure smoother user interactions.
  • Improvements

    • Updated UI components for better usability, including clearer label positioning and dynamic default values.
    • Enhanced schema initialization with updated model values and tab properties.
  • Tests

    • Added comprehensive test cases for new utility functions to ensure robust functionality and reliability.

betterdancing avatar Apr 22 '24 09:04 betterdancing

image 建议删除当前选项卡后选中第一个选项卡

已解决

betterdancing avatar May 10 '24 09:05 betterdancing

Bot detected the issue body's language is not English, translate it automatically.


![image](https://private-user-images.githubusercontent.com/18585869/329513316-a47da568-a664-4242-8f47-d223cf96e446.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..Q7xEM 4_h0MkvN5nZ8gtPQ8qhekoPejLr4klwgx-DLhQ) It is recommended to delete the current tab Then select the first tab

solved

Issues-translate-bot avatar May 10 '24 09:05 Issues-translate-bot

Bot detected the issue body's language is not English, translate it automatically.


![image](https://private-user-images.githubusercontent.com/18585869/329513316-a47da568-a664-4242-8f47-d223cf96e446.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..Q7xEM 4_h0MkvN5nZ8gtPQ8qhekoPejLr4klwgx-DLhQ) It is recommended to delete the current tab Then select the first tab

Issues-translate-bot avatar May 10 '24 09:05 Issues-translate-bot

Walkthrough

The 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

File Path Change Summary
mockServer/assets/json/bundle.json Updated event handlers, property configurations, and component settings.
packages/common/component/ConfigItem.vue Added setPropertyProps to property manipulation functions.
packages/common/component/MetaContainer.vue Added props, emits, new methods, and a watcher for children value changes.
packages/common/component/MetaSelect.vue Set clearable prop's default value dynamically based on the property value.
packages/controller/src/useProperties.js Introduced functions for property management.
packages/design-core/public/mock/bundle.json Adjusted event handlers, property settings, and component configurations.
packages/utils/src/utils/index.js Added isOmitValue and delNullKey functions for value filtering.
packages/utils/test/delNullKey.test.js Added test cases for the delNullKey function.
packages/utils/test/isOmitValue.test.js Added test cases for the isOmitValue function.

🐇 In the realm of code so bright, Changes came to set things right. Event handlers, properties anew, Components polished, shining through. Utilities fine-tuned with care, Now our code's beyond compare. Hoppy coding, one and all, Let's celebrate, both big and small! 🌟


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?

Share
Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai generate interesting stats about this repository and render them as a table.
    • @coderabbitai show all the console.log statements in this repository.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

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)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger a review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai help to get help.

Additionally, you can add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.

CodeRabbit Configration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

coderabbitai[bot] avatar May 20 '24 04:05 coderabbitai[bot]