|
@@ -222,7 +222,7 @@
|
|
|
:key="y + 'td0'"
|
|
|
:class="[y % 6 === 5 && y != tdList.length && 'redLineTd']"
|
|
|
>
|
|
|
- <div class="recorde-text">{{ getSymbolTextArr(y) }}</div>
|
|
|
+ <div class="recorde-text" :style="recordeTextStyle">{{ getSymbolTextArr(y) }}</div>
|
|
|
</td>
|
|
|
</tr>
|
|
|
<tr
|
|
@@ -668,6 +668,16 @@ export default {
|
|
|
comKey: 1,
|
|
|
symbolTextArr: [],
|
|
|
array42: [],
|
|
|
+ // 动态样式
|
|
|
+ recordeTextStyle: {
|
|
|
+ width: '12px',
|
|
|
+ height: '10px',
|
|
|
+ color: '#ff0000',
|
|
|
+ fontSize: '8px',
|
|
|
+ position: 'relative',
|
|
|
+ top: '0px',
|
|
|
+ lineHeight: '14px'
|
|
|
+ }
|
|
|
};
|
|
|
},
|
|
|
computed: {
|
|
@@ -722,6 +732,10 @@ export default {
|
|
|
10 +
|
|
|
28;
|
|
|
this.marginTop = marginTop;
|
|
|
+
|
|
|
+ // 根据分辨率设置样式
|
|
|
+ this.setStyleByResolution();
|
|
|
+
|
|
|
// setTimeout(() => {
|
|
|
// this.$emit('done')
|
|
|
// })
|
|
@@ -1127,6 +1141,76 @@ export default {
|
|
|
});
|
|
|
this.typesViewData = keyMap;
|
|
|
},
|
|
|
+ // 根据分辨率设置样式
|
|
|
+ setStyleByResolution() {
|
|
|
+ const screenWidth = window.screen.width;
|
|
|
+ const screenHeight = window.screen.height;
|
|
|
+
|
|
|
+ console.log('当前分辨率:', screenWidth + 'x' + screenHeight);
|
|
|
+
|
|
|
+ // 默认样式(当前分辨率)
|
|
|
+ let style = {
|
|
|
+ width: '12px',
|
|
|
+ height: '10px',
|
|
|
+ color: '#ff0000',
|
|
|
+ fontSize: '8px',
|
|
|
+ position: 'relative',
|
|
|
+ top: '0px',
|
|
|
+ lineHeight: '14px'
|
|
|
+ };
|
|
|
+
|
|
|
+ // 可以根据不同分辨率设置不同样式
|
|
|
+ // 例如:1920x1080
|
|
|
+ if (screenWidth === 1920 && screenHeight === 1080) {
|
|
|
+ style = {
|
|
|
+ width: '12px',
|
|
|
+ height: '10px',
|
|
|
+ color: '#ff0000',
|
|
|
+ fontSize: '8px',
|
|
|
+ position: 'relative',
|
|
|
+ top: '0px',
|
|
|
+ lineHeight: '14px'
|
|
|
+ };
|
|
|
+ }
|
|
|
+ // 例如:1366x768
|
|
|
+ else if (screenWidth === 1366 && screenHeight === 768) {
|
|
|
+ style = {
|
|
|
+ width: '12px',
|
|
|
+ height: '10px',
|
|
|
+ color: '#ff0000',
|
|
|
+ fontSize: '8px',
|
|
|
+ position: 'relative',
|
|
|
+ top: '0px',
|
|
|
+ lineHeight: '14px'
|
|
|
+ };
|
|
|
+ }
|
|
|
+ // 例如:1440x900
|
|
|
+ else if (screenWidth === 1440 && screenHeight === 900) {
|
|
|
+ style = {
|
|
|
+ width: '12px',
|
|
|
+ height: '10px',
|
|
|
+ color: '#ff0000',
|
|
|
+ fontSize: '8px',
|
|
|
+ position: 'relative',
|
|
|
+ top: '0px',
|
|
|
+ lineHeight: '14px'
|
|
|
+ };
|
|
|
+ }
|
|
|
+ // 其他分辨率使用默认样式
|
|
|
+ else {
|
|
|
+ style = {
|
|
|
+ width: '12px',
|
|
|
+ height: '10px',
|
|
|
+ color: '#ff0000',
|
|
|
+ fontSize: '8px',
|
|
|
+ position: 'relative',
|
|
|
+ top: '0px',
|
|
|
+ lineHeight: '14px'
|
|
|
+ };
|
|
|
+ }
|
|
|
+
|
|
|
+ this.recordeTextStyle = style;
|
|
|
+ },
|
|
|
},
|
|
|
};
|
|
|
|
|
@@ -1168,13 +1252,9 @@ td {
|
|
|
border-right: 1px solid #ff6e71;
|
|
|
}
|
|
|
.recorde-text {
|
|
|
- width: 12px;
|
|
|
- height: 10px;
|
|
|
+ /* 样式现在通过动态计算设置 */
|
|
|
color: #ff0000;
|
|
|
- font-size: 8px;
|
|
|
position: relative;
|
|
|
- top: 0px;
|
|
|
- line-height:14px;
|
|
|
}
|
|
|
.table_wrap {
|
|
|
position: relative;
|