|
@@ -1235,7 +1235,7 @@ export struct LocalMusic {
|
|
|
{ value: "新建歌单", fontColor: $r('app.color.text_color') },
|
|
{ value: "新建歌单", fontColor: $r('app.color.text_color') },
|
|
|
{ value: "手动导入", fontColor: $r('app.color.text_color') },
|
|
{ value: "手动导入", fontColor: $r('app.color.text_color') },
|
|
|
{ value: "自动导入", fontColor: $r('app.color.text_color') },
|
|
{ value: "自动导入", fontColor: $r('app.color.text_color') },
|
|
|
-
|
|
|
|
|
|
|
+ { value: "全选导入", fontColor: $r('app.color.text_color') },
|
|
|
],
|
|
],
|
|
|
maskColor: Color.Transparent,
|
|
maskColor: Color.Transparent,
|
|
|
backgroundColor: $r('app.color.bg_card'),
|
|
backgroundColor: $r('app.color.bg_card'),
|
|
@@ -1256,12 +1256,41 @@ export struct LocalMusic {
|
|
|
case 2:
|
|
case 2:
|
|
|
this.showTips()
|
|
this.showTips()
|
|
|
break;
|
|
break;
|
|
|
-
|
|
|
|
|
|
|
+ case 3:
|
|
|
|
|
+ this.goSelectMusic()
|
|
|
|
|
+ break;
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
})
|
|
})
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ //拉起音频
|
|
|
|
|
+ goSelectMusic(){
|
|
|
|
|
+
|
|
|
|
|
+ try {
|
|
|
|
|
+ let documentSelectOptions = new picker.DocumentSelectOptions();
|
|
|
|
|
+ documentSelectOptions.authMode = true
|
|
|
|
|
+ documentSelectOptions.multiAuthMode = true
|
|
|
|
|
+ documentSelectOptions.mergeMode = picker.MergeTypeMode.AUDIO;
|
|
|
|
|
+ let documentPicker = new picker.DocumentViewPicker(this.context);
|
|
|
|
|
+ documentPicker.select(documentSelectOptions).then((documentSelectResult: Array<string>) => {
|
|
|
|
|
+ if (documentSelectResult !== null && documentSelectResult !== undefined) {
|
|
|
|
|
+ this.saveVideoDatas(documentSelectResult)
|
|
|
|
|
+ }
|
|
|
|
|
+ console.info('DocumentViewPicker.select successfully, documentSelectResult uri: ' + JSON.stringify(documentSelectResult));
|
|
|
|
|
+ }).catch((err: BusinessError) => {
|
|
|
|
|
+ console.error(`DocumentViewPicker.select failed with err, code is: ${err.code}, message is: ${err.message}`);
|
|
|
|
|
+ });
|
|
|
|
|
+
|
|
|
|
|
+ } catch (error) {
|
|
|
|
|
+ let err: BusinessError = error as BusinessError;
|
|
|
|
|
+ console.error('AudioViewPicker failed with err: ' + JSON.stringify(err));
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
async showTips() {
|
|
async showTips() {
|
|
|
DialogHelper.showTipsDialog({
|
|
DialogHelper.showTipsDialog({
|
|
|
title: '使用提示:自动导入教程',
|
|
title: '使用提示:自动导入教程',
|