Ionic Angular应用从CSR切换到SSR后ion-header样式丢失
Ionic Angular 切换为 SSR/SSG 后 ion-header 样式丢失
我给现有的CSR(客户端渲染)Ionic Angular网页应用(非Capacitor原生应用)添加SSR(服务端渲染)/SSG(静态站点生成)后,ion-header的样式不再正常显示:

预期样式:

组件代码如下:
<ion-header [translucent]="true"> <ion-toolbar> <ion-title> Blank </ion-title> </ion-toolbar> </ion-header> <ion-content [fullscreen]="true"> <ion-header collapse="condense"> <ion-toolbar> <ion-title size="large">Blank</ion-title> </ion-toolbar> </ion-header> <div id="container"> <strong>Ready to create an app?</strong> <p>Start with Ionic <a target="_blank" rel="noopener noreferrer" href="https://ionicframework.com/docs/components">UI Components</a></p> </div> </ion-content>
发现一个特殊现象:只要在<ion-content>中添加一个简单的ion-button组件,整个header的样式就会恢复正常。
内容的提问来源于stack exchange,提问作者Felix Olszewski
相关产品推荐
相关产品推荐

