84 lines
3.8 KiB
JavaScript
84 lines
3.8 KiB
JavaScript
/** @type {import('tailwindcss').Config} */
|
|
export default {
|
|
content: ['./index.html', './src/**/*.{vue,js,ts,jsx,tsx}'],
|
|
darkMode: 'class',
|
|
theme: {
|
|
extend: {
|
|
colors: {
|
|
// 主色统一走蓝色系:比默认蓝略深一点,业务系统里更沉稳
|
|
primary: {
|
|
50: '#eef5ff', 100: '#d9e8ff', 200: '#bad7ff', 300: '#8cbdff', 400: '#5b9bfb',
|
|
500: '#2f76ef', 600: '#1c5cd6', 700: '#1748ae', 800: '#183e8b', 900: '#19376d',
|
|
950: '#111f42'
|
|
},
|
|
// 中性色整体偏蓝:浅色用蓝灰,深色用藏蓝,避免灰阶把主色冲淡
|
|
gray: {
|
|
50: '#eff4fc', 100: '#e4ecf8', 200: '#d4e0f0', 300: '#b8c9e0', 400: '#8095b4',
|
|
500: '#5d7295', 600: '#455a7b', 700: '#324460', 800: '#212f49', 900: '#152039',
|
|
950: '#0a1123'
|
|
},
|
|
accent: {
|
|
50: '#eff4fc', 100: '#e4ecf8', 200: '#d4e0f0', 300: '#b8c9e0', 400: '#8095b4',
|
|
500: '#5d7295', 600: '#455a7b', 700: '#324460', 800: '#212f49', 900: '#152039',
|
|
950: '#0a1123'
|
|
},
|
|
dark: {
|
|
50: '#eff4fc', 100: '#e4ecf8', 200: '#d4e0f0', 300: '#b6c6de', 400: '#8ba0c2',
|
|
500: '#66799c', 600: '#42567a', 700: '#2c3e5d', 800: '#1d2b47', 900: '#131e35',
|
|
950: '#0a1122'
|
|
},
|
|
// 语义色:成功收进蓝绿(青)一族,提示用亮蓝,警示/危险保留暖色保证可分辨
|
|
success: {
|
|
50: '#eefbfd', 100: '#d3f4f7', 200: '#ade9ef', 300: '#75d8e2', 400: '#38bccd',
|
|
500: '#179fb6', 600: '#0f7f99', 700: '#10667d', 800: '#135366', 900: '#144555',
|
|
950: '#0a2b37'
|
|
},
|
|
info: {
|
|
50: '#f0f9ff', 100: '#e0f2fe', 200: '#b9e6fe', 300: '#7dd3fc', 400: '#38bdf8',
|
|
500: '#0ea5e9', 600: '#0284c7', 700: '#0369a1', 800: '#075985', 900: '#0c4a6e',
|
|
950: '#082f49'
|
|
},
|
|
warning: {
|
|
50: '#fffbeb', 100: '#fef3c7', 200: '#fde68a', 300: '#fcd34d', 400: '#fbbf24',
|
|
500: '#f59e0b', 600: '#d97706', 700: '#b45309', 800: '#92400e', 900: '#78350f',
|
|
950: '#451a03'
|
|
},
|
|
danger: {
|
|
50: '#fef2f2', 100: '#fee2e2', 200: '#fecaca', 300: '#fca5a5', 400: '#f87171',
|
|
500: '#ef4444', 600: '#dc2626', 700: '#b91c1c', 800: '#991b1b', 900: '#7f1d1d',
|
|
950: '#450a0a'
|
|
}
|
|
},
|
|
fontFamily: {
|
|
sans: ['system-ui', '-apple-system', 'BlinkMacSystemFont', 'Segoe UI', 'Roboto',
|
|
'Helvetica Neue', 'Arial', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei',
|
|
'sans-serif'],
|
|
mono: ['ui-monospace', 'SFMono-Regular', 'Menlo', 'Monaco', 'Consolas', 'monospace']
|
|
},
|
|
fontSize: {
|
|
// 表格里长金额要靠 tabular-nums 对齐,不然每行数字宽度不一样
|
|
'num': ['0.8125rem', { lineHeight: '1.25rem', fontVariantNumeric: 'tabular-nums' }],
|
|
'num-lg': ['1.125rem', { lineHeight: '1.75rem', fontVariantNumeric: 'tabular-nums' }]
|
|
},
|
|
boxShadow: {
|
|
card: '0 1px 3px rgba(16, 34, 84, 0.05), 0 1px 2px rgba(16, 34, 84, 0.07)',
|
|
'card-hover': '0 10px 40px rgba(16, 34, 84, 0.10)',
|
|
'glass-sm': '0 4px 16px rgba(16, 34, 84, 0.08)'
|
|
},
|
|
animation: {
|
|
'fade-in': 'fadeIn 0.25s ease-out',
|
|
'slide-up': 'slideUp 0.25s ease-out',
|
|
'scale-in': 'scaleIn 0.18s ease-out',
|
|
shimmer: 'shimmer 2s linear infinite'
|
|
},
|
|
keyframes: {
|
|
fadeIn: { '0%': { opacity: '0' }, '100%': { opacity: '1' } },
|
|
slideUp: { '0%': { opacity: '0', transform: 'translateY(8px)' }, '100%': { opacity: '1', transform: 'none' } },
|
|
scaleIn: { '0%': { opacity: '0', transform: 'scale(0.96)' }, '100%': { opacity: '1', transform: 'none' } },
|
|
shimmer: { '0%': { backgroundPosition: '-200% 0' }, '100%': { backgroundPosition: '200% 0' } }
|
|
}
|
|
}
|
|
},
|
|
plugins: []
|
|
}
|