WebComponent
WebComponent copied to clipboard
前端常用组件
Results
2
WebComponent issues
Sort by
recently updated
recently updated
newest added
我当前的一个项目是用react写的,有一个功能是识别图片中的二维码 我使用`import '../static/qrcode.lib.min'`这种方式引入到组件中,会报错 于是我选择了``标签的方式去引入 然后我在组件的`componentDidMount`方法中去初始化,会提示`$ undefined` 最后我选择了在`index.html`页面中去初始化,并且使用了`onhashchange`方法去监听路由的变化,不监听的话会因为路由的变化导致不能调出选择图片的方法 虽然这种方法比较笨,但是能解决 我想问问在react或者vue里面,有没有更优的做法?
html5-qrcode拍照无法解析