Merge branch 'dev' into next
This commit is contained in:
@@ -242,7 +242,7 @@ export default {
|
||||
| lazy-render | 是否开启延迟渲染(首次切换到标签时才触发内容渲染) | _boolean_ | `true` |
|
||||
| scrollspy `v2.3.0` | 是否开启滚动导航 | _boolean_ | `false` |
|
||||
| offset-top `v2.8.7` | 粘性定位布局下与顶部的最小距离,支持 `px` `vw` `rem` 单位,默认 `px` | _number \| string_ | `0` |
|
||||
| swipe-threshold | 滚动阈值,标签数量超过阈值时开始横向滚动 | _number \| string_ | `5` |
|
||||
| swipe-threshold | 滚动阈值,标签数量超过阈值且总宽度超过标签栏宽度时开始横向滚动 | _number \| string_ | `5` |
|
||||
| title-active-color | 标题选中态颜色 | _string_ | - |
|
||||
| title-inactive-color | 标题默认态颜色 | _string_ | - |
|
||||
| before-change `v2.9.3` | 切换标签前的回调函数,返回 `false` 可阻止切换,支持返回 Promise | _(name) => boolean \| Promise_ | - |
|
||||
|
||||
+3
-2
@@ -60,11 +60,12 @@ export default createComponent({
|
||||
);
|
||||
|
||||
return () => {
|
||||
if (!slots.default) {
|
||||
const { animated, swipeable, scrollspy, lazyRender } = parent.props;
|
||||
|
||||
if (!slots.default && !animated) {
|
||||
return;
|
||||
}
|
||||
|
||||
const { animated, swipeable, scrollspy, lazyRender } = parent.props;
|
||||
const active = isActive();
|
||||
const show = scrollspy || active;
|
||||
|
||||
|
||||
@@ -1,5 +1,21 @@
|
||||
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
||||
|
||||
exports[`badge prop 1`] = `
|
||||
<div class="van-tabs van-tabs--line">
|
||||
<div class="van-tabs__wrap">
|
||||
<div role="tablist" class="van-tabs__nav van-tabs__nav--line">
|
||||
<div role="tab" aria-selected="true" class="van-tab van-tab--active"><span class="van-tab__text-wrapper"><span class="van-tab__text van-tab__text--ellipsis"></span>
|
||||
<div class="van-info">10</div>
|
||||
</span></div>
|
||||
<div class="van-tabs__line"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="van-tabs__content">
|
||||
<div role="tabpanel" class="van-tab__pane">Text</div>
|
||||
</div>
|
||||
</div>
|
||||
`;
|
||||
|
||||
exports[`border props 1`] = `
|
||||
<div class="van-tabs van-tabs--line">
|
||||
<div class="van-tabs__wrap">
|
||||
|
||||
Reference in New Issue
Block a user