fix: 表格设置主题后透明

This commit is contained in:
pipipi-pikachu 2021-12-31 17:11:16 +08:00
parent cb9ae878ad
commit e19eae8267
3 changed files with 5 additions and 5 deletions

View File

@ -179,12 +179,10 @@ export const createElementIdMap = (elements: PPTElement[]) => {
* @param themeColor
*/
export const getTableSubThemeColor = (themeColor: string) => {
const rgba = tinycolor(themeColor).toRgb()
const subRgba1 = { r: rgba.r, g: rgba.g, b: rgba.b, a: rgba.a * 0.3 }
const subRgba2 = { r: rgba.r, g: rgba.g, b: rgba.b, a: rgba.a * 0.1 }
const rgba = tinycolor(themeColor)
return [
`rgba(${[subRgba1.r, subRgba1.g, subRgba1.b, subRgba1.a].join(',')})`,
`rgba(${[subRgba2.r, subRgba2.g, subRgba2.b, subRgba2.a].join(',')})`,
rgba.setAlpha(0.3).toRgbString(),
rgba.setAlpha(0.1).toRgbString(),
]
}

View File

@ -709,6 +709,7 @@ table {
border: 0;
word-wrap: break-word;
user-select: none;
background-color: #fff;
--themeColor: $themeColor;
--subThemeColor1: $themeColor;

View File

@ -120,6 +120,7 @@ table {
border: 0;
word-wrap: break-word;
user-select: none;
background-color: #fff;
--themeColor: $themeColor;
--subThemeColor1: $themeColor;