Skip to content

Commit 8ad9317

Browse files
committed
Merge remote-tracking branch 'origin/main' into feat-v3.3
2 parents 76585f7 + d9b3d80 commit 8ad9317

File tree

45 files changed

+88
-58
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

45 files changed

+88
-58
lines changed

components/_util/reactivePick.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import type { UnwrapRef } from 'vue';
22
import { reactive, toRef } from 'vue';
3+
import fromPairs from 'lodash-es/fromPairs';
34

45
/**
56
* Reactively pick fields from a reactive object
@@ -10,5 +11,5 @@ export function reactivePick<T extends object, K extends keyof T>(
1011
obj: T,
1112
...keys: K[]
1213
): { [S in K]: UnwrapRef<T[S]> } {
13-
return reactive(Object.fromEntries(keys.map(k => [k, toRef(obj, k)]))) as any;
14+
return reactive(fromPairs(keys.map(k => [k, toRef(obj, k)]))) as any;
1415
}

components/alert/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@ const Alert = defineComponent({
168168
<div
169169
role="alert"
170170
{...attrs}
171-
style={[attrs.style, motionStyle.value]}
171+
style={[attrs.style as CSSProperties, motionStyle.value]}
172172
v-show={!closing.value}
173173
class={[attrs.class, alertCls]}
174174
data-show={!closing.value}

components/avatar/Avatar.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -203,7 +203,7 @@ const Avatar = defineComponent({
203203
{...attrs}
204204
ref={avatarNodeRef}
205205
class={classString}
206-
style={[sizeStyle, responsiveSizeStyle(!!icon), attrs.style]}
206+
style={[sizeStyle, responsiveSizeStyle(!!icon), attrs.style as CSSProperties]}
207207
>
208208
{childrenToRender}
209209
</span>

components/avatar/Group.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,14 +71,14 @@ const Group = defineComponent({
7171
</Popover>,
7272
);
7373
return (
74-
<div {...attrs} class={cls} style={attrs.style}>
74+
<div {...attrs} class={cls} style={attrs.style as CSSProperties}>
7575
{childrenShow}
7676
</div>
7777
);
7878
}
7979

8080
return (
81-
<div {...attrs} class={cls} style={attrs.style}>
81+
<div {...attrs} class={cls} style={attrs.style as CSSProperties}>
8282
{childrenWithProps}
8383
</div>
8484
);

components/breadcrumb/BreadcrumbItem.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import type { ExtractPropTypes, PropType } from 'vue';
1+
import type { CSSProperties, ExtractPropTypes, PropType } from 'vue';
22
import { defineComponent } from 'vue';
33
import PropTypes from '../_util/vue-types';
44
import { getPropsSlot } from '../_util/props-util';
@@ -66,7 +66,7 @@ export default defineComponent({
6666
link = renderBreadcrumbNode(link, prefixCls.value);
6767
if (children) {
6868
return (
69-
<li class={cls} style={style}>
69+
<li class={cls} style={style as CSSProperties}>
7070
{link}
7171
{separator && <span class={`${prefixCls.value}-separator`}>{separator}</span>}
7272
</li>

components/carousel/index.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import type { ExtractPropTypes, PropType } from 'vue';
1+
import type { CSSProperties, ExtractPropTypes, PropType } from 'vue';
22
import { ref, computed, watchEffect, defineComponent } from 'vue';
33
import PropTypes from '../_util/vue-types';
44
import warning from '../_util/warning';
@@ -127,7 +127,7 @@ const Carousel = defineComponent({
127127
[`${cls}`]: !!cls,
128128
});
129129
return (
130-
<div class={className} style={style}>
130+
<div class={className} style={style as CSSProperties}>
131131
<SlickCarousel
132132
ref={slickRef}
133133
{...props}

components/checkbox/Checkbox.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import type { CSSProperties } from 'vue';
12
import { watchEffect, onMounted, defineComponent, inject, onBeforeUnmount, ref } from 'vue';
23
import classNames from '../_util/classNames';
34
import VcCheckbox from '../vc-checkbox/Checkbox';
@@ -96,7 +97,7 @@ export default defineComponent({
9697
return (
9798
<label
9899
class={classString}
99-
style={style}
100+
style={style as CSSProperties}
100101
onMouseenter={onMouseenter as EventHandler}
101102
onMouseleave={onMouseleave as EventHandler}
102103
>

components/collapse/Collapse.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import { cloneElement } from '../_util/vnode';
88
import type { CollapsibleType } from './commonProps';
99
import { collapseProps } from './commonProps';
1010
import { getDataAndAriaProps } from '../_util/util';
11-
import type { ExtractPropTypes } from 'vue';
11+
import type { CSSProperties, ExtractPropTypes } from 'vue';
1212
import { computed, defineComponent, ref, watch } from 'vue';
1313
import RightOutlined from '@ant-design/icons-vue/RightOutlined';
1414
import firstNotUndefined from '../_util/firstNotUndefined';
@@ -173,7 +173,7 @@ export default defineComponent({
173173
<div
174174
class={collapseClassName}
175175
{...getDataAndAriaProps(attrs)}
176-
style={attrs.style}
176+
style={attrs.style as CSSProperties}
177177
role={accordion ? 'tablist' : null}
178178
>
179179
{getItems()}

components/drawer/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -283,7 +283,7 @@ const Drawer = defineComponent({
283283
return (
284284
closable && (
285285
<button key="closer" onClick={close} aria-label="Close" class={`${prefixCls}-close`}>
286-
{$closeIcon === undefined ? <CloseOutlined></CloseOutlined> : null}
286+
{$closeIcon === undefined ? <CloseOutlined></CloseOutlined> : $closeIcon}
287287
</button>
288288
)
289289
);

components/dropdown/dropdown-button.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import type { ExtractPropTypes } from 'vue';
1+
import type { ExtractPropTypes, HTMLAttributes } from 'vue';
22
import { defineComponent } from 'vue';
33
import Button from '../button';
44
import classNames from '../_util/classNames';
@@ -54,7 +54,7 @@ export default defineComponent({
5454
onClick,
5555
'onUpdate:visible': _updateVisible,
5656
...restProps
57-
} = { ...props, ...attrs };
57+
} = { ...props, ...attrs } as DropdownButtonProps & HTMLAttributes;
5858

5959
const dropdownProps = {
6060
align,

0 commit comments

Comments
 (0)