更新最新代码
This commit is contained in:
7
packages/@core/base/icons/build.config.ts
Normal file
7
packages/@core/base/icons/build.config.ts
Normal file
@@ -0,0 +1,7 @@
|
||||
import { defineBuildConfig } from 'unbuild';
|
||||
|
||||
export default defineBuildConfig({
|
||||
clean: true,
|
||||
declaration: true,
|
||||
entries: ['src/index'],
|
||||
});
|
||||
14
packages/@core/base/icons/src/create-icon.ts
Normal file
14
packages/@core/base/icons/src/create-icon.ts
Normal file
@@ -0,0 +1,14 @@
|
||||
import { defineComponent, h } from 'vue';
|
||||
|
||||
import { Icon } from '@iconify/vue';
|
||||
|
||||
function createIconifyIcon(icon: string) {
|
||||
return defineComponent({
|
||||
name: `Icon-${icon}`,
|
||||
setup(props, { attrs }) {
|
||||
return () => h(Icon, { icon, ...props, ...attrs });
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
export { createIconifyIcon };
|
||||
11
packages/@core/base/icons/src/index.ts
Normal file
11
packages/@core/base/icons/src/index.ts
Normal file
@@ -0,0 +1,11 @@
|
||||
export * from './create-icon';
|
||||
|
||||
export * from './lucide';
|
||||
|
||||
export type { IconifyIcon as IconifyIconStructure } from '@iconify/vue';
|
||||
export {
|
||||
addCollection,
|
||||
addIcon,
|
||||
Icon as IconifyIcon,
|
||||
listIcons,
|
||||
} from '@iconify/vue';
|
||||
6
packages/@core/base/icons/tsconfig.json
Normal file
6
packages/@core/base/icons/tsconfig.json
Normal file
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"$schema": "https://json.schemastore.org/tsconfig",
|
||||
"extends": "@vben/tsconfig/web.json",
|
||||
"include": ["src"],
|
||||
"exclude": ["node_modules"]
|
||||
}
|
||||
Reference in New Issue
Block a user