99 :collapsed =" statusStore.menuCollapsed"
1010 :collapsed-width =" 64"
1111 :collapsed-icon-size =" 22"
12- :default-expand-all = " true "
12+ v-model:expanded-keys = " settingStore.menuExpandedKeys "
1313 :options =" menuOptions"
1414 :render-label =" renderMenuLabel"
1515 @update:value =" menuUpdate"
@@ -65,6 +65,7 @@ const menuOptions = computed<MenuOption[] | MenuGroupOption[]>(() => {
6565 key: " discover" ,
6666 link: " discover" ,
6767 label: " 发现音乐" ,
68+ show: ! settingStore .hideDiscover ,
6869 icon: renderIcon (" Discover" , {
6970 style: {
7071 transform: " translateY(-1px)" ,
@@ -74,7 +75,7 @@ const menuOptions = computed<MenuOption[] | MenuGroupOption[]>(() => {
7475 {
7576 key: " personal-fm" ,
7677 label: " 私人漫游" ,
77- show: isLogin () !== 0 ,
78+ show: isLogin () !== 0 && ! settingStore . hidePersonalFM ,
7879 icon: renderIcon (" Radio" , {
7980 style: {
8081 transform: " translateY(-1px)" ,
@@ -85,6 +86,7 @@ const menuOptions = computed<MenuOption[] | MenuGroupOption[]>(() => {
8586 key: " radio-hot" ,
8687 link: " radio-hot" ,
8788 label: " 播客电台" ,
89+ show: ! settingStore .hideRadioHot ,
8890 icon: renderIcon (" Record" , {
8991 style: {
9092 transform: " translateY(-1px)" ,
@@ -100,44 +102,48 @@ const menuOptions = computed<MenuOption[] | MenuGroupOption[]>(() => {
100102 label : () =>
101103 h (" div" , { class: " user-liked" }, [
102104 h (NText , null , () => " 我喜欢的音乐" ),
103- h (NButton , {
104- type: " tertiary" ,
105- round: true ,
106- strong: true ,
107- secondary: true ,
108- renderIcon: renderIcon (" HeartBit" ),
109- onClick : (event : Event ) => {
110- event .stopPropagation ();
111- openHeartMode ();
112- },
113- }),
105+ ! settingStore .hideHeartbeatMode
106+ ? h (NButton , {
107+ type: " tertiary" ,
108+ round: true ,
109+ strong: true ,
110+ secondary: true ,
111+ renderIcon: renderIcon (" HeartBit" ),
112+ onClick : (event : Event ) => {
113+ event .stopPropagation ();
114+ openHeartMode ();
115+ },
116+ })
117+ : null ,
114118 ]),
115119 icon: renderIcon (" Favorite" ),
116120 },
117121 {
118122 key: " like" ,
119123 link: " like" ,
120124 label: " 我的收藏" ,
125+ show: ! settingStore .hideLike ,
121126 icon: renderIcon (" Star" ),
122127 },
123128 {
124129 key: " cloud" ,
125130 link: " cloud" ,
126131 label: " 我的云盘" ,
127- show: isLogin () === 1 ,
132+ show: isLogin () === 1 && ! settingStore . hideCloud ,
128133 icon: renderIcon (" Cloud" ),
129134 },
130135 {
131136 key: " local" ,
132137 link: " local" ,
133138 label: " 本地歌曲" ,
134- show: isElectron ,
139+ show: isElectron && ! settingStore . hideLocal ,
135140 icon: renderIcon (" FolderMusic" ),
136141 },
137142 {
138143 key: " history" ,
139144 link: " history" ,
140145 label: " 最近播放" ,
146+ show: ! settingStore .hideHistory ,
141147 icon: renderIcon (" History" ),
142148 },
143149 {
@@ -147,6 +153,7 @@ const menuOptions = computed<MenuOption[] | MenuGroupOption[]>(() => {
147153 // 创建的歌单
148154 {
149155 key: " user-playlists" ,
156+ show: ! settingStore .hideUserPlaylists ,
150157 icon: statusStore .menuCollapsed ? renderIcon (" PlaylistAdd" ) : undefined ,
151158 label : () =>
152159 h (" div" , { class: " user-list" }, [
@@ -168,6 +175,7 @@ const menuOptions = computed<MenuOption[] | MenuGroupOption[]>(() => {
168175 // 收藏的歌单
169176 {
170177 key: " liked-playlists" ,
178+ show: ! settingStore .hideLikedPlaylists ,
171179 icon: statusStore .menuCollapsed ? renderIcon (" PlaylistAddCheck" ) : undefined ,
172180 label : () =>
173181 h (
0 commit comments