feat: 回车检测&restore添加标签
This commit is contained in:
@@ -25,35 +25,15 @@ function slugify(str) {
|
||||
* @returns { string | null } 返回可直接用于 <img :src=""> 的 URL
|
||||
*/
|
||||
export function getStyleImage(types, style) {
|
||||
|
||||
if (!types) types = 'Sofa'
|
||||
if (!types) types = 'Sofa'
|
||||
const type = types.toLowerCase()
|
||||
const map = imagesMaps[type]
|
||||
|
||||
|
||||
const fileName = `${slugify(style)}.png`
|
||||
const key = `/src/assets/images/${type}/${fileName}`
|
||||
console.log('types',types, 'style',style, 'fileName',fileName, 'key',key);
|
||||
|
||||
if (map[key]) {
|
||||
return map[key].default
|
||||
}
|
||||
return ''
|
||||
}
|
||||
|
||||
const styleList = [
|
||||
'Venetian Modern',
|
||||
'Coastal',
|
||||
'Maximalism',
|
||||
'Memphis',
|
||||
'Verdant',
|
||||
'Century Chrome',
|
||||
'Modern Revival',
|
||||
'Transitional',
|
||||
"Tuscan 2000's",
|
||||
'Kitsch-core',
|
||||
'Bauhaus',
|
||||
'Constructivism',
|
||||
'Nordic Noir',
|
||||
'Dopamine',
|
||||
'Squiggle'
|
||||
]
|
||||
|
||||
Reference in New Issue
Block a user