学习创建app框架。
This commit is contained in:
22
企业级管理系统/web/admin_system/src/components/svg/svg.js
Normal file
22
企业级管理系统/web/admin_system/src/components/svg/svg.js
Normal file
@@ -0,0 +1,22 @@
|
||||
/*
|
||||
* @Author: Kane
|
||||
* @Date: 2023-01-06 20:49:04
|
||||
* @LastEditors: Kane
|
||||
* @LastEditTime: 2023-01-06 20:58:42
|
||||
* @FilePath: \admin_system\src\components\svg\svg.js
|
||||
* @Description: 导入svg图标
|
||||
*
|
||||
* Copyright (c) ${2022} by Kane, All Rights Reserved.
|
||||
*/
|
||||
const svgContext = require.context("./icons", true, /\.svg$/);
|
||||
console.log(svgContext);
|
||||
|
||||
function requireAll(context)
|
||||
{
|
||||
return context.keys().map(context);
|
||||
}
|
||||
|
||||
const svgMap = requireAll(svgContext);
|
||||
|
||||
console.log("导入svg");
|
||||
console.log(svgMap);
|
Reference in New Issue
Block a user