diff --git a/.eslintrc.js b/.eslintrc.js index 0b58fe50..50171d6a 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -45,7 +45,7 @@ module.exports = { }], 'default-case': 'error', 'consistent-this': ['error', '_this'], - 'max-depth': ['error', 5], + 'max-depth': ['error', 6], 'max-lines': ['error', 800], 'no-multi-str': 'error', 'space-infix-ops': 'error', diff --git a/src/views/Editor/Toolbar/SlideStylePanel.vue b/src/views/Editor/Toolbar/SlideStylePanel.vue index 4a94472f..15cbbe4b 100644 --- a/src/views/Editor/Toolbar/SlideStylePanel.vue +++ b/src/views/Editor/Toolbar/SlideStylePanel.vue @@ -294,7 +294,7 @@ export default defineComponent({ // 将当前主题应用到全部页面 const applyThemeAllSlide = () => { const newSlides: Slide[] = JSON.parse(JSON.stringify(slides.value)) - const { themeColor, backgroundColor, fontColor } = theme.value + const { themeColor, backgroundColor, fontColor, fontName } = theme.value for (const slide of newSlides) { if (!slide.background || slide.background.type !== 'image') { @@ -311,13 +311,17 @@ export default defineComponent({ else if (el.type === 'line') el.color = themeColor else if (el.type === 'text') { el.defaultColor = fontColor + el.defaultFontName = fontName if (el.fill) el.fill = themeColor } else if (el.type === 'table') { if (el.theme) el.theme.color = themeColor for (const rowCells of el.data) { for (const cell of rowCells) { - cell.style?.color && (cell.style.color = fontColor) + if (cell.style) { + cell.style.color = fontColor + cell.style.fontname = fontName + } } } }