Skip to content

Commit 13e1db0

Browse files
committed
chore: type support [email protected]
1 parent fdf76b9 commit 13e1db0

File tree

38 files changed

+66
-55
lines changed

38 files changed

+66
-55
lines changed

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-
<span class={cls} style={style}>
69+
<span class={cls} style={style as CSSProperties}>
7070
{link}
7171
{separator && <span class={`${prefixCls.value}-separator`}>{separator}</span>}
7272
</span>

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';
@@ -93,7 +94,7 @@ export default defineComponent({
9394
return (
9495
<label
9596
class={classString}
96-
style={style}
97+
style={style as CSSProperties}
9798
onMouseenter={onMouseenter as EventHandler}
9899
onMouseleave={onMouseleave as EventHandler}
99100
>

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/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,

components/input-number/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ const InputNumber = defineComponent({
9494
prefix = slots.prefix?.(),
9595
valueModifiers = {},
9696
...others
97-
} = { ...(attrs as HTMLAttributes), ...props };
97+
} = { ...attrs, ...props } as InputNumberProps & HTMLAttributes;
9898

9999
const preCls = prefixCls.value;
100100

components/input/ClearableLabeledInput.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import classNames from '../_util/classNames';
22
import CloseCircleFilled from '@ant-design/icons-vue/CloseCircleFilled';
33
import PropTypes from '../_util/vue-types';
44
import { cloneElement } from '../_util/vnode';
5-
import type { PropType, VNode } from 'vue';
5+
import type { CSSProperties, PropType, VNode } from 'vue';
66
import { ref, defineComponent } from 'vue';
77
import { tuple } from '../_util/type';
88
import type { Direction, SizeType } from '../config-provider';
@@ -121,7 +121,7 @@ export default defineComponent({
121121
<span
122122
ref={containerRef}
123123
class={affixWrapperCls}
124-
style={attrs.style}
124+
style={attrs.style as CSSProperties}
125125
onMouseup={onInputMouseUp}
126126
hidden={hidden}
127127
>
@@ -173,7 +173,7 @@ export default defineComponent({
173173
// Need another wrapper for changing display:table to display:inline-block
174174
// and put style prop in wrapper
175175
return (
176-
<span class={mergedGroupClassName} style={attrs.style} hidden={hidden}>
176+
<span class={mergedGroupClassName} style={attrs.style as CSSProperties} hidden={hidden}>
177177
<span class={mergedWrapperClassName}>
178178
{addonBeforeNode}
179179
{cloneElement(labeledElement, { style: null })}
@@ -209,7 +209,7 @@ export default defineComponent({
209209
},
210210
);
211211
return (
212-
<span class={affixWrapperCls} style={attrs.style} hidden={hidden}>
212+
<span class={affixWrapperCls} style={attrs.style as CSSProperties} hidden={hidden}>
213213
{cloneElement(element, {
214214
style: null,
215215
value,

0 commit comments

Comments
 (0)