feat: 增加两种图标类别及虚拟组件
This commit is contained in:
parent
2770114254
commit
aee8c6bf9e
45
src/packages/components/Icons/MaterialLine/index.ts
Normal file
45
src/packages/components/Icons/MaterialLine/index.ts
Normal file
@ -0,0 +1,45 @@
|
||||
import { IconConfig } from '../Icon/index'
|
||||
import { PackagesCategoryEnum } from '@/packages/index.d'
|
||||
import { ChatCategoryEnum, ChatCategoryEnumName } from '../index.d'
|
||||
|
||||
const iconNames = [
|
||||
'line-md:beer-alt-filled-loop',
|
||||
'line-md:beer-alt-twotone-loop',
|
||||
'line-md:cloud-braces-loop',
|
||||
'line-md:cloud-download-loop',
|
||||
'line-md:cloud-download-outline-loop',
|
||||
'line-md:cloud-upload-loop',
|
||||
'line-md:cloud-upload-outline-loop',
|
||||
'line-md:coffee-half-empty-twotone-loop',
|
||||
'line-md:coffee-loop',
|
||||
'line-md:coffee-twotone-loop',
|
||||
'line-md:downloading-loop',
|
||||
'line-md:github-loop',
|
||||
'line-md:light-dark-loop',
|
||||
'line-md:loading-alt-loop',
|
||||
'line-md:loading-loop',
|
||||
'line-md:loading-twotone-loop',
|
||||
'line-md:moon-alt-loop',
|
||||
'line-md:moon-alt-to-sunny-outline-loop-transition',
|
||||
'line-md:moon-filled-loop',
|
||||
'line-md:moon-filled-to-sunny-filled-loop-transition',
|
||||
'line-md:star-pulsating-filled-loop',
|
||||
'line-md:star-pulsating-loop',
|
||||
'line-md:star-pulsating-twotone-loop',
|
||||
'line-md:upload-loop',
|
||||
'line-md:upload-outline-loop',
|
||||
'line-md:uploading-loop'
|
||||
]
|
||||
const iconList = iconNames.map(name => ({
|
||||
...IconConfig,
|
||||
category: ChatCategoryEnum.ML,
|
||||
categoryName: ChatCategoryEnumName.ML,
|
||||
package: PackagesCategoryEnum.ICONS,
|
||||
image: name,
|
||||
icon: name,
|
||||
dataset: name,
|
||||
title: name.replace('line-md:', ''),
|
||||
virtualComponent: './components/Icons/Icon' // 虚拟组件路径,尾部不跟 ‘/’,相对于 /packages/index.ts 文件的位置
|
||||
}))
|
||||
|
||||
export default iconList
|
86
src/packages/components/Icons/Unicons/index.ts
Normal file
86
src/packages/components/Icons/Unicons/index.ts
Normal file
@ -0,0 +1,86 @@
|
||||
import { IconConfig } from '../Icon/index'
|
||||
import { PackagesCategoryEnum } from '@/packages/index.d'
|
||||
import { ChatCategoryEnum, ChatCategoryEnumName } from '../index.d'
|
||||
|
||||
const iconNames = [
|
||||
'uim:adobe',
|
||||
'uim:airplay',
|
||||
'uim:align',
|
||||
'uim:align-alt',
|
||||
'uim:android-alt',
|
||||
'uim:angle-double-down',
|
||||
'uim:angle-double-left',
|
||||
'uim:angle-double-right',
|
||||
'uim:angle-double-up',
|
||||
'uim:angle-down',
|
||||
'uim:angle-left',
|
||||
'uim:angle-right',
|
||||
'uim:angle-up',
|
||||
'uim:apple',
|
||||
'uim:apple-alt',
|
||||
'uim:apps',
|
||||
'uim:bag',
|
||||
'uim:battery-bolt',
|
||||
'uim:bing',
|
||||
'uim:box',
|
||||
'uim:briefcase',
|
||||
'uim:calender',
|
||||
'uim:chart',
|
||||
'uim:chart-pie',
|
||||
'uim:circle-layer',
|
||||
'uim:clinic-medical',
|
||||
'uim:clock',
|
||||
'uim:comment-alt',
|
||||
'uim:comment-alt-dots',
|
||||
'uim:docker',
|
||||
'uim:download-alt',
|
||||
'uim:dribbble',
|
||||
'uim:dropbox',
|
||||
'uim:entry',
|
||||
'uim:exclamation-circle',
|
||||
'uim:exclamation-triangle',
|
||||
'uim:exit',
|
||||
'uim:facebook',
|
||||
'uim:facebook-messenger',
|
||||
'uim:facebook-messenger-alt',
|
||||
'uim:google-drive',
|
||||
'uim:google-play',
|
||||
'uim:graph-bar',
|
||||
'uim:head-side-mask',
|
||||
'uim:horizontal-align-left',
|
||||
'uim:hospital',
|
||||
'uim:house-user',
|
||||
'uim:image-v',
|
||||
'uim:key-skeleton',
|
||||
'uim:layer-group',
|
||||
'uim:layers-alt',
|
||||
'uim:link-h',
|
||||
'uim:microscope',
|
||||
'uim:microsoft',
|
||||
'uim:object-group',
|
||||
'uim:object-ungroup',
|
||||
'uim:paypal',
|
||||
'uim:refresh',
|
||||
'uim:repeat',
|
||||
'uim:right-indent-alt',
|
||||
'uim:rocket',
|
||||
'uim:shield-plus',
|
||||
'uim:social-distancing',
|
||||
'uim:telegram-alt',
|
||||
'uim:user-md',
|
||||
'uim:toilet-paper',
|
||||
'uim:youtube'
|
||||
]
|
||||
const iconList = iconNames.map(name => ({
|
||||
...IconConfig,
|
||||
category: ChatCategoryEnum.UNICONS,
|
||||
categoryName: ChatCategoryEnumName.UNICONS,
|
||||
package: PackagesCategoryEnum.ICONS,
|
||||
image: name,
|
||||
icon: name,
|
||||
dataset: name,
|
||||
title: name.replace('uim:', ''),
|
||||
virtualComponent: './components/Icons/Icon' // 虚拟组件路径,尾部不跟 ‘/’,相对于 /packages/index.ts 文件的位置
|
||||
}))
|
||||
|
||||
export default iconList
|
9
src/packages/components/Icons/index.d.ts
vendored
Normal file
9
src/packages/components/Icons/index.d.ts
vendored
Normal file
@ -0,0 +1,9 @@
|
||||
export enum ChatCategoryEnum {
|
||||
ML = 'MaterialLine',
|
||||
UNICONS = 'Unicons',
|
||||
}
|
||||
|
||||
export enum ChatCategoryEnumName {
|
||||
ML = '动画',
|
||||
UNICONS = '通用'
|
||||
}
|
4
src/packages/components/Icons/index.ts
Normal file
4
src/packages/components/Icons/index.ts
Normal file
@ -0,0 +1,4 @@
|
||||
import MaterialLine from './MaterialLine'
|
||||
import Unicons from './Unicons'
|
||||
|
||||
export const IconList = [...MaterialLine, ...Unicons]
|
Loading…
x
Reference in New Issue
Block a user