问题描述
我有一个简单的Vue应用程序,当用户以PWA形式打开该应用程序时,我想显示其他样式。例如,我有一个标头组件:
@Component({
components: {
HeaderMenu,},})
export default class Header extends Vue {
@Prop() private msg!: string;
}
</script>
<style scoped lang="scss">
header {
display: flex;
background: #0fcece;
padding: 24px 8px;
align-items: center;
@media only screen and (max-width: 600px) {
h1 {
display: none;;
}
}
h1 {
font-size: 3.5em;
color: #fff;
margin: 0;
font-family: 'Oleo Script Swash Caps',cursive;
text-shadow: 2px 2px 5px #000;
}
.headerMenu {
user-select: none;
position: relative;
margin-left: auto;
}
}
</style>
<template>
<header>
<h1>Movieseat</h1>
<HeaderMenu class='headerMenu'/>
</header>
</template>
当用户打开PWA时,我想隐藏h1标签。我当然可以使用检查特定水平屏幕分辨率的媒体查询,但是有其他/更好的方法吗?
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)