Parcourir la source

综合管理大屏公告样式修改。

jxq il y a 1 mois
Parent
commit
6457074da4
1 fichiers modifiés avec 17 ajouts et 1 suppressions
  1. 17 1
      src/views/screens/screen-components/WeiDianZiCheJianGongGao.vue

+ 17 - 1
src/views/screens/screen-components/WeiDianZiCheJianGongGao.vue

@@ -26,6 +26,7 @@ const props = defineProps({
   },
 });
 const bigScreenData: any = inject("bigScreenData");
+const bsFS = bigScreenData.value.fontSize * 1.5;
 onMounted(async () => {
   let res = await microelectronicWorkshopNotice();
   if (res.data.length > 0) {
@@ -37,7 +38,7 @@ onMounted(async () => {
                 <span style="color: blue;font-size:150%;">${item.title}</span>
             <span>${item.updated}</span>
             </div>
-            <div style="word-break: break-all;white-space: normal;display: flex;align-items: start;justify-content: start;width: 100%;height: 100%;overflow: hidden;line-height: ${bigScreenData.value.fontSize * 2 + 5}px">
+            <div id="scroll-table-id" style="word-break: break-all;white-space: normal;display: flex;flex-direction: column;align-items: start;justify-content: start;width: 100%;height: 100%;overflow: hidden;font-size: ${bigScreenData.value.fontSize * 2}px;line-height: ${bigScreenData.value.fontSize * 2 + 5}px">
                 ${item.content}
             </div>
         </div>`,
@@ -71,4 +72,19 @@ const tableHover = (data: any) => {
   height: 60px;
   border: 1px solid red;
 }
+.scroll-table-id {
+  p {
+    font-size: 14px;
+  }
+}
+</style>
+
+<style lang="scss">
+#scroll-table-id {
+  font-size: v-bind("bsFS"); /* 示例值,按需调整 */
+}
+
+#scroll-table-id h1 {
+  font-size: v-bind("bsFS") !important; /* 使用!important覆盖用户样式 */
+}
 </style>