1.3.6 • Published 9 months ago

@ahcloud/icon-vue v1.3.6

Weekly downloads
-
License
MIT
Repository
-
Last release
9 months ago

@ahcloud/icon-vue

Vue Svg Icon Components

安装

npm install @ahcloud/icon-vue

全量引入

import Vue from "vue";
import IconBox from "@ahcloud/icon-vue";
import App from "./App.vue";

Vue.use(IconBox);

new Vue({
  el: "#app",
  render: (h) => h(App),
});

引用图标

<template>
  <AlertFilled :size="24" />
</template>

<script>
  import { AlertFilled } from "@ahcloud/icon-vue";

  export default {
    components: {
      AlertFilled,
    },
  };
</script>

自动按需引用图标

可以使用 babel-plugin-import 来按需加载图标。 配置 .babelrc

{
  "plugins": [
    [
      "import",
      {
        "libraryName": "@ahcloud/icon-vue",
        "libraryDirectory": "build/esm/icons"
      }
    ]
  ]
}
import { AlertFilled } from "@ahcloud/icon-vue";
////                  👇🏻                        ////
import AlertFilled from "@ahcloud/icon-vue/build/esm/icons/alert-filled";

属性

属性名称说明类型默认值
size图标的大小,宽高相同number, string'24px'
color图标的颜色,string'currentColor'
1.3.6

9 months ago

1.3.5

10 months ago

1.3.4

10 months ago

1.3.3

11 months ago

1.3.2

11 months ago

1.3.1

11 months ago

1.3.0

12 months ago

1.2.0

1 year ago

1.1.0

1 year ago

1.0.0

1 year ago