add techBox & fix bugs 0720
This commit is contained in:
30
src/components/noTemplateComponents/techBox.js
Normal file
30
src/components/noTemplateComponents/techBox.js
Normal 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
|
||||
);
|
||||
},
|
||||
};
|
||||
Reference in New Issue
Block a user