diff --git a/components/components.ts b/components/components.ts index cb1a34586..168b44076 100644 --- a/components/components.ts +++ b/components/components.ts @@ -90,7 +90,7 @@ export { default as Image, ImagePreviewGroup } from './image'; export type { InputNumberProps } from './input-number'; export { default as InputNumber } from './input-number'; -export type { LayoutProps } from './layout'; +export type { LayoutProps, SiderProps } from './layout'; export { default as Layout, LayoutHeader, diff --git a/components/upload/Upload.tsx b/components/upload/Upload.tsx index 7035ed2e8..196ec1a75 100644 --- a/components/upload/Upload.tsx +++ b/components/upload/Upload.tsx @@ -13,6 +13,7 @@ import { uploadProps } from './interface'; import { file2Obj, getFileItem, removeFileItem, updateFileList } from './utils'; import { useLocaleReceiver } from '../locale-provider/LocaleReceiver'; import defaultLocale from '../locale/default'; +import type { CSSProperties } from 'vue'; import { computed, defineComponent, onMounted, ref, toRef } from 'vue'; import { flattenChildren, initDefaultProps } from '../_util/props-util'; import useMergedState from '../_util/hooks/useMergedState'; @@ -295,7 +296,7 @@ export default defineComponent({ defaultLocale.Upload, computed(() => props.locale), ); - const renderUploadList = (button?: VueNode) => { + const renderUploadList = (button?: VueNode, buttonVisible?: boolean) => { const { removeIcon, previewIcon, @@ -331,6 +332,7 @@ export default defineComponent({ isImageUrl={isImageUrl} progress={progress} itemRender={itemRender} + appendActionVisible={buttonVisible} v-slots={{ ...slots, appendAction: () => button }} /> ) : ( @@ -403,11 +405,8 @@ export default defineComponent({ [`${prefixCls.value}-rtl`]: direction.value === 'rtl', }); const children = flattenChildren(slots.default?.()); - const uploadButton = ( -