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

docs(Tab): refine the description of 'props' #12935

Merged
merged 2 commits into from
Jun 14, 2024

Conversation

pany-ang
Copy link
Contributor

@pany-ang pany-ang commented Jun 14, 2024

根据以下 Tabs.tsx 的源码,完善文档对应 ellipsis 和 swipe-threshold 的描述:

    const scrollable = computed(
      () =>
        children.length > +props.swipeThreshold ||
        !props.ellipsis ||
        props.shrink,
    );

根据以下 Badge.tsx 的源码,完善文档对应 badg 的描述:

    const renderContent = () => {
      const { dot, max, content } = props;

      if (!dot && hasContent()) {
        if (slots.content) {
          return slots.content();
        }

        if (isDef(max) && isNumeric(content!) && +content > +max) {
          return `${max}+`;
        }

        return content;
      }
    };

@pany-ang
Copy link
Contributor Author

有关联的 issue: #12738

@codecov-commenter
Copy link

codecov-commenter commented Jun 14, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 88.83%. Comparing base (7898140) to head (60f2f64).

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #12935      +/-   ##
==========================================
+ Coverage   88.80%   88.83%   +0.02%     
==========================================
  Files         257      257              
  Lines        6977     6977              
  Branches     1718     1718              
==========================================
+ Hits         6196     6198       +2     
+ Misses        439      437       -2     
  Partials      342      342              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Member

@chenjiahan chenjiahan left a comment

Choose a reason for hiding this comment

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

Thanks!

@chenjiahan chenjiahan merged commit 6d1b953 into youzan:main Jun 14, 2024
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants