在使用React渲染progress元素时,为什么IE10(我没有在IE11及以上版本中检查)渲染值1,无论我传入的值是什么?
var Hello = React.createClass({
render: function() {
return <progress value="50" max="100"></progress>;
}
});
ReactDOM.render(
<Hello />,
document.getElementById('container')
);
Run Code Online (Sandbox Code Playgroud)
看看这个小提琴 - https://jsfiddle.net/co4wz3ft/5/
它在Chrome和Firefox中按预期工作.
我正在尝试使用fontVariant文本样式。该文件表示,预计一个“枚举阵列”。这在 json 中看起来如何?我试过传递一个字符串,它在 android上工作在 android 上被忽略,但在 ios 上抛出一个错误:
<Text style={{ fontVariant: 'small-caps' }}>some text</Text>
Run Code Online (Sandbox Code Playgroud)
会抛出:
NSString 类型的 JSON 值“small-caps”无法转换为 NSArray
我使用的是 0.53.3 版本的 react-native
使用jQuery时on,有没有办法从处理程序中获取所选元素,而不是事件目标?例如,以下都与以下内容无关body:
$('body').on('click', 'h1', function(e){
console.log(e.target);
console.log(e.currentTarget);
console.log(this);
});
Run Code Online (Sandbox Code Playgroud)