目前,我正在运行Windows 8.1 PC,它没有像Android Studio或Eclipse这样的IDE的存储或RAM.我想在没有IDE的情况下下载Android SDK工具.如何实现这一目标?
我正在开发一个 React 应用程序并不断遇到我不明白的错误。我在其他任何地方都找不到。我的理解是,在 JSX 元素中,我应该始终使用“className”而不是“class”属性。但是,我收到此警告:
index.js:2178 Warning: React does not recognize the `classsName` prop on a DOM element. If you intentionally want it to appear in the DOM as a custom attribute, spell it as lowercase `classsname` instead. If you accidentally passed it from a parent component, remove it from the DOM element.
Run Code Online (Sandbox Code Playgroud)
任何人以前见过这个或知道我做错了什么?
所以几个月前我从我的计算机中移除了节点(大多数情况下,我认为),今天我重新安装了它.Node的工作正常,但是当我尝试测试npm时,我收到以下消息:
$ npm
module.js:549
throw err;
^
Error: Cannot find module 'internal/util/types'
at Function.Module._resolveFilename (module.js:547:15)
at Function.Module._load (module.js:474:25)
at Module.require (module.js:596:17)
at require (internal/module.js:11:18)
at evalmachine.<anonymous>:31:26
at Object.<anonymous> (C:\Users\LG\AppData\Roaming\npm\node_modules\npm\node_modules\graceful-fs\fs.js:11:1)
at Module._compile (module.js:652:30)
at Object.Module._extensions..js (module.js:663:10)
at Module.load (module.js:565:32)
at tryModuleLoad (module.js:505:12)
Run Code Online (Sandbox Code Playgroud)
正如我所见,我尝试使用"npm rebuild",但这对任何事都没有影响.我在Windows上使用Node v8.11.2(如果我知道什么版本的NPM,那该死的).有线索吗?
我正在处理的组件依赖于<img>元素内部的<span>元素,当<span>通过JQuery检测到"click"事件时,该span的ID应记录到控制台.但由于某种原因,<img>正在记录的ID.
$(() => {
$('.star-span').click(e => {
console.log(e.target);
});
});Run Code Online (Sandbox Code Playgroud)
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<span class="star-span" id="1">
<img class="star-img" width="15%" src="https://upload.wikimedia.org/wikipedia/commons/thumb/1/18/Five-pointed_star.svg/2000px-Five-pointed_star.svg.png" />
</span>Run Code Online (Sandbox Code Playgroud)
有人在我的代码中看到任何明显的错误吗?