|
@@ -542,7 +542,6 @@ export struct LocalMusic {
|
|
|
if (this.modeType === 0) {
|
|
if (this.modeType === 0) {
|
|
|
this.getSortedFiles(this.currentPath)
|
|
this.getSortedFiles(this.currentPath)
|
|
|
}
|
|
}
|
|
|
-
|
|
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
doChangeBarHeight() {
|
|
doChangeBarHeight() {
|
|
@@ -969,6 +968,7 @@ export struct LocalMusic {
|
|
|
}
|
|
}
|
|
|
let dataBean = new BubbleBean()
|
|
let dataBean = new BubbleBean()
|
|
|
dataBean.data = ["首页", "媒体库", "艺术家", "专辑", "同步数据"]
|
|
dataBean.data = ["首页", "媒体库", "艺术家", "专辑", "同步数据"]
|
|
|
|
|
+ dataBean.color = this.themeColor
|
|
|
dataBean.imageRes =
|
|
dataBean.imageRes =
|
|
|
[$r('app.media.home_press'), $r('app.media.kp_music'), $r('app.media.music_menu'), $r('app.media.llq'),
|
|
[$r('app.media.home_press'), $r('app.media.kp_music'), $r('app.media.music_menu'), $r('app.media.llq'),
|
|
|
$r('app.media.refresh')]
|
|
$r('app.media.refresh')]
|
|
@@ -1620,6 +1620,7 @@ export struct LocalMusic {
|
|
|
}
|
|
}
|
|
|
let dataBean = new BubbleBean()
|
|
let dataBean = new BubbleBean()
|
|
|
dataBean.data = mList
|
|
dataBean.data = mList
|
|
|
|
|
+ dataBean.color = this.themeColor
|
|
|
dataBean.onItemClick = (i) => {
|
|
dataBean.onItemClick = (i) => {
|
|
|
const newPath = rPath + '/' + mList[i] + '/' + item.fileName
|
|
const newPath = rPath + '/' + mList[i] + '/' + item.fileName
|
|
|
Logger.info('newPath = ' + newPath)
|
|
Logger.info('newPath = ' + newPath)
|
|
@@ -1698,6 +1699,7 @@ export struct LocalMusic {
|
|
|
let dataBean = new BubbleBean()
|
|
let dataBean = new BubbleBean()
|
|
|
dataBean.data = mList
|
|
dataBean.data = mList
|
|
|
dataBean.isCopy = true
|
|
dataBean.isCopy = true
|
|
|
|
|
+ dataBean.color = this.themeColor
|
|
|
dataBean.onItemClick = (i) => {
|
|
dataBean.onItemClick = (i) => {
|
|
|
const newPath = rPath + '/' + mList[i] + '/' + item.fileName
|
|
const newPath = rPath + '/' + mList[i] + '/' + item.fileName
|
|
|
Logger.info('newPath = ' + newPath)
|
|
Logger.info('newPath = ' + newPath)
|
|
@@ -1730,11 +1732,7 @@ export struct LocalMusic {
|
|
|
if (index <= 3) {
|
|
if (index <= 3) {
|
|
|
popupPosition = PopupPosition.BOTTOM
|
|
popupPosition = PopupPosition.BOTTOM
|
|
|
}
|
|
}
|
|
|
- // let pup = XPopup.Builder()
|
|
|
|
|
- // .setPopupPosition(popupPosition)
|
|
|
|
|
- // .atView(id)
|
|
|
|
|
- // .asBubble(wrapBuilder(cutPopupBuilder), dataBean)
|
|
|
|
|
- // .show()
|
|
|
|
|
|
|
+
|
|
|
let pup:XPopup
|
|
let pup:XPopup
|
|
|
if (this.isDarkMode) {
|
|
if (this.isDarkMode) {
|
|
|
pup = XPopup.Builder()
|
|
pup = XPopup.Builder()
|
|
@@ -2071,6 +2069,7 @@ export struct LocalMusic {
|
|
|
}
|
|
}
|
|
|
let dataBean = new BubbleBean();
|
|
let dataBean = new BubbleBean();
|
|
|
dataBean.data = mList;
|
|
dataBean.data = mList;
|
|
|
|
|
+ dataBean.color = this.themeColor
|
|
|
dataBean.onItemClick = (i) => {
|
|
dataBean.onItemClick = (i) => {
|
|
|
const newDirPath = rPath + '/' + mList[i];
|
|
const newDirPath = rPath + '/' + mList[i];
|
|
|
// Logger.info('newDirPath = ' + newDirPath)
|
|
// Logger.info('newDirPath = ' + newDirPath)
|
|
@@ -2106,11 +2105,6 @@ export struct LocalMusic {
|
|
|
XPopup.dismissTop();
|
|
XPopup.dismissTop();
|
|
|
};
|
|
};
|
|
|
|
|
|
|
|
- // let pup = XPopup.Builder()
|
|
|
|
|
- // .setPopupPosition(PopupPosition.TOP)
|
|
|
|
|
- // .atView(viewId)
|
|
|
|
|
- // .asBubble(wrapBuilder(cutPopupBuilder), dataBean)
|
|
|
|
|
- // .show();
|
|
|
|
|
let pup:XPopup
|
|
let pup:XPopup
|
|
|
if (this.isDarkMode) {
|
|
if (this.isDarkMode) {
|
|
|
pup = XPopup.Builder()
|
|
pup = XPopup.Builder()
|
|
@@ -2176,6 +2170,7 @@ export struct LocalMusic {
|
|
|
let dataBean = new BubbleBean();
|
|
let dataBean = new BubbleBean();
|
|
|
dataBean.data = mList;
|
|
dataBean.data = mList;
|
|
|
dataBean.isCopy = true
|
|
dataBean.isCopy = true
|
|
|
|
|
+ dataBean.color = this.themeColor
|
|
|
dataBean.onItemClick = (i) => {
|
|
dataBean.onItemClick = (i) => {
|
|
|
const newDirPath = rPath + '/' + mList[i];
|
|
const newDirPath = rPath + '/' + mList[i];
|
|
|
// Logger.info('newDirPath = ' + newDirPath)
|
|
// Logger.info('newDirPath = ' + newDirPath)
|
|
@@ -3030,132 +3025,130 @@ export struct LocalMusic {
|
|
|
@State tempLyricContent:string = ''
|
|
@State tempLyricContent:string = ''
|
|
|
@Builder
|
|
@Builder
|
|
|
private MusicItemGrid(item: VideoItem, index: number) {
|
|
private MusicItemGrid(item: VideoItem, index: number) {
|
|
|
-
|
|
|
|
|
- Stack() {
|
|
|
|
|
-
|
|
|
|
|
- Column() {
|
|
|
|
|
- Image(StrUtil.isEmpty(item.pixelMapPath) ?Utility.getMusisBg2(index) : item.pixelMapPath)
|
|
|
|
|
- .height(150)
|
|
|
|
|
- .width(150)
|
|
|
|
|
- .alt($r('app.media.ic_avatar6'))
|
|
|
|
|
- .clip(true)
|
|
|
|
|
- .borderRadius({
|
|
|
|
|
- topLeft: 20,
|
|
|
|
|
- topRight : 20,
|
|
|
|
|
- bottomLeft: 0,
|
|
|
|
|
- bottomRight: 0
|
|
|
|
|
- })
|
|
|
|
|
- .draggable(false)
|
|
|
|
|
- .opacity(this.opacityItem)// 绑定透明度
|
|
|
|
|
- .animation({ curve: Curve.Sharp, duration: 300 })
|
|
|
|
|
- .margin({ left: this.currentBreakpoint !== BreakpointTypeEnum.SM?40:20 ,
|
|
|
|
|
- right: this.currentBreakpoint !== BreakpointTypeEnum.SM?40:20})
|
|
|
|
|
|
|
+ Button({ type: ButtonType.Normal, stateEffect: true }) {
|
|
|
|
|
+ Stack() {
|
|
|
Column() {
|
|
Column() {
|
|
|
- Text(item.name.startsWith('.')?item.name.replace(/\./g, ''):item.name)
|
|
|
|
|
- .fontSize(14)
|
|
|
|
|
- .maxLines(1)
|
|
|
|
|
- .fontWeight(FontWeight.Bold)
|
|
|
|
|
- .textOverflow({overflow: TextOverflow.MARQUEE}) //超长滚动
|
|
|
|
|
- .animation({
|
|
|
|
|
- duration: 555,
|
|
|
|
|
- curve: 'Linear',
|
|
|
|
|
|
|
+ Image(StrUtil.isEmpty(item.pixelMapPath) ?Utility.getMusisBg2(index) : item.pixelMapPath)
|
|
|
|
|
+ .height(150)
|
|
|
|
|
+ .width(150)
|
|
|
|
|
+ .alt($r('app.media.ic_avatar6'))
|
|
|
|
|
+ .clip(true)
|
|
|
|
|
+ .borderRadius({
|
|
|
|
|
+ topLeft: 20,
|
|
|
|
|
+ topRight : 20,
|
|
|
|
|
+ bottomLeft: 0,
|
|
|
|
|
+ bottomRight: 0
|
|
|
})
|
|
})
|
|
|
- .fontColor(this.currentSong?.filePath === item.filePath ? this.themeColor :
|
|
|
|
|
- $r('app.color.text_color'))
|
|
|
|
|
-
|
|
|
|
|
- Column(){
|
|
|
|
|
- Text(`${this.artistMap.get(item.name)?.length ?? 0}首`)
|
|
|
|
|
- .fontSize(11)
|
|
|
|
|
- .visibility(this.modeType===2&&!this.isCanBack?Visibility.Visible:Visibility.None)
|
|
|
|
|
- .fontColor($r('app.color.text_color'))
|
|
|
|
|
- Text(`${this.albumMap.get(item.name)?.length ?? 0}首`)
|
|
|
|
|
- .fontSize(11)
|
|
|
|
|
- .visibility(this.modeType===3&&!this.isCanBack?Visibility.Visible:Visibility.None)
|
|
|
|
|
- .fontColor($r('app.color.text_color'))
|
|
|
|
|
- Text(StrUtil.isEmpty(item.artist) ? 'Unknown' : item.artist )
|
|
|
|
|
- .fontSize(11)
|
|
|
|
|
|
|
+ .draggable(false)
|
|
|
|
|
+ .opacity(this.opacityItem)// 绑定透明度
|
|
|
|
|
+ .animation({ curve: Curve.Sharp, duration: 300 })
|
|
|
|
|
+ .margin({ left: this.currentBreakpoint !== BreakpointTypeEnum.SM?40:20 ,
|
|
|
|
|
+ right: this.currentBreakpoint !== BreakpointTypeEnum.SM?40:20})
|
|
|
|
|
+ Column() {
|
|
|
|
|
+ Text(item.name.startsWith('.')?item.name.replace(/\./g, ''):item.name)
|
|
|
|
|
+ .fontSize(14)
|
|
|
.maxLines(1)
|
|
.maxLines(1)
|
|
|
- .margin({top:2})
|
|
|
|
|
- .visibility(item.type==CommonConstants.TYPE_IS_ARTIST
|
|
|
|
|
- ||item.type==CommonConstants.TYPE_IS_ALBUM
|
|
|
|
|
- ||item.type==CommonConstants.TYPE_IS_DIR?Visibility.None:Visibility.Visible)
|
|
|
|
|
- .fontWeight(FontWeight.Medium)
|
|
|
|
|
- .fontColor(this.currentSong?.filePath === item.filePath ? this.themeColor:
|
|
|
|
|
|
|
+ .fontWeight(FontWeight.Bold)
|
|
|
|
|
+ .textOverflow({overflow: TextOverflow.MARQUEE}) //超长滚动
|
|
|
|
|
+ .animation({
|
|
|
|
|
+ duration: 555,
|
|
|
|
|
+ curve: 'Linear',
|
|
|
|
|
+ })
|
|
|
|
|
+ .fontColor(this.currentSong?.filePath === item.filePath ? this.themeColor :
|
|
|
$r('app.color.text_color'))
|
|
$r('app.color.text_color'))
|
|
|
|
|
|
|
|
- }
|
|
|
|
|
- .alignItems(HorizontalAlign.Center) // 关键:使内容水平居中
|
|
|
|
|
|
|
+ Column(){
|
|
|
|
|
+ Text(`${this.artistMap.get(item.name)?.length ?? 0}首`)
|
|
|
|
|
+ .fontSize(11)
|
|
|
|
|
+ .visibility(this.modeType===2&&!this.isCanBack?Visibility.Visible:Visibility.None)
|
|
|
|
|
+ .fontColor($r('app.color.text_color'))
|
|
|
|
|
+ Text(`${this.albumMap.get(item.name)?.length ?? 0}首`)
|
|
|
|
|
+ .fontSize(11)
|
|
|
|
|
+ .visibility(this.modeType===3&&!this.isCanBack?Visibility.Visible:Visibility.None)
|
|
|
|
|
+ .fontColor($r('app.color.text_color'))
|
|
|
|
|
+ Text(StrUtil.isEmpty(item.artist) ? 'Unknown' : item.artist )
|
|
|
|
|
+ .fontSize(11)
|
|
|
|
|
+ .maxLines(1)
|
|
|
|
|
+ .margin({top:2})
|
|
|
|
|
+ .visibility(item.type==CommonConstants.TYPE_IS_ARTIST
|
|
|
|
|
+ ||item.type==CommonConstants.TYPE_IS_ALBUM
|
|
|
|
|
+ ||item.type==CommonConstants.TYPE_IS_DIR?Visibility.None:Visibility.Visible)
|
|
|
|
|
+ .fontWeight(FontWeight.Medium)
|
|
|
|
|
+ .fontColor(this.currentSong?.filePath === item.filePath ? this.themeColor:
|
|
|
|
|
+ $r('app.color.text_color'))
|
|
|
|
|
|
|
|
- }
|
|
|
|
|
- .bindPopup(this.longItemFilePath === item.filePath, {
|
|
|
|
|
- builder: this.MenuBuilder(item,index,item.filePath),
|
|
|
|
|
- placement: Placement.Top,
|
|
|
|
|
- // autoCancel: true,
|
|
|
|
|
- mask: {color:'#33000000'},
|
|
|
|
|
- // popupColor: Color.Yellow,
|
|
|
|
|
- enableArrow: false,//是否显示箭头
|
|
|
|
|
- showInSubWindow: false,
|
|
|
|
|
- onStateChange: (e) => {
|
|
|
|
|
- if (!e.isVisible) {
|
|
|
|
|
- this.longItemFilePath = ''
|
|
|
|
|
- this.tempLyricContent = ''
|
|
|
|
|
}
|
|
}
|
|
|
- }
|
|
|
|
|
- })
|
|
|
|
|
|
|
+ .alignItems(HorizontalAlign.Center) // 关键:使内容水平居中
|
|
|
|
|
|
|
|
- .gesture(LongPressGesture()
|
|
|
|
|
- .onAction(async () => {
|
|
|
|
|
- //如果是专辑和艺术家的首页,不能长按
|
|
|
|
|
- if((this.modeType===2||this.modeType==3)&&!this.isCanBack)
|
|
|
|
|
- return
|
|
|
|
|
- //如果是我的收藏 最近播放等也不能长按
|
|
|
|
|
- if(item.name === LocalMusic.STR_LOCK_VIDEO || item.name === LocalMusic.STR_FAC_VIDEO ||
|
|
|
|
|
- item.name === LocalMusic.STR_HISTORY_MUSIC
|
|
|
|
|
- )
|
|
|
|
|
- return
|
|
|
|
|
- this.longItemFilePath = item.filePath
|
|
|
|
|
- this.tempLyricContent = await this.getLyricContent(item)
|
|
|
|
|
- LogUtil.info('长按this.tempLyricContent = '+this.tempLyricContent)
|
|
|
|
|
|
|
+ }
|
|
|
|
|
+ .bindPopup(this.longItemFilePath === item.filePath, {
|
|
|
|
|
+ builder: this.MenuBuilder(item,index,item.filePath),
|
|
|
|
|
+ placement: Placement.Top,
|
|
|
|
|
+ // autoCancel: true,
|
|
|
|
|
+ mask: {color:'#33000000'},
|
|
|
|
|
+ // popupColor: Color.Yellow,
|
|
|
|
|
+ enableArrow: false,//是否显示箭头
|
|
|
|
|
+ showInSubWindow: false,
|
|
|
|
|
+ onStateChange: (e) => {
|
|
|
|
|
+ if (!e.isVisible) {
|
|
|
|
|
+ this.longItemFilePath = ''
|
|
|
|
|
+ this.tempLyricContent = ''
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
})
|
|
})
|
|
|
- .onActionEnd((event: GestureEvent) => {
|
|
|
|
|
|
|
|
|
|
- })
|
|
|
|
|
- )
|
|
|
|
|
- .height(50)
|
|
|
|
|
- .width(150)
|
|
|
|
|
- .justifyContent(FlexAlign.Center)
|
|
|
|
|
- .margin({ left: this.currentBreakpoint !== BreakpointTypeEnum.SM?40:20 ,
|
|
|
|
|
- right: this.currentBreakpoint !== BreakpointTypeEnum.SM?40:20})
|
|
|
|
|
|
|
+ .gesture(LongPressGesture()
|
|
|
|
|
+ .onAction(async () => {
|
|
|
|
|
+ //如果是专辑和艺术家的首页,不能长按
|
|
|
|
|
+ if((this.modeType===2||this.modeType==3)&&!this.isCanBack)
|
|
|
|
|
+ return
|
|
|
|
|
+ //如果是我的收藏 最近播放等也不能长按
|
|
|
|
|
+ if(item.name === LocalMusic.STR_LOCK_VIDEO || item.name === LocalMusic.STR_FAC_VIDEO ||
|
|
|
|
|
+ item.name === LocalMusic.STR_HISTORY_MUSIC
|
|
|
|
|
+ )
|
|
|
|
|
+ return
|
|
|
|
|
+ this.longItemFilePath = item.filePath
|
|
|
|
|
+ this.tempLyricContent = await this.getLyricContent(item)
|
|
|
|
|
+ LogUtil.info('长按this.tempLyricContent = '+this.tempLyricContent)
|
|
|
|
|
+ })
|
|
|
|
|
+ .onActionEnd((event: GestureEvent) => {
|
|
|
|
|
|
|
|
- }
|
|
|
|
|
- .width(150)
|
|
|
|
|
- .borderRadius(20)
|
|
|
|
|
- .backgroundImage(item.pixelMapPath)
|
|
|
|
|
- .backgroundImageSize({ height: '100%',width:'100%' })
|
|
|
|
|
- .backgroundBlurStyle(BlurStyle.BACKGROUND_ULTRA_THICK)
|
|
|
|
|
- .animation({ curve: Curve.Sharp, duration: 300 })
|
|
|
|
|
|
|
+ })
|
|
|
|
|
+ )
|
|
|
|
|
+ .height(50)
|
|
|
|
|
+ .width(150)
|
|
|
|
|
+ .justifyContent(FlexAlign.Center)
|
|
|
|
|
+ .margin({ left: this.currentBreakpoint !== BreakpointTypeEnum.SM?40:20 ,
|
|
|
|
|
+ right: this.currentBreakpoint !== BreakpointTypeEnum.SM?40:20})
|
|
|
|
|
+
|
|
|
|
|
+ }
|
|
|
|
|
+ .width(150)
|
|
|
|
|
+ .borderRadius(20)
|
|
|
|
|
+ .backgroundImage(item.pixelMapPath)
|
|
|
|
|
+ .backgroundImageSize({ height: '100%',width:'100%' })
|
|
|
|
|
+ .backgroundBlurStyle(BlurStyle.BACKGROUND_ULTRA_THICK)
|
|
|
|
|
+ .animation({ curve: Curve.Sharp, duration: 300 })
|
|
|
|
|
|
|
|
|
|
|
|
|
- Checkbox({ name: 'checkbox' + index })
|
|
|
|
|
- .select(this.selectedFiles.some(x => x.filePath === item.filePath))
|
|
|
|
|
- .selectedColor(this.themeColor)
|
|
|
|
|
- .shape(CheckBoxShape.CIRCLE)
|
|
|
|
|
- .opacity(this.isMultiSelect ? 1 : 0)
|
|
|
|
|
- .animation({
|
|
|
|
|
- duration: 666,
|
|
|
|
|
- curve: 'Smooth' // 可选动画曲线
|
|
|
|
|
- })
|
|
|
|
|
- .visibility(this.isMultiSelect&&item.type!==CommonConstants.TYPE_IS_DIR?Visibility.Visible:Visibility.None)
|
|
|
|
|
- .onChange((checked: boolean) => this.handleFileSelection(item, checked))
|
|
|
|
|
- .margin({ left: 20, top: 8, bottom: 8 })
|
|
|
|
|
- .width(38)
|
|
|
|
|
- .height(38)
|
|
|
|
|
|
|
+ Checkbox({ name: 'checkbox' + index })
|
|
|
|
|
+ .select(this.selectedFiles.some(x => x.filePath === item.filePath))
|
|
|
|
|
+ .selectedColor(this.themeColor)
|
|
|
|
|
+ .shape(CheckBoxShape.CIRCLE)
|
|
|
|
|
+ .opacity(this.isMultiSelect ? 1 : 0)
|
|
|
|
|
+ .animation({
|
|
|
|
|
+ duration: 666,
|
|
|
|
|
+ curve: 'Smooth' // 可选动画曲线
|
|
|
|
|
+ })
|
|
|
|
|
+ .visibility(this.isMultiSelect&&item.type!==CommonConstants.TYPE_IS_DIR?Visibility.Visible:Visibility.None)
|
|
|
|
|
+ .onChange((checked: boolean) => this.handleFileSelection(item, checked))
|
|
|
|
|
+ .margin({ left: 20, top: 8, bottom: 8 })
|
|
|
|
|
+ .width(38)
|
|
|
|
|
+ .height(38)
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
|
|
+ .backgroundColor(Color.Transparent)
|
|
|
.width('100%')
|
|
.width('100%')
|
|
|
.height(205)
|
|
.height(205)
|
|
|
- .stateStyles({
|
|
|
|
|
- pressed: { opacity: 0.6 } // 按压反馈
|
|
|
|
|
- })
|
|
|
|
|
.onClick(() => {
|
|
.onClick(() => {
|
|
|
if(this.isMultiSelect&&item.type!==CommonConstants.TYPE_IS_DIR){
|
|
if(this.isMultiSelect&&item.type!==CommonConstants.TYPE_IS_DIR){
|
|
|
this.handleFileSelection(item, !this.selectedFiles.some(x => x.filePath === item.filePath))
|
|
this.handleFileSelection(item, !this.selectedFiles.some(x => x.filePath === item.filePath))
|
|
@@ -9464,25 +9457,29 @@ function customPopupBuilder(dataBu: BubbleBean) {
|
|
|
List() {
|
|
List() {
|
|
|
LazyForEach(new LazyDataSource(dataBu.data), (item: string, index: number) => {
|
|
LazyForEach(new LazyDataSource(dataBu.data), (item: string, index: number) => {
|
|
|
ListItem() {
|
|
ListItem() {
|
|
|
- Row() {
|
|
|
|
|
- Column() {
|
|
|
|
|
- Image(dataBu.imageRes[index])
|
|
|
|
|
- .height(28)
|
|
|
|
|
- .alignSelf(ItemAlign.Center)
|
|
|
|
|
|
|
+ Button({ type: ButtonType.Capsule, stateEffect: true }) {
|
|
|
|
|
+ Row() {
|
|
|
|
|
+ Column() {
|
|
|
|
|
+ Image(dataBu.imageRes[index])
|
|
|
|
|
+ .height(28)
|
|
|
|
|
+ .fillColor(dataBu.color)
|
|
|
|
|
+ .alignSelf(ItemAlign.Center)
|
|
|
|
|
+ }
|
|
|
|
|
+ .width(32)
|
|
|
|
|
|
|
|
|
|
+ Text(item)
|
|
|
|
|
+ .padding({
|
|
|
|
|
+ top: 10,
|
|
|
|
|
+ bottom: 10,
|
|
|
|
|
+ right: 10,
|
|
|
|
|
+ left: 10
|
|
|
|
|
+ })
|
|
|
|
|
+ .textAlign(TextAlign.Start)
|
|
|
|
|
+ .width("100%")
|
|
|
}
|
|
}
|
|
|
- .width(32)
|
|
|
|
|
-
|
|
|
|
|
- Text(item)
|
|
|
|
|
- .padding({
|
|
|
|
|
- top: 10,
|
|
|
|
|
- bottom: 10,
|
|
|
|
|
- right: 10,
|
|
|
|
|
- left: 10
|
|
|
|
|
- })
|
|
|
|
|
- .textAlign(TextAlign.Start)
|
|
|
|
|
- .width("100%")
|
|
|
|
|
|
|
+
|
|
|
}
|
|
}
|
|
|
|
|
+ .backgroundColor($r('app.color.settings_background_main'))
|
|
|
.margin({ top: 6, bottom: 6 })
|
|
.margin({ top: 6, bottom: 6 })
|
|
|
}.onClick(() => {
|
|
}.onClick(() => {
|
|
|
dataBu.onItemClick?.(index)
|
|
dataBu.onItemClick?.(index)
|
|
@@ -9533,27 +9530,30 @@ function cutPopupBuilder(dataBu: BubbleBean) {
|
|
|
List() {
|
|
List() {
|
|
|
ForEach(dataBu.data, (item: string, index: number) => {
|
|
ForEach(dataBu.data, (item: string, index: number) => {
|
|
|
ListItem() {
|
|
ListItem() {
|
|
|
- Row() {
|
|
|
|
|
- Column() {
|
|
|
|
|
- // Image($r('app.media.music_group'))
|
|
|
|
|
- SymbolGlyph($r('sys.symbol.identify_song'))
|
|
|
|
|
- .height(28)
|
|
|
|
|
- .fontColor([$r('app.color.img_color')])
|
|
|
|
|
- .alignSelf(ItemAlign.Center)
|
|
|
|
|
|
|
+ Button({ type: ButtonType.Capsule, stateEffect: true }) {
|
|
|
|
|
+ Row() {
|
|
|
|
|
+ Column() {
|
|
|
|
|
+ Image($r('app.media.music_group'))
|
|
|
|
|
+ .height(28)
|
|
|
|
|
+ .fillColor(dataBu.color)
|
|
|
|
|
+ .alignSelf(ItemAlign.Center)
|
|
|
|
|
|
|
|
- }
|
|
|
|
|
- .width(32)
|
|
|
|
|
|
|
+ }
|
|
|
|
|
+ .width(32)
|
|
|
|
|
|
|
|
- Text(item.startsWith('.') ? item.replace(/\./g, '') : item)
|
|
|
|
|
- .padding({
|
|
|
|
|
- top: 10,
|
|
|
|
|
- bottom: 10,
|
|
|
|
|
- right: 10,
|
|
|
|
|
- left: 10
|
|
|
|
|
- })
|
|
|
|
|
- .textAlign(TextAlign.Start).width("100%")// .fontColor(Color.Gray)
|
|
|
|
|
- .fontSize(15)
|
|
|
|
|
|
|
+ Text(item.startsWith('.') ? item.replace(/\./g, '') : item)
|
|
|
|
|
+ .padding({
|
|
|
|
|
+ top: 10,
|
|
|
|
|
+ bottom: 10,
|
|
|
|
|
+ right: 10,
|
|
|
|
|
+ left: 10
|
|
|
|
|
+ })
|
|
|
|
|
+ .textAlign(TextAlign.Start).width("100%")// .fontColor(Color.Gray)
|
|
|
|
|
+ .fontSize(15)
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
|
|
+ .backgroundColor(Color.Transparent)
|
|
|
|
|
+
|
|
|
.margin({ top: 7, bottom: 7 })
|
|
.margin({ top: 7, bottom: 7 })
|
|
|
|
|
|
|
|
}.onClick(() => {
|
|
}.onClick(() => {
|