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
base: dev
Are you sure you want to change the base?
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
@YHoney7 is attempting to deploy a commit to the varletjs Team on Vercel. A member of the Team first needs to authorize it. |
还需要修改 types 的 对应文件 |
好的 |
@@ -25,6 +26,8 @@ | |||
<slot name="fab"></slot> | |||
</var-button> | |||
</div> | |||
|
|||
<div v-if="fixed && placeholder" :class="n('--placeholder')" :style="{ height: placeholderHeight }" /> |
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.
--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') |
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.
这个没有必要
@@ -81,6 +86,8 @@ export default defineComponent({ | |||
) | |||
|
|||
onSmartMounted(() => { | |||
setPlaceholderHeight() |
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.
更名为 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` | |
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.
版本号也修改一下,预计在 3.2.11 发布。
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.
好的
return | ||
} | ||
|
||
const bottomRect = getRect(bottomNavigationDom.value!) |
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.
bottomRect -> bottomNavigationRect
Codecov ReportAttention: Patch coverage is
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. |
Checklist
List of tasks you have already done and plan to do.
Change information
Describe your modifications here.
Issues
The issues you want to close, formatted as close #1.
Related Links
Links related to this pr.