mirror of
https://github.com/blossom-editor/blossom
synced 2024-11-17 14:39:21 +08:00
feat: 设置是否只展开一项子菜单
This commit is contained in:
parent
9ae8778ab2
commit
ba1545cf91
@ -28,6 +28,8 @@ export interface ViewStyle {
|
||||
isGlobalShadow: boolean
|
||||
// 是否显示试用按钮
|
||||
isShowTryuseBtn: boolean
|
||||
// 只展开一项子菜单
|
||||
isMenuUniqueOpened: boolean
|
||||
}
|
||||
|
||||
/**
|
||||
@ -106,7 +108,8 @@ export const useConfigStore = defineStore('configStore', {
|
||||
isHomeSubjectCard: true,
|
||||
isWebCollectCard: true,
|
||||
isGlobalShadow: false,
|
||||
isShowTryuseBtn: true
|
||||
isShowTryuseBtn: true,
|
||||
isMenuUniqueOpened: true
|
||||
},
|
||||
...Local.get(VIEW_STYLE_KEY)
|
||||
},
|
||||
|
@ -18,7 +18,7 @@
|
||||
v-if="!isEmpty(docTreeData)"
|
||||
ref="DocTreeRef"
|
||||
class="doc-trees"
|
||||
:unique-opened="true"
|
||||
:unique-opened="viewStyle.isMenuUniqueOpened"
|
||||
:default-active="docTreeActiveArticleId"
|
||||
@open="openMenu">
|
||||
<!-- ================================================ L1 ================================================ -->
|
||||
|
@ -45,6 +45,13 @@
|
||||
</bl-row>
|
||||
<div class="conf-tip">是否在文档列表中以特殊的样式显示专题。</div>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="只展开一项子菜单">
|
||||
<bl-row>
|
||||
<el-switch v-model="configViewStyleForm.isMenuUniqueOpened" size="default" style="margin-right: 10px" @change="changeViewStyle" />
|
||||
</bl-row>
|
||||
<div class="conf-tip">展开子菜单时,收起其他子菜单。</div>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<el-form label-position="right" label-width="130px" style="max-width: 800px">
|
||||
|
@ -10,7 +10,7 @@
|
||||
element-loading-text="正在读取文档..."
|
||||
:style="{ fontSize: configStore.viewStyle.treeDocsFontSize }">
|
||||
<!-- 文件夹 -->
|
||||
<el-menu v-if="!isEmpty(docTreeData)" ref="DocTreeRef" class="doc-trees" :unique-opened="true">
|
||||
<el-menu v-if="!isEmpty(docTreeData)" ref="DocTreeRef" class="doc-trees" :unique-opened="configStore.viewStyle.isMenuUniqueOpened">
|
||||
<!-- ================================================ L1 ================================================ -->
|
||||
<div v-for="L1 in docTreeData" :key="L1.i">
|
||||
<div v-if="L1.ty == 11" class="menu-divider" />
|
||||
|
Loading…
Reference in New Issue
Block a user