文件
OmniCard/mpuniapp/pages/API/is-simulator/is-simulator.uvue

27 行
697 B
Plaintext

此文件含有模棱两可的 Unicode 字符

此文件含有可能会与其他字符混淆的 Unicode 字符。 如果您是想特意这样的,可以安全地忽略该警告。 使用 Escape 按钮显示他们。

<template>
<!-- #ifdef APP && !VUE3-VAPOR -->
<scroll-view style="flex:1">
<!-- #endif -->
<view>
<page-head :title="'isSimulator'"></page-head>
<view class="uni-common-mt" style="justify-content: center;align-items: center;">
<text>{{
isSimulator ? "当前设备是模拟器" : "当前设备不是模拟器"
}}</text>
<text>\n注:有些模拟器会故意伪装为真机,此时识别可能会不准确</text>
</view>
</view>
<!-- #ifdef APP && !VUE3-VAPOR -->
</scroll-view>
<!-- #endif -->
</template>
<script setup>
const isSimulator = ref(false)
isSimulator.value = uni.isSimulator()
</script>
<style>
</style>