1.1.1 • Published 1 year ago

@taropui/vue v1.1.1

Weekly downloads
-
License
ISC
Repository
github
Last release
1 year ago

安装

npm add @taropui/vue

使用

// 引入样式
import '@taropui/vue/lib/style/style.css';
import { Tab, Navbar } from '@taropui/vue';

按需引入

import Tab from '@taropui/vue/lib/es/Tab';
import '@taropui/vue/lib/style/Tab/style.css';

可通过 babel-plugin-import 设置自动转换为按需引入的方式

.babelrcbabel.config.js 中添加配置:

{
  // ...
  plugins: [
    [
      "import",
      {
        "libraryName": "@taropui/vue",
        "libraryDirectory": "lib/es",
        "style": (name, file) => name.replace('es', 'style') + '/style.css',
        "camel2DashComponentName": false
      }
    ]
  ]
}