mirror of
https://gitee.com/vant-contrib/vant.git
synced 2026-07-14 09:41:05 +08:00
Compare commits
3 Commits
1c1e2e3b27
...
58fb3402b6
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
58fb3402b6 | ||
|
|
33ba747071 | ||
|
|
81d36aa9ac |
@ -6,6 +6,7 @@
|
||||
"lint": "pnpm --dir ./packages/vant lint",
|
||||
"test": "pnpm --dir ./packages/vant test",
|
||||
"test:watch": "pnpm --dir ./packages/vant test:watch",
|
||||
"test:update": "pnpm --dir ./packages/vant test:update",
|
||||
"build": "pnpm --dir ./packages/vant build",
|
||||
"build:site": "pnpm --dir ./packages/vant build:site"
|
||||
},
|
||||
|
||||
@ -19,6 +19,20 @@ Vant follows [Semantic Versioning 2.0.0](https://semver.org/lang/zh-CN/).
|
||||
|
||||
## Details
|
||||
|
||||
### [v4.1.2](https://github.com/vant-ui/vant/compare/v4.1.1...v4.1.2)
|
||||
|
||||
`2023-03-26`
|
||||
|
||||
**Feature**
|
||||
|
||||
- Locale: add Khmer translations [#11701](https://github.com/vant-ui/vant/issues/11701)
|
||||
|
||||
**Bug Fixes**
|
||||
|
||||
- Field: label-align top works well with label-width [#11684](https://github.com/vant-ui/vant/issues/11684)
|
||||
- Field: should emit blur event when readonly [#11699](https://github.com/vant-ui/vant/issues/11699)
|
||||
- ImagePreview: long vertical images sliding up and down [#11702](https://github.com/vant-ui/vant/issues/11702)
|
||||
|
||||
### [v4.1.1](https://github.com/vant-ui/vant/compare/v4.1.0...v4.1.1)
|
||||
|
||||
`2023-03-19`
|
||||
|
||||
@ -19,6 +19,20 @@ Vant 遵循 [Semver](https://semver.org/lang/zh-CN/) 语义化版本规范。
|
||||
|
||||
## 更新内容
|
||||
|
||||
### [v4.1.2](https://github.com/vant-ui/vant/compare/v4.1.1...v4.1.2)
|
||||
|
||||
`2023-03-26`
|
||||
|
||||
**Feature**
|
||||
|
||||
- Locale: 增加 Khmer 高棉语 [#11701](https://github.com/vant-ui/vant/issues/11701)
|
||||
|
||||
**Bug Fixes**
|
||||
|
||||
- Field: 修复同时设置 label-align "top" 和 is-link 时样式错误的问题 [#11684](https://github.com/vant-ui/vant/issues/11684)
|
||||
- Field: 修复设置 readonly 属性后无法触发 blur 事件的问题 [#11699](https://github.com/vant-ui/vant/issues/11699)
|
||||
- ImagePreview: 修复长图片上下拖动不顺滑的问题 [#11702](https://github.com/vant-ui/vant/issues/11702)
|
||||
|
||||
### [v4.1.1](https://github.com/vant-ui/vant/compare/v4.1.0...v4.1.1)
|
||||
|
||||
`2023-03-19`
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "vant",
|
||||
"version": "4.1.1",
|
||||
"version": "4.1.2",
|
||||
"description": "Mobile UI Components built on Vue",
|
||||
"main": "lib/vant.cjs.js",
|
||||
"module": "es/index.mjs",
|
||||
|
||||
@ -243,16 +243,34 @@ Use `input-align` prop to align the input value.
|
||||
|
||||
### Label Align
|
||||
|
||||
Use `label-align` prop to align the input value.
|
||||
Use `label-align` prop to align the input value, can be set to `center`, `right` or `top`.
|
||||
|
||||
```html
|
||||
<van-cell-group inset>
|
||||
<van-field
|
||||
v-model="value"
|
||||
label="Tel"
|
||||
placeholder="Please input tel number"
|
||||
label="Label"
|
||||
placeholder="Align Top"
|
||||
label-align="top"
|
||||
/>
|
||||
<van-field
|
||||
v-model="value2"
|
||||
label="Label"
|
||||
placeholder="Align Left"
|
||||
label-align="left"
|
||||
/>
|
||||
<van-field
|
||||
v-model="value3"
|
||||
label="Label"
|
||||
placeholder="Align Center"
|
||||
label-align="center"
|
||||
/>
|
||||
<van-field
|
||||
v-model="value4"
|
||||
label="Label"
|
||||
placeholder="Align Right"
|
||||
label-align="right"
|
||||
/>
|
||||
</van-cell-group>
|
||||
```
|
||||
|
||||
|
||||
@ -268,10 +268,28 @@ export default {
|
||||
<van-cell-group inset>
|
||||
<van-field
|
||||
v-model="value"
|
||||
label="手机号"
|
||||
placeholder="请输入手机号"
|
||||
label="文本"
|
||||
placeholder="顶部对齐"
|
||||
label-align="top"
|
||||
/>
|
||||
<van-field
|
||||
v-model="value2"
|
||||
label="文本"
|
||||
placeholder="左对齐"
|
||||
label-align="left"
|
||||
/>
|
||||
<van-field
|
||||
v-model="value3"
|
||||
label="文本"
|
||||
placeholder="居中对齐"
|
||||
label-align="center"
|
||||
/>
|
||||
<van-field
|
||||
v-model="value4"
|
||||
label="文本"
|
||||
placeholder="右对齐"
|
||||
label-align="right"
|
||||
/>
|
||||
</van-cell-group>
|
||||
```
|
||||
|
||||
|
||||
@ -6,7 +6,7 @@ import { useTranslate } from '../../../docs/site';
|
||||
|
||||
const t = useTranslate({
|
||||
'zh-CN': {
|
||||
text: '文本',
|
||||
label: '文本',
|
||||
top: '顶部对齐',
|
||||
center: '居中对齐',
|
||||
left: '左对齐',
|
||||
@ -14,11 +14,11 @@ const t = useTranslate({
|
||||
labelAlign: '输入框文本位置',
|
||||
},
|
||||
'en-US': {
|
||||
text: 'Text',
|
||||
top: 'Top Align',
|
||||
center: 'Center Align',
|
||||
left: 'Left Align',
|
||||
right: 'Right Align',
|
||||
label: 'Label',
|
||||
top: 'Align Top',
|
||||
center: 'Align Center',
|
||||
left: 'Align Left',
|
||||
right: 'Align Right',
|
||||
labelAlign: 'Label Align',
|
||||
},
|
||||
});
|
||||
@ -31,25 +31,25 @@ const value = ref('');
|
||||
<van-cell-group inset>
|
||||
<van-field
|
||||
v-model="value"
|
||||
:label="t('text')"
|
||||
:label="t('label')"
|
||||
:placeholder="t('top')"
|
||||
label-align="top"
|
||||
/>
|
||||
<van-field
|
||||
v-model="value"
|
||||
:label="t('text')"
|
||||
:label="t('label')"
|
||||
:placeholder="t('left')"
|
||||
label-align="left"
|
||||
/>
|
||||
<van-field
|
||||
v-model="value"
|
||||
:label="t('text')"
|
||||
:label="t('label')"
|
||||
:placeholder="t('center')"
|
||||
label-align="center"
|
||||
/>
|
||||
<van-field
|
||||
v-model="value"
|
||||
:label="t('text')"
|
||||
:label="t('label')"
|
||||
:placeholder="t('right')"
|
||||
label-align="right"
|
||||
/>
|
||||
|
||||
@ -424,7 +424,7 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
<label id="van-field-label"
|
||||
for="van-field-input"
|
||||
>
|
||||
Text
|
||||
Label
|
||||
</label>
|
||||
</div>
|
||||
<div class="van-cell__value van-field__value">
|
||||
@ -432,7 +432,7 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
<input type="text"
|
||||
id="van-field-input"
|
||||
class="van-field__control"
|
||||
placeholder="Top Align"
|
||||
placeholder="Align Top"
|
||||
aria-labelledby="van-field-label"
|
||||
>
|
||||
</div>
|
||||
@ -443,7 +443,7 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
<label id="van-field-label"
|
||||
for="van-field-input"
|
||||
>
|
||||
Text
|
||||
Label
|
||||
</label>
|
||||
</div>
|
||||
<div class="van-cell__value van-field__value">
|
||||
@ -451,7 +451,7 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
<input type="text"
|
||||
id="van-field-input"
|
||||
class="van-field__control"
|
||||
placeholder="Left Align"
|
||||
placeholder="Align Left"
|
||||
aria-labelledby="van-field-label"
|
||||
>
|
||||
</div>
|
||||
@ -462,7 +462,7 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
<label id="van-field-label"
|
||||
for="van-field-input"
|
||||
>
|
||||
Text
|
||||
Label
|
||||
</label>
|
||||
</div>
|
||||
<div class="van-cell__value van-field__value">
|
||||
@ -470,7 +470,7 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
<input type="text"
|
||||
id="van-field-input"
|
||||
class="van-field__control"
|
||||
placeholder="Center Align"
|
||||
placeholder="Align Center"
|
||||
aria-labelledby="van-field-label"
|
||||
>
|
||||
</div>
|
||||
@ -481,7 +481,7 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
<label id="van-field-label"
|
||||
for="van-field-input"
|
||||
>
|
||||
Text
|
||||
Label
|
||||
</label>
|
||||
</div>
|
||||
<div class="van-cell__value van-field__value">
|
||||
@ -489,7 +489,7 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
<input type="text"
|
||||
id="van-field-input"
|
||||
class="van-field__control"
|
||||
placeholder="Right Align"
|
||||
placeholder="Align Right"
|
||||
aria-labelledby="van-field-label"
|
||||
>
|
||||
</div>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user