From 870d97788c3e9fc8c64d03bd11929b2b2a3dfda6 Mon Sep 17 00:00:00 2001 From: wujingjing <gersonwu@qq.com> Date: 星期四, 27 二月 2025 16:44:21 +0800 Subject: [PATCH] 修改 bug ,地图查询 --- tailwind.config.js | 88 +++++++++++++++++++++++++++++++++++++++++++- 1 files changed, 86 insertions(+), 2 deletions(-) diff --git a/tailwind.config.js b/tailwind.config.js index ea0d823..1177eae 100644 --- a/tailwind.config.js +++ b/tailwind.config.js @@ -1,4 +1,24 @@ /** @type {import('tailwindcss').Config} */ + +// function genSimilarColorsName(brandName) { +// return { +// lighter: `var(--${brandName}-lighter-color)`, +// light: `var(--${brandName}-light-color)`, +// DEFAULT: `var(--${brandName}-color)`, +// deep: `var(--${brandName}-deep-color)`, +// deeper: `var(--${brandName}-deeper-color)` +// }; +// } +function withOpacityValue(variable) { + // 杩斿洖涓�涓嚱鏁帮紝閫忔槑搴︿负鍙�夊弬鏁帮紝杩欐牱鍦� HTML 鍏冪礌涓娇鐢ㄩ鑹插熀纭�绫绘椂锛屾棦鍙互閲囩敤 text-blue-500 鏂瑰紡锛屼篃鏀寔 text-blue-500/20 蹇嵎鍚屾椂璁剧疆閫忔槑搴︾殑褰㈠紡 + return ({ opacityValue }) => { + if (opacityValue === undefined) { + return `rgb(var(${variable}))`; + } + return `rgba(var(${variable}), ${opacityValue})`; + }; +} + export default { content: ['./index.html', './src/**/*.{vue,js,ts,jsx,tsx}'], corePlugins: { @@ -7,6 +27,70 @@ // 2锛塱 鏍囩 display 淇敼锛屽鑷村竷灞�閿欒锛�3锛塨order 棰滆壊榛樿鍊间笉鏄粦鑹� preflight: false, }, - theme: {}, - plugins: [require("@tailwindcss/typography")], + // theme: { + // // ... + // // 淇敼Tailwind涓婚鑹查厤缃紝浣跨敤鎴戜滑璁捐鐨勮繖涓�濂楅鑹� + // colors: { + // white: '#fff', + // black: '#191919', + // transparent: 'transparent', + // // 鐩存帴浣跨敤css鍙橀噺 + // primary: genSimilarColorsName('primary'), + // info: genSimilarColorsName('info'), + // success: genSimilarColorsName('success'), + // warning: genSimilarColorsName('warning'), + // danger: genSimilarColorsName('danger') + // } + // }, + theme: { + extend: { + colors: { + primary: { + DEFAULT: '#1989fa', + light: '#40a9ff', + dark: '#096dd9', + }, + info: { + DEFAULT: '#909399', + light: '#a6a9ad', + dark: '#82848a', + }, + success: { + DEFAULT: '#67c23a', + light: '#85ce61', + dark: '#529b2e', + }, + warning: { + DEFAULT: '#e6a23c', + light: '#ebb563', + dark: '#b88230', + }, + danger: { + DEFAULT: '#f56c6c', + light: '#f78989', + dark: '#c45656', + }, + }, + backgroundColor: { + // 姝ゅ鐢ㄦ潵瀹氫箟涓婚鐨勮儗鏅壊鍩虹鏍峰紡 + skin: { + bg: withOpacityValue('--color-bg-base'), + bgExr: withOpacityValue('--color-bg-base-exr'), + bgSide: withOpacityValue('--color-bg-side'), + bgBorder: withOpacityValue('--color-bg-border'), + fo: withOpacityValue('--color-text-font'), + card: withOpacityValue('--color-bg-card'), + btn: withOpacityValue('--color-bg-btn'), + avatar: withOpacityValue('--color-bg-avatar'), + 'btn-hover': withOpacityValue('--color-bg-btn-hover'), + }, + }, + textColor: { + // 鏂囨湰鐨勫熀纭�鏍峰紡 + primary: 'var(--color-text-base)', + 'btn-base': 'var(--color-btn-base)', + }, + }, + }, + plugins: [require('@tailwindcss/typography')], }; -- Gitblit v1.9.3