Skip to content

Commit

Permalink
Merge pull request #515 from Tencent/fix/upload/exposetriggeupload
Browse files Browse the repository at this point in the history
fix: upload expose triggerupload
  • Loading branch information
LeeJim authored Apr 1, 2022
2 parents c77d43a + 9e7c4da commit f7d3826
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/upload/upload.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import useVModel from '../hooks/useVModel';
export default defineComponent({
name: 'TUpload',
props,
setup(props) {
setup(props, { expose }) {
const renderTNodeContent = useContent();
const { classPrefix: prefix, global } = useConfig('upload');
const UPLOAD_NAME = usePrefixClass('upload');
Expand Down Expand Up @@ -64,6 +64,8 @@ export default defineComponent({
const { handleChange, multipleUpload, triggerUpload, cancelUpload, handleDragChange, upload, inputRef } =
useActions(props, uploadCtx, disabled);

expose(triggerUpload);

// input 节点
const renderInput = () => {
return (
Expand Down

0 comments on commit f7d3826

Please sign in to comment.