add techBox & fix bugs 0720

This commit is contained in:
lb
2023-07-21 10:10:04 +08:00
parent c6504f0d3d
commit ab24d8b558
3 changed files with 55 additions and 11 deletions

View File

@@ -0,0 +1,30 @@
export default {
name: "TechBox",
props: ["injectData"],
data() {
return {
prop: this.injectData.head.prop,
};
},
methods: {},
render: function (h) {
const value = this.injectData[this.prop];
return h(
"span",
{
style: {
backgroundColor: value ? "#a5e24bdb" : "#ff000066",
position: "absolute",
top: 0,
left: 0,
width: "100%",
height: "100%",
padding: '0 10px',
lineHeight: "2.1125",
// TODO: 这块的 lineHeight 可以进一步精调或采用translate将文本居中以应对浏览器缩放至 33% 比例及以下的情况
},
},
value
);
},
};