useMobileLandscape

跟踪移动设备是否处于横屏模式。

Usage

Live Editor

function Demo() {
  const isMobileLandscape = useMobileLandscape();
  return <p>是否是移动端横屏: {JSON.stringify(isMobileLandscape)}</p>;
};
Result

API

useMobileLandscape

Returns

boolean: 是否是移动端横屏

Arguments