-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: 水平布局组件加参defaultExpandAll,版本更新至1.11.2
- Loading branch information
Showing
5 changed files
with
150 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
131 changes: 131 additions & 0 deletions
131
docs/.vitepress/components/BHorizontalLayout/useExpandAll.vue
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,131 @@ | ||
<template> | ||
<div style="height: 500px"> | ||
<BHorizontalLayout v-model:curPath="currentPath" :menus="menus" @menuChange="onMenuClick" @sideBarCollapse="onSideBarCollapse" footText="自定义注脚" :defaultExpandAll="true"> | ||
<template v-slot:top> | ||
顶部内容 | ||
</template> | ||
<template v-slot:container> | ||
<div> | ||
右侧容器内容使用slot插槽, | ||
当前选择菜单路径:{{currentPath}} | ||
</div> | ||
</template> | ||
</BHorizontalLayout> | ||
</div> | ||
</template> | ||
<script setup lang="ts"> | ||
import { ref, h} from 'vue'; | ||
import { BHorizontalLayout } from '@fesjs/traction-widget'; | ||
import { AppstoreOutlined, DateOutlined,ClusterOutlined, SettingOutlined } from '@fesjs/fes-design/icon'; | ||
const currentPath = ref<string>(''); | ||
const menus = ref([{ | ||
label: '任务查询', | ||
value: '/tasks', | ||
icon: () => h(AppstoreOutlined), | ||
}, { | ||
label: '我的项目', | ||
value: '/rules', | ||
icon: () => h(SettingOutlined), | ||
children: [{ | ||
label: '规则查询一个很长想看下省略效果的标题', | ||
value: '/rules/query1', | ||
icon: () => h(DateOutlined), | ||
children: [{ | ||
label: '规则查询一个很长想看下省略效果的标题', | ||
value: '/rules/query2', | ||
icon: () => h(DateOutlined), | ||
}, { | ||
label: '规则模板', | ||
value: '/rules/template3', | ||
icon: () => h(ClusterOutlined), | ||
children: [{ | ||
label: '规则查询一个很长想看下省略效果的标题', | ||
value: '/rules/query4', | ||
icon: () => h(DateOutlined), | ||
children: [{ | ||
label: '规则查询一个很长想看下省略效果的标题', | ||
value: '/rules/query5', | ||
icon: () => h(DateOutlined), | ||
}, { | ||
label: '规则模板', | ||
value: '/rules/template6', | ||
icon: () => h(ClusterOutlined), | ||
}] | ||
}, { | ||
label: '规则模板', | ||
value: '/rules/template7', | ||
icon: () => h(ClusterOutlined), | ||
}] | ||
}] | ||
}, { | ||
label: '规则模板', | ||
value: '/rules/template8', | ||
icon: () => h(ClusterOutlined), | ||
}] | ||
},{ | ||
label: '我的项目2', | ||
value: '/rules2', | ||
icon: () => h(SettingOutlined), | ||
children: [{ | ||
label: '规则查询一个很长想看下省略效果的标题2', | ||
value: '/rules2/query', | ||
icon: () => h(DateOutlined), | ||
}, { | ||
label: '规则模板2', | ||
value: '/rules2/template', | ||
icon: () => h(ClusterOutlined), | ||
}] | ||
}, | ||
{ | ||
label: '任务查询1', | ||
value: '/tasks1', | ||
icon: () => h(AppstoreOutlined), | ||
},{ | ||
label: '任务查询2', | ||
value: '/tasks2', | ||
icon: () => h(AppstoreOutlined), | ||
},{ | ||
label: '任务查询3', | ||
value: '/tasks3', | ||
icon: () => h(AppstoreOutlined), | ||
},{ | ||
label: '任务查询4', | ||
value: '/tasks4', | ||
icon: () => h(AppstoreOutlined), | ||
},{ | ||
label: '任务查询5', | ||
value: '/tasks5', | ||
icon: () => h(AppstoreOutlined), | ||
},{ | ||
label: '任务查询6', | ||
value: '/tasks6', | ||
icon: () => h(AppstoreOutlined), | ||
},{ label: '任务查询7', | ||
value: '/tasks7', | ||
icon: () => h(AppstoreOutlined), | ||
},{ label: '任务查询8', | ||
value: '/tasks8', | ||
icon: () => h(AppstoreOutlined), | ||
},{ label: '任务查询9', | ||
value: '/tasks9', | ||
icon: () => h(AppstoreOutlined), | ||
},{ | ||
label: '任务查询10', | ||
value: '/tasks10', | ||
icon: () => h(AppstoreOutlined), | ||
}]); | ||
const onMenuClick = (v: any) => { | ||
currentPath.value = v.value; | ||
console.log('onMenuClick-菜单跳转', currentPath.value); | ||
}; | ||
const onSideBarCollapse = (v:Boolean) => { | ||
if (v) { | ||
console.log('侧边栏折叠') | ||
} else { | ||
console.log('侧边栏展开') | ||
} | ||
} | ||
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters