This commit is contained in:
dap
2024-10-21 20:29:43 +08:00
15 changed files with 41 additions and 21 deletions

View File

@@ -1,2 +1,2 @@
export * from './iconify/index';
export * from './svg/index';
export * from './iconify/index.js';
export * from './svg/index.js';

View File

@@ -1,6 +1,6 @@
import { createIconifyIcon } from '@vben-core/icons';
import './load';
import './load.js';
const SvgAvatar1Icon = createIconifyIcon('svg:avatar-1');
const SvgAvatar2Icon = createIconifyIcon('svg:avatar-2');

View File

@@ -1,4 +1,6 @@
import { addIcon, type IconifyIcon } from '@vben-core/icons';
import type { IconifyIconStructure } from '@vben-core/icons';
import { addIcon } from '@vben-core/icons';
let loaded = false;
if (!loaded) {
@@ -6,7 +8,7 @@ if (!loaded) {
loaded = true;
}
function parseSvg(svgData: string): IconifyIcon {
function parseSvg(svgData: string): IconifyIconStructure {
const parser = new DOMParser();
const xmlDoc = parser.parseFromString(svgData, 'image/svg+xml');
const svgElement = xmlDoc.documentElement;