UNPKG

jtljia-icons

Version:

icons

58 lines (45 loc) 978 B
# 指南 ## 基础 ### 安装 ```shell npm i jtljia-icons ``` ### 快速开始 #### 用法 如果你对打包后的文件大小不是很在乎,那么使用完整导入会更方便。 ##### 完整引入 ```ts // main.ts import { createApp } from 'vue' import JtljiaIcons from 'jtljia-icons' import App from './App.vue' const app = createApp(App) app.use(JtljiaIcons) app.mount('#app') ``` ###### Volar 支持 如果您使用 Volar,请在 tsconfig.json 中通过 compilerOptions.type 指定全局组件类型。 ```json // tsconfig.json { "compilerOptions": { // ... "types": ["jtljia-icons/dist/types/components/index.d.ts"] } } ``` ##### 按需导入 ```vue <template> <div> <Contract :size="20" color="#000000" /> </div> </template> <script setup lang='ts'> import { Contract } from 'cel-test-icons' defineOptions({ name: 'App', }); </script> <style lang='scss' scoped></style> ```