-
-
Notifications
You must be signed in to change notification settings - Fork 14
Open
Description
描述问题
我在 layouts 中编写了两个布局系统,sys 和 tabbar,插件默认布局使用的 sys,区别是 sys 布局只有自定义 navbar 标题栏。tabbar 布局拥有 navbar 和 tabbar 两个组件。
我有三个 tabbar 页面,定义在主包中,tabbar 页面中使用 layout: false 是生效的,但是在 sub-xxx 分包中使用 layout: false 并没有生效,分包页面依然继承了 sys 的默认布局。
复现
tabbar 页面 layout: false 页面使用 uni-layout 加载布局系统
<script lang="ts" setup>
definePage(()=> ({
name: 'pages-workbench',
layout: false,
meta: {
title: '工作台'
}
}))
</script>
<template>
<uni-layout name="tabbar">
<button>获取列表</button>
</uni-layout>
</template>
// 页面有 navbar 和 tabbar 两个组件 还有 button 按钮。✅正确tabbar 页面 layout: false
<script lang="ts" setup>
definePage(()=> ({
name: 'pages-workbench',
layout: false,
meta: {
title: '工作台'
}
}))
</script>
<template>
<button>获取列表</button>
</template>
// 页面只有 button 按钮。layout: false 生效。✅正确分包页面 layout: false
<script lang="ts" setup>
definePage(() => ({
name: 'sub-app-list',
layout: false,
meta: {
title: '工作台'
}
}))
</script>
<template>
<wd-button type="primary" block>
按钮
</wd-button>
</template>
// 页面有 navbar,标题名称为“工作台”。layout: false 没有生效。❌错误系统信息
基础环境信息:
- os:
macOS 26.1 - node:
24.11.1 - packageManager:
pnpm
基础依赖信息:
- vue:
3.4.38 - vite:
5.2.8 - @dcloudio/uni-app:
3.0.0-4080520251106001
uni-helper依赖信息:
- @uni-helper/eslint-config:
0.5.0 - eslint:
9.39.1 - @uni-helper/plugin-uni:
0.1.0 - @uni-helper/uni-env:
0.2.0 - @uni-helper/uni-types:
1.0.0-alpha.6 - @uni-helper/unocss-preset-uni:
0.2.11 - unocss:
66.0.0 - @uni-helper/vite-plugin-uni-components:
0.2.3 - @uni-helper/vite-plugin-uni-layouts:
0.1.11 - @uni-helper/vite-plugin-uni-manifest:
0.2.11 - @uni-helper/vite-plugin-uni-pages:
0.3.22 - @uni-helper/volar-service-uni-pages:
0.3.22
使用的包管理器
pnpm
核对
- 遵循我们的 行为准则
- 阅读 贡献指南 和 一位疲惫的维护者的笔记。
- 检查是否已经有一个报告相同错误的问题,以避免重复创建。
- 这是一个具体的错误。请开启 GitHub 讨论你的疑问。
- 所提供的复现是这个问题的 最小复现。
贡献
- 我愿意提交一个 PR 修复这个问题
- 我愿意提交一个 PR 带有失败的测试(实际上只要去做就好,谢谢!)
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels