Compare commits

..

2 Commits

Author SHA1 Message Date
4476be60b5 修复动态表单默认值赋值逻辑 2025-04-01 13:14:12 +08:00
85127ff866 允许无法获取到5sing链接时继续添加曲目 2025-04-01 13:06:38 +08:00
2 changed files with 8 additions and 8 deletions

View File

@@ -4,7 +4,7 @@
import { ConfigItemDefinition, TemplateConfigImageItem } from '@/data/VTsuruTypes';
import { FILE_BASE_URL, VTSURU_API_URL } from '@/data/constants';
import { Info24Filled } from '@vicons/fluent';
import { NButton, NCheckbox, NColorPicker, NEmpty, NForm, NFormItem, NGrid, NInput, NInputNumber, NSlider, NTooltip, NUpload, UploadFileInfo, useMessage } from 'naive-ui';
import { NButton, NCheckbox, NColorPicker, NEmpty, NForm, NGrid, NInput, NInputNumber, NSlider, NTooltip, NUpload, UploadFileInfo, useMessage } from 'naive-ui';
import { onMounted, ref } from 'vue';
const message = useMessage();
@@ -73,7 +73,8 @@ import { Info24Filled } from '@vicons/fluent';
function getItems() { }
onMounted(() => {
props.config?.forEach(item => {
if (item.default && !props.configData[item.key]) {
console.log(props.configData)
if (item.default && !(item.key in props.configData)) {
props.configData[item.key] = item.default;
}
if (item.type == 'image') {

View File

@@ -252,8 +252,7 @@ async function addFingsingSongs(song: SongsInfo) {
song.url = url
} catch (err) {
isModalLoading.value = false
message.error('添加失败')
return
message.error('未能获取到歌曲链接, 将留空')
}
}
await addSongs([song], SongFrom.FiveSing)