├── Empty
├── 1.png
├── 2.png
├── 3.png
├── 4.png
├── README.md
└── index.vue
├── SideBar
├── 效果图.gif
├── SidebarItem.vue
├── SideBar.vue
└── README.md
├── Pagination
├── 效果图.gif
├── index.vue
└── README.md
├── UploadFile
├── 效果图.gif
├── README.md
└── index.vue
├── VueHoverMask
├── 效果图.gif
├── README.md
└── index.vue
├── JTopoInVue
├── static
│ └── bg.jpg
├── main.js
├── App.vue
├── index.html
├── components
│ └── jTopo.vue
├── package.json
├── README.md
├── webpack.config.js
└── lib
│ └── jtopo-0.4.8-min.js
├── MergeTableCell
├── main.js
├── README.md
├── index.html
├── package.json
├── webpack.config.js
├── App.vue
└── data.js
├── nprogresBar
├── router.js
└── README.md
├── LICENSE
├── ExportExcel
├── index.vue
├── README.md
└── Export2Excel.js
├── README.md
└── BackToTop
├── README.md
└── index.vue
/Empty/1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/NLRX-WJC/Vue-Components-Library/HEAD/Empty/1.png
--------------------------------------------------------------------------------
/Empty/2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/NLRX-WJC/Vue-Components-Library/HEAD/Empty/2.png
--------------------------------------------------------------------------------
/Empty/3.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/NLRX-WJC/Vue-Components-Library/HEAD/Empty/3.png
--------------------------------------------------------------------------------
/Empty/4.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/NLRX-WJC/Vue-Components-Library/HEAD/Empty/4.png
--------------------------------------------------------------------------------
/SideBar/效果图.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/NLRX-WJC/Vue-Components-Library/HEAD/SideBar/效果图.gif
--------------------------------------------------------------------------------
/Pagination/效果图.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/NLRX-WJC/Vue-Components-Library/HEAD/Pagination/效果图.gif
--------------------------------------------------------------------------------
/UploadFile/效果图.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/NLRX-WJC/Vue-Components-Library/HEAD/UploadFile/效果图.gif
--------------------------------------------------------------------------------
/VueHoverMask/效果图.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/NLRX-WJC/Vue-Components-Library/HEAD/VueHoverMask/效果图.gif
--------------------------------------------------------------------------------
/JTopoInVue/static/bg.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/NLRX-WJC/Vue-Components-Library/HEAD/JTopoInVue/static/bg.jpg
--------------------------------------------------------------------------------
/JTopoInVue/main.js:
--------------------------------------------------------------------------------
1 | import Vue from 'vue'
2 | import App from './App.vue'
3 |
4 | new Vue({
5 | el: '#app',
6 | render: h => h(App),
7 | })
8 |
--------------------------------------------------------------------------------
/MergeTableCell/main.js:
--------------------------------------------------------------------------------
1 | import Vue from 'vue'
2 | import App from './App.vue'
3 |
4 | new Vue({
5 | el: '#app',
6 | render: h => h(App),
7 | })
8 |
--------------------------------------------------------------------------------
/MergeTableCell/README.md:
--------------------------------------------------------------------------------
1 | # 1.运行demo
2 |
3 | ``` bash
4 | # install dependencies
5 | npm install
6 |
7 | # serve with hot reload at localhost:8080
8 | npm run dev
9 |
10 | # build for production with minification
11 | npm run build
12 | ```
13 |
14 |
--------------------------------------------------------------------------------
/JTopoInVue/App.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
14 |
15 |
--------------------------------------------------------------------------------
/MergeTableCell/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | mergeTableCell
6 |
7 |
8 |
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/JTopoInVue/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | JTopoInVue
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/JTopoInVue/components/jTopo.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
36 |
--------------------------------------------------------------------------------
/JTopoInVue/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "JTopo in Vue",
3 | "description": "JTopo in Vue",
4 | "version": "1.0.0",
5 | "author": "NLRX",
6 | "license": "MIT",
7 | "private": true,
8 | "scripts": {
9 | "dev": "cross-env NODE_ENV=development webpack-dev-server --open --hot",
10 | "build": "cross-env NODE_ENV=production webpack --progress --hide-modules"
11 | },
12 | "dependencies": {
13 | "vue": "^2.5.11"
14 | },
15 | "browserslist": [
16 | "> 1%",
17 | "last 2 versions",
18 | "not ie <= 8"
19 | ],
20 | "devDependencies": {
21 | "babel-core": "^6.26.0",
22 | "babel-loader": "^7.1.2",
23 | "babel-plugin-component": "^1.1.1",
24 | "babel-preset-env": "^1.6.0",
25 | "babel-preset-stage-3": "^6.24.1",
26 | "cross-env": "^5.0.5",
27 | "css-loader": "^0.28.7",
28 | "file-loader": "^1.1.4",
29 | "vue-loader": "^13.0.5",
30 | "vue-template-compiler": "^2.4.4",
31 | "webpack": "^3.6.0",
32 | "webpack-dev-server": "^2.9.1"
33 | }
34 | }
35 |
--------------------------------------------------------------------------------
/UploadFile/README.md:
--------------------------------------------------------------------------------
1 | # 介绍
2 |
3 | 这是一个是基于`element-UI`的文件上传组件基础上,进行了二次封装,该组件除了可以正常的进行文件上传,还增加了显示文件上传的进度条。
4 |
5 | # 使用方法
6 |
7 | 由于该组件是基于`element-UI`的分页组件进行二次封装,所以在使用该组件时请务必安装`element-UI`([安装方式猛戳这里](http://element-cn.eleme.io/#/zh-CN/component/installation)),另外,该组件进行文件上传的操作采用了`axios`,所以也必须先安装好`axios`,安装好上述两个库后,只需将该组件文件夹`UploadFile`导入到现有项目中即可使用。
8 |
9 | # 使用示例
10 |
11 | ```html
12 |
13 |
14 |
15 |
16 |
17 |
18 |
30 | ```
31 |
32 | # 选项
33 |
34 | | 属性 | 描述 | 类型 | 是否必须 |
35 | | :----------: | :--: | :--: | :----------: |
36 | | url | 件上传到的目的url | String | 是 |
37 |
38 | # 效果图
39 | 
40 |
--------------------------------------------------------------------------------
/nprogresBar/router.js:
--------------------------------------------------------------------------------
1 | import Vue from 'vue'
2 | import Router from 'vue-router'
3 | import NProgress from 'nprogress' // progress bar
4 | import 'nprogress/nprogress.css'// progress bar style
5 |
6 | Vue.use(Router)
7 |
8 | // 个性化配置进度条外观
9 | NProgress.configure({
10 | easing: 'ease', // 动画方式
11 | speed: 500, // 递增进度条的速度
12 | showSpinner: false, // 是否显示加载ico
13 | trickleSpeed: 200, // 自动递增间隔
14 | minimum: 0.3 // 初始化时的最小百分比
15 | })
16 |
17 | const router = new Router({
18 | routes: [
19 | { path: '/', redirect: '/index' },
20 | { path: '/login', name: 'login', component: Login },
21 | ]
22 | })
23 |
24 | // 添加路由守卫
25 | router.beforeEach((to, from, next) => {
26 | NProgress.start()
27 | if (to.path == "/login") {
28 | next();
29 | NProgress.done()
30 | } else {
31 | isLogin ? next() : next("/login");
32 | NProgress.done()
33 | }
34 | })
35 | router.afterEach(() => {
36 | NProgress.done()
37 | })
38 | export default router;
--------------------------------------------------------------------------------
/MergeTableCell/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "mergeTableCell",
3 | "description": "mergeTableCell",
4 | "version": "1.0.0",
5 | "author": "NLRX",
6 | "license": "MIT",
7 | "private": true,
8 | "scripts": {
9 | "dev": "cross-env NODE_ENV=development webpack-dev-server --open --hot",
10 | "build": "cross-env NODE_ENV=production webpack --progress --hide-modules"
11 | },
12 | "dependencies": {
13 | "vue": "^2.5.11"
14 | },
15 | "browserslist": [
16 | "> 1%",
17 | "last 2 versions",
18 | "not ie <= 8"
19 | ],
20 | "devDependencies": {
21 | "babel-core": "^6.26.0",
22 | "babel-loader": "^7.1.2",
23 | "babel-plugin-component": "^1.1.1",
24 | "babel-preset-env": "^1.6.0",
25 | "babel-preset-stage-3": "^6.24.1",
26 | "element-ui": "^2.4.10",
27 | "cross-env": "^5.0.5",
28 | "css-loader": "^0.28.7",
29 | "file-loader": "^1.1.4",
30 | "vue-loader": "^13.0.5",
31 | "vue-template-compiler": "^2.4.4",
32 | "webpack": "^3.6.0",
33 | "webpack-dev-server": "^2.9.1"
34 | }
35 | }
36 |
--------------------------------------------------------------------------------
/SideBar/SidebarItem.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | {{item.title}}
7 |
8 |
9 |
10 |
11 |
12 |
13 | {{item.title}}
14 |
15 |
16 |
17 |
21 |
22 |
23 | {{child.title}}
24 |
25 |
26 |
27 |
28 |
29 |
30 |
42 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) 2019 NLRX-WJC
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
22 |
--------------------------------------------------------------------------------
/VueHoverMask/README.md:
--------------------------------------------------------------------------------
1 |
2 |
3 | # 介绍
4 |
5 | 当鼠标hover 上元素时,给元素加一层遮罩层。
6 |
7 | # 效果图
8 |
9 | 
10 |
11 | # 使用
12 |
13 | ```js
14 | import VueHoverMask from 'vue-hover-mask'
15 | export default {
16 | components: {
17 | VueHoverMask
18 | }
19 | }
20 | ```
21 |
22 | # 示例
23 |
24 | ```html
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 | 编辑
33 |
34 |
35 |
36 |
37 |
38 |
50 |
56 | ```
57 |
58 | # 组件代码
59 |
60 | 完整代码请戳☞[Vue-Components-Library/VueHoverMask](https://github.com/wangjiachen199366/Vue-Components-Library/tree/master/VueHoverMask)
--------------------------------------------------------------------------------
/VueHoverMask/index.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
8 |
9 |
10 |
11 |
12 |
13 |
23 |
24 |
62 |
--------------------------------------------------------------------------------
/ExportExcel/index.vue:
--------------------------------------------------------------------------------
1 |
2 | 导出 Excel
3 |
4 |
5 |
57 |
58 |
59 |
--------------------------------------------------------------------------------
/JTopoInVue/README.md:
--------------------------------------------------------------------------------
1 | # 1.前言
2 |
3 | [jTopo(Javascript Topology library)]([http://www.jtopo.com](http://www.jtopo.com/)) 是一款完全基于HTML5 Canvas的关系、拓扑图形化界面开发工具包。其体积小,性能优异,由一群开发爱好者来维护。唯一感觉不足的是它是一个纯`js`库,没有像使用`ES6`语法,不能像模块化开发那样使用`import`导入,
4 |
5 | 由于博主的项目是使用vue-cli搭建的模块化开发项目,想要使用第三方库最好的方式是通过`npm install xxx`安装,然后在项目里`import xxx`来使用。但是在`JTopo`官网上并没有发现有该库的`npm`包,在`www.npmjs.com`上搜索`JTopo`,虽然找到了该库的`npm`包,但是这些包都是由一些个人开发者通过修改源码上传的,并且年限过久,博主担心直接使用的话可能会有一些诡异的`bug`,所以博主研究了一下,如何在`vue-cli`项目中直接导入第三方`js`库,幸运的是,很快就找到了办法,并且很容易哈,现将方法记录下来,并提供demo,供大家参考。
6 |
7 | # 2.解决办法
8 |
9 | 我们知道,无论是什么项目,最终通过打包后跑在浏览器上的肯定是一个`html`文件,在`Vue`中就是根目录下的`index.html`,在该文件中会将`webpack`打包后的`build.js`文件通过`
21 |
22 |