Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
react.js 文档有以下变量声明:
var { Image, StyleSheet, Text, View } = React;
你能告诉它是什么意思吗?谢谢你。
这是解构语法,它是 ES6 的一部分。
这是 ES6 的一个特性,称为解构。与写作基本相同:
var Image = React.Image; var StyleSheet = React.StyleSheet; var Text = React.Text; var View = React.View;
我的 JSP 的标题中有这一行,<script>var logicalName = "${logicalName}"</script>它正在解析为正确的值。
<script>var logicalName = "${logicalName}"</script>
我想通过 javascript/jquery 访问这个值。我该怎么做呢?
这是行不通的console.log($lo
console.log($lo