|
|
@@ -12,6 +12,7 @@ import { FileInfo } from '../viewmodel/FileInfo';
|
|
|
import { emitter } from '@kit.BasicServicesKit';
|
|
|
import { EventConstants } from '../common/constants/EventConstants';
|
|
|
import { LazyDataSource } from '../common/util/LazyDataSource';
|
|
|
+import { PreferencesUtil } from '@pura/harmony-utils';
|
|
|
|
|
|
/**
|
|
|
* 歌单播放事件数据
|
|
|
@@ -75,6 +76,8 @@ export struct WebDavMainPage {
|
|
|
@State breadcrumbs:string[] = []//面包屑导航
|
|
|
|
|
|
@State visibleFoldersState: FileInfo[] = []; // 改为普通状态变量
|
|
|
+ @State isShowFileName: boolean = false//是否显示文件名
|
|
|
+ @State isLongNameRoLL: boolean = true//长歌名滚动
|
|
|
|
|
|
async onSwitchAccount(){
|
|
|
console.log('onecold 切换账户:', this.selectedAccount.name);
|
|
|
@@ -142,6 +145,8 @@ export struct WebDavMainPage {
|
|
|
};
|
|
|
|
|
|
aboutToAppear(): void {
|
|
|
+ this.isShowFileName = PreferencesUtil.getBooleanSync('isShowFileName', false)
|
|
|
+ this.isLongNameRoLL = PreferencesUtil.getBooleanSync('isLongNameRoLL', true)
|
|
|
// 获取顶部安全区高度
|
|
|
this.getTopRectHeight();
|
|
|
|
|
|
@@ -674,14 +679,15 @@ export struct WebDavMainPage {
|
|
|
|
|
|
// 歌曲信息
|
|
|
Column({ space: 4 }) {
|
|
|
- Text(decodeUrlEncodedString(song.name))
|
|
|
+ Text(this.isShowFileName?song.fileName :song.name)
|
|
|
.fontSize(15)
|
|
|
+ .textOverflow({ overflow: this.isLongNameRoLL?TextOverflow.MARQUEE:TextOverflow.Ellipsis })//超长滚动
|
|
|
.fontColor($r('app.color.index_tab_font_color'))
|
|
|
.maxLines(1)
|
|
|
.textOverflow({ overflow: TextOverflow.Ellipsis })
|
|
|
|
|
|
Row(){
|
|
|
- Text(song.artist)
|
|
|
+ Text(song.artist+" ")
|
|
|
.fontSize(13)
|
|
|
.fontColor($r('app.color.index_tab_font_color'))
|
|
|
.opacity(0.6)
|