From f1e4601f7c84ba4ecf9df2063e950e492226e6b9 Mon Sep 17 00:00:00 2001 From: xingyy <64720302+Concur-max@users.noreply.github.com> Date: Thu, 20 Feb 2025 14:47:57 +0800 Subject: [PATCH] =?UTF-8?q?feat(components):=20=E6=96=B0=E5=A2=9E=E6=82=AC?= =?UTF-8?q?=E6=B5=AE=E7=AA=97=E7=BB=84=E4=BB=B6=E5=B9=B6=E4=BC=98=E5=8C=96?= =?UTF-8?q?=E7=9B=B4=E6=92=AD=E7=9B=B8=E5=85=B3=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 新增悬浮窗组件,用于在直播页面显示"回到直播"按钮- 优化直播室侧边按钮,使用新的悬浮窗组件 - 修复商品详情页面的成交价显示问题 - 优化首页拍卖列表的成交价显示 -改进用户主页的拍卖信息展示 - 重构签名面板组件,使用 vue-signature-pad 替代原生实现 - 优化 nuxt 配置,启用 vscode devtools --- app/components/floatingBubble/floating.js | 34 +++++++++++++ app/components/floatingBubble/index.vue | 26 ++++++++++ app/components/itemDetail/index.vue | 6 ++- .../collectCode/signature/panel/index.vue | 39 +-------------- app/pages/home/components/ItemList/index.vue | 2 +- app/pages/home/index.vue | 2 + .../liveRoom/components/SideButton/index.vue | 31 +++++++----- .../components/SideButton/tangPopup.vue | 2 +- app/pages/liveRoom/index.client.vue | 2 +- app/pages/profile/index.vue | 2 +- app/pages/signature/panel/index.vue | 48 +++++++------------ nuxt.config.js | 5 +- 12 files changed, 112 insertions(+), 87 deletions(-) create mode 100644 app/components/floatingBubble/floating.js create mode 100644 app/components/floatingBubble/index.vue diff --git a/app/components/floatingBubble/floating.js b/app/components/floatingBubble/floating.js new file mode 100644 index 0000000..d28f994 --- /dev/null +++ b/app/components/floatingBubble/floating.js @@ -0,0 +1,34 @@ +import { createApp } from 'vue' +import MinWindow from '@/components/floatingBubble/index.vue' + +let minWindowInstance = null +let minWindowApp = null // 新增:保存应用实例 + +// 创建悬浮窗 +export const showMinWindow1 = ( props = {}) => { + if (process.client){ + const container = document.createElement('div') + container.className = 'floating-bubble-container' // 添加类名 + document.body.appendChild(container) + const app = createApp(MinWindow, { + ...props + }) + + minWindowApp = app // 保存应用实例 + minWindowInstance = app.mount(container) + return minWindowInstance + } +} + +export const hideMinWindow1 = () => { + if (!minWindowApp) return + const cleanup = () => { + minWindowApp.unmount() // 使用应用实例的unmount方法 + const container = document.querySelector('.floating-bubble-container') // 假设您的容器有这个类名 + container && document.body.removeChild(container) + minWindowApp = null + minWindowInstance = null + } + + cleanup() +} \ No newline at end of file diff --git a/app/components/floatingBubble/index.vue b/app/components/floatingBubble/index.vue new file mode 100644 index 0000000..0fc4b58 --- /dev/null +++ b/app/components/floatingBubble/index.vue @@ -0,0 +1,26 @@ + + + + + \ No newline at end of file diff --git a/app/components/itemDetail/index.vue b/app/components/itemDetail/index.vue index f2ca9d6..c67833c 100644 --- a/app/components/itemDetail/index.vue +++ b/app/components/itemDetail/index.vue @@ -8,7 +8,7 @@ const props = defineProps({ default: null } }) - +console.log(props.detailInfo)