Theme.ts 2.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. import { configTheme } from "@/components/theme/ThemeDefine";
  2. export function configAppTheme() {
  3. //修改默认主题颜色
  4. configTheme(false, (theme, defaultDarkTheme) => {
  5. theme.colorConfigs.default.primary = '#e19579';
  6. theme.colorConfigs.pressed.primary = '#fbce7a';
  7. theme.colorConfigs.default.button = '#f6e9d9';
  8. theme.colorConfigs.background.primary = '#fef2e8';
  9. theme.colorConfigs.background.secondary = '#f7f8f9';
  10. theme.colorConfigs.background.tertiary = '#fff7f1';
  11. theme.colorConfigs.background.quaternary = '#fff4d8';
  12. theme.colorConfigs.text.title = '#62422f';
  13. theme.colorConfigs.text.content = '#7b5e49';
  14. theme.colorConfigs.text.second = '#95755a';
  15. theme.colorConfigs.text.titleLight = '#55989a';
  16. theme.colorConfigs.border.primary = '#55989a';
  17. theme.colorConfigs.border.secondary = '#5F3F2C';
  18. theme.varOverrides.radius.xs = '5rpx';
  19. theme.varOverrides.radius.sm = '10rpx';
  20. theme.varOverrides.radius.md = '20rpx';
  21. theme.varOverrides.radius.lg = '30rpx';
  22. theme.varOverrides.radius.lgr = '50rpx';
  23. theme.textConfigs.primaryTitle = {
  24. color: 'text.title',
  25. fontFamily: 'SongtiSCBlack',
  26. fontSize: '40rpx',
  27. fontWeight: 'bold',
  28. };
  29. theme.textConfigs.lightTitle = {
  30. color: 'text.titleLight',
  31. fontFamily: 'SongtiSCBlack',
  32. fontSize: '40rpx',
  33. fontWeight: 'bold',
  34. };
  35. theme.textConfigs.lightGoldTitle = {
  36. color: '#cb8833',
  37. fontFamily: 'SongtiSCBlack',
  38. fontSize: '40rpx',
  39. fontWeight: 'bold',
  40. };
  41. theme.textConfigs.importantTitle = {
  42. color: 'text.title',
  43. fontSize: '36rpx',
  44. fontWeight: 'bold',
  45. };
  46. theme.textConfigs.lightImportantTitle = {
  47. color: 'text.title',
  48. fontSize: '34rpx',
  49. };
  50. theme.textConfigs.contentText = {
  51. color: 'text.content',
  52. fontSize: '26rpx',
  53. };
  54. theme.textConfigs.secondText = {
  55. color: 'text.second',
  56. fontSize: '24rpx',
  57. };
  58. theme.varOverrides.border.primary = '1px solid #aca696';
  59. theme.varOverrides.border.secondary = '1px solid #5F3F2C';
  60. theme.varOverrides['DividerColor'] = '#eacb9f';
  61. theme.varOverrides['ImageDefaultImage'] = 'https://xy.wenlvti.net/app_static/EmptyImage.png';
  62. return [theme, defaultDarkTheme];
  63. });
  64. }