Compare commits

...

6 Commits

Author SHA1 Message Date
chenjiahan
5b3c4f1546 style: update van doc background 2022-02-09 11:34:25 +08:00
chenjiahan
25302fb333 Merge branch 'dev' into next 2022-02-09 11:20:28 +08:00
neverland
daa8e4b9bb
types(Toast): fix missing teleport prop (#10272) 2022-02-09 10:35:15 +08:00
neverland
73af4437de
feat(CollapseItem): add lazy-render prop (#10270) 2022-02-09 10:14:21 +08:00
neverland
0cb6382b9c
docs: update npm shields link (#10268) 2022-02-08 15:38:14 +08:00
neverland
506e2a9030
docs: update site subtitle (#10267) 2022-02-08 15:16:03 +08:00
12 changed files with 35 additions and 20 deletions

View File

@ -7,7 +7,7 @@
<p align="center">Mobile UI Components built on Vue</p>
<p align="center">
<img src="https://img.shields.io/npm/v/vant/next?style=flat-square" alt="npm version" />
<img src="https://img.shields.io/npm/v/vant?style=flat-square" alt="npm version" />
<img src="https://img.shields.io/github/workflow/status/youzan/vant/CI/dev?style=flat-square" alt="CI Status" />
<img src="https://img.shields.io/codecov/c/github/youzan/vant/dev.svg?style=flat-square&color=#4fc08d" alt="Coverage Status" />
<img src="https://img.shields.io/npm/dm/vant.svg?style=flat-square&color=#4fc08d" alt="downloads" />

View File

@ -7,7 +7,7 @@
<p align="center">轻量、可靠的移动端 Vue 组件库</p>
<p align="center">
<img src="https://img.shields.io/npm/v/vant/next?style=flat-square" alt="npm version" />
<img src="https://img.shields.io/npm/v/vant?style=flat-square" alt="npm version" />
<img src="https://img.shields.io/github/workflow/status/youzan/vant/CI/dev?style=flat-square" alt="CI Status" />
<img src="https://img.shields.io/codecov/c/github/youzan/vant/dev.svg?style=flat-square&color=#4fc08d" alt="Coverage Status" />
<img src="https://img.shields.io/npm/dm/vant.svg?style=flat-square&color=#4fc08d" alt="downloads" />

View File

@ -32,7 +32,7 @@ body {
--van-doc-link-color: var(--van-doc-blue);
// background
--van-doc-background: #eeeff2;
--van-doc-background: #eff2f5;
--van-doc-background-2: var(--van-doc-white);
--van-doc-background-3: var(--van-doc-white);
--van-doc-header-background: #011f3c;

View File

@ -4,7 +4,10 @@
<div class="van-doc-header__top">
<a class="van-doc-header__logo">
<img :src="config.logo" />
<span>{{ config.title }}</span>
<span class="van-doc-header__title">{{ config.title }}</span>
<span v-if="config.subtitle" class="van-doc-header__subtitle">
{{ config.subtitle }}
</span>
</a>
<ul class="van-doc-header__top-nav">
@ -275,21 +278,27 @@ export default {
&__logo {
display: block;
img,
span {
display: inline-block;
vertical-align: middle;
}
img {
display: inline-block;
width: 28px;
margin-right: 12px;
vertical-align: middle;
}
}
span {
color: #fff;
font-size: 22px;
}
&__title {
display: inline-block;
color: #fff;
font-size: 22px;
vertical-align: middle;
}
&__subtitle {
display: inline-block;
color: #999;
margin-left: 8px;
vertical-align: -4px;
font-size: 13px;
}
&__link {

View File

@ -20,7 +20,7 @@ Vant follows [Semantic Versioning 2.0.0](https://semver.org/lang/zh-CN/).
`2022-02-07`
- Vant 3 对应的 npm tag 切换为 `latest`
- switch default npm tag to `latest`
### [v3.4.3](https://github.com/compare/v3.4.2...v3.4.3)

View File

@ -20,7 +20,7 @@ Vant 遵循 [Semver](https://semver.org/lang/zh-CN/) 语义化版本规范。
`2022-02-07`
- switch default npm tag to `latest`
- Vant 3 对应的 npm tag 切换为 `latest`
### [v3.4.3](https://github.com/compare/v3.4.2...v3.4.3)

View File

@ -8,7 +8,7 @@
### Picker 组件重构
在之前的版本中Picker 组件的 API 设计存在较大问题,比如:
在之前的版本中Picker 组件的 API 设计存在一些不合理的设计,比如:
- columns 数据格式定义不合理,容易产生误解
- 数据流不清晰,暴露了过多的实例方法来对数据进行操作

View File

@ -35,6 +35,7 @@ const collapseItemProps = extend({}, cellSharedProps, {
isLink: truthProp,
disabled: Boolean,
readonly: Boolean,
lazyRender: truthProp,
});
export type CollapseItemProps = ExtractPropTypes<typeof collapseItemProps>;
@ -62,7 +63,7 @@ export default defineComponent({
const expanded = computed(() => parent.isExpanded(name.value));
const show = ref(expanded.value);
const lazyRender = useLazyRender(show);
const lazyRender = useLazyRender(() => show.value || !props.lazyRender);
const onTransitionEnd = () => {
if (!expanded.value) {

View File

@ -138,6 +138,7 @@ export default {
| disabled | Whether to disabled collapse | _boolean_ | `false` |
| readonly `v3.0.12` | Whether to be readonly | _boolean_ | `false` |
| is-link | Whether to show link icon | _boolean_ | `true` |
| lazy-render `v3.4.5` | Whether to lazy render util opened | _boolean_ | `true` |
| title-class | Title className | _string_ | - |
| value-class | Value className | _string_ | - |
| label-class | Label className | _string_ | - |

View File

@ -154,6 +154,7 @@ export default {
| is-link | 是否展示标题栏右侧箭头并开启点击反馈 | _boolean_ | `true` |
| disabled | 是否禁用面板 | _boolean_ | `false` |
| readonly `v3.0.12` | 是否为只读状态,只读状态下无法操作面板 | _boolean_ | `false` |
| lazy-render `v3.4.5` | 是否在首次展开时才渲染面板内容 | _boolean_ | `true` |
| title-class | 左侧标题额外类名 | _string_ | - |
| value-class | 右侧内容额外类名 | _string_ | - |
| label-class | 描述信息额外类名 | _string_ | - |

View File

@ -33,6 +33,7 @@ const [name, bem] = createNamespace('toast');
const popupInheritProps = [
'show',
'overlay',
'teleport',
'transition',
'overlayClass',
'overlayStyle',

View File

@ -28,7 +28,8 @@ export default {
},
locales: {
'zh-CN': {
title: 'Vant',
title: 'Vant 3',
subtitle: '(适用于 Vue 3',
description: '轻量、可靠的移动端组件库',
logo: 'https://img.yzcdn.cn/vant/logo.png',
langLabel: '中',
@ -469,7 +470,8 @@ export default {
],
},
'en-US': {
title: 'Vant',
title: 'Vant 3',
subtitle: ' (for Vue 3)',
description: 'Mobile UI Components built on Vue',
logo: 'https://img.yzcdn.cn/vant/logo.png',
langLabel: 'EN',