Skip to content

Conversation

@BB0813
Copy link

@BB0813 BB0813 commented Jan 16, 2026

夹带私货

其实感觉这个PR并不是很核心 大概率是不会合并Pr的awa 但我还是想提交 至少有在为APlayer的生态做贡献
这个仓库接下来会作为第三方分支发布新的UI/UX更新

动机 / Motivation

在帮助朋友更新个人主页UI/UX的过程中,我认为原项目的 UI 可以更加现代化和美观,因此我基于 Vue 3 重写了一套全新的播放器控件,采用了流行的 Glassmorphism (毛玻璃) 设计风格,并增强了交互体验。
I think the original UI could be more modern and beautiful, so I rewrote a brand new player component based on Vue 3, adopting the popular Glassmorphism design style and enhancing the interactive experience.

主要更新 / Key Updates

  1. Vue 3 重构: 引入 vue, vue-loader 等依赖,使用 Vue 3 Composition API 重构了核心逻辑。
    Vue 3 Refactor: Introduced vue, vue-loader, etc., and refactored the core logic using Vue 3 Composition API.
  2. 全新 UI: 现代化的毛玻璃风格界面,适配深色模式。
    Brand New UI: Modern Glassmorphism interface with Dark Mode support.
  3. Webpack 升级: 升级构建配置以支持 Vue 单文件组件 (.vue) 和 Dart Sass。
    Webpack Upgrade: Upgraded build config to support Vue SFC (.vue) and Dart Sass.

新特性 / New Features

1. 桌面级歌词体验 (Desktop-class Lyrics)

  • 拖拽功能 (Draggable): 歌词容器支持在页面任意位置拖拽悬浮。
  • 右键菜单 (Context Menu): 右键点击歌词可自定义字体大小和颜色。
  • 双行显示: 高亮显示当前歌词,并预告下一句。

2. 增强的交互 (Enhanced Interaction)

  • 垂直音量条: 更加节省空间的垂直音量控制滑块。
  • 封面旋转: 播放时专辑封面会自动旋转。
  • 自适应布局: 针对移动端 (< 768px) 进行了专门的适配。

使用方法 / How to use it?

引入方式保持不变,但底层已完全替换为 Vue 实例挂载。
The initialization remains compatible, but the underlying implementation is now mounting a Vue instance.

import 'aplayer/dist/APlayer.min.css';
import APlayer from 'aplayer';

const ap = new APlayer({
    container: document.getElementById('player'),
    // 目前版本内置了 Meting API 调用逻辑,未来可恢复 audio 数组传参
    // Currently uses built-in Meting API logic
});

效果预览 / Preview

537035508-3eb55718-bfe3-4e69-998e-54fa8e0b5759 d7cb5722-9e36-481d-9530-55abf1a2ead7

技术细节 / Technical Details

  • Dependencies: Added vue@3.x, sass, sass-loader.
  • Removed: Removed node-sass (deprecated).
  • Entry: Changed entry point from src/js/index.js to src/index_vue.js.

Windows 环境导致的换行符自动转换
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant