提交 9306495b 编写于 作者: DCloud-WZF's avatar DCloud-WZF 💬

test: 支持 ios 端 webview & app 截图对比

上级 9e0f3292
......@@ -20,7 +20,9 @@
</template>
<script>
import { setStatusBarHeight, setSafeArea } from '@/store/index.uts'
// #ifdef APP-ANDROID
import type { SafeArea } from '@/store/index.uts'
// #endif
type Item = {
label : string,
......@@ -44,14 +46,26 @@
// 获取状态栏高度, 供截图对比使用
setStatusBarHeight(res.statusBarHeight);
// 获取安全区信息,供截图使用
setSafeArea({
top: res.safeArea.top,
left: res.safeArea.left,
right: res.safeArea.right,
bottom: res.safeArea.bottom,
width: res.safeArea.width,
height: res.safeArea.height,
// #ifdef APP-ANDROID
setSafeArea({
top: res.safeArea.top,
left: res.safeArea.left,
right: res.safeArea.right,
bottom: res.safeArea.bottom,
width: res.safeArea.width,
height: res.safeArea.height,
} as SafeArea);
// #endif
// #ifdef APP-IOS
setSafeArea({
top: res.safeArea.top,
left: res.safeArea.left,
right: res.safeArea.right,
bottom: res.safeArea.bottom,
width: res.safeArea.width,
height: res.safeArea.height,
});
// #endif
this.items = [] as Item[];
const res_str = JSON.stringify(res);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册