初始化移动端提交

This commit is contained in:
chenbowen
2025-09-30 00:08:23 +08:00
parent 08784ca8f3
commit f2ffc65094
406 changed files with 55626 additions and 93 deletions

49
sheep/utils/theme.js Normal file
View File

@@ -0,0 +1,49 @@
import themeConfig from '@/sheep/config/theme.js';
/**
* 主题管理工具类 - 简化版,只提供主题色配置
*/
class ThemeManager {
constructor() {
this.config = themeConfig;
}
/**
* 获取当前主题色
*/
getCurrentThemeColor() {
return this.config.primary.main;
}
/**
* 获取主题渐变
* @param {string} type - 渐变类型 horizontal|vertical|diagonal
*/
getGradient(type = 'horizontal') {
return this.config.gradients[type] || this.config.gradients.horizontal;
}
/**
* 获取主题色变体
*/
getThemeColors() {
return {
main: this.config.primary.main,
light: this.config.primary.light,
dark: this.config.primary.dark,
gradient: this.config.primary.gradient
};
}
/**
* 获取CSS变量
*/
getCSSVars() {
return this.config.getCSSVars();
}
}
// 创建全局实例
const themeManager = new ThemeManager();
export default themeManager;