第三方app跳转

This commit is contained in:
weiwei committed 2025-05-14 11:53:09 +08:00
1 parent 06f5ebd9be
commit dee8d2e21f
6 files changed
+81 -27

No files matched your search

@@ -1,5 +1,5 @@
<script setup>
import { defineProps, computed } from "vue"
import { computed } from "vue"
import { router } from "@@/index"
const props = defineProps({
@@ -1,5 +1,5 @@
<script setup>
import { defineProps, computed } from "vue"
import { computed } from "vue"
import { router } from "@@/index"
const props = defineProps({
@@ -1,31 +1,31 @@
<script setup lang="ts">
import { defineProps, withDefaults } from "vue";
import { withDefaults } from "vue"
export interface Props {
type: "top" | "bottom";
bgColor: string;
type: "top" | "bottom"
bgColor: string
}
const props = withDefaults(defineProps<Props>(), {
type: "top",
bgColor: "transparent",
});
type: "top",
bgColor: "transparent",
})
function getHeight() {
const { top, bottom } = uni.getSystemInfoSync().safeAreaInsets!;
if (props.type && props.type === "bottom") {
return bottom + "px";
}
return top + "px";
const { top, bottom } = uni.getSystemInfoSync().safeAreaInsets!
if (props.type && props.type === "bottom") {
return bottom + "px"
}
return top + "px"
}
</script>
<template>
<view class="safe" :style="{ backgroundColor: props.bgColor, height: getHeight() }"></view>
<view class="safe" :style="{ backgroundColor: props.bgColor, height: getHeight() }"></view>
</template>
<style lang="scss">
.safe-top {
width: 100%;
width: 100%;
}
</style>
</style>