You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

SvelteNative中bottomNavigation失效:添加后出现白屏求助

解决Svelte中bottomNavigation导致白屏的问题

你的问题出在空的bottomNavigation组件上,这类导航组件通常要求必须包含对应的子项元素才能正常工作,空组件会触发渲染异常导致白屏。

你需要给bottomNavigation添加至少一个bottomNavigationItem子组件,示例代码修改如下:

<script lang='ts'>
</script>

<frame>
  <page>
    <actionBar title="Hello" />

    <bottomNavigation>
      <!-- 添加导航子项 -->
      <bottomNavigationItem text="首页" />
      <bottomNavigationItem text="设置" />
    </bottomNavigation>
  </page>
</frame>

另外,也可以检查组件库的文档确认bottomNavigation的必填属性或子组件要求,确保所有必要的结构都已满足。如果还是有问题,可以查看浏览器控制台的错误信息,通常会给出具体的报错原因,帮助定位问题。

内容的提问来源于stack exchange,提问作者Fayeure

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.07.30 10:28:12