chore: type support vue@3.2.35

pull/5627/head
tangjinzhou 2022-05-21 10:56:28 +08:00
parent fdf76b9fb9
commit 13e1db0bc4
38 changed files with 66 additions and 55 deletions

View File

@ -168,7 +168,7 @@ const Alert = defineComponent({
<div <div
role="alert" role="alert"
{...attrs} {...attrs}
style={[attrs.style, motionStyle.value]} style={[attrs.style as CSSProperties, motionStyle.value]}
v-show={!closing.value} v-show={!closing.value}
class={[attrs.class, alertCls]} class={[attrs.class, alertCls]}
data-show={!closing.value} data-show={!closing.value}

View File

@ -203,7 +203,7 @@ const Avatar = defineComponent({
{...attrs} {...attrs}
ref={avatarNodeRef} ref={avatarNodeRef}
class={classString} class={classString}
style={[sizeStyle, responsiveSizeStyle(!!icon), attrs.style]} style={[sizeStyle, responsiveSizeStyle(!!icon), attrs.style as CSSProperties]}
> >
{childrenToRender} {childrenToRender}
</span> </span>

View File

@ -71,14 +71,14 @@ const Group = defineComponent({
</Popover>, </Popover>,
); );
return ( return (
<div {...attrs} class={cls} style={attrs.style}> <div {...attrs} class={cls} style={attrs.style as CSSProperties}>
{childrenShow} {childrenShow}
</div> </div>
); );
} }
return ( return (
<div {...attrs} class={cls} style={attrs.style}> <div {...attrs} class={cls} style={attrs.style as CSSProperties}>
{childrenWithProps} {childrenWithProps}
</div> </div>
); );

View File

@ -1,4 +1,4 @@
import type { ExtractPropTypes, PropType } from 'vue'; import type { CSSProperties, ExtractPropTypes, PropType } from 'vue';
import { defineComponent } from 'vue'; import { defineComponent } from 'vue';
import PropTypes from '../_util/vue-types'; import PropTypes from '../_util/vue-types';
import { getPropsSlot } from '../_util/props-util'; import { getPropsSlot } from '../_util/props-util';
@ -66,7 +66,7 @@ export default defineComponent({
link = renderBreadcrumbNode(link, prefixCls.value); link = renderBreadcrumbNode(link, prefixCls.value);
if (children) { if (children) {
return ( return (
<span class={cls} style={style}> <span class={cls} style={style as CSSProperties}>
{link} {link}
{separator && <span class={`${prefixCls.value}-separator`}>{separator}</span>} {separator && <span class={`${prefixCls.value}-separator`}>{separator}</span>}
</span> </span>

View File

@ -1,4 +1,4 @@
import type { ExtractPropTypes, PropType } from 'vue'; import type { CSSProperties, ExtractPropTypes, PropType } from 'vue';
import { ref, computed, watchEffect, defineComponent } from 'vue'; import { ref, computed, watchEffect, defineComponent } from 'vue';
import PropTypes from '../_util/vue-types'; import PropTypes from '../_util/vue-types';
import warning from '../_util/warning'; import warning from '../_util/warning';
@ -127,7 +127,7 @@ const Carousel = defineComponent({
[`${cls}`]: !!cls, [`${cls}`]: !!cls,
}); });
return ( return (
<div class={className} style={style}> <div class={className} style={style as CSSProperties}>
<SlickCarousel <SlickCarousel
ref={slickRef} ref={slickRef}
{...props} {...props}

View File

@ -1,3 +1,4 @@
import type { CSSProperties } from 'vue';
import { watchEffect, onMounted, defineComponent, inject, onBeforeUnmount, ref } from 'vue'; import { watchEffect, onMounted, defineComponent, inject, onBeforeUnmount, ref } from 'vue';
import classNames from '../_util/classNames'; import classNames from '../_util/classNames';
import VcCheckbox from '../vc-checkbox/Checkbox'; import VcCheckbox from '../vc-checkbox/Checkbox';
@ -93,7 +94,7 @@ export default defineComponent({
return ( return (
<label <label
class={classString} class={classString}
style={style} style={style as CSSProperties}
onMouseenter={onMouseenter as EventHandler} onMouseenter={onMouseenter as EventHandler}
onMouseleave={onMouseleave as EventHandler} onMouseleave={onMouseleave as EventHandler}
> >

View File

@ -8,7 +8,7 @@ import { cloneElement } from '../_util/vnode';
import type { CollapsibleType } from './commonProps'; import type { CollapsibleType } from './commonProps';
import { collapseProps } from './commonProps'; import { collapseProps } from './commonProps';
import { getDataAndAriaProps } from '../_util/util'; import { getDataAndAriaProps } from '../_util/util';
import type { ExtractPropTypes } from 'vue'; import type { CSSProperties, ExtractPropTypes } from 'vue';
import { computed, defineComponent, ref, watch } from 'vue'; import { computed, defineComponent, ref, watch } from 'vue';
import RightOutlined from '@ant-design/icons-vue/RightOutlined'; import RightOutlined from '@ant-design/icons-vue/RightOutlined';
import firstNotUndefined from '../_util/firstNotUndefined'; import firstNotUndefined from '../_util/firstNotUndefined';
@ -173,7 +173,7 @@ export default defineComponent({
<div <div
class={collapseClassName} class={collapseClassName}
{...getDataAndAriaProps(attrs)} {...getDataAndAriaProps(attrs)}
style={attrs.style} style={attrs.style as CSSProperties}
role={accordion ? 'tablist' : null} role={accordion ? 'tablist' : null}
> >
{getItems()} {getItems()}

View File

@ -1,4 +1,4 @@
import type { ExtractPropTypes } from 'vue'; import type { ExtractPropTypes, HTMLAttributes } from 'vue';
import { defineComponent } from 'vue'; import { defineComponent } from 'vue';
import Button from '../button'; import Button from '../button';
import classNames from '../_util/classNames'; import classNames from '../_util/classNames';
@ -54,7 +54,7 @@ export default defineComponent({
onClick, onClick,
'onUpdate:visible': _updateVisible, 'onUpdate:visible': _updateVisible,
...restProps ...restProps
} = { ...props, ...attrs }; } = { ...props, ...attrs } as DropdownButtonProps & HTMLAttributes;
const dropdownProps = { const dropdownProps = {
align, align,

View File

@ -94,7 +94,7 @@ const InputNumber = defineComponent({
prefix = slots.prefix?.(), prefix = slots.prefix?.(),
valueModifiers = {}, valueModifiers = {},
...others ...others
} = { ...(attrs as HTMLAttributes), ...props }; } = { ...attrs, ...props } as InputNumberProps & HTMLAttributes;
const preCls = prefixCls.value; const preCls = prefixCls.value;

View File

@ -2,7 +2,7 @@ import classNames from '../_util/classNames';
import CloseCircleFilled from '@ant-design/icons-vue/CloseCircleFilled'; import CloseCircleFilled from '@ant-design/icons-vue/CloseCircleFilled';
import PropTypes from '../_util/vue-types'; import PropTypes from '../_util/vue-types';
import { cloneElement } from '../_util/vnode'; import { cloneElement } from '../_util/vnode';
import type { PropType, VNode } from 'vue'; import type { CSSProperties, PropType, VNode } from 'vue';
import { ref, defineComponent } from 'vue'; import { ref, defineComponent } from 'vue';
import { tuple } from '../_util/type'; import { tuple } from '../_util/type';
import type { Direction, SizeType } from '../config-provider'; import type { Direction, SizeType } from '../config-provider';
@ -121,7 +121,7 @@ export default defineComponent({
<span <span
ref={containerRef} ref={containerRef}
class={affixWrapperCls} class={affixWrapperCls}
style={attrs.style} style={attrs.style as CSSProperties}
onMouseup={onInputMouseUp} onMouseup={onInputMouseUp}
hidden={hidden} hidden={hidden}
> >
@ -173,7 +173,7 @@ export default defineComponent({
// Need another wrapper for changing display:table to display:inline-block // Need another wrapper for changing display:table to display:inline-block
// and put style prop in wrapper // and put style prop in wrapper
return ( return (
<span class={mergedGroupClassName} style={attrs.style} hidden={hidden}> <span class={mergedGroupClassName} style={attrs.style as CSSProperties} hidden={hidden}>
<span class={mergedWrapperClassName}> <span class={mergedWrapperClassName}>
{addonBeforeNode} {addonBeforeNode}
{cloneElement(labeledElement, { style: null })} {cloneElement(labeledElement, { style: null })}
@ -209,7 +209,7 @@ export default defineComponent({
}, },
); );
return ( return (
<span class={affixWrapperCls} style={attrs.style} hidden={hidden}> <span class={affixWrapperCls} style={attrs.style as CSSProperties} hidden={hidden}>
{cloneElement(element, { {cloneElement(element, {
style: null, style: null,
value, value,

View File

@ -125,6 +125,9 @@ const ResizableTextArea = defineComponent({
if (!textareaProps.autofocus) { if (!textareaProps.autofocus) {
delete textareaProps.autofocus; delete textareaProps.autofocus;
} }
if (textareaProps.rows === 0) {
delete textareaProps.rows;
}
return ( return (
<ResizeObserver onResize={handleResize} disabled={!(autoSize || autosize)}> <ResizeObserver onResize={handleResize} disabled={!(autoSize || autosize)}>
{withDirectives((<textarea {...textareaProps} ref={textAreaRef} />) as VNode, [ {withDirectives((<textarea {...textareaProps} ref={textAreaRef} />) as VNode, [

View File

@ -1,3 +1,4 @@
import type { CSSProperties } from 'vue';
import { import {
computed, computed,
defineComponent, defineComponent,
@ -281,7 +282,7 @@ export default defineComponent({
`${prefixCls.value}-textarea-show-count`, `${prefixCls.value}-textarea-show-count`,
customClass, customClass,
)} )}
style={style} style={style as CSSProperties}
data-count={typeof dataCount !== 'object' ? dataCount : undefined} data-count={typeof dataCount !== 'object' ? dataCount : undefined}
> >
{textareaNode} {textareaNode}

View File

@ -194,7 +194,7 @@ export default defineComponent({
) )
: null; : null;
const divStyle = [ const divStyle = [
attrs.style, attrs.style as CSSProperties,
{ {
flex: `0 0 ${siderWidth}`, flex: `0 0 ${siderWidth}`,
maxWidth: siderWidth, // Fix width transition bug in IE11 maxWidth: siderWidth, // Fix width transition bug in IE11

View File

@ -323,7 +323,7 @@ export default defineComponent({
const storeValue = store.value; const storeValue = store.value;
eventKeys.forEach(eventKey => { eventKeys.forEach(eventKey => {
const { key, childrenEventKeys } = storeValue[eventKey]; const { key, childrenEventKeys } = storeValue[eventKey];
keys.push(key, ...getChildrenKeys(childrenEventKeys)); keys.push(key, ...getChildrenKeys(unref(childrenEventKeys)));
}); });
return keys; return keys;
}; };
@ -345,7 +345,7 @@ export default defineComponent({
newOpenKeys.push(key); newOpenKeys.push(key);
} else if (mergedMode.value !== 'inline') { } else if (mergedMode.value !== 'inline') {
// We need find all related popup to close // We need find all related popup to close
const subPathKeys = getChildrenKeys(childrenEventKeys); const subPathKeys = getChildrenKeys(unref(childrenEventKeys));
newOpenKeys = uniq(newOpenKeys.filter(k => !subPathKeys.includes(k))); newOpenKeys = uniq(newOpenKeys.filter(k => !subPathKeys.includes(k)));
} }

View File

@ -1,5 +1,5 @@
import type { Key } from '../../../_util/type'; import type { Key } from '../../../_util/type';
import type { ComputedRef, InjectionKey, PropType, Ref, UnwrapRef } from 'vue'; import type { ComputedRef, InjectionKey, PropType, Ref } from 'vue';
import { defineComponent, inject, provide, toRef } from 'vue'; import { defineComponent, inject, provide, toRef } from 'vue';
import type { import type {
BuiltinPlacements, BuiltinPlacements,
@ -21,7 +21,7 @@ export interface StoreMenuInfo {
export interface MenuContextProps { export interface MenuContextProps {
isRootMenu: Ref<boolean>; isRootMenu: Ref<boolean>;
store: Ref<Record<string, UnwrapRef<StoreMenuInfo>>>; store: Ref<Record<string, StoreMenuInfo>>;
registerMenuInfo: (key: string, info: StoreMenuInfo) => void; registerMenuInfo: (key: string, info: StoreMenuInfo) => void;
unRegisterMenuInfo: (key: string) => void; unRegisterMenuInfo: (key: string) => void;
prefixCls: ComputedRef<string>; prefixCls: ComputedRef<string>;

View File

@ -1,4 +1,4 @@
import type { ExtractPropTypes, PropType, VNode } from 'vue'; import type { CSSProperties, ExtractPropTypes, PropType, VNode } from 'vue';
import { watch, defineComponent, ref, reactive, onMounted } from 'vue'; import { watch, defineComponent, ref, reactive, onMounted } from 'vue';
import { initDefaultProps, getPropsSlot, findDOMNode } from '../_util/props-util'; import { initDefaultProps, getPropsSlot, findDOMNode } from '../_util/props-util';
import { withInstall } from '../_util/type'; import { withInstall } from '../_util/type';
@ -230,7 +230,7 @@ const Rate = defineComponent({
{...attrs} {...attrs}
id={id} id={id}
class={rateClassName} class={rateClassName}
style={style} style={style as CSSProperties}
onMouseleave={disabled ? null : onMouseLeave} onMouseleave={disabled ? null : onMouseLeave}
tabindex={disabled ? -1 : tabindex} tabindex={disabled ? -1 : tabindex}
onFocus={disabled ? null : onFocus} onFocus={disabled ? null : onFocus}

View File

@ -34,7 +34,7 @@ import scrollTo from '../_util/scrollTo';
import defaultLocale from '../locale/en_US'; import defaultLocale from '../locale/en_US';
import type { SizeType } from '../config-provider'; import type { SizeType } from '../config-provider';
import devWarning from '../vc-util/devWarning'; import devWarning from '../vc-util/devWarning';
import type { PropType } from 'vue'; import type { CSSProperties, PropType } from 'vue';
import { nextTick, reactive, ref, computed, defineComponent, toRef, watchEffect, watch } from 'vue'; import { nextTick, reactive, ref, computed, defineComponent, toRef, watchEffect, watch } from 'vue';
import type { DefaultRecordType } from '../vc-table/interface'; import type { DefaultRecordType } from '../vc-table/interface';
import useBreakpoint from '../_util/hooks/useBreakpoint'; import useBreakpoint from '../_util/hooks/useBreakpoint';
@ -636,7 +636,7 @@ const InteralTable = defineComponent<
); );
const tableProps = omit(props, ['columns']); const tableProps = omit(props, ['columns']);
return ( return (
<div class={wrapperClassNames} style={attrs.style}> <div class={wrapperClassNames} style={attrs.style as CSSProperties}>
<Spin spinning={false} {...spinProps}> <Spin spinning={false} {...spinProps}>
{topPaginationNode} {topPaginationNode}
<RcTable <RcTable

View File

@ -1,4 +1,4 @@
import type { PropType } from 'vue'; import type { CSSProperties, PropType } from 'vue';
import { defineComponent, ref } from 'vue'; import { defineComponent, ref } from 'vue';
import type { EditableConfig, TabsLocale } from '../interface'; import type { EditableConfig, TabsLocale } from '../interface';
@ -32,7 +32,7 @@ export default defineComponent({
ref={domRef} ref={domRef}
type="button" type="button"
class={`${prefixCls}-nav-add`} class={`${prefixCls}-nav-add`}
style={attrs.style} style={attrs.style as CSSProperties}
aria-label={locale?.addAriaLabel || 'Add tab'} aria-label={locale?.addAriaLabel || 'Add tab'}
onClick={event => { onClick={event => {
editable.onEdit('add', { editable.onEdit('add', {

View File

@ -224,7 +224,10 @@ export default defineComponent({
); );
return ( return (
<div class={classNames(`${prefixCls}-nav-operations`, attrs.class)} style={attrs.style}> <div
class={classNames(`${prefixCls}-nav-operations`, attrs.class)}
style={attrs.style as CSSProperties}
>
{moreNode} {moreNode}
<AddButton prefixCls={prefixCls} locale={locale} editable={editable} /> <AddButton prefixCls={prefixCls} locale={locale} editable={editable} />
</div> </div>

View File

@ -1,5 +1,5 @@
import type { Tab, EditableConfig } from '../interface'; import type { Tab, EditableConfig } from '../interface';
import type { PropType } from 'vue'; import type { CSSProperties, PropType } from 'vue';
import { defineComponent, computed, ref } from 'vue'; import { defineComponent, computed, ref } from 'vue';
import type { FocusEventHandler } from '../../../_util/EventInterface'; import type { FocusEventHandler } from '../../../_util/EventInterface';
import KeyCode from '../../../_util/KeyCode'; import KeyCode from '../../../_util/KeyCode';
@ -88,7 +88,7 @@ export default defineComponent({
[`${tabPrefix}-active`]: active, [`${tabPrefix}-active`]: active,
[`${tabPrefix}-disabled`]: disabled, [`${tabPrefix}-disabled`]: disabled,
})} })}
style={attrs.style} style={attrs.style as CSSProperties}
onClick={onInternalClick} onClick={onInternalClick}
> >
{/* Primary Tab Button */} {/* Primary Tab Button */}

View File

@ -464,7 +464,7 @@ export default defineComponent({
<div <div
role="tablist" role="tablist"
class={classNames(`${pre}-nav`, className)} class={classNames(`${pre}-nav`, className)}
style={style} style={style as CSSProperties}
onKeydown={() => { onKeydown={() => {
// No need animation when use keyboard // No need animation when use keyboard
doLockAnimation(); doLockAnimation();

View File

@ -63,7 +63,7 @@ export default defineComponent({
tabindex={active ? 0 : -1} tabindex={active ? 0 : -1}
aria-labelledby={id && `${id}-tab-${tabKey}`} aria-labelledby={id && `${id}-tab-${tabKey}`}
aria-hidden={!active} aria-hidden={!active}
style={[mergedStyle.value, attrs.style]} style={[mergedStyle.value, attrs.style as CSSProperties]}
class={[`${prefixCls}-tabpane`, active && `${prefixCls}-tabpane-active`, attrs.class]} class={[`${prefixCls}-tabpane`, active && `${prefixCls}-tabpane-active`, attrs.class]}
> >
{(active || visited.value || forceRender) && slots.default?.()} {(active || visited.value || forceRender) && slots.default?.()}

View File

@ -344,7 +344,7 @@ const Transfer = defineComponent({
const rightTitle = const rightTitle =
(titles && titles[1]) ?? slots.rightTitle?.() ?? (locale.titles || ['', ''])[1]; (titles && titles[1]) ?? slots.rightTitle?.() ?? (locale.titles || ['', ''])[1];
return ( return (
<div class={cls} style={style} id={id}> <div class={cls} style={style as CSSProperties} id={id}>
<List <List
key="leftList" key="leftList"
prefixCls={`${prefixCls.value}-list`} prefixCls={`${prefixCls.value}-list`}

View File

@ -7,7 +7,7 @@ import Menu from '../menu';
import Dropdown from '../dropdown'; import Dropdown from '../dropdown';
import Search from './search'; import Search from './search';
import ListBody from './ListBody'; import ListBody from './ListBody';
import type { VNode, VNodeTypes, ExtractPropTypes, PropType } from 'vue'; import type { VNode, VNodeTypes, ExtractPropTypes, PropType, CSSProperties } from 'vue';
import { watchEffect, computed, defineComponent, ref } from 'vue'; import { watchEffect, computed, defineComponent, ref } from 'vue';
import type { RadioChangeEvent } from '../radio/interface'; import type { RadioChangeEvent } from '../radio/interface';
import type { TransferDirection, TransferItem } from './index'; import type { TransferDirection, TransferItem } from './index';
@ -388,7 +388,7 @@ export default defineComponent({
); );
return ( return (
<div class={listCls} style={attrs.style}> <div class={listCls} style={attrs.style as CSSProperties}>
<div class={`${prefixCls}-header`}> <div class={`${prefixCls}-header`}>
{showSelectAll ? ( {showSelectAll ? (
<> <>

View File

@ -383,7 +383,7 @@ export default defineComponent({
onDrop={onFileDrop} onDrop={onFileDrop}
onDragover={onFileDrop} onDragover={onFileDrop}
onDragleave={onFileDrop} onDragleave={onFileDrop}
style={attrs.style} style={attrs.style as CSSProperties}
> >
<VcUpload <VcUpload
{...rcUploadProps} {...rcUploadProps}

View File

@ -266,7 +266,7 @@ export default defineComponent({
); );
return ( return (
<div class={listContainerNameClass} style={style} ref={ref}> <div class={listContainerNameClass} style={style as CSSProperties} ref={ref}>
{itemRender {itemRender
? itemRender({ ? itemRender({
originNode: item, originNode: item,

View File

@ -137,7 +137,7 @@ export default defineComponent({
v-show={visible} v-show={visible}
key="dialog-element" key="dialog-element"
role="document" role="document"
style={[contentStyleRef.value, attrs.style]} style={[contentStyleRef.value, attrs.style as CSSProperties]}
class={[prefixCls, attrs.class]} class={[prefixCls, attrs.class]}
onMousedown={onMousedown} onMousedown={onMousedown}
onMouseup={onMouseup} onMouseup={onMouseup}

View File

@ -1,4 +1,4 @@
import type { ExtractPropTypes } from 'vue'; import type { CSSProperties, ExtractPropTypes } from 'vue';
import { import {
toRef, toRef,
watchEffect, watchEffect,
@ -278,7 +278,7 @@ export default defineComponent({
onPressenter: onPressEnter, onPressenter: onPressEnter,
}; };
return ( return (
<div class={classNames(prefixCls, className)} style={style}> <div class={classNames(prefixCls, className)} style={style as CSSProperties}>
{withDirectives(<textarea ref={textarea} {...textareaProps} />, [[antInputDirective]])} {withDirectives(<textarea ref={textarea} {...textareaProps} />, [[antInputDirective]])}
{measuring && ( {measuring && (
<div ref={measure} class={`${prefixCls}-measure`}> <div ref={measure} class={`${prefixCls}-measure`}>

View File

@ -1,6 +1,6 @@
import type { Key } from '../_util/type'; import type { Key } from '../_util/type';
import { Teleport, computed, defineComponent, onMounted, watch, onUnmounted } from 'vue'; import { Teleport, computed, defineComponent, onMounted, watch, onUnmounted } from 'vue';
import type { HTMLAttributes } from 'vue'; import type { HTMLAttributes, CSSProperties } from 'vue';
import type { MouseEventHandler } from '../_util/EventInterface'; import type { MouseEventHandler } from '../_util/EventInterface';
import classNames from '../_util/classNames'; import classNames from '../_util/classNames';
@ -113,7 +113,7 @@ export default defineComponent<NoticeProps>({
class={classNames(componentClass, className, { class={classNames(componentClass, className, {
[`${componentClass}-closable`]: closable, [`${componentClass}-closable`]: closable,
})} })}
style={style} style={style as CSSProperties}
onMouseenter={clearCloseTimer} onMouseenter={clearCloseTimer}
onMouseleave={startCloseTimer} onMouseleave={startCloseTimer}
onClick={onClick} onClick={onClick}

View File

@ -179,7 +179,7 @@ const Notification = defineComponent<NotificationProps>({
<div <div
class={className} class={className}
style={ style={
attrs.style || { (attrs.style as CSSProperties) || {
top: '65px', top: '65px',
left: '50%', left: '50%',
} }

View File

@ -1,5 +1,6 @@
import PropTypes from '../_util/vue-types'; import PropTypes from '../_util/vue-types';
import classNames from '../_util/classNames'; import classNames from '../_util/classNames';
import type { CSSProperties } from 'vue';
import { defineComponent } from 'vue'; import { defineComponent } from 'vue';
export default defineComponent({ export default defineComponent({
@ -52,7 +53,7 @@ export default defineComponent({
title={showTitle ? String(page) : null} title={showTitle ? String(page) : null}
tabindex="0" tabindex="0"
class={cls} class={cls}
style={style} style={style as CSSProperties}
> >
{itemRender({ {itemRender({
page, page,

View File

@ -593,7 +593,7 @@ function Picker<DateType>() {
[`${prefixCls}-focused`]: focused.value, [`${prefixCls}-focused`]: focused.value,
[`${prefixCls}-rtl`]: direction === 'rtl', [`${prefixCls}-rtl`]: direction === 'rtl',
})} })}
style={attrs.style} style={attrs.style as CSSProperties}
onMousedown={onMousedown} onMousedown={onMousedown}
onMouseup={onInternalMouseup} onMouseup={onInternalMouseup}
onMouseenter={onMouseenter} onMouseenter={onMouseenter}

View File

@ -33,6 +33,7 @@ import getExtraFooter from './utils/getExtraFooter';
import getRanges from './utils/getRanges'; import getRanges from './utils/getRanges';
import { getLowerBoundTime, setDateTime, setTime } from './utils/timeUtil'; import { getLowerBoundTime, setDateTime, setTime } from './utils/timeUtil';
import type { VueNode } from '../_util/type'; import type { VueNode } from '../_util/type';
import type { CSSProperties } from 'vue';
import { computed, createVNode, defineComponent, ref, toRef, watch, watchEffect } from 'vue'; import { computed, createVNode, defineComponent, ref, toRef, watch, watchEffect } from 'vue';
import useMergedState from '../_util/hooks/useMergedState'; import useMergedState from '../_util/hooks/useMergedState';
import { warning } from '../vc-util/warning'; import { warning } from '../vc-util/warning';
@ -596,7 +597,7 @@ function PickerPanel<DateType>() {
<div <div
tabindex={tabindex} tabindex={tabindex}
class={classNames(classString.value, attrs.class)} class={classNames(classString.value, attrs.class)}
style={attrs.style} style={attrs.style as CSSProperties}
onKeydown={onInternalKeydown} onKeydown={onInternalKeydown}
onBlur={onInternalBlur} onBlur={onInternalBlur}
onMousedown={onMousedown} onMousedown={onMousedown}

View File

@ -1,4 +1,4 @@
import type { PropType } from 'vue'; import type { CSSProperties, PropType } from 'vue';
import { computed, defineComponent, ref, onMounted, onBeforeUnmount } from 'vue'; import { computed, defineComponent, ref, onMounted, onBeforeUnmount } from 'vue';
import classNames from '../../_util/classNames'; import classNames from '../../_util/classNames';
import PropTypes from '../../_util/vue-types'; import PropTypes from '../../_util/vue-types';
@ -108,7 +108,7 @@ export default defineComponent({
'aria-valuenow': value, 'aria-valuenow': value,
'aria-disabled': !!disabled, 'aria-disabled': !!disabled,
}; };
const elStyle = [attrs.style, positionStyle.value]; const elStyle = [attrs.style as CSSProperties, positionStyle.value];
let mergedTabIndex = tabindex || 0; let mergedTabIndex = tabindex || 0;
if (disabled || tabindex === null) { if (disabled || tabindex === null) {
mergedTabIndex = null; mergedTabIndex = null;

View File

@ -837,7 +837,7 @@ export default defineComponent<TableProps<DefaultRecordType>>({
flattenColumns.value[columnCount.value - 1].fixed === 'right', flattenColumns.value[columnCount.value - 1].fixed === 'right',
[attrs.class as string]: attrs.class, [attrs.class as string]: attrs.class,
})} })}
style={attrs.style} style={attrs.style as CSSProperties}
id={id} id={id}
ref={fullTableRef} ref={fullTableRef}
> >

View File

@ -1,6 +1,7 @@
import { useInjectKeysState, useInjectTreeContext } from './contextTypes'; import { useInjectKeysState, useInjectTreeContext } from './contextTypes';
import Indent from './Indent'; import Indent from './Indent';
import { convertNodePropsToEventData, getTreeNodeProps } from './utils/treeUtil'; import { convertNodePropsToEventData, getTreeNodeProps } from './utils/treeUtil';
import type { CSSProperties } from 'vue';
import { import {
computed, computed,
defineComponent, defineComponent,
@ -556,7 +557,7 @@ export default defineComponent({
'drag-over-gap-bottom': !disabled && dragOverGapBottom.value, 'drag-over-gap-bottom': !disabled && dragOverGapBottom.value,
'filter-node': filterTreeNode && filterTreeNode(eventData.value), 'filter-node': filterTreeNode && filterTreeNode(eventData.value),
})} })}
style={attrs.style} style={attrs.style as CSSProperties}
// Draggable config // Draggable config
draggable={draggableWithoutDisabled} draggable={draggableWithoutDisabled}
aria-grabbed={dragging} aria-grabbed={dragging}

View File

@ -152,7 +152,7 @@ export default defineComponent({
statusValue === 'motion' || statusValue === 'stable' || !visible.value ? null : 0, statusValue === 'motion' || statusValue === 'stable' || !visible.value ? null : 0,
pointerEvents: statusValue === 'stable' ? null : 'none', pointerEvents: statusValue === 'stable' ? null : 'none',
}, },
attrs.style, attrs.style as CSSProperties,
]; ];
let childNode: any = flattenChildren(slots.default?.({ visible: props.visible })); let childNode: any = flattenChildren(slots.default?.({ visible: props.visible }));

View File

@ -254,7 +254,7 @@
"vue-router": "^4.0.0", "vue-router": "^4.0.0",
"vue-server-renderer": "^2.6.11", "vue-server-renderer": "^2.6.11",
"vue-style-loader": "^4.1.2", "vue-style-loader": "^4.1.2",
"vue-tsc": "^0.30.2", "vue-tsc": "^0.34.15",
"vuex": "^4.0.0-beta.2", "vuex": "^4.0.0-beta.2",
"webpack": "^5.0.0", "webpack": "^5.0.0",
"webpack-bundle-analyzer": "^4.4.2", "webpack-bundle-analyzer": "^4.4.2",