# @device

@device 指令用于指定设备类型列表,并限制组件只能在标记的(指定的)设备上运行。如果当前运行的设备类型与任何标记的设备都不匹配,那么带有设备标记的组件将不会被解析,并且调用 getComponentByName() 或者 querySelector将无法检索组件。

# 设备类型

名称 描述
mobile mobile devices
tablet tablet devices
desktop desktop
touch touchable screen devices
android android devices
iphone iphones
ios devices with IOS OS
ipad ipad

# 示例

@device.invert 示例