xlqx/app/components/ContactFloatingButton.vue

47 lines
1.5 KiB
Vue
Raw Normal View History

2025-10-27 16:22:18 +08:00
<!-- components/ContactFloatingButton.vue -->
<template>
2025-11-04 15:25:51 +08:00
<div class="fixed right-2 lg:right-6 top-1/2 transform -translate-y-1/2 z-50 flex items-center">
<!-- PC端弹窗 - 使用 CSS 媒体查询只在 lg 及以上显示 -->
<div class="hidden lg:block">
<UPopover
arrow
mode="click"
:popper="{ placement: 'left-start' }"
:content="{
align: 'center',
side: 'left',
sideOffset: 6
}"
>
2025-10-27 16:22:18 +08:00
<UButton
2025-10-29 13:52:37 +08:00
class="bg-primary hover:bg-primary-600 text-white px-4 py-3 rounded-l-lg shadow-lg transition-all duration-300"
color="neutral"
label="商家加盟"
2025-10-27 16:22:18 +08:00
variant="subtle"/>
<template #content>
2025-11-04 15:32:40 +08:00
<div class="w-75 lg:w-100 h-120 lg:h-160 overflow-y-auto hidden lg:block">
<MerchantForm container-class="p-4 bg-white rounded-lg shadow-xl" />
2025-10-27 16:22:18 +08:00
</div>
</template>
2025-11-04 15:25:51 +08:00
</UPopover>
</div>
2025-11-04 15:25:51 +08:00
<!-- 移动端跳转链接 - 使用 CSS 媒体查询只在 lg 以下显示 -->
<NuxtLink
to="/merchantFranchise"
2025-11-04 15:25:51 +08:00
class="block lg:hidden"
>
<UButton
2025-11-04 15:25:51 +08:00
class="bg-primary hover:bg-primary-600 text-white px-4 py-2 rounded-l-lg shadow-lg transition-all duration-300 "
color="neutral"
label="商家加盟"
variant="subtle"/>
</NuxtLink>
2025-10-27 16:22:18 +08:00
</div>
</template>
2025-11-03 16:39:40 +08:00
<script setup lang="ts">
2025-11-04 15:32:40 +08:00
// 表单逻辑已抽离到 MerchantForm 组件
2025-11-03 16:39:40 +08:00
</script>