mirror of
https://gitee.com/vant-contrib/vant.git
synced 2026-07-09 16:01:07 +08:00
Compare commits
3 Commits
0547527f5b
...
1ba9f6de4f
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
1ba9f6de4f | ||
|
|
1d7f0c9aff | ||
|
|
6c42fa0a4e |
@ -19,6 +19,25 @@ Vant follows [Semantic Versioning 2.0.0](https://semver.org/lang/zh-CN/).
|
||||
|
||||
## Details
|
||||
|
||||
### [v4.1.0](https://github.com/vant-ui/vant/compare/v4.0.11...v4.1.0)
|
||||
|
||||
`2023-03-05`
|
||||
|
||||
**New Component**
|
||||
|
||||
- add new TextEllipsis component [#11593](https://github.com/vant-ui/vant/issues/11593)
|
||||
|
||||
**Feature**
|
||||
|
||||
- Swipe: add index param to drag-start/drag-end event [#11632](https://github.com/vant-ui/vant/issues/11632)
|
||||
- TreeSelect: add nav-text slot [#11602](https://github.com/vant-ui/vant/issues/11602) [#11641](https://github.com/vant-ui/vant/issues/11641)
|
||||
|
||||
**Bug Fixes**
|
||||
|
||||
- DropdownMenu: fix dropdown-item position when expanded by default [#11640](https://github.com/vant-ui/vant/issues/11640)
|
||||
- Field: fix label-align top not work when set label-width [#11611](https://github.com/vant-ui/vant/issues/11611)
|
||||
- Locale: improve Ukrainian translation [#11629](https://github.com/vant-ui/vant/issues/11629)
|
||||
|
||||
### [v4.0.11](https://github.com/vant-ui/vant/compare/v4.0.10...v4.0.11)
|
||||
|
||||
`2023-02-20`
|
||||
|
||||
@ -19,6 +19,25 @@ Vant 遵循 [Semver](https://semver.org/lang/zh-CN/) 语义化版本规范。
|
||||
|
||||
## 更新内容
|
||||
|
||||
### [v4.1.0](https://github.com/vant-ui/vant/compare/v4.0.11...v4.1.0)
|
||||
|
||||
`2023-03-05`
|
||||
|
||||
**New Component**
|
||||
|
||||
- 新增 TextEllipsis 文本省略组件 [#11593](https://github.com/vant-ui/vant/issues/11593)
|
||||
|
||||
**Feature**
|
||||
|
||||
- Swipe: 新增 drag-start/drag-end 事件的 index 参数 [#11632](https://github.com/vant-ui/vant/issues/11632)
|
||||
- TreeSelect: 新增 nav-text 插槽 [#11602](https://github.com/vant-ui/vant/issues/11602) [#11641](https://github.com/vant-ui/vant/issues/11641)
|
||||
|
||||
**Bug Fixes**
|
||||
|
||||
- DropdownMenu: 修复使用 toggle 方法打开时位置错误的问题 [#11640](https://github.com/vant-ui/vant/issues/11640)
|
||||
- Field: 修复设置 label-width 后 label-position 不生效的问题 [#11611](https://github.com/vant-ui/vant/issues/11611)
|
||||
- Locale: 修复乌克兰语翻译问题 [#11629](https://github.com/vant-ui/vant/issues/11629)
|
||||
|
||||
### [v4.0.11](https://github.com/vant-ui/vant/compare/v4.0.10...v4.0.11)
|
||||
|
||||
`2023-02-20`
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "vant",
|
||||
"version": "4.0.11",
|
||||
"version": "4.1.0",
|
||||
"description": "Mobile UI Components built on Vue",
|
||||
"main": "lib/vant.cjs.js",
|
||||
"module": "es/index.mjs",
|
||||
|
||||
@ -100,6 +100,7 @@ export default defineComponent({
|
||||
state.transition = !options.immediate;
|
||||
|
||||
if (show) {
|
||||
parent.updateOffset();
|
||||
state.showWrapper = true;
|
||||
}
|
||||
};
|
||||
|
||||
@ -103,7 +103,6 @@ export default defineComponent({
|
||||
const toggleItem = (active: number) => {
|
||||
children.forEach((item, index) => {
|
||||
if (index === active) {
|
||||
updateOffset();
|
||||
item.toggle();
|
||||
} else if (item.state.showPopup) {
|
||||
item.toggle(false, { immediate: true });
|
||||
@ -143,7 +142,7 @@ export default defineComponent({
|
||||
);
|
||||
};
|
||||
|
||||
linkChildren({ id, props, offset });
|
||||
linkChildren({ id, props, offset, updateOffset });
|
||||
useClickAway(root, onClickAway);
|
||||
useEventListener('scroll', onScroll, {
|
||||
target: scrollParent,
|
||||
|
||||
@ -7,6 +7,7 @@ export type DropdownMenuProvide = {
|
||||
id: string;
|
||||
props: DropdownMenuProps;
|
||||
offset: Ref<number>;
|
||||
updateOffset: () => void;
|
||||
};
|
||||
|
||||
export type DropdownMenuThemeVars = {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user