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

This commit is contained in:
tnt group
2023-05-27 12:06:43 +08:00
parent d8bcb4ab4f
commit ff4140cbfb
5 changed files with 6 additions and 6 deletions
@@ -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
@@ -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
@@ -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