GithubHelp home page GithubHelp logo

Comments (4)

shepherdwind avatar shepherdwind commented on June 3, 2024

如果不用兼容ie,就不需要。

如果兼容ie,必须把input=file覆盖到上传按钮上吧,不用React也可以实现,但是用起来就不那么方便了。

from upload.

shepherdwind avatar shepherdwind commented on June 3, 2024

如果不用React,就需要这样写了

var a = React.render(<a href="#nowhere">上传文件</a>);
props.el = React.findDOMNode(a);
new Upload(props);

这样其实也行,就是upload里面需要自己操作dom了。另外如果直接不依赖React,就可以省略没有用的span那一层包裹了。

from upload.

shepherdwind avatar shepherdwind commented on June 3, 2024

我现在疑惑的是,是否有必要不依赖React,这个组件有必要支持没有React的场景么?

from upload.

afc163 avatar afc163 commented on June 3, 2024

嗯,这样也方便些。

from upload.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.