Skip to content

Commit

Permalink
fix: 修复 upload 组件上文文件问题 (#72)
Browse files Browse the repository at this point in the history
  • Loading branch information
winixt committed Mar 16, 2022
1 parent 83df236 commit 3bc9bb6
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions components/upload/upload.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ export default defineComponent({
emits: ['change', 'remove', 'success', 'error', 'progress', 'exceed'],
setup(props, ctx) {
useTheme();
const { uploadFiles } = useUpload(props, ctx);
const { uploadFiles } = useUpload(props, ctx.emit);
const getFileList = () => {
if (!props.showFileList) {
return null;
Expand All @@ -86,15 +86,15 @@ export default defineComponent({
return () => {
return (
<>
{
ctx.slots.default ? (
<Trigger>
{ctx.slots.default?.({ uploadFiles: uploadFiles.value })}
</Trigger>
) : (
<Trigger />
)
}
{ctx.slots.default ? (
<Trigger>
{ctx.slots.default?.({
uploadFiles: uploadFiles.value,
})}
</Trigger>
) : (
<Trigger />
)}
{ctx.slots.tip?.()}
{getFileList()}
</>
Expand Down

0 comments on commit 3bc9bb6

Please sign in to comment.