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(bottom-navigation): add placeholder prop #1618

Open
wants to merge 7 commits into
base: dev
Choose a base branch
from

Conversation

YHoney7
Copy link
Member

@YHoney7 YHoney7 commented May 9, 2024

Checklist

List of tasks you have already done and plan to do.

  • Fix linting errors
  • Tests have been added / updated (or snapshots)

Change information

Describe your modifications here.

Issues

The issues you want to close, formatted as close #1.

Related Links

Links related to this pr.

Copy link

vercel bot commented May 9, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
varlet ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 16, 2024 1:35pm

Copy link

vercel bot commented May 9, 2024

@YHoney7 is attempting to deploy a commit to the varletjs Team on Vercel.

A member of the Team first needs to authorize it.

@chouchouji
Copy link
Member

还需要修改 types 的 对应文件

@YHoney7
Copy link
Member Author

YHoney7 commented May 11, 2024

好的

@@ -25,6 +26,8 @@
<slot name="fab"></slot>
</var-button>
</div>

<div v-if="fixed && placeholder" :class="n('--placeholder')" :style="{ height: placeholderHeight }" />
Copy link
Member

Choose a reason for hiding this comment

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

--placeholder -> placeholder

import { onSmartMounted } from '@varlet/use'
import { type BottomNavigationItemProvider } from '../bottom-navigation-item/provide'

const { name, n, classes } = createNamespace('bottom-navigation')
const { n: nItem } = createNamespace('bottom-navigation-item')
const { n: nFab } = createNamespace('bottom-navigation__fab')
Copy link
Member

Choose a reason for hiding this comment

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

这个没有必要

@@ -81,6 +86,8 @@ export default defineComponent({
)

onSmartMounted(() => {
setPlaceholderHeight()
Copy link
Member

Choose a reason for hiding this comment

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

更名为 resizePlaceholder

@@ -201,6 +201,7 @@ const active = ref(0)
| `z-index` | Z-index | _number \| string_ | `1` |
| `active-color` | Color of active tab item | _string_ | `-` |
| `inactive-color` | Color of inactive tab item | _string_ | `-` |
| `placeholder` ***3.2.10*** | Whether to generate placeholder elements of the same height at the bottom (`fixed` required) | _boolean_ | `false` |
Copy link
Member

Choose a reason for hiding this comment

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

版本号也修改一下,预计在 3.2.11 发布。

Copy link
Member Author

Choose a reason for hiding this comment

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

好的

return
}

const bottomRect = getRect(bottomNavigationDom.value!)
Copy link
Member

Choose a reason for hiding this comment

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

bottomRect -> bottomNavigationRect

Copy link

codecov bot commented May 16, 2024

Codecov Report

Attention: Patch coverage is 83.33333% with 2 lines in your changes are missing coverage. Please review.

Project coverage is 92.75%. Comparing base (560af0c) to head (254e604).
Report is 12 commits behind head on dev.

Files Patch % Lines
...rlet-ui/src/bottom-navigation/BottomNavigation.vue 83.33% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##              dev    #1618      +/-   ##
==========================================
- Coverage   92.84%   92.75%   -0.10%     
==========================================
  Files         306      306              
  Lines        7172     7193      +21     
  Branches     1785     1790       +5     
==========================================
+ Hits         6659     6672      +13     
- Misses        447      454       +7     
- Partials       66       67       +1     

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

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.

None yet

3 participants