, } } } 上面封装的genSidebarConfig函数 function genSidebarConfig(title) { return [{ title, collapsable 'css-standard', 'js-standard', 'git-standard' ] }] } 支持侧边栏分组(可以用来做博客文章分类) collapsable module.exports = { themeConfig: { sidebar: { '/note': [ { title:'前端', collapsable notes/frontEnd/PWA介绍及快速上手搭建一个PWA应用', ] }, { title:'后端', collapsable
, } } } 上面封装的genSidebarConfig函数 function genSidebarConfig(title) { return [{ title, collapsable , 'css-standard', 'js-standard', 'git-standard' ] }] } 支持侧边栏分组(可以用来做博客文章分类) collapsable module.exports = { themeConfig: { sidebar: { '/note': [ { title:'前端', collapsable notes/frontEnd/PWA介绍及快速上手搭建一个PWA应用', ] }, { title:'后端', collapsable
e.printStackTrace(); } } public static void setActionBarViewCollapsable(ActionBar actionbar, boolean collapsable setActionBarViewCollapsable", new Class[] { boolean.class }); try { method.invoke(actionbar, collapsable
[ { text: 'Icon图标', // 必要的 link: '/icon/', // 可选的,标题的跳转链接,应为绝对路径且路径正确 collapsable sidebarDepth: 1 // 可选的,默认1 }, { text: 'Button按钮', link: '/button/', collapsable
: [ // 侧边栏在 /index/ 目录上 '/index/', { title: 'html&css', collapsable css.md'] }, // 侧边栏在 /javascript/ 目录上 { title: 'javascript', collapsable ] }, // 侧边栏在 /node.js/ 目录上 { title: 'nodejs', collapsable spider.md', ] }, // 侧边栏在 /others/ 目录上 { title: '其它', collapsable
export default defineSidebarConfig({ "/mall/":[ { text: "序章", icon: "note", collapsable ["mall_foreword_01", "mall_foreword_02"], }, { text: "架构篇", icon: "note", collapsable mall_arch_01", "mall_arch_02","mall_arch_03"], }, { text: "业务篇", icon: "note", collapsable mall_database_overview", "mall_pms_01","mall_pms_02"], }, { text: "技术要点篇", icon: "note", collapsable children: ["mybatis_mapper", "aop_log"], }, { text: "部署篇", icon: "note", collapsable
为以下路由添加侧边栏 sidebar:{ '/baseComponents/': [ { title: '布局类组件', collapsable 'base/test5' ] }, { title: '可视化组件', collapsable children: [ ] }, { title: '工具类组件', collapsable ], '/interfaceSpecification/': [ { title: '前后端对接规范', collapsable
module.exports = { themeConfig: { sidebar: [ { title: '开发指南', collapsable /guide/started/started','快速上手'], { title: '组件', collapsable: false
guide/", }, ], sidebar: { "/guide/": [ { title: "新手指南", collapsable , children: ["/guide/notes/one"], }, { title: "java", collapsable
duration: duration, easing: Easing.linear, useNativeDriver: enableNativeDriver}).start(); collapsable 属性 此外在Android平台上由于存在collapsable属性,该属性仅限Android平台。 _isNative来设置collapsable属性,但是并不是在所有场景下都会生效,如果组件没有触发Re-Render则没有去强制设置该属性。 因此对于这类AnimatedView需要显示指定collapsable属性为false,保证其不会在视图中被移除。
image.png 节点是否可被展开 节点可被展开,默认是不展开,通过show-collapsable设置节点可被展开。 image.png 节点默认全部展开 通过设置 default-expand-all 默认展开所有节点,该参数只有在 show-collapsable 为true 时有效 image.png 可将 className Function(node)/String — — current-lable-class-name 当前选中节点的样式 Function(node)/String — — show-collapsable 节点是否可被展开 Boolean — false default-expand-all 是否默认展开所有节点,该参数只有在 show-collapsable 为 true 时有效 Boolean —
{text: '交流', link: 'zyqq/wheel'}, ], sidebar: [ // 侧边栏 { title: '入门', collapsable install目录下的README.md文件 '/get-started/', ] }, { title: '组件', collapsable
title: 'Group 1', // 必要的 path: '/foo/', // 可选的, 标题的跳转链接,应为绝对路径且必须存在 collapsable title: 'Group 1', // 必要的 path: '/foo/', // 可选的, 标题的跳转链接,应为绝对路径且必须存在 collapsable
通过对两个调试小技巧的应用,发现了 isLayoutOnly 本应为 true 的节点实际上输出结果为 false,而 isLayoutOnly 的判断标准是通过提取节点属性中的 collapsable 来判断: if (props.get(NodeProps.COLLAPSABLE) ! = null && (Boolean) props.get(NodeProps.COLLAPSABLE) == false) { return false; } 而源节点数组却只有 collapse 而没有 collapsable,这很明显是双端的节点数据不统一(iOS与android生成的节点数据不一致),不明白为什么 hippy 并不把节点数据标准化,类似的问题还有 image 类型,双端差异如下图所示
解决办法,主要是sidebar格式配置错误 错误配置 export const sidebar: Array<SidebarItem4Group> = [ { title: 'js', collapsable ] }, ... ]; 正确配置 export const sidebar = { '/front/js/': [ { title: '基础', collapsable [ '', // js下的RADEME.md文件 '2022-02-18' ] }, { title: '进阶', collapsable
, }; render() { var pages = []; for(let i = 0;i < PAGES;i++){ pages.push( <View key={i} collapsable
render() { var pages = []; for(let i = 0;i < PAGES;i++){ pages.push( <View key={i} collapsable
language/japanese' } ]}], sidebar: [{ title: 'Group 1', collapsable
docs', // 编辑的文件夹 editLinks: false, // 启用编辑 editLinkText: '编辑', sidebar: { mode: 'structuring', collapsable : false}, // 侧边栏 'structuring' | { mode: 'structuring', collapsable: Boolean} | 'auto' | 自定义 温馨提示
就是我们写的具体的文章 module.exports = { themeConfig:{ sidebar:{ { title: "JavaScript", collapsable ["js/scope", "理解Js中的作用域-作用域链以及闭包"] ] }, { title: "工具", collapsable