-移除原有的直播界面组件,改为使用新的 sideButton 组件 - 新增支付对话框,允许用户输入支付金额 - 使用 Pinia 创建 liveStore 来管理直播相关状态 - 优化了出价开关逻辑,现在通过 liveStore进行管理 - 调整了侧边按钮的样式和布局,提高了用户体验
28 lines
550 B
Vue
28 lines
550 B
Vue
<script setup>
|
|
import {ref, defineEmits} from "vue";
|
|
|
|
const emit = defineEmits(["click"]);
|
|
|
|
const isButtonActive = ref(false);
|
|
|
|
const handleButtonPress = () => {
|
|
isButtonActive.value = true;
|
|
};
|
|
const handleButtonRelease = () => {
|
|
isButtonActive.value = false;
|
|
emit("click")
|
|
};
|
|
</script>
|
|
<template>
|
|
<div
|
|
:class="[
|
|
'bg-white transition-all duration-200',
|
|
isButtonActive ? 'scale-95 bg-gray-200' : ''
|
|
]"
|
|
@touchstart="handleButtonPress"
|
|
@touchend="handleButtonRelease"
|
|
>
|
|
<slot></slot>
|
|
</div>
|
|
</template>
|