liveh5-nuxt/app/components/x-popup/index.vue
xingyy 331b4a73b2 refactor(app): 重构 LiveRoom 组件
- 将 LiveRoom 相关组件和文件重命名,统一使用小写开头
- 新增 x-button、x-image 和 x-popup 组件,替代原有 PressableButton 和 ImagePreview
-优化 SideButton 组件,使用新的 x-button 和 tangPopup 组件- 更新 LiveRoom 组件中的引用和使用方式
- 调整 tangPopup 组件,使用 goodStore 替代静态数据
2025-01-22 15:44:50 +08:00

51 lines
1.1 KiB
Vue

<script setup>
const props = defineProps({
show: {
type: Boolean,
default: false
},
title:''
})
const emit = defineEmits(['update:show'])
const close=()=>{
emit('update:show',false)
}
</script>
<template>
<van-popup
:show="show"
teleport="#__nuxt"
position="bottom"
:style="{ height: '74%' }"
v-bind="{...$attrs,...$props}"
>
<div class="flex flex-col h-full">
<!-- 标题栏 -->
<div class="flex items-center pl-16px pr-19px h-40px border-b-1px border-gray-300 shrink-0">
<slot name="title">
<div class="text-black text-16px">{{ title }}</div>
</slot>
<van-icon
class="ml-auto"
size="20"
name="cross"
color="#939393"
@click="close"
/>
</div>
<!-- 内容区域 -->
<div class="flex-1 px-16px py-18px overflow-hidden relative">
<div class="h-full overflow-y-auto relative">
<slot/>
</div>
</div>
</div>
</van-popup>
</template>
<style scoped>
</style>