1、
const getAssetsImages = (name) => {
return new URL(`/src/assets/images/icon/${name}.png`, import.meta.url).href
}
2、
const application = reactive([
{ title: '预约带看', icon: 'yuyue', link: '' },
{ title: '仪表门锁', icon: 'yibiao', link: '' },
{ title: '审批', icon: 'shenpi', link: '' },
{ title: '报修反馈', icon: 'baoxiu', link: '' },
{ title: '自定义', icon: 'zidingyi', link: '' },
]);
const pathImage = () => {
for (let i = 0; i < application.length; i++) {
import(`./../../static/suzhou-images/icon/${application[i].icon}.png`).then((res :any) => {
application[i].icon = res.default;
})
}
};```