chore: 使用模板字符串方式表示 redirectComponent 规则,更为精准,避免手误

This commit is contained in:
tnt group 2023-05-27 12:06:43 +08:00
parent 9c0aa14473
commit d907d30686
5 changed files with 6 additions and 6 deletions

View File

@ -78,7 +78,7 @@ const iconList = iconNames.map(name => ({
icon: name,
dataset: name,
title: name.replace('uim:', ''),
redirectComponent: 'Icons/Default/Icon' // 跳转组件路径规则packageName/categoryName/componentKey
redirectComponent: `${IconConfig.package}/${IconConfig.category}/${IconConfig.key}` // 跳转组件路径规则packageName/categoryName/componentKey
}))
export default iconList

View File

@ -39,7 +39,7 @@ const iconList = iconNames.map(name => ({
icon: name,
dataset: name,
title: name.replace('line-md:', ''),
redirectComponent: 'Icons/Default/Icon' // 跳转组件路径规则packageName/categoryName/componentKey
redirectComponent: `${IconConfig.package}/${IconConfig.category}/${IconConfig.key}` // 跳转组件路径规则packageName/categoryName/componentKey
}))
export default iconList

View File

@ -36,7 +36,7 @@ const iconNames = [
'wi:night-alt-cloudy-high',
'wi:night-alt-hail',
'wi:night-alt-lightning',
'wi:umbrella',
'wi:umbrella'
]
const iconList = iconNames.map(name => ({
...IconConfig,
@ -47,7 +47,7 @@ const iconList = iconNames.map(name => ({
icon: name,
dataset: name,
title: name.replace('wi:', ''),
redirectComponent: 'Icons/Default/Icon' // 跳转组件路径规则packageName/categoryName/componentKey
redirectComponent: `${IconConfig.package}/${IconConfig.category}/${IconConfig.key}` // 跳转组件路径规则packageName/categoryName/componentKey
}))
export default iconList

View File

@ -74,7 +74,7 @@ const addConfig = {
title: e.fileName,
image: e.url,
dataset: e.url,
redirectComponent: 'Informations/Mores/Image' // 跳转组件路径规则packageName/categoryName/componentKey
redirectComponent: `${ImageConfig.package}/${ImageConfig.category}/${ImageConfig.key}` // 跳转组件路径规则packageName/categoryName/componentKey
}
userPhotosList.unshift(newPhoto)
// 存储在本地数据中

View File

@ -17,7 +17,7 @@ const photoConfigList = imageList.map(i => ({
image: i.imageUrl,
dataset: i.imageUrl,
title: i.imageName,
redirectComponent: 'Informations/Mores/Image' // 跳转组件路径规则packageName/categoryName/componentKey
redirectComponent: `${ImageConfig.package}/${ImageConfig.category}/${ImageConfig.key}` // 跳转组件路径规则packageName/categoryName/componentKey
}))
export default photoConfigList