1.0.30 • Published 7 years ago

jcloud-ele-ui v1.0.30

Weekly downloads
-
License
MIT
Repository
-
Last release
7 years ago

Element - JCloud

A Vue.js 2.0 UI Toolkit for Web.

Modified from Element

安装 / Install

npm i jcloud-ele-ui -S

使用 / Useage

完整引入 / Fully Import

import Vue from 'vue';

import UI from 'jcloud-ele-ui';
import 'jcloud-ele-ui/lib/theme-jcloud/index.css';

Vue.use(UI);

按需引入 / Import Demand

import Vue from 'vue';
import { Button, ButtonGroup, Menu, Submenu, MenuItem } from 'jcloud-ele-ui';

Vue.use(Button);
Vue.use(Menu);
Vue.use(Submenu);
Vue.use(MenuItem);
Vue.use(ButtonGroup);

组件样式的引用将会由babel插件(后文介绍)自动加入, 但公共样式需要手动引入

import 'jcloud-ele-ui/lib/theme-jcloud/base.css';
import 'jcloud-ele-ui/lib/theme-jcloud/reset.css';

以下组件使用特殊的的引入方式

import { Loading, MessageBox, Notification, Message } from 'jcloud-ele-ui';

Vue.prototype.$loading = Loading.service;
Vue.prototype.$msgbox = MessageBox;
Vue.prototype.$alert = MessageBox.alert;
Vue.prototype.$confirm = MessageBox.confirm;
Vue.prototype.$prompt = MessageBox.prompt;
Vue.prototype.$notify = Notification;
Vue.prototype.$message = Message;

同时需要使用babel-plugin-component

安装

npm i babel-plugin-component -D

在.babelrc中添加配置

{
  ...,    // other configs
  "plugins": [
    ...,  // other plugins
    [
      "component", {
        "libraryName": "jcloud-ele-ui",
        "styleLibraryName": "theme-jcloud"
      }
    ]
  ]
}

babel-plugin-component会自动引入对应组件的样式文件. 因此无需单独引入主题中的index.css

LICENSE

MIT

1.0.30

7 years ago

1.0.29

7 years ago

1.0.28

8 years ago

1.0.27

8 years ago

1.0.26

8 years ago

1.0.25

8 years ago

1.0.24

8 years ago

1.0.23

8 years ago

1.0.22

8 years ago

1.0.21

8 years ago

1.0.20

8 years ago

1.0.19

8 years ago

1.0.18

8 years ago

1.0.17

8 years ago

1.0.16

8 years ago

1.0.15

8 years ago

1.0.14

8 years ago

1.0.13

8 years ago

1.0.12

8 years ago

1.0.11

8 years ago

1.0.10

8 years ago

1.0.9

8 years ago

1.0.8

8 years ago

1.0.7

8 years ago

1.0.6

8 years ago

1.0.5

8 years ago

1.0.4

8 years ago

1.0.3

8 years ago

1.0.2

8 years ago

1.0.1

8 years ago

1.0.0

8 years ago