ByteNote LogoByteNote

Navigation

  • Blog
  • 工具

    © 2025 ByteNote. All rights reserved.

    在严格模式下,全局作用域中函数中this的值为什么是undefined?

    Jun 6, 20232 min read

    在严格模式下,全局作用域中函数中的this值将是undefined,而不是默认绑定到全局对象上。这是为了防止意外的行为,因为在非严格模式下,如果没有使用任何上下文来绑定函数中this的值,它将自动绑定到全局对象上。在严格模式中,必须显式地指定函数的this值,否则将会被设置为undefined。

    相关文章

    Vue3 useRoute() 获取 path 参数

    在Vue3中,使用`useRoute()`函数可以获取当前路由的响应式信息,包括路径参数。

    iOS 模拟器使用FaceID

    iOS模拟器允许用户模拟FaceID的匹配和不匹配情况,但不支持实际的人脸识别。

    Flutter 透明色设置

    Flutter 中可以通过 `Color.fromRGBO(r, g, b, 0)` 或 `Colors.red.withOpacity(0)` 设置透明背景色。

    JsonConvert 源码之全局对象

    实例化JsonConvert对象后,可在全局范围内直接使用`jsonConvert`进行操作。

    fvm flutter run

    The error message "No supported devices connected" means there are no compatible devices or emulators for running a Flutter app, and to fix this, you need to connect a device or launch an emulator, ensuring proper drivers and tools are installed, then use `flutter run` to start the app.