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

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

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