@web-xhh/web-components

1.0.6 • Public • Published

Description

web前端通用组件库(测试中项目)

Install

npm i @web-xhh/web-components -S

Usage

全局引入

import webComponents from '@web-xhh/web-components'
import '@web-xhh/web-components/lib/style.css'
Vue.use(webComponents)

<XhhButton button-type="warning">按钮测试</XhhButton>

按需引入

import XhhButton from '@web-xhh/web-components/lib/xhh-button'
import '@web-xhh/web-components/lib/xhh-button/style.css'
Vue.use(XhhButton)

<XhhButton button-type="warning">按钮测试</XhhButton>

按需引入优化

使用babel-plugin-component

"plugins": [
    [
      "component",
      {
        "libraryName": "@web-xhh/web-components",
        "style": true
      }
    ]
  ]
import { XhhButton, XhhToast } from '@web-xhh/web-components'
Vue.use(XhhButton)
Vue.use(XhhToast)

<XhhButton button-type="warning">按钮测试咯</XhhButton>
<XhhToast />

Package Sidebar

Install

npm i @web-xhh/web-components

Weekly Downloads

1

Version

1.0.6

License

ISC

Unpacked Size

10.8 kB

Total Files

18

Last publish

Collaborators

  • xhh-npm