Skip to content

kingning/veui

 
 

Repository files navigation

VEUI

Baidu Enterprise UI for Vue.js.

This is a work in progress.

DEMO

Installation

$ npm i --save veui
$ npm i --save-dev babel-plugin-veui veui-loader

To use default theme x you have to install it too.

$ npm i --save veui-theme-x

Configuration

First, scaffold your project using vue-cli with template webpack.

To use default theme x, make sure to add these plugins in .babelrc:

{
  "plugins": [
    [
      "veui",
      {
        "modules": [
          {
            "package": "veui-theme-x",
            "fileName": "${module}.less"
          },
          {
            "package": "veui-theme-x",
            "fileName": "${module}.js",
            "transform": false
          }
        ]
      }
    ],
    "lodash",
    "transform-vue-jsx",
    [
      "transform-runtime",
      {
        "polyfill": false,
        "regenerator": false
      }
    ]
  ]
}

To make sure Webpack dynamically loads style modules correctly, make sure to configure veui-loader in the workflow as follows:

In build/webpack.base.conf.js, prepend this rule:

{
  test: /\.js$/,
  loader: 'veui-loader',
  enforce: 'pre',
  include: [resolve('src'), resolve('demo'), resolve('test')]
}

In build/vue-loader.conf.js, add a pre-loader:

{
  preLoaders: {
    js: 'veui-loader'
  }
}

Development

Install lerna:

$ npm i -g lerna

After cloning the repo, run

$ lerna bootstrap
$ npm run dev

And then you should be able to see the demo via http://localhost:8080/.

Browser Support

Evergreen browsers, IE9 and above.

FAQ

TBD.

Packages

No packages published

Languages

  • Vue 60.4%
  • JavaScript 21.0%
  • CSS 18.6%