mirror of
https://github.com/pipipi-pikachu/PPTist.git
synced 2025-04-15 02:20:00 +08:00
fix: 应用全局字体
This commit is contained in:
parent
5657d3af05
commit
fcc23b0ad6
@ -45,7 +45,7 @@ module.exports = {
|
|||||||
}],
|
}],
|
||||||
'default-case': 'error',
|
'default-case': 'error',
|
||||||
'consistent-this': ['error', '_this'],
|
'consistent-this': ['error', '_this'],
|
||||||
'max-depth': ['error', 5],
|
'max-depth': ['error', 6],
|
||||||
'max-lines': ['error', 800],
|
'max-lines': ['error', 800],
|
||||||
'no-multi-str': 'error',
|
'no-multi-str': 'error',
|
||||||
'space-infix-ops': 'error',
|
'space-infix-ops': 'error',
|
||||||
|
@ -294,7 +294,7 @@ export default defineComponent({
|
|||||||
// 将当前主题应用到全部页面
|
// 将当前主题应用到全部页面
|
||||||
const applyThemeAllSlide = () => {
|
const applyThemeAllSlide = () => {
|
||||||
const newSlides: Slide[] = JSON.parse(JSON.stringify(slides.value))
|
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) {
|
for (const slide of newSlides) {
|
||||||
if (!slide.background || slide.background.type !== 'image') {
|
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 === 'line') el.color = themeColor
|
||||||
else if (el.type === 'text') {
|
else if (el.type === 'text') {
|
||||||
el.defaultColor = fontColor
|
el.defaultColor = fontColor
|
||||||
|
el.defaultFontName = fontName
|
||||||
if (el.fill) el.fill = themeColor
|
if (el.fill) el.fill = themeColor
|
||||||
}
|
}
|
||||||
else if (el.type === 'table') {
|
else if (el.type === 'table') {
|
||||||
if (el.theme) el.theme.color = themeColor
|
if (el.theme) el.theme.color = themeColor
|
||||||
for (const rowCells of el.data) {
|
for (const rowCells of el.data) {
|
||||||
for (const cell of rowCells) {
|
for (const cell of rowCells) {
|
||||||
cell.style?.color && (cell.style.color = fontColor)
|
if (cell.style) {
|
||||||
|
cell.style.color = fontColor
|
||||||
|
cell.style.fontname = fontName
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user