Pārlūkot izejas kodu

fix: 修复列表序号位置问题

李志伟 4 nedēļas atpakaļ
vecāks
revīzija
5825b9894d

+ 2 - 2
src/components/view_file/components/vendors/pptx/PPT.vue

@@ -2,7 +2,7 @@
  * @Author: LiZhiWei
  * @Date: 2025-04-10 14:38:27
  * @LastEditors: LiZhiWei
- * @LastEditTime: 2025-04-18 17:38:35
+ * @LastEditTime: 2025-04-18 17:52:24
  * @Description:
 -->
 <template>
@@ -79,7 +79,7 @@ export default {
       const olTags = this.$refs.pptxContainer.querySelectorAll('ol')
       olTags.forEach((ol) => {
         ol.style.margin = '0px'
-        ol.style.padding = 'auto 0px'
+         ol.style.padding = 'auto 0px'
         ol.style.wordBreak = 'break-word'
         ol.style.lineHeight = '1'
       })

+ 2 - 2
src/utils/pptxToJson/text.js

@@ -93,7 +93,7 @@ export function genTextBody(
           '': '•', // 默认圆点
         }
         const displayChar = symbolMap[bulletChar] || bulletChar
-        text += `<span style="display: inline-block; width: 20px; margin-left: ${indentSize}px;">${displayChar}</span>`
+        text += `<span style="display: inline-block; width: 20px; margin-left: -${indentSize}px;">${displayChar}</span>`
       }
       else {
         let displayNumber = ''
@@ -124,7 +124,7 @@ export function genTextBody(
             displayNumber = `${currentNumber}.`
         }
       
-        text += `<span style="display: inline-block; margin-left: ${indentSize}px;">${displayNumber}</span>`
+        text += `<span style="display: inline-block; margin-left: -${indentSize}px;">${displayNumber}</span>`
       }
     }
     else {