1 | # 获取 `Kero` 资源
|
2 |
|
3 | kero资源已打包在`u.js`中,配合`u.css` , 依赖`jquery`实现完整前端UI方案。
|
4 |
|
5 | 如需使用到grid,tree相关插件,可选择添加对应的`css`和`js`文件,页面结构如下:
|
6 |
|
7 | ```
|
8 | <!DOCTYPE html>
|
9 | <html lang="en">
|
10 | <head>
|
11 | <meta charset="UTF-8">
|
12 |
|
13 | <!-- 整体样式u.css,必须引入 -->
|
14 | <link rel="stylesheet" href="//design.yyuap.com/static/uui/latest/css/u.css">
|
15 |
|
16 | <!-- 可选:使用grid图表相关插件,加载grid.css -->
|
17 | <link rel="stylesheet" type="text/css" href="//design.yyuap.com/static/uui/latest/css/grid.css">
|
18 |
|
19 | <!-- 可选:使用tree相关插件,加载tree.css -->
|
20 | <link rel="stylesheet" type="text/css" href="//design.yyuap.com/static/uui/latest/css/tree.css">
|
21 | </head>
|
22 | <body>
|
23 | <h1> Hi, iuap design </h1>
|
24 |
|
25 | <!-- 你的代码 -->
|
26 |
|
27 | <!-- 依赖jQuery,必须在核心js加载前引入 -->
|
28 | <script src="//design.yyuap.com/static/jquery/jquery-1.11.2.js"></script>
|
29 |
|
30 | <!--[if lte IE 8 ]>
|
31 | <!-- 针对ie8,Polyfill -->
|
32 | <script src="//design.yyuap.com/static/uui/latest/js/u-polyfill.js"></script>
|
33 | <![endif]-->
|
34 |
|
35 | <!-- 核心js 必须引入 -->
|
36 | <script src="//design.yyuap.com/static/uui/latest/js/u.js"></script>
|
37 |
|
38 | <!-- 可选:使用grid图表相关插件,加载u-grid.js -->
|
39 | <script src="//design.yyuap.com/static/uui/latest/js/u-grid.js"></script>
|
40 |
|
41 | <!-- 可选:使用tree相关插件,加载u-tree.js -->
|
42 | <script src="//design.yyuap.com/static/uui/latest/js/u-tree.js"></script>
|
43 |
|
44 | </body>
|
45 | </html>
|
46 | ```
|
47 | 完整资源可通过以下方式获取
|
48 |
|
49 | ## 1.直接下载资源包
|
50 |
|
51 | 可通过官网首页点击下载资源,获得完整资源包(包含空页面及所需样式),下载地址
|
52 |
|
53 | ```
|
54 | http://design.yyuap.com/static/download/iuap-design-3.1.12.zip
|
55 | ```
|
56 | 核心文件`u.js`可通过以下方式获取
|
57 |
|
58 | ## 1.通过CDN引用
|
59 |
|
60 | ```
|
61 | <script src="http://design.yyuap.com/static/uui/latest/js/u.js"></script>
|
62 | ```
|
63 |
|
64 | ## 2.获取Kero源码
|
65 |
|
66 | ```
|
67 | $ git clone git@github.com:iuap-design/kero.git
|
68 | ```
|
69 |
|
70 | ## 3.NPM
|
71 |
|
72 | ```
|
73 | $ npm install kero --save
|
74 | ```
|