Newer
Older
urbanLifeline_YanAn / src / views / DialogTabs / DialogConfig.js
@zhangqy zhangqy on 4 Oct 728 bytes 公共弹窗

// 批量引入所有封装的子组件  component下组件为封装的公共组件  component下项目路径文件夹下的组件为定制化组件
const AllComponents = import.meta.globEager("./component/*.vue");
let res_components = {};
console.log(AllComponents);
Object.keys(AllComponents).forEach((item) => {
  console.log(item);
  let comp = AllComponents[item];
  let name = comp.default.name;
  res_components[name] = comp.default;
});

const config = {
  ComparisonTable: [{
    title: '视频监控',
    content: markRaw(res_components['ShiPingJianKong']),
    name: "spjk"
  }, {
    title: '工单派发',
    content: markRaw(res_components['GongDanPaiFa']),
    name: "gdpf"
  }
  ]


}

export default config;