Pārlūkot izejas kodu

fix: 修复组合元素渲染时宽度问题、修复标题字体大小问题

李志伟 1 mēnesi atpakaļ
vecāks
revīzija
113a8cd040

Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 294 - 303
src/components/view_file/components/vendors/pptx/PPT.vue


+ 8 - 8
src/components/view_file/components/vendors/pptx/index.js

@@ -2,24 +2,24 @@
  * @Author: LiZhiWei
  * @Date: 2025-04-09 10:49:05
  * @LastEditors: LiZhiWei
- * @LastEditTime: 2025-04-15 10:28:33
+ * @LastEditTime: 2025-04-16 17:16:28
  * @Description:
  */
-import Vue from 'vue'
-import PPT from './PPT.vue'
-import { parse } from 'pptxtojson'
+import Vue from "vue"
+import PPT from "./PPT.vue"
+import { parse } from "@/utils/pptxToJson/dist/index"
 /**
  * 渲染ppt
  */
-export default async function render (buffer, target) {
+export default async function render(buffer, target) {
   const pptxJson = await parse(buffer)
   const el = new Vue({
     render: (h) =>
       h(PPT, {
         props: {
-          pptxJson
-        }
-      })
+          pptxJson,
+        },
+      }),
   }).$mount(target)
   return el
 }

+ 34 - 34
src/components/view_file/components/vendors/xlsx/Table.vue

@@ -1,7 +1,7 @@
 <template>
-  <div>
-    <div ref="spreadsheet" class="spreadsheet-container" id="spreadsheet"></div>
-  </div>
+    <div>
+        <div ref="spreadsheet" class="spreadsheet-container" id="spreadsheet"></div>
+    </div>
 </template>
 
 <script>
@@ -776,48 +776,48 @@ export default {
 
 <style scoped>
 .spreadsheet-container {
-  width: 100%;
-  height: calc(100vh - 120px);
-  position: relative;
+    width: 100%;
+    height: calc(100vh - 120px);
+    position: relative;
 }
 
 .spreadsheet-container.loading::after {
-  content: "加载中...";
-  position: absolute;
-  top: 0;
-  left: 0;
-  right: 0;
-  bottom: 0;
-  background: rgba(255, 255, 255, 0.7);
-  display: flex;
-  align-items: center;
-  justify-content: center;
-  font-size: 18px;
-  z-index: 1000;
+    content: "加载中...";
+    position: absolute;
+    top: 0;
+    left: 0;
+    right: 0;
+    bottom: 0;
+    background: rgba(255, 255, 255, 0.7);
+    display: flex;
+    align-items: center;
+    justify-content: center;
+    font-size: 18px;
+    z-index: 1000;
 }
 
 .sheet-btn {
-  border: 1px solid #ccc;
-  background-color: #f0f0f0;
-  cursor: pointer;
-  margin-right: 5px;
-  border-radius: 4px;
-  padding: 5px 15px;
+    border: 1px solid #ccc;
+    background-color: #f0f0f0;
+    cursor: pointer;
+    margin-right: 5px;
+    border-radius: 4px;
+    padding: 5px 15px;
 }
 
 .sheet-btn.active {
-  background-color: #4caf50;
-  color: white;
-  border-color: #388e3c;
+    background-color: #4caf50;
+    color: white;
+    border-color: #388e3c;
 }
 
 .btn-group {
-  margin-bottom: 10px;
-  display: flex;
-  flex-wrap: wrap;
-  gap: 5px;
-  padding: 8px;
-  background-color: #f8f8f8;
-  border-radius: 4px;
+    margin-bottom: 10px;
+    display: flex;
+    flex-wrap: wrap;
+    gap: 5px;
+    padding: 8px;
+    background-color: #f8f8f8;
+    border-radius: 4px;
 }
 </style>

Daži faili netika attēloti, jo izmaiņu fails ir pārāk liels