├── .gitignore
├── LICENSE
├── README.md
├── elementui
├── .eslintrc.json
├── .gitignore
├── README.md
├── hey.conf.js
├── index.html
├── package-lock.json
├── package.json
└── src
│ ├── App.vue
│ └── main.js
├── heyadmin
├── LICENSE
├── README.md
├── README_en.md
├── hey.conf.js
├── index.html
├── package-lock.json
├── package.json
├── src
│ ├── app.js
│ ├── components
│ │ ├── App.vue
│ │ ├── app
│ │ │ ├── app-footer.vue
│ │ │ ├── app-frame.vue
│ │ │ ├── app-header.vue
│ │ │ ├── app-logo.vue
│ │ │ ├── app-menu.vue
│ │ │ └── modules
│ │ │ │ ├── app-header-message.vue
│ │ │ │ └── app-layout-setting.vue
│ │ ├── common-item
│ │ │ ├── a-item.vue
│ │ │ └── b-item.vue
│ │ ├── common
│ │ │ ├── address-picker.vue
│ │ │ ├── baidu-map
│ │ │ │ ├── baidu-map.vue
│ │ │ │ ├── index.js
│ │ │ │ └── load.js
│ │ │ ├── chart
│ │ │ │ ├── echarts.vue
│ │ │ │ ├── index.js
│ │ │ │ └── theme.js
│ │ │ ├── code-editor
│ │ │ │ ├── code-editor.vue
│ │ │ │ ├── index.js
│ │ │ │ └── props.js
│ │ │ ├── markdown-editor.vue
│ │ │ ├── qiniu.vue
│ │ │ ├── richtext-editor.vue
│ │ │ ├── search-filter.vue
│ │ │ ├── sub-menu.vue
│ │ │ └── sys-tabs
│ │ │ │ ├── index.js
│ │ │ │ ├── sys-tabs.vue
│ │ │ │ └── utils.js
│ │ ├── demo-components
│ │ │ ├── account
│ │ │ │ ├── account-setting.vue
│ │ │ │ ├── account.vue
│ │ │ │ └── modules
│ │ │ │ │ ├── account-info-edit.vue
│ │ │ │ │ ├── account-info-show.vue
│ │ │ │ │ ├── notice-setting.vue
│ │ │ │ │ └── security-setting.vue
│ │ │ ├── autocomplete1.vue
│ │ │ ├── autocomplete2.vue
│ │ │ ├── autocomplete3.vue
│ │ │ ├── components
│ │ │ │ ├── address-picker.vue
│ │ │ │ ├── baidu-map.vue
│ │ │ │ ├── chart.vue
│ │ │ │ ├── code-editor.vue
│ │ │ │ ├── datas
│ │ │ │ │ ├── data1.js
│ │ │ │ │ ├── data2.js
│ │ │ │ │ ├── data3.js
│ │ │ │ │ ├── data4.js
│ │ │ │ │ └── data5.js
│ │ │ │ ├── markdown-editor.vue
│ │ │ │ └── richtext-editor.vue
│ │ │ ├── form-detail.vue
│ │ │ ├── form.vue
│ │ │ ├── form
│ │ │ │ ├── basic.vue
│ │ │ │ └── create.vue
│ │ │ ├── icons.vue
│ │ │ ├── info
│ │ │ │ ├── basic.vue
│ │ │ │ └── detail.vue
│ │ │ └── table
│ │ │ │ ├── basic.vue
│ │ │ │ ├── detail.vue
│ │ │ │ └── search.vue
│ │ ├── error-pages
│ │ │ ├── 403.vue
│ │ │ ├── 404.vue
│ │ │ └── 500.vue
│ │ ├── home
│ │ │ └── index.vue
│ │ ├── login
│ │ │ └── index.vue
│ │ └── management
│ │ │ ├── authorization.vue
│ │ │ └── users.vue
│ ├── css
│ │ ├── app.less
│ │ ├── common.less
│ │ ├── fonts
│ │ │ ├── Read Me.txt
│ │ │ ├── demo-files
│ │ │ │ ├── demo.css
│ │ │ │ └── demo.js
│ │ │ ├── demo.html
│ │ │ ├── fonts
│ │ │ │ ├── heyuiadmin.eot
│ │ │ │ ├── heyuiadmin.svg
│ │ │ │ ├── heyuiadmin.ttf
│ │ │ │ └── heyuiadmin.woff
│ │ │ ├── selection.json
│ │ │ ├── style.css
│ │ │ ├── style.less
│ │ │ └── variables.less
│ │ ├── frame.less
│ │ ├── markdown.less
│ │ ├── overwrite.less
│ │ ├── richtext-editor.less
│ │ ├── var.js
│ │ └── var.less
│ ├── images
│ │ ├── avatar.png
│ │ ├── error-pages
│ │ │ ├── 403.png
│ │ │ ├── 404.png
│ │ │ └── 500.png
│ │ ├── folders.png
│ │ ├── logo.ico
│ │ └── logo.png
│ ├── js
│ │ ├── common
│ │ │ ├── ajax.js
│ │ │ ├── request.js
│ │ │ └── utils.js
│ │ ├── config
│ │ │ ├── autocomplete-config.js
│ │ │ ├── category-config.js
│ │ │ ├── demo-components.js
│ │ │ ├── dict-config.js
│ │ │ ├── heyui-config.js
│ │ │ ├── menu-config.js
│ │ │ ├── router-config.js
│ │ │ └── tree-config.js
│ │ ├── model
│ │ │ ├── Form.js
│ │ │ └── login
│ │ │ │ └── Login.js
│ │ ├── vue
│ │ │ ├── components.js
│ │ │ ├── directives.js
│ │ │ └── filters.js
│ │ └── vuex
│ │ │ └── store.js
│ └── mock
│ │ ├── index.js
│ │ └── users.js
└── vue-cli
│ ├── babel.config.js
│ ├── package-lock.json
│ ├── package.json
│ └── vue.config.js
├── heyui
├── .eslintrc.json
├── .gitignore
├── README.md
├── hey.conf.js
├── index.html
├── package-lock.json
├── package.json
└── src
│ ├── App.vue
│ ├── css
│ ├── index.less
│ └── var.less
│ └── main.js
├── iviewui
├── .eslintrc.json
├── .gitignore
├── README.md
├── hey.conf.js
├── index.html
├── package.json
└── src
│ ├── App.vue
│ └── main.js
├── react
├── README.md
├── hey.conf.js
├── index.html
├── package-lock.json
├── package.json
└── src
│ └── main.js
├── simple
├── .eslintrc.json
├── .gitignore
├── README.md
├── hey.conf.js
├── index.html
├── package.json
└── src
│ ├── app.js
│ └── css
│ └── index.less
├── viewui
├── .eslintrc.json
├── .gitignore
├── README.md
├── hey.conf.js
├── index.html
├── package.json
└── src
│ ├── App.vue
│ └── main.js
└── vue
├── .babelrc
├── .editorconfig
├── .gitignore
├── README.md
├── hey.conf.js
├── index.html
├── package.json
└── src
├── App.vue
├── assets
└── logo.png
└── main.js
/.gitignore:
--------------------------------------------------------------------------------
1 | node_modules/
2 | dist/
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) 2017 heyui
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 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # hey-template
2 | vue template
3 |
4 | ## Compatibility
5 | In order to compatible with win10 system, we changed config file from `hey.js` to `hey.conf.js`;
6 | Please use hey-cli at least version 1.2.2.
7 |
8 | ## simple
9 | simple webpack project.
10 | [https://github.com/heyui/hey-cli-template/tree/master/simple](https://github.com/heyui/hey-cli-template/tree/master/simple)
11 |
12 | ## react
13 | simple react project.
14 | [https://github.com/heyui/hey-cli-template/tree/master/react](https://github.com/heyui/hey-cli-template/tree/master/react)
15 |
16 | ## vue
17 | simple vue project.
18 | [https://github.com/heyui/hey-cli-template/tree/master/vue](https://github.com/heyui/hey-cli-template/tree/master/vue)
19 |
20 | ## heyui
21 | simple heyui project.
22 | [https://github.com/heyui/hey-cli-template/tree/master/heyui](https://github.com/heyui/hey-cli-template/tree/master/heyui)
23 |
24 | ## heyadmin
25 | simple heyadmin project.
26 | [https://github.com/heyui/hey-cli-template/tree/master/heyadmin](https://github.com/heyui/hey-cli-template/tree/master/heyadmin)
27 |
28 | ## iviewui
29 | simple iviewui project.
30 | [https://github.com/heyui/hey-cli-template/tree/master/iviewui](https://github.com/heyui/hey-cli-template/tree/master/iviewui)
31 |
32 | ## viewui
33 | simple viewui project.
34 | [https://github.com/heyui/hey-cli-template/tree/master/viewui](https://github.com/heyui/hey-cli-template/tree/master/viewui)
35 |
36 | ## elementui
37 | simple elementui project.
38 | [https://github.com/heyui/hey-cli-template/tree/master/elementui](https://github.com/heyui/hey-cli-template/tree/master/elementui)
39 |
--------------------------------------------------------------------------------
/elementui/.eslintrc.json:
--------------------------------------------------------------------------------
1 | {
2 | "root": true,
3 | "env": {
4 | "browser": true,
5 | "commonjs": true,
6 | "es6": true
7 | },
8 | "globals": {
9 | "WEBPACK_DEBUG": false,
10 | "request": false,
11 | "require": false,
12 | "module": false
13 | },
14 | "plugins": [
15 | "html"
16 | ],
17 | "extends": "airbnb-base",
18 | "rules": {
19 | "no-underscore-dangle": [
20 | "error", {
21 | "allow": [
22 | "_status",
23 | "_msg",
24 | "_body",
25 | ]
26 | }
27 | ],
28 | "prefer-arrow-callback": [
29 | "off", {
30 | "allowNamedFunctions": false,
31 | "allowUnboundThis": true
32 | }
33 | ],
34 | "prefer-const": [
35 | "off"
36 | ],
37 | "eqeqeq": [
38 | "off"
39 | ],
40 | "no-plusplus": [
41 | "error", {
42 | "allowForLoopAfterthoughts": true
43 | }
44 | ],
45 | "no-restricted-syntax": [
46 | "off",
47 | "ForInStatement",
48 | "ForOfStatement"
49 | ],
50 | "semi-spacing": [
51 | "off"
52 | ],
53 | "semi": [
54 | "off"
55 | ],
56 | "padding-blocks": [
57 | "off"
58 | ],
59 | "quotes": [
60 | "off"
61 | ],
62 | "comma-dangle": [
63 | "off", {
64 | "arrays": "never",
65 | "objects": "never",
66 | "imports": "never",
67 | "exports": "never",
68 | "functions": "never"
69 | }
70 | ],
71 | "func-names": "off",
72 | "spaced-comment": "off",
73 | "consistent-return": "off",
74 | "radix": "off",
75 | "new-cap": "off"
76 | }
77 | }
78 |
--------------------------------------------------------------------------------
/elementui/.gitignore:
--------------------------------------------------------------------------------
1 | node_modules
2 |
--------------------------------------------------------------------------------
/elementui/README.md:
--------------------------------------------------------------------------------
1 | # vue
2 |
3 | > A Vue.js project
4 |
5 | ## Build Setup
6 |
7 | ``` bash
8 | # install dependencies
9 | npm install
10 |
11 | # serve with hot reload at localhost:9008
12 | hey dev
13 |
14 | # build for production with minification
15 | hey build
16 | ```
17 |
18 | For detailed explanation on how things work, consult the [docs for hey-cli](https://github.com/heyui/hey-cli).
19 |
--------------------------------------------------------------------------------
/elementui/hey.conf.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | port: 9008,
3 | root: "dist",
4 | webpack: {
5 | publicPath: "/",
6 | output: {
7 | "./*html": {
8 | entry: "./src/main"
9 | }
10 | },
11 | global: {},
12 | devServer: {},
13 | externals: {}
14 | },
15 | copy: []
16 | };
17 |
--------------------------------------------------------------------------------
/elementui/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | vue
6 |
7 |
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/elementui/package-lock.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "vue",
3 | "version": "1.0.0",
4 | "lockfileVersion": 1,
5 | "requires": true,
6 | "dependencies": {
7 | "async-validator": {
8 | "version": "1.8.2",
9 | "resolved": "https://registry.npmjs.org/async-validator/-/async-validator-1.8.2.tgz",
10 | "integrity": "sha1-t3WXIm6WJC+NUxwNRq4pX2JCK6Q=",
11 | "requires": {
12 | "babel-runtime": "6.26.0"
13 | }
14 | },
15 | "babel-helper-vue-jsx-merge-props": {
16 | "version": "2.0.3",
17 | "resolved": "https://registry.npmjs.org/babel-helper-vue-jsx-merge-props/-/babel-helper-vue-jsx-merge-props-2.0.3.tgz",
18 | "integrity": "sha512-gsLiKK7Qrb7zYJNgiXKpXblxbV5ffSwR0f5whkPAaBAR4fhi6bwRZxX9wBlIc5M/v8CCkXUbXZL4N/nSE97cqg=="
19 | },
20 | "babel-runtime": {
21 | "version": "6.26.0",
22 | "resolved": "https://registry.npmjs.org/babel-runtime/-/babel-runtime-6.26.0.tgz",
23 | "integrity": "sha1-llxwWGaOgrVde/4E/yM3vItWR/4=",
24 | "requires": {
25 | "core-js": "2.5.3",
26 | "regenerator-runtime": "0.11.1"
27 | }
28 | },
29 | "core-js": {
30 | "version": "2.5.3",
31 | "resolved": "https://registry.npmjs.org/core-js/-/core-js-2.5.3.tgz",
32 | "integrity": "sha1-isw4NFgk8W2DZbfJtCWRaOjtYD4="
33 | },
34 | "deepmerge": {
35 | "version": "1.5.2",
36 | "resolved": "https://registry.npmjs.org/deepmerge/-/deepmerge-1.5.2.tgz",
37 | "integrity": "sha512-95k0GDqvBjZavkuvzx/YqVLv/6YYa17fz6ILMSf7neqQITCPbnfEnQvEgMPNjH4kgobe7+WIL0yJEHku+H3qtQ=="
38 | },
39 | "element-ui": {
40 | "version": "2.2.0",
41 | "resolved": "https://registry.npmjs.org/element-ui/-/element-ui-2.2.0.tgz",
42 | "integrity": "sha512-hC2E1Rn+V7E9aHoQ7vyXgTP60HtePdUyNzcFJahMdFzjlXYT05Cj/FmJZTthy1fyXyBmaDmU2FZe/wxCQv4fag==",
43 | "requires": {
44 | "async-validator": "1.8.2",
45 | "babel-helper-vue-jsx-merge-props": "2.0.3",
46 | "deepmerge": "1.5.2",
47 | "normalize-wheel": "1.0.1",
48 | "throttle-debounce": "1.0.1"
49 | }
50 | },
51 | "normalize-wheel": {
52 | "version": "1.0.1",
53 | "resolved": "https://registry.npmjs.org/normalize-wheel/-/normalize-wheel-1.0.1.tgz",
54 | "integrity": "sha1-rsiGr/2wRQcNhWRH32Ls+GFG7EU="
55 | },
56 | "regenerator-runtime": {
57 | "version": "0.11.1",
58 | "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.11.1.tgz",
59 | "integrity": "sha512-MguG95oij0fC3QV3URf4V2SDYGJhJnJGqvIIgdECeODCT98wSWDAJ94SSuVpYQUoTcGUIL6L4yNB7j1DFFHSBg=="
60 | },
61 | "throttle-debounce": {
62 | "version": "1.0.1",
63 | "resolved": "https://registry.npmjs.org/throttle-debounce/-/throttle-debounce-1.0.1.tgz",
64 | "integrity": "sha1-2tD+Ew+drzcZ/eoz3Dao5rp/MLU="
65 | },
66 | "vue": {
67 | "version": "2.5.13",
68 | "resolved": "https://registry.npmjs.org/vue/-/vue-2.5.13.tgz",
69 | "integrity": "sha512-3D+lY7HTkKbtswDM4BBHgqyq+qo8IAEE8lz8va1dz3LLmttjgo0FxairO4r1iN2OBqk8o1FyL4hvzzTFEdQSEw=="
70 | }
71 | }
72 | }
73 |
--------------------------------------------------------------------------------
/elementui/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "element-ui-sample",
3 | "description": "A element-ui project",
4 | "version": "1.0.0",
5 | "author": "vvpvvp ",
6 | "license": "MIT",
7 | "private": true,
8 | "scripts": {},
9 | "dependencies": {
10 | "element-ui": "^2.2.0",
11 | "vue": "^2.5.11"
12 | },
13 | "browserslist": [
14 | "> 1%",
15 | "last 2 versions",
16 | "not ie <= 8"
17 | ],
18 | "devDependencies": {}
19 | }
20 |
--------------------------------------------------------------------------------
/elementui/src/App.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Aside
5 |
6 | Header
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 | -
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 | 立即创建
49 | 取消
50 |
51 |
52 |
53 | Footer
54 |
55 |
56 |
57 |
58 |
59 |
83 |
84 |
118 |
--------------------------------------------------------------------------------
/elementui/src/main.js:
--------------------------------------------------------------------------------
1 | import Vue from 'vue'
2 | import ElementUI from 'element-ui'
3 | import 'element-ui/lib/theme-chalk/index.css'
4 | import App from './App.vue'
5 |
6 | Vue.use(ElementUI)
7 |
8 | new Vue({
9 | el: '#app',
10 | render: h => h(App)
11 | })
--------------------------------------------------------------------------------
/heyadmin/LICENSE:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) 2018-present, Lan (vvpvvp)
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.
--------------------------------------------------------------------------------
/heyadmin/README.md:
--------------------------------------------------------------------------------
1 | HeyUI-Admin
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 | 
18 |
19 |
20 |
21 | 简体中文 | [English](./README_en.md)
22 |
23 | ## 介绍
24 |
25 | heyui-admin 是一个成熟的企业应用解决方案,基于 vue2.0 和 heyui 组件库的中后端系统。
26 |
27 | 这是一个成熟的前端开发解决方案,你可以使用这个架构完成几乎 90%的前端开发工作。
28 |
29 | ## 在线示例
30 |
31 | 我们启动了线上的项目,方便用户查看 heyui-admin 的实际使用效果。
32 |
33 | [在线预览](http://admin.heyui.top)
34 |
35 | ## 教学文档
36 |
37 | 我们为 heyui-admin 提供了相关的教程说明,如果你在使用的过程中有疑问,建议先查阅相关文档。
38 |
39 | [教学文档](https://heyui.github.io/heyui-admin-docs)
40 |
41 | ## 准备
42 |
43 | 项目基于以下依赖:
44 |
45 | - [hey-ui](https://www.heyui.top/)
46 | - [vue](https://cn.vuejs.org/index.html)
47 | - [vuex](https://vuex.vuejs.org/zh-cn/)
48 | - [vue-router](https://router.vuejs.org/zh-cn/)
49 | - [axios](https://github.com/axios/axios)
50 | - [js-model](https://www.npmjs.com/package/js-model)
51 | - [manba](https://www.npmjs.com/package/manba)
52 | - [hey-utils](https://www.npmjs.com/package/hey-utils)
53 | - [hey-global](https://www.npmjs.com/package/hey-global)
54 | - [hey-log](https://www.npmjs.com/package/hey-log)
55 |
56 | 提前了解和学习这些知识将大大有助于这个项目的使用。
57 |
58 | ## 功能
59 |
60 | ```
61 | - Js
62 | - common / 通用
63 | - ajax / 封装axios
64 | - request / 封装所有的请求
65 | - utils / 通用方法
66 | - model / Js模型
67 | - config / 配置
68 | - router-config / 路由配置
69 | - heyui-config / heyui配置
70 | - dict-config / 字典配置
71 | - autocomplete-config / autocomplete配置
72 | - category-config / category配置
73 | - tree-config / 树配置
74 | - menu-config / 系统菜单配置
75 | - vue
76 | - components / 通用组件
77 | - filters / 通用filters
78 | - directives / 通用directives
79 | - vuex
80 | - store
81 |
82 | - 框架组件
83 | - App
84 | - App头部
85 | - 消息
86 | - 全局搜索
87 | - App左侧菜单
88 | - 登录
89 |
90 | - 组件
91 | - 仪表盘
92 | - Icons
93 | - 信息页
94 | - 详情信息
95 | - Form
96 | - 基本的表单
97 | - 创建
98 | - Table
99 | - 基本表格
100 | - 搜索
101 | - 详情弹框
102 | - Components
103 | - 图表
104 | - 富文本编辑器Editor
105 | - 代码编辑器
106 | - Markdown编辑器
107 | - 剪贴板
108 | - 个人中心
109 | - 基本信息
110 | - 安全中心
111 | - 登出
112 |
113 | - 错误页面
114 | - 403
115 | - 404
116 | - 500
117 | ```
118 |
119 | ## 开始
120 |
121 | ### 使用 hey-cli
122 |
123 | 需要全局安装 hey-cli@1.13.0+
124 |
125 | **我们建议使用[hey-cli](https://github.com/heyui/hey-cli)脚手架。**
126 |
127 | ```bash
128 | # clone the project
129 | git clone https://github.com/heyui/heyui-admin.git
130 |
131 | cd heyui-admin
132 |
133 | # install dependency
134 | npm install
135 |
136 | # develop, 你需要首先安装 hey-cli
137 | hey dev
138 | ```
139 |
140 | 系统将自动打开页面 http://localhost:9012, 或者你可以通过 hey.conf.js 文件修改端口号.
141 |
142 |
143 | ### 使用 vue-cli
144 |
145 | 需要全局安装 vue-cli@3.0.0+
146 |
147 | ```bash
148 | # clone the project
149 | git clone https://github.com/heyui/heyui-admin.git
150 |
151 | cd heyui-admin
152 |
153 | # 将vue-cli文件夹内的文件复制到根目录。
154 | mv -f ./vue-cli/* ./
155 |
156 | # install dependency
157 | npm install
158 |
159 | # develop
160 | npm run serve
161 | ```
162 |
163 | ## 开发
164 |
165 | **hey.conf.js**,将反向代理地址修改至真正的项目后端地址.
166 |
167 | ```js
168 | devServer: {
169 | "proxy": {
170 | "/api": {
171 | //proxy address
172 | "target": "http://umock.ch-un.com"
173 | }
174 | },
175 | historyApiFallback: true
176 | },
177 | ```
178 |
179 | ## 构建
180 |
181 | 我们建议所有构建环境使用相同的代码,具体方案请参考开发文档。
182 |
183 | ```
184 | # build
185 | hey build
186 | ```
187 |
188 | ## 浏览器支持
189 |
190 | 现代浏览器以及 Internet Explorer 9+.
191 |
192 | **系统已经自动安装配置好 polyfill.**
193 |
194 | ## 打赏
195 |
196 | 如果你觉得这个项目帮助到了你,你可以帮作者买一杯茶🍵表示鼓励。
197 |
198 | 
199 |
200 |
201 | ## License
202 |
203 | [MIT](https://github.com/heyui/heyui-admin/blob/master/LICENSE)
204 |
205 | Copyright (c) 2018-present Lan (vvpvvp)
206 |
--------------------------------------------------------------------------------
/heyadmin/hey.conf.js:
--------------------------------------------------------------------------------
1 | const path = require('path');
2 |
3 | module.exports = {
4 | port: 9012,
5 | root: 'dist',
6 | stat: false,
7 | webpack: {
8 | console: true,
9 | publicPath: '/',
10 | output: {
11 | './index.html': {
12 | entry: './src/app'
13 | }
14 | },
15 | alias: {
16 | model: './src/js/model/',
17 | js: './src/js/',
18 | components: './src/components/'
19 | },
20 | global: {
21 | Utils: [path.resolve(__dirname, 'src/js/common/utils'), 'default'],
22 | Manba: 'manba',
23 | HeyUI: 'heyui',
24 | Model: 'js-model',
25 | G: 'hey-global',
26 | log: 'hey-log',
27 | R: [path.resolve(__dirname, 'src/js/common/request'), 'default']
28 | },
29 | devServer: {
30 | proxy: {
31 | // 此处应该配置为开发服务器的后台地址
32 | // '/api': {
33 | // target: 'http://xxx.xx.xx'
34 | // }
35 | },
36 | historyApiFallback: true
37 | },
38 | globalVars: './src/css/var.less',
39 | externals: {}
40 | },
41 | copy: ['static/images/*', 'call/*', './baidu_verify_7O2vpVMzwg.html']
42 | };
43 |
--------------------------------------------------------------------------------
/heyadmin/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 | HeyUI Admin管理平台
14 |
15 |
16 |
17 |
18 | We're sorry but admin doesn't work properly without JavaScript enabled. Please enable it to continue.
19 |
20 |
21 |
22 |
35 |
36 |
--------------------------------------------------------------------------------
/heyadmin/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "heyui-admin",
3 | "version": "1.0.0",
4 | "description": "HeyUI components framework.",
5 | "main": "index.js",
6 | "repository": {
7 | "type": "git",
8 | "url": "git+https://github.com/heyui/heyui-admin.git"
9 | },
10 | "homepage": "http://admin.heyui.top/",
11 | "keywords": [
12 | "vue",
13 | "ui",
14 | "framework"
15 | ],
16 | "author": {
17 | "name": "vvpvvp"
18 | },
19 | "license": "MIT",
20 | "dependencies": {
21 | "@babel/polyfill": "^7.4.4",
22 | "axios": "^0.19.0",
23 | "brace": "^0.11.1",
24 | "core-js": "^2.6.9",
25 | "echarts": "^4.2.0-rc.2",
26 | "fetch-jsonp": "^1.1.3",
27 | "hey-global": "0.0.1",
28 | "hey-log": "0.0.8",
29 | "hey-utils": "^1.0.2",
30 | "heyui": "^1.24.2",
31 | "js-model": "^1.4.2",
32 | "lodash.debounce": "^4.0.8",
33 | "manba": "^1.3.2",
34 | "marked": "^0.7.0",
35 | "plupload-es6": "^2.1.11",
36 | "qiniu-js-es6": "^1.0.31",
37 | "qs": "^6.4.0",
38 | "regenerator-runtime": "^0.13.2",
39 | "vue": "^2.6.10",
40 | "vue-router": "^2.5.3",
41 | "vuex": "^2.3.1",
42 | "wangeditor": "^3.1.1"
43 | },
44 | "devDependencies": {
45 | "@vue/eslint-config-standard": "^4.0.0",
46 | "babel-eslint": "^10.0.1",
47 | "eslint": "^5.3.0",
48 | "eslint-plugin-html": "^5.0.3",
49 | "eslint-plugin-import": "^2.16.0",
50 | "eslint-plugin-vue": "^5.2.2",
51 | "mockjs": "^1.0.1-beta3"
52 | },
53 | "readmeFilename": "README.md",
54 | "scripts": {
55 | "serve": "hey dev",
56 | "build": "hey build",
57 | "lint": "eslint --fix --ext .js,.vue src"
58 | }
59 | }
60 |
--------------------------------------------------------------------------------
/heyadmin/src/app.js:
--------------------------------------------------------------------------------
1 | // import 'core-js/stable';
2 | // import 'regenerator-runtime/runtime';
3 | import '@babel/polyfill';
4 | import Vue from 'vue';
5 | import App from 'components/App';
6 |
7 | import heyuiConfig from 'js/config/heyui-config';
8 | import routerConfig from 'js/config/router-config';
9 | import store from 'js/vuex/store';
10 | import 'js/vue/components';
11 | import 'js/vue/filters';
12 |
13 | require('./css/app.less');
14 |
15 | // 开发环境判断
16 | // process.env.NODE_ENV == 'development'
17 |
18 | // 使用mock文件, 自己开发的时候请删除
19 | require('./mock/index');
20 |
21 | // HeyUI已经设定为全局变量,无需引用
22 | // 设定全局变量请参考根目录下的hey.conf.js文件
23 |
24 | heyuiConfig();
25 | Vue.use(HeyUI);
26 |
27 | const router = routerConfig();
28 |
29 | export default new Vue({
30 | router,
31 | store,
32 | render: h => h(App)
33 | }).$mount('#app');
34 |
--------------------------------------------------------------------------------
/heyadmin/src/components/App.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
22 |
--------------------------------------------------------------------------------
/heyadmin/src/components/app/app-footer.vue:
--------------------------------------------------------------------------------
1 |
11 |
12 |
13 |
16 |
17 |
25 |
--------------------------------------------------------------------------------
/heyadmin/src/components/app/app-frame.vue:
--------------------------------------------------------------------------------
1 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
124 |
--------------------------------------------------------------------------------
/heyadmin/src/components/app/app-logo.vue:
--------------------------------------------------------------------------------
1 |
35 |
36 | HEYUI ADMIN
37 |
38 |
48 |
--------------------------------------------------------------------------------
/heyadmin/src/components/app/app-menu.vue:
--------------------------------------------------------------------------------
1 |
34 |
35 |
40 |
41 |
98 |
--------------------------------------------------------------------------------
/heyadmin/src/components/app/modules/app-header-message.vue:
--------------------------------------------------------------------------------
1 |
52 |
53 |
76 |
77 |
111 |
--------------------------------------------------------------------------------
/heyadmin/src/components/app/modules/app-layout-setting.vue:
--------------------------------------------------------------------------------
1 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
53 |
复制配置
54 |
所有的配置都在 app-frame.vue 文件内,通过 layoutConfig 参数设置排版方式。
55 |
56 |
57 |
58 |
59 |
78 |
--------------------------------------------------------------------------------
/heyadmin/src/components/common-item/a-item.vue:
--------------------------------------------------------------------------------
1 |
19 |
20 |
21 |
22 | {{item.title}}
23 |
24 | {{item.desc}}
25 |
26 |
27 |
28 |
52 |
--------------------------------------------------------------------------------
/heyadmin/src/components/common-item/b-item.vue:
--------------------------------------------------------------------------------
1 |
3 |
4 |
5 |
6 |
7 |
8 |
28 |
--------------------------------------------------------------------------------
/heyadmin/src/components/common/address-picker.vue:
--------------------------------------------------------------------------------
1 |
3 |
4 |
5 |
6 |
7 |
8 |
28 |
--------------------------------------------------------------------------------
/heyadmin/src/components/common/baidu-map/baidu-map.vue:
--------------------------------------------------------------------------------
1 |
6 |
7 |
8 |
9 |
49 |
--------------------------------------------------------------------------------
/heyadmin/src/components/common/baidu-map/index.js:
--------------------------------------------------------------------------------
1 | import BaiduMap from './baidu-map';
2 |
3 | export default BaiduMap;
4 |
--------------------------------------------------------------------------------
/heyadmin/src/components/common/baidu-map/load.js:
--------------------------------------------------------------------------------
1 | export default function () {
2 | return new Promise(function (resolve, reject) {
3 | var script = document.createElement('script');
4 | script.type = 'text/javascript';
5 | script.src = `//api.map.baidu.com/api?v=2.0&ak=20qOZbvLhZnFinXiG1NfGPLC&s=1&callback=baiduMapInitialize`;
6 | script.onerror = reject;
7 | window.baiduMapInitialize = function () {
8 | resolve();
9 | };
10 | document.head.appendChild(script);
11 | });
12 | }
13 |
--------------------------------------------------------------------------------
/heyadmin/src/components/common/chart/echarts.vue:
--------------------------------------------------------------------------------
1 |
7 |
8 |
9 |
10 |
11 |
12 |
73 |
--------------------------------------------------------------------------------
/heyadmin/src/components/common/chart/index.js:
--------------------------------------------------------------------------------
1 | import ECharts from './echarts';
2 |
3 | require('echarts/lib/component/tooltip');
4 |
5 | export default ECharts;
6 |
--------------------------------------------------------------------------------
/heyadmin/src/components/common/code-editor/index.js:
--------------------------------------------------------------------------------
1 | import Editor from './code-editor';
2 |
3 | import 'brace/ext/language_tools';
4 | import 'brace/theme/chaos';
5 | import 'brace/theme/gob';
6 | import 'brace/theme/tomorrow';
7 | import 'brace/mode/javascript';
8 | import 'brace/mode/sql';
9 | import 'brace/mode/json';
10 | import 'brace/mode/markdown';
11 |
12 | export default Editor;
13 |
--------------------------------------------------------------------------------
/heyadmin/src/components/common/code-editor/props.js:
--------------------------------------------------------------------------------
1 | export default {
2 | mode: {
3 | type: String,
4 | default: ''
5 | },
6 | focus: {
7 | type: Boolean,
8 | default: false
9 | },
10 | theme: {
11 | type: String,
12 | default: 'tomorrow'
13 | },
14 | orientation: {
15 | type: String,
16 | default: 'beside'
17 | },
18 | splits: {
19 | type: Number,
20 | default: 2
21 | },
22 | name: {
23 | type: String,
24 | default: 'brace-editor'
25 | },
26 | className: {
27 | type: String
28 | },
29 | height: {
30 | type: String,
31 | default: '500px'
32 | },
33 | width: {
34 | type: String,
35 | default: '100%'
36 | },
37 | fontSize: {
38 | type: [String, Number],
39 | default: 14
40 | },
41 | showGutter: {
42 | type: Boolean,
43 | default: true
44 | },
45 | onChange: {
46 | type: Function,
47 | default: null
48 | },
49 | onCopy: {
50 | type: Function,
51 | default: null
52 | },
53 | onPaste: {
54 | type: Function,
55 | default: null
56 | },
57 | onFocus: {
58 | type: Function
59 | },
60 | onInput: {
61 | type: Function
62 | },
63 | onBlur: {
64 | type: Function
65 | },
66 | onScroll: {
67 | type: Function,
68 | default: null
69 | },
70 | value: {
71 | type: String
72 | },
73 | onLoad: {
74 | type: Function,
75 | default: null
76 | },
77 | onSelectionChange: {
78 | type: Function
79 | },
80 | onCursorChange: {
81 | type: Function
82 | },
83 | onBeforeLoad: {
84 | type: Function
85 | },
86 | onValidate: {
87 | type: Function
88 | },
89 | minLines: {
90 | type: Number,
91 | default: null
92 | },
93 | maxLines: {
94 | type: Number,
95 | default: null
96 | },
97 | readOnly: {
98 | type: Boolean,
99 | default: false
100 | },
101 | highlightActiveLine: {
102 | type: Boolean,
103 | default: true
104 | },
105 | tabSize: {
106 | type: Number,
107 | default: 2
108 | },
109 | showPrintMargin: {
110 | type: Boolean,
111 | default: false
112 | },
113 | cursorStart: {
114 | type: Number,
115 | default: 1
116 | },
117 | debounceChangePeriod: {
118 | type: Number
119 | },
120 | editorProps: {
121 | type: Object,
122 | default: function () {
123 | return { $blockScrolling: true };
124 | }
125 | },
126 | setOptions: {
127 | type: Object,
128 | default: function () {
129 | return {};
130 | }
131 | },
132 | styles: {
133 | type: Object,
134 | default: function () {
135 | return {};
136 | }
137 | },
138 | scrollMargin: {
139 | type: Array,
140 | default: function () {
141 | return [ 0, 0, 0, 0 ];
142 | }
143 | },
144 | annotations: {
145 | type: Array
146 | },
147 | markers: {
148 | type: Array
149 | },
150 | keyboardHandler: {
151 | type: String
152 | },
153 | wrapEnabled: {
154 | type: Boolean,
155 | default: true
156 | },
157 | enableBasicAutocompletion: {
158 | type: [Boolean, Array],
159 | default: false
160 | },
161 | enableLiveAutocompletion: {
162 | type: [Boolean, Array],
163 | default: false
164 | },
165 | commands: {
166 | type: Array
167 | }
168 | };
169 |
--------------------------------------------------------------------------------
/heyadmin/src/components/common/markdown-editor.vue:
--------------------------------------------------------------------------------
1 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
70 |
--------------------------------------------------------------------------------
/heyadmin/src/components/common/qiniu.vue:
--------------------------------------------------------------------------------
1 |
2 |
7 |
8 |
150 |
--------------------------------------------------------------------------------
/heyadmin/src/components/common/richtext-editor.vue:
--------------------------------------------------------------------------------
1 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
67 |
--------------------------------------------------------------------------------
/heyadmin/src/components/common/search-filter.vue:
--------------------------------------------------------------------------------
1 |
29 |
30 |
31 |
{{title}}
32 |
33 | 不限
34 | {{d.title}}
35 |
36 |
37 |
38 |
39 |
115 |
--------------------------------------------------------------------------------
/heyadmin/src/components/common/sub-menu.vue:
--------------------------------------------------------------------------------
1 |
8 |
9 |
12 |
13 |
45 |
--------------------------------------------------------------------------------
/heyadmin/src/components/common/sys-tabs/index.js:
--------------------------------------------------------------------------------
1 | import SysTabs from './sys-tabs';
2 |
3 | export default SysTabs;
4 |
--------------------------------------------------------------------------------
/heyadmin/src/components/common/sys-tabs/utils.js:
--------------------------------------------------------------------------------
1 | const objEqual = (obj1, obj2) => {
2 | const keysArr1 = Object.keys(obj1);
3 | const keysArr2 = Object.keys(obj2);
4 | if (keysArr1.length !== keysArr2.length) return false;
5 | else if (keysArr1.length === 0 && keysArr2.length === 0) return true;
6 | else return !keysArr1.some(key => obj1[key] != obj2[key]);
7 | };
8 |
9 | export const isExsit = (obj, list) => {
10 | for (let route of list) {
11 | if (routeEqual(route, obj)) {
12 | return true;
13 | }
14 | }
15 | return false;
16 | };
17 |
18 | export const showTitle = (item, vm) => {
19 | let { title } = item.meta;
20 | if (!title) return;
21 | return title;
22 | };
23 |
24 | export const routeEqual = (route1, route2) => {
25 | const params1 = route1.params || {};
26 | const params2 = route2.params || {};
27 | const query1 = route1.query || {};
28 | const query2 = route2.query || {};
29 | return (route1.name === route2.name) && objEqual(params1, params2) && objEqual(query1, query2);
30 | };
31 |
--------------------------------------------------------------------------------
/heyadmin/src/components/demo-components/account/account-setting.vue:
--------------------------------------------------------------------------------
1 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
42 |
--------------------------------------------------------------------------------
/heyadmin/src/components/demo-components/account/account.vue:
--------------------------------------------------------------------------------
1 |
5 |
6 |
7 |
8 |
9 |
10 | |
11 |
12 |
18 | |
19 |
20 |
21 |
22 |
55 |
--------------------------------------------------------------------------------
/heyadmin/src/components/demo-components/account/modules/account-info-edit.vue:
--------------------------------------------------------------------------------
1 |
7 |
8 |
9 |
42 |
43 |
44 |
94 |
--------------------------------------------------------------------------------
/heyadmin/src/components/demo-components/account/modules/account-info-show.vue:
--------------------------------------------------------------------------------
1 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
{{account.name}}
57 |
{{account.desc}}
58 |
59 |
{{account.email}}
60 |
{{account.org}} · {{account.dept}} · {{account.title}}
61 |
{{account.location}}
62 |
63 |
64 |
65 |
标签
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
96 |
--------------------------------------------------------------------------------
/heyadmin/src/components/demo-components/account/modules/notice-setting.vue:
--------------------------------------------------------------------------------
1 |
6 |
7 |
26 |
27 |
48 |
--------------------------------------------------------------------------------
/heyadmin/src/components/demo-components/account/modules/security-setting.vue:
--------------------------------------------------------------------------------
1 |
6 |
7 |
33 |
34 |
54 |
--------------------------------------------------------------------------------
/heyadmin/src/components/demo-components/autocomplete1.vue:
--------------------------------------------------------------------------------
1 |
31 |
32 |
41 |
42 |
64 |
--------------------------------------------------------------------------------
/heyadmin/src/components/demo-components/autocomplete2.vue:
--------------------------------------------------------------------------------
1 |
11 |
12 |
13 |
场景应用
14 |
15 |
默认Key模式
16 |
option可以传递一些业务参数,针对于选择数据的时候。
17 |
value:{{value}}
18 |
19 |
20 |
Key模式,附带show属性
21 |
使用show属性做展示,针对一些平铺属性的对象。
22 |
value: {{value5}}, show: {{show}}
23 |
24 |
25 |
title模式
26 |
配合mustMatch=false,适用于输入提醒或者模糊查询的一些场景。
27 |
value:{{value4}}
28 |
29 |
30 |
Key多选模式
31 |
适用于一些数据选择的场景,比如说精准查询。
32 |
value1:{{value1}}
33 |
34 |
35 |
对象选择模式
36 |
适用于一些数据编辑的场景。
37 |
value2:{{value2}}
38 |
39 |
40 |
对象多选模式
41 |
适用于一些数据编辑的场景。
42 |
value3:{{value3}}
43 |
44 |
还有mustMatch
等模式,具体请查看autocomplete文档。
45 |
46 |
47 |
48 |
73 |
--------------------------------------------------------------------------------
/heyadmin/src/components/demo-components/autocomplete3.vue:
--------------------------------------------------------------------------------
1 |
5 |
6 |
7 |
复杂场景
8 |
9 |
10 |
11 | {{companyId}}/{{companyName}}
12 |
13 |
14 |
15 |
16 |
17 | {{accountId}}/{{accountName}}
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
49 |
--------------------------------------------------------------------------------
/heyadmin/src/components/demo-components/components/address-picker.vue:
--------------------------------------------------------------------------------
1 |
3 |
4 |
5 |
6 |
7 |
8 |
28 |
--------------------------------------------------------------------------------
/heyadmin/src/components/demo-components/components/baidu-map.vue:
--------------------------------------------------------------------------------
1 |
3 |
4 |
5 |
6 | 百度地图展示
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
51 |
--------------------------------------------------------------------------------
/heyadmin/src/components/demo-components/components/chart.vue:
--------------------------------------------------------------------------------
1 |
3 |
4 |
5 |
6 |
7 | 图表1
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 | 图表2
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 | 图表3
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 | 图表4
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
70 |
--------------------------------------------------------------------------------
/heyadmin/src/components/demo-components/components/code-editor.vue:
--------------------------------------------------------------------------------
1 |
3 |
4 |
5 |
6 | 代码编辑器
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
41 |
--------------------------------------------------------------------------------
/heyadmin/src/components/demo-components/components/datas/data1.js:
--------------------------------------------------------------------------------
1 | export default {
2 | tooltip: {
3 | trigger: 'axis'
4 | },
5 | legend: {
6 | data: ['最高价', '最低价']
7 | },
8 | toolbox: {
9 | show: true,
10 | feature: {
11 | mark: { show: true },
12 | dataView: { show: true, readOnly: false },
13 | magicType: { show: true, type: ['line', 'bar'] },
14 | restore: { show: true },
15 | saveAsImage: { show: true }
16 | }
17 | },
18 | calculable: true,
19 | xAxis: [
20 | {
21 | type: 'category',
22 | boundaryGap: false,
23 | data: ['周一', '周二', '周三', '周四', '周五', '周六', '周日']
24 | }
25 | ],
26 | yAxis: [
27 | {
28 | type: 'value',
29 | axisLabel: {
30 | formatter: '{value} K'
31 | }
32 | }
33 | ],
34 | series: [
35 | {
36 | name: '最高价',
37 | type: 'line',
38 | data: [11, 11, 15, 13, 12, 13, 10],
39 | markPoint: {
40 | data: [
41 | { type: 'max', name: '最大值' },
42 | { type: 'min', name: '最小值' }
43 | ]
44 | },
45 | smooth: true,
46 | markLine: {
47 | data: [
48 | { type: 'average', name: '平均值' }
49 | ]
50 | }
51 | },
52 | {
53 | name: '最低价',
54 | type: 'line',
55 | data: [1, -2, 2, 5, 3, 2, 0],
56 | smooth: true,
57 | markPoint: {
58 | data: [
59 | { name: '周最低', value: -2, xAxis: 1, yAxis: -1.5 }
60 | ]
61 | },
62 | markLine: {
63 | data: [
64 | { type: 'average', name: '平均值' }
65 | ]
66 | }
67 | }
68 | ]
69 | };
70 |
--------------------------------------------------------------------------------
/heyadmin/src/components/demo-components/components/datas/data2.js:
--------------------------------------------------------------------------------
1 | export default {
2 | title: {
3 | text: '南丁格尔玫瑰图',
4 | subtext: '纯属虚构',
5 | x: 'center'
6 | },
7 | tooltip: {
8 | trigger: 'item',
9 | formatter: '{a} {b} : {c} ({d}%)'
10 | },
11 | legend: {
12 | x: 'center',
13 | y: 'bottom',
14 | data: ['rose1', 'rose2', 'rose3', 'rose4', 'rose5', 'rose6', 'rose7', 'rose8']
15 | },
16 | toolbox: {
17 | show: true,
18 | feature: {
19 | mark: { show: true },
20 | dataView: { show: true, readOnly: false },
21 | magicType: {
22 | show: true,
23 | type: ['pie', 'funnel']
24 | },
25 | restore: { show: true },
26 | saveAsImage: { show: true }
27 | }
28 | },
29 | calculable: true,
30 | series: [
31 | {
32 | name: '半径模式',
33 | type: 'pie',
34 | radius: [20, 110],
35 | center: ['25%', '50%'],
36 | roseType: 'radius',
37 | label: {
38 | normal: {
39 | show: false
40 | },
41 | emphasis: {
42 | show: true
43 | }
44 | },
45 | lableLine: {
46 | normal: {
47 | show: false
48 | },
49 | emphasis: {
50 | show: true
51 | }
52 | },
53 | data: [
54 | { value: 10, name: 'rose1' },
55 | { value: 5, name: 'rose2' },
56 | { value: 15, name: 'rose3' },
57 | { value: 25, name: 'rose4' },
58 | { value: 20, name: 'rose5' },
59 | { value: 35, name: 'rose6' },
60 | { value: 30, name: 'rose7' },
61 | { value: 40, name: 'rose8' }
62 | ]
63 | },
64 | {
65 | name: '面积模式',
66 | type: 'pie',
67 | radius: [30, 110],
68 | center: ['75%', '50%'],
69 | roseType: 'area',
70 | data: [
71 | { value: 10, name: 'rose1' },
72 | { value: 5, name: 'rose2' },
73 | { value: 15, name: 'rose3' },
74 | { value: 25, name: 'rose4' },
75 | { value: 20, name: 'rose5' },
76 | { value: 35, name: 'rose6' },
77 | { value: 30, name: 'rose7' },
78 | { value: 40, name: 'rose8' }
79 | ]
80 | }
81 | ]
82 | };
83 |
--------------------------------------------------------------------------------
/heyadmin/src/components/demo-components/components/datas/data3.js:
--------------------------------------------------------------------------------
1 | export default {
2 | tooltip: {
3 | trigger: 'axis',
4 | axisPointer: { // 坐标轴指示器,坐标轴触发有效
5 | type: 'shadow' // 默认为直线,可选为:'line' | 'shadow'
6 | }
7 | },
8 | legend: {
9 | data: ['直接访问', '邮件营销', '联盟广告', '视频广告', '搜索引擎', '百度', '谷歌', '必应', '其他']
10 | },
11 | grid: {
12 | left: '3%',
13 | right: '4%',
14 | bottom: '3%',
15 | containLabel: true
16 | },
17 | xAxis: [
18 | {
19 | type: 'category',
20 | data: ['周一', '周二', '周三', '周四', '周五', '周六', '周日']
21 | }
22 | ],
23 | yAxis: [
24 | {
25 | type: 'value'
26 | }
27 | ],
28 | series: [
29 | {
30 | name: '直接访问',
31 | type: 'bar',
32 | data: [320, 332, 301, 334, 390, 330, 320]
33 | },
34 | {
35 | name: '邮件营销',
36 | type: 'bar',
37 | stack: '广告',
38 | data: [120, 132, 101, 134, 90, 230, 210]
39 | },
40 | {
41 | name: '联盟广告',
42 | type: 'bar',
43 | stack: '广告',
44 | data: [220, 182, 191, 234, 290, 330, 310]
45 | },
46 | {
47 | name: '视频广告',
48 | type: 'bar',
49 | stack: '广告',
50 | data: [150, 232, 201, 154, 190, 330, 410]
51 | },
52 | {
53 | name: '搜索引擎',
54 | type: 'bar',
55 | data: [862, 1018, 964, 1026, 1679, 1600, 1570],
56 | markLine: {
57 | lineStyle: {
58 | normal: {
59 | type: 'dashed'
60 | }
61 | },
62 | data: [
63 | [{ type: 'min' }, { type: 'max' }]
64 | ]
65 | }
66 | },
67 | {
68 | name: '百度',
69 | type: 'bar',
70 | barWidth: 5,
71 | stack: '搜索引擎',
72 | data: [620, 732, 701, 734, 1090, 1130, 1120]
73 | },
74 | {
75 | name: '谷歌',
76 | type: 'bar',
77 | stack: '搜索引擎',
78 | data: [120, 132, 101, 134, 290, 230, 220]
79 | },
80 | {
81 | name: '必应',
82 | type: 'bar',
83 | stack: '搜索引擎',
84 | data: [60, 72, 71, 74, 190, 130, 110]
85 | },
86 | {
87 | name: '其他',
88 | type: 'bar',
89 | stack: '搜索引擎',
90 | data: [62, 82, 91, 84, 109, 110, 120]
91 | }
92 | ]
93 | };
94 |
--------------------------------------------------------------------------------
/heyadmin/src/components/demo-components/components/datas/data4.js:
--------------------------------------------------------------------------------
1 | export default {
2 | title: {
3 | text: '堆叠区域图'
4 | },
5 | tooltip: {
6 | trigger: 'axis',
7 | axisPointer: {
8 | type: 'cross',
9 | label: {
10 | backgroundColor: '#6a7985'
11 | }
12 | }
13 | },
14 | legend: {
15 | data: ['邮件营销', '联盟广告', '视频广告', '直接访问', '搜索引擎']
16 | },
17 | toolbox: {
18 | feature: {
19 | saveAsImage: {}
20 | }
21 | },
22 | grid: {
23 | left: '3%',
24 | right: '4%',
25 | bottom: '3%',
26 | containLabel: true
27 | },
28 | xAxis: [
29 | {
30 | type: 'category',
31 | boundaryGap: false,
32 | data: ['周一', '周二', '周三', '周四', '周五', '周六', '周日']
33 | }
34 | ],
35 | yAxis: [
36 | {
37 | type: 'value'
38 | }
39 | ],
40 | series: [
41 | {
42 | name: '邮件营销',
43 | type: 'line',
44 | stack: '总量',
45 | areaStyle: {},
46 | data: [120, 132, 101, 134, 90, 230, 210]
47 | },
48 | {
49 | name: '联盟广告',
50 | type: 'line',
51 | stack: '总量',
52 | areaStyle: {},
53 | data: [220, 182, 191, 234, 290, 330, 310]
54 | },
55 | {
56 | name: '视频广告',
57 | type: 'line',
58 | stack: '总量',
59 | areaStyle: {},
60 | data: [150, 232, 201, 154, 190, 330, 410]
61 | },
62 | {
63 | name: '直接访问',
64 | type: 'line',
65 | stack: '总量',
66 | areaStyle: { normal: {} },
67 | data: [320, 332, 301, 334, 390, 330, 320]
68 | },
69 | {
70 | name: '搜索引擎',
71 | type: 'line',
72 | stack: '总量',
73 | label: {
74 | normal: {
75 | show: true,
76 | position: 'top'
77 | }
78 | },
79 | areaStyle: { normal: {} },
80 | data: [820, 932, 901, 934, 1290, 1330, 1320]
81 | }
82 | ]
83 | };
84 |
--------------------------------------------------------------------------------
/heyadmin/src/components/demo-components/components/datas/data5.js:
--------------------------------------------------------------------------------
1 | export default [
2 | {
3 | id: 101911,
4 | name: '游族网络股份有限公司'
5 | },
6 | {
7 | id: 101894,
8 | name: '网易(杭州)网络有限公司'
9 | },
10 | {
11 | id: 101731,
12 | name: '杭州实业'
13 | },
14 | {
15 | id: 101708,
16 | name: 'STEELE猫咪有限公司'
17 | },
18 | {
19 | id: 70642,
20 | name: '大众点评',
21 | externalName: ''
22 | },
23 | {
24 | id: 20262,
25 | name: '产品测试验收公司(切勿修改)'
26 | },
27 | {
28 | id: 50,
29 | name: '上海希格斯网络科技有限公司上海希格斯网络科技有限公司'
30 | },
31 | {
32 | id: 9,
33 | name: '阿里巴巴14',
34 | children: [
35 | {
36 | id: 29,
37 | name: '阿里巴巴29'
38 | },
39 | {
40 | id: 39,
41 | name: '阿里巴巴39'
42 | },
43 | {
44 | id: 49,
45 | name: '阿里巴巴49'
46 | },
47 | {
48 | id: 59,
49 | name: '阿里巴巴59'
50 | }
51 | ]
52 | },
53 | {
54 | id: 7,
55 | name: '阿里巴巴12'
56 | }
57 | ];
58 |
--------------------------------------------------------------------------------
/heyadmin/src/components/demo-components/components/markdown-editor.vue:
--------------------------------------------------------------------------------
1 |
3 |
4 |
5 |
6 | Markdown编辑器
7 |
8 |
9 | 只读模式
10 |
11 |
12 |
13 |
14 |
15 |
16 |
37 |
--------------------------------------------------------------------------------
/heyadmin/src/components/demo-components/components/richtext-editor.vue:
--------------------------------------------------------------------------------
1 |
3 |
4 |
5 |
6 | 富文本编辑器
7 |
8 |
9 | 重新设置值
10 | 清空
11 |
12 |
13 |
14 |
15 |
16 |
17 |
39 |
--------------------------------------------------------------------------------
/heyadmin/src/components/demo-components/form-detail.vue:
--------------------------------------------------------------------------------
1 |
25 |
26 |
27 |
28 |
29 |
30 | 表单详情
31 |
32 |
33 |
34 |
35 | 基本信息
36 |
37 |
38 |
39 |
40 | 1900-01-01
41 |
42 |
43 | 138****0000
44 |
45 |
46 | 123456@gmail.com
47 |
48 |
49 | 女
50 |
51 |
52 | 上海市
53 |
54 |
55 | xx区xx弄
56 |
57 |
58 |
59 |
60 | 其他信息
61 |
62 |
63 |
64 |
65 | 1900-01-01
66 |
67 |
68 | 138****0000
69 |
70 |
71 | 123456@gmail.com
72 |
73 |
74 | 女
75 |
76 |
77 | 上海市
78 |
79 |
80 | xx区xx弄
81 |
82 |
83 |
84 |
85 | 操作记录
86 |
87 |
88 |
89 |
90 |
91 |
96 |
97 |
102 |
103 |
104 |
105 |
106 |
107 |
108 |
143 |
--------------------------------------------------------------------------------
/heyadmin/src/components/demo-components/form/basic.vue:
--------------------------------------------------------------------------------
1 |
3 |
4 |
5 |
6 |
7 |
8 |
28 |
--------------------------------------------------------------------------------
/heyadmin/src/components/demo-components/form/create.vue:
--------------------------------------------------------------------------------
1 |
3 |
4 |
5 |
6 |
7 |
8 |
28 |
--------------------------------------------------------------------------------
/heyadmin/src/components/demo-components/icons.vue:
--------------------------------------------------------------------------------
1 |
20 |
21 |
22 |
23 | Icons
24 |
25 |
26 |
27 |
28 |
32 | |
33 |
34 |
35 |
36 |
37 |
38 |
185 |
--------------------------------------------------------------------------------
/heyadmin/src/components/demo-components/info/basic.vue:
--------------------------------------------------------------------------------
1 |
3 |
4 |
5 |
6 |
7 |
8 |
28 |
--------------------------------------------------------------------------------
/heyadmin/src/components/demo-components/info/detail.vue:
--------------------------------------------------------------------------------
1 |
3 |
4 |
5 |
6 |
7 |
8 |
28 |
--------------------------------------------------------------------------------
/heyadmin/src/components/demo-components/table/detail.vue:
--------------------------------------------------------------------------------
1 |
3 |
4 |
5 |
6 |
7 |
8 |
28 |
--------------------------------------------------------------------------------
/heyadmin/src/components/demo-components/table/search.vue:
--------------------------------------------------------------------------------
1 |
3 |
4 |
5 |
查询列表
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
21 |
22 |
23 |
100 |
--------------------------------------------------------------------------------
/heyadmin/src/components/error-pages/403.vue:
--------------------------------------------------------------------------------
1 |
8 |
9 |
10 |
11 |
您无权访问此页面~~
12 |
13 |
14 |
34 |
--------------------------------------------------------------------------------
/heyadmin/src/components/error-pages/404.vue:
--------------------------------------------------------------------------------
1 |
8 |
9 |
10 |
11 |
您访问的页面不存在~~
12 |
13 |
14 |
34 |
--------------------------------------------------------------------------------
/heyadmin/src/components/error-pages/500.vue:
--------------------------------------------------------------------------------
1 |
8 |
9 |
10 |
11 |
您访问的页面出现错误~~
12 |
13 |
14 |
34 |
--------------------------------------------------------------------------------
/heyadmin/src/components/login/index.vue:
--------------------------------------------------------------------------------
1 |
105 |
106 |
107 |
108 |
109 |
110 |
管理系统
111 |
112 |
113 | 用户名
114 |
115 |
116 |
117 | 密码
118 |
119 |
120 | 登录
121 |
122 |
123 |
Copyright © 2019 vvpvvp - heyui.top
124 |
125 |
126 |
127 |
155 |
--------------------------------------------------------------------------------
/heyadmin/src/components/management/authorization.vue:
--------------------------------------------------------------------------------
1 |
42 |
43 |
44 |
45 | 权限管理
46 | 保存示例是存储在Local Storage中,可通过清空 Local Storage 属性 SYS_CONFIG_MENU 重置菜单
47 |
48 |
49 |
50 |
51 |
52 |
{{r.name}}
53 |
{{r.description}}
54 |
55 |
56 |
63 |
64 |
65 | 全选
66 | 清空
67 |
68 |
69 |
70 |
71 |
72 | 保存
73 | 重置
74 |
75 |
76 |
77 |
78 |
151 |
--------------------------------------------------------------------------------
/heyadmin/src/components/management/users.vue:
--------------------------------------------------------------------------------
1 |
6 |
7 |
8 |
9 | 用户
10 |
11 |
12 |
13 |
14 |
15 | 全选
16 | 清空
17 |
18 |
19 |
20 |
23 |
24 |
25 |
26 |
27 |
47 |
--------------------------------------------------------------------------------
/heyadmin/src/css/app.less:
--------------------------------------------------------------------------------
1 | @import (less) "~heyui/themes/common.less";
2 | @import (less) "./overwrite.less";
3 | @import (less) "./fonts/style.less";
4 | @import (less) "./frame.less";
5 | @import (less) "./markdown.less";
6 | @import (less) "./common.less";
7 |
8 |
9 | body{
10 | background: #f3f6f8;
11 | color: rgb(47, 47, 47);
12 | font-weight: 400;
13 | }
14 |
15 | p {
16 | margin: 8px 0;
17 | }
18 |
19 | pre {
20 | white-space: pre-wrap;
21 | }
--------------------------------------------------------------------------------
/heyadmin/src/css/common.less:
--------------------------------------------------------------------------------
1 | .font-size(@var, @size) {
2 | .font@{var} {
3 | font-size: @size !important;
4 | }
5 | }
6 |
7 | .font-size(12, 12px);
8 | .font-size(13, 13px);
9 | .font-size(14, 14px);
10 | .font-size(15, 15px);
11 | .font-size(16, 16px);
12 | .font-size(18, 18px);
13 | .font-size(20, 20px);
14 | .font-size(22, 22px);
15 | .font-size(28, 28px);
16 |
17 | .font-bold {
18 | font-weight: bold;
19 | }
20 |
21 |
22 | .common-page-tabs-bar {
23 | position: relative;
24 | margin-bottom: 2px;
25 | min-height: 50px;
26 | .h-tabs-default {
27 | min-height: 47px;
28 | }
29 | }
30 |
31 | .common-filter-bar {
32 | padding: 17px 0 8px;
33 | min-height: 66px;
34 | }
35 |
36 | .common-filter-select {
37 | height:32px;
38 | background:rgba(0,0,0,0.04);
39 | border-radius:2px;
40 | color:rgba(0,0,0,0.65);
41 | .h-select-value-single, .h-select-placeholder {
42 | height:32px;
43 | line-height:32px;
44 | }
45 | }
46 |
47 |
48 | .common-status-filter-tabs {
49 | border: 1px solid fade( @primary-color, 10%);
50 | background-color: fade( @primary-color, 5%);
51 | border-radius: 2px;
52 |
53 | >div {
54 | position: relative;
55 | padding: 20px 22px;
56 |
57 | >p {
58 | margin: 0;
59 | line-height: 22px;
60 | text-align: center;
61 | }
62 |
63 | .name {
64 | font-size: 14px;
65 | color: rgba(0, 0, 0, 0.65);
66 | }
67 |
68 | .code {
69 | color: rgba(0, 0, 0, 0.85);
70 | font-size: 18px;
71 | }
72 |
73 | .bold {
74 | font-weight: bold;
75 | }
76 |
77 | &:after {
78 | content: "";
79 | border-right: 1px dashed #979797;
80 | position: absolute;
81 | top: 24px;
82 | right: 0;
83 | opacity: 0.3;
84 | bottom: 24px;
85 | }
86 |
87 | &:before {
88 | content: "";
89 | background: @primary-color;
90 | position: absolute;
91 | height: 0;
92 | bottom: -1px;
93 | left: 22px;
94 | right: 22px;
95 | border-radius: 3px;
96 | transition: .3s;
97 | }
98 |
99 | &:hover,
100 | &.h-tabs-selected {
101 |
102 | .code,
103 | .name {
104 | color: @primary-color;
105 | }
106 | }
107 |
108 | &.h-tabs-selected {
109 | &:before {
110 | height: 3px;
111 | }
112 | }
113 | }
114 |
115 | &.last-float-right {
116 | >div:nth-last-child(2) {
117 | &:after {
118 | content: none;
119 | }
120 | }
121 |
122 | >div:last-child {
123 | float: right;
124 |
125 | &:after {
126 | content: none;
127 | }
128 | }
129 | }
130 | }
131 |
132 |
133 | .common-list-container {
134 | .common-list-item {
135 | padding-top: 14px;
136 | padding-bottom: 14px;
137 | align-items: center;
138 | display: flex;
139 | padding: 12px 0;
140 | border-bottom: @border;
141 |
142 | .common-list-meta {
143 | flex: 1;
144 | }
145 | }
146 | }
147 |
148 | .common-panel-tabs {
149 | border-bottom: 1px solid #eeeeee;
150 | padding: 0 25px;
151 | font-size: 18px;
152 | > .h-tabs-item {
153 | padding: 24px 0px;
154 | + div {
155 | margin-left: 30px;
156 | }
157 | }
158 | }
159 |
160 | .frame-page,
161 | .frame-flex-page {
162 | margin: 30px;
163 | .clearfix;
164 |
165 | &.frame-flex-page {
166 | display: flex;
167 | padding: 20px 0;
168 | }
169 |
170 | .frame-left {
171 | width: 224px;
172 | border-right: @border;
173 | margin-right: -1px;
174 | }
175 |
176 | .frame-main {
177 | flex: 1;
178 | border-left: @border;
179 | padding: 8px 40px;
180 |
181 | .subframe-title {
182 | font-size: 20px;
183 | color: rgba(0, 0, 0, .85);
184 | line-height: 28px;
185 | font-weight: 500;
186 | margin-bottom: 12px;
187 | }
188 | }
189 | }
190 |
191 | .error-page {
192 | height: calc(~"100vh - @{layout-header-height} -100px");
193 | text-align: center;
194 | .background-image {
195 | height: 35vh;
196 | background-size: contain;
197 | background-repeat: no-repeat;
198 | background-position: center;
199 | margin: 18vh auto 50px;
200 | }
201 | p {
202 | font-size: 22px;
203 | color: #3788ee;
204 | margin-bottom: 20vh;
205 | }
206 | }
207 |
208 | ::-webkit-scrollbar {
209 | width: 12px;
210 | height: 12px;
211 | }
212 |
213 | ::-webkit-scrollbar-thumb {
214 | background-color: hsla(0,0%,44%,.06);
215 | border-radius: 12px;
216 | }
217 |
218 | ::-webkit-scrollbar-thumb:hover {
219 | background-color: @primary-color;
220 | border-radius: 12px
221 | }
--------------------------------------------------------------------------------
/heyadmin/src/css/fonts/Read Me.txt:
--------------------------------------------------------------------------------
1 | Open *demo.html* to see a list of all the glyphs in your font along with their codes/ligatures.
2 |
3 | To use the generated font in desktop programs, you can install the TTF font. In order to copy the character associated with each icon, refer to the text box at the bottom right corner of each glyph in demo.html. The character inside this text box may be invisible; but it can still be copied. See this guide for more info: https://icomoon.io/#docs/local-fonts
4 |
5 | You won't need any of the files located under the *demo-files* directory when including the generated font in your own projects.
6 |
7 | You can import *selection.json* back to the IcoMoon app using the *Import Icons* button (or via Main Menu → Manage Projects) to retrieve your icon selection.
8 |
--------------------------------------------------------------------------------
/heyadmin/src/css/fonts/demo-files/demo.css:
--------------------------------------------------------------------------------
1 | body {
2 | padding: 0;
3 | margin: 0;
4 | font-family: sans-serif;
5 | font-size: 1em;
6 | line-height: 1.5;
7 | color: #555;
8 | background: #fff;
9 | }
10 | h1 {
11 | font-size: 1.5em;
12 | font-weight: normal;
13 | }
14 | small {
15 | font-size: .66666667em;
16 | }
17 | a {
18 | color: #e74c3c;
19 | text-decoration: none;
20 | }
21 | a:hover, a:focus {
22 | box-shadow: 0 1px #e74c3c;
23 | }
24 | .bshadow0, input {
25 | box-shadow: inset 0 -2px #e7e7e7;
26 | }
27 | input:hover {
28 | box-shadow: inset 0 -2px #ccc;
29 | }
30 | input, fieldset {
31 | font-family: sans-serif;
32 | font-size: 1em;
33 | margin: 0;
34 | padding: 0;
35 | border: 0;
36 | }
37 | input {
38 | color: inherit;
39 | line-height: 1.5;
40 | height: 1.5em;
41 | padding: .25em 0;
42 | }
43 | input:focus {
44 | outline: none;
45 | box-shadow: inset 0 -2px #449fdb;
46 | }
47 | .glyph {
48 | font-size: 16px;
49 | width: 15em;
50 | padding-bottom: 1em;
51 | margin-right: 4em;
52 | margin-bottom: 1em;
53 | float: left;
54 | overflow: hidden;
55 | }
56 | .liga {
57 | width: 80%;
58 | width: calc(100% - 2.5em);
59 | }
60 | .talign-right {
61 | text-align: right;
62 | }
63 | .talign-center {
64 | text-align: center;
65 | }
66 | .bgc1 {
67 | background: #f1f1f1;
68 | }
69 | .fgc1 {
70 | color: #999;
71 | }
72 | .fgc0 {
73 | color: #000;
74 | }
75 | p {
76 | margin-top: 1em;
77 | margin-bottom: 1em;
78 | }
79 | .mvm {
80 | margin-top: .75em;
81 | margin-bottom: .75em;
82 | }
83 | .mtn {
84 | margin-top: 0;
85 | }
86 | .mtl, .mal {
87 | margin-top: 1.5em;
88 | }
89 | .mbl, .mal {
90 | margin-bottom: 1.5em;
91 | }
92 | .mal, .mhl {
93 | margin-left: 1.5em;
94 | margin-right: 1.5em;
95 | }
96 | .mhmm {
97 | margin-left: 1em;
98 | margin-right: 1em;
99 | }
100 | .mls {
101 | margin-left: .25em;
102 | }
103 | .ptl {
104 | padding-top: 1.5em;
105 | }
106 | .pbs, .pvs {
107 | padding-bottom: .25em;
108 | }
109 | .pvs, .pts {
110 | padding-top: .25em;
111 | }
112 | .unit {
113 | float: left;
114 | }
115 | .unitRight {
116 | float: right;
117 | }
118 | .size1of2 {
119 | width: 50%;
120 | }
121 | .size1of1 {
122 | width: 100%;
123 | }
124 | .clearfix:before, .clearfix:after {
125 | content: " ";
126 | display: table;
127 | }
128 | .clearfix:after {
129 | clear: both;
130 | }
131 | .hidden-true {
132 | display: none;
133 | }
134 | .textbox0 {
135 | width: 3em;
136 | background: #f1f1f1;
137 | padding: .25em .5em;
138 | line-height: 1.5;
139 | height: 1.5em;
140 | }
141 | #testDrive {
142 | display: block;
143 | padding-top: 24px;
144 | line-height: 1.5;
145 | }
146 | .fs0 {
147 | font-size: 16px;
148 | }
149 | .fs1 {
150 | font-size: 32px;
151 | }
152 |
153 |
--------------------------------------------------------------------------------
/heyadmin/src/css/fonts/demo-files/demo.js:
--------------------------------------------------------------------------------
1 | if (!('boxShadow' in document.body.style)) {
2 | document.body.setAttribute('class', 'noBoxShadow');
3 | }
4 |
5 | document.body.addEventListener('click', function (e) {
6 | var target = e.target;
7 | if (target.tagName === 'INPUT' &&
8 | target.getAttribute('class').indexOf('liga') === -1) {
9 | target.select();
10 | }
11 | });
12 |
13 | (function () {
14 | var fontSize = document.getElementById('fontSize');
15 | var testDrive = document.getElementById('testDrive');
16 | var testText = document.getElementById('testText');
17 | function updateTest() {
18 | testDrive.innerHTML = testText.value || String.fromCharCode(160);
19 | if (window.icomoonLiga) {
20 | window.icomoonLiga(testDrive);
21 | }
22 | }
23 | function updateSize() {
24 | testDrive.style.fontSize = fontSize.value + 'px';
25 | }
26 | fontSize.addEventListener('change', updateSize, false);
27 | testText.addEventListener('input', updateTest, false);
28 | testText.addEventListener('change', updateTest, false);
29 | updateSize();
30 | }());
31 |
--------------------------------------------------------------------------------
/heyadmin/src/css/fonts/fonts/heyuiadmin.eot:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/heyui/hey-cli-template/8030133de9f131ff5404ec61aec20fb264f4ffa3/heyadmin/src/css/fonts/fonts/heyuiadmin.eot
--------------------------------------------------------------------------------
/heyadmin/src/css/fonts/fonts/heyuiadmin.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/heyui/hey-cli-template/8030133de9f131ff5404ec61aec20fb264f4ffa3/heyadmin/src/css/fonts/fonts/heyuiadmin.ttf
--------------------------------------------------------------------------------
/heyadmin/src/css/fonts/fonts/heyuiadmin.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/heyui/hey-cli-template/8030133de9f131ff5404ec61aec20fb264f4ffa3/heyadmin/src/css/fonts/fonts/heyuiadmin.woff
--------------------------------------------------------------------------------
/heyadmin/src/css/fonts/variables.less:
--------------------------------------------------------------------------------
1 | @icomoon-font-family: "heyuiadmin";
2 | @icomoon-font-path: "fonts";
3 |
4 | @icon-eye: "\e000";
5 | @icon-paper-clip: "\e001";
6 | @icon-mail: "\e002";
7 | @icon-toggle: "\e003";
8 | @icon-layout: "\e004";
9 | @icon-link: "\e005";
10 | @icon-bell: "\e006";
11 | @icon-lock: "\e007";
12 | @icon-unlock: "\e008";
13 | @icon-ribbon: "\e009";
14 | @icon-image: "\e010";
15 | @icon-signal: "\e011";
16 | @icon-target: "\e012";
17 | @icon-clipboard: "\e013";
18 | @icon-clock: "\e014";
19 | @icon-watch: "\e015";
20 | @icon-air-play: "\e016";
21 | @icon-camera: "\e017";
22 | @icon-video: "\e018";
23 | @icon-disc: "\e019";
24 | @icon-printer: "\e020";
25 | @icon-monitor: "\e021";
26 | @icon-server: "\e022";
27 | @icon-cog: "\e023";
28 | @icon-heart: "\e024";
29 | @icon-paragraph: "\e025";
30 | @icon-align-justify: "\e026";
31 | @icon-align-left: "\e027";
32 | @icon-align-center: "\e028";
33 | @icon-align-right: "\e029";
34 | @icon-book: "\e030";
35 | @icon-layers: "\e031";
36 | @icon-stack: "\e032";
37 | @icon-stack-2: "\e033";
38 | @icon-paper: "\e034";
39 | @icon-paper-stack: "\e035";
40 | @icon-search: "\e036";
41 | @icon-zoom-in: "\e037";
42 | @icon-zoom-out: "\e038";
43 | @icon-reply: "\e039";
44 | @icon-circle-plus: "\e040";
45 | @icon-circle-minus: "\e041";
46 | @icon-circle-check: "\e042";
47 | @icon-circle-cross: "\e043";
48 | @icon-square-plus: "\e044";
49 | @icon-square-minus: "\e045";
50 | @icon-square-check: "\e046";
51 | @icon-square-cross: "\e047";
52 | @icon-microphone: "\e048";
53 | @icon-record: "\e049";
54 | @icon-skip-back: "\e050";
55 | @icon-rewind: "\e051";
56 | @icon-play: "\e052";
57 | @icon-pause: "\e053";
58 | @icon-stop: "\e054";
59 | @icon-fast-forward: "\e055";
60 | @icon-skip-forward: "\e056";
61 | @icon-shuffle: "\e057";
62 | @icon-repeat: "\e058";
63 | @icon-folder: "\e059";
64 | @icon-umbrella: "\e060";
65 | @icon-moon: "\e061";
66 | @icon-thermometer: "\e062";
67 | @icon-drop: "\e063";
68 | @icon-sun: "\e064";
69 | @icon-cloud: "\e065";
70 | @icon-cloud-upload: "\e066";
71 | @icon-cloud-download: "\e067";
72 | @icon-upload: "\e068";
73 | @icon-download: "\e069";
74 | @icon-location: "\e070";
75 | @icon-location-2: "\e071";
76 | @icon-map: "\e072";
77 | @icon-battery: "\e073";
78 | @icon-head: "\e074";
79 | @icon-briefcase: "\e075";
80 | @icon-speech-bubble: "\e076";
81 | @icon-anchor: "\e077";
82 | @icon-globe: "\e078";
83 | @icon-box: "\e079";
84 | @icon-reload: "\e080";
85 | @icon-share: "\e081";
86 | @icon-marquee: "\e082";
87 | @icon-marquee-plus: "\e083";
88 | @icon-marquee-minus: "\e084";
89 | @icon-tag: "\e085";
90 | @icon-power: "\e086";
91 | @icon-command: "\e087";
92 | @icon-alt: "\e088";
93 | @icon-esc: "\e089";
94 | @icon-bar-graph: "\e090";
95 | @icon-bar-graph-2: "\e091";
96 | @icon-pie-graph: "\e092";
97 | @icon-star: "\e093";
98 | @icon-arrow-left: "\e094";
99 | @icon-arrow-right: "\e095";
100 | @icon-arrow-up: "\e096";
101 | @icon-arrow-down: "\e097";
102 | @icon-volume: "\e098";
103 | @icon-mute: "\e099";
104 | @icon-content-right: "\e100";
105 | @icon-content-left: "\e101";
106 | @icon-grid: "\e102";
107 | @icon-grid-2: "\e103";
108 | @icon-columns: "\e104";
109 | @icon-loader: "\e105";
110 | @icon-bag: "\e106";
111 | @icon-ban: "\e107";
112 | @icon-flag: "\e108";
113 | @icon-trash: "\e109";
114 | @icon-expand: "\e110";
115 | @icon-contract: "\e111";
116 | @icon-maximize: "\e112";
117 | @icon-minimize: "\e113";
118 | @icon-plus: "\e114";
119 | @icon-minus: "\e115";
120 | @icon-check: "\e116";
121 | @icon-cross: "\e117";
122 | @icon-move: "\e118";
123 | @icon-delete: "\e119";
124 | @icon-menu: "\e120";
125 | @icon-archive: "\e121";
126 | @icon-inbox: "\e122";
127 | @icon-outbox: "\e123";
128 | @icon-file: "\e124";
129 | @icon-file-add: "\e125";
130 | @icon-file-subtract: "\e126";
131 | @icon-help: "\e127";
132 | @icon-open: "\e128";
133 | @icon-ellipsis: "\e129";
134 |
135 |
--------------------------------------------------------------------------------
/heyadmin/src/css/frame.less:
--------------------------------------------------------------------------------
1 | @frame-box-shadow: rgba(0,21,41,.08);
2 |
3 | #app{
4 | .app-frame {
5 | min-height: 100vh;
6 | }
7 |
8 | .h-layout-sider{
9 | z-index: 2;
10 | box-shadow: 0 1px 4px @frame-box-shadow;
11 | }
12 | .h-layout-header{
13 | overflow: hidden;
14 | box-shadow: 0px 1px 4px 0 @frame-box-shadow;
15 | }
16 |
17 | .h-layout-sider-collapsed {
18 | .app-logo{
19 | padding-left: 5px;
20 | }
21 | .h-layout-header-fixed {
22 | .sys-tabs-vue {
23 | left: @layout-sider-collapse-width;
24 | }
25 | }
26 | }
27 |
28 | .h-layout-header-fixed {
29 | .sys-tabs-vue {
30 | position: fixed;
31 | top: @layout-header-height;
32 | right: 0;
33 | z-index: 2;
34 | left: @layout-sider-width;
35 | }
36 | .sys-tabs-vue + .h-layout-content {
37 | margin-top: 45px;
38 | }
39 | }
40 | .h-layout-sider-fixed .h-layout-header-fixed {
41 | .h-layout-content {
42 | overflow: auto;
43 | height: calc(~"100vh - @{layout-header-height}");
44 | }
45 | .sys-tabs-vue + .h-layout-content {
46 | height: calc(~"100vh - @{layout-header-height} - @{sys-tabs-height}");
47 | }
48 | }
49 |
50 | .h-layout-sider-theme-dark .app-logo a{
51 | color: #FFF;
52 | }
53 |
54 | }
55 |
56 | @media (max-width: 900px) {
57 | #app {
58 | .app-header-info {
59 | .h-autocomplete, .app-header-icon-item {
60 | display: none;
61 | }
62 | }
63 | .h-layout {
64 | padding-left: 0;
65 | .app-menu-mask {
66 | position: fixed;
67 | left: @layout-sider-width;
68 | right: 0;
69 | top: 0;
70 | bottom: 0;
71 | background: rgba(0, 0, 0, 0.2);
72 | z-index: 1;
73 | }
74 | &.h-layout-sider-collapsed {
75 | > .h-layout-sider {
76 | transform: translateX(-@layout-sider-collapse-width);
77 | overflow: hidden;
78 | }
79 | .app-menu-mask {
80 | display: none;
81 | }
82 | }
83 | }
84 | .h-layout-content {
85 | -webkit-overflow-scrolling: touch;
86 | }
87 | .h-layout-header-fixed .h-layout-header {
88 | left: 0 !important;
89 | }
90 | .sys-tabs-vue {
91 | left: 0 !important;
92 | }
93 | }
94 | }
--------------------------------------------------------------------------------
/heyadmin/src/css/markdown.less:
--------------------------------------------------------------------------------
1 | .markdown-info-show {
2 | li {
3 | list-style: disc;
4 | }
5 |
6 | h1,
7 | h2,
8 | h3,
9 | h4 {
10 | color: #111111;
11 | font-weight: 400;
12 | margin-top: 1em;
13 | }
14 |
15 | h1,
16 | h2,
17 | h3,
18 | h4,
19 | h5,
20 | p,
21 | dl {
22 | margin-bottom: 16px;
23 | padding: 0;
24 | }
25 |
26 | h1 {
27 | font-size: 38px;
28 | line-height: 54px;
29 | }
30 |
31 | h2 {
32 | font-size: 30px;
33 | line-height: 42px;
34 | }
35 |
36 | h1,
37 | h2 {
38 | border-bottom: 1px solid #EFEAEA;
39 | padding-bottom: 10px;
40 | }
41 |
42 | h3 {
43 | font-size: 24px;
44 | line-height: 30px;
45 | }
46 |
47 | h4 {
48 | font-size: 21px;
49 | line-height: 26px;
50 | }
51 |
52 | h5 {
53 | font-size: 18px;
54 | list-style: 23px;
55 | }
56 |
57 | a {
58 | color: #0099ff;
59 | margin: 0;
60 | padding: 0;
61 | vertical-align: baseline;
62 | }
63 |
64 | a:hover {
65 | text-decoration: none;
66 | color: #ff6600;
67 | }
68 |
69 | a:visited {
70 | /*color: purple;*/
71 | }
72 |
73 | ul,
74 | ol {
75 | padding: 0;
76 | padding-left: 24px;
77 | margin: 0;
78 | }
79 |
80 | li {
81 | line-height: 24px;
82 | }
83 |
84 | p,
85 | ul,
86 | ol {
87 | font-size: 16px;
88 | line-height: 24px;
89 | }
90 |
91 | ol ol,
92 | ul ol {
93 | list-style-type: lower-roman;
94 | }
95 |
96 | code,
97 | pre {
98 | border-radius: 3px;
99 | background-color: #f7f7f7;
100 | color: inherit;
101 | }
102 |
103 | code {
104 | font-family: Consolas, Monaco, Andale Mono, monospace;
105 | margin: 0 2px;
106 | }
107 |
108 | pre {
109 | line-height: 1.7em;
110 | overflow: auto;
111 | padding: 6px 10px;
112 | border-left: 5px solid @primary-color;
113 | }
114 |
115 | pre>code {
116 | border: 0;
117 | display: inline;
118 | max-width: initial;
119 | padding: 0;
120 | margin: 0;
121 | overflow: initial;
122 | line-height: inherit;
123 | font-size: .85em;
124 | white-space: pre;
125 | background: 0 0;
126 |
127 | }
128 |
129 | code {
130 | color: #666555;
131 | }
132 |
133 | aside {
134 | display: block;
135 | float: right;
136 | width: 390px;
137 | }
138 |
139 | blockquote {
140 | border-left: .5em solid #eee;
141 | padding: 0 0 0 2em;
142 | margin-left: 0;
143 | }
144 |
145 | blockquote cite {
146 | font-size: 14px;
147 | line-height: 20px;
148 | color: #bfbfbf;
149 | }
150 |
151 | blockquote cite:before {
152 | content: '\2014 \00A0';
153 | }
154 |
155 | blockquote p {
156 | color: #666;
157 | }
158 |
159 | hr {
160 | text-align: left;
161 | color: #999;
162 | height: 2px;
163 | padding: 0;
164 | margin: 16px 0;
165 | background-color: #e7e7e7;
166 | border: 0 none;
167 | }
168 |
169 | dl {
170 | padding: 0;
171 | }
172 |
173 | dl dt {
174 | padding: 10px 0;
175 | margin-top: 16px;
176 | font-size: 1em;
177 | font-style: italic;
178 | font-weight: bold;
179 | }
180 |
181 | dl dd {
182 | padding: 0 16px;
183 | margin-bottom: 16px;
184 | }
185 |
186 | dd {
187 | margin-left: 0;
188 | }
189 | }
--------------------------------------------------------------------------------
/heyadmin/src/css/overwrite.less:
--------------------------------------------------------------------------------
1 | .h-panel {
2 | border: none;
3 | &-title {
4 | color: @dark-color;
5 | }
6 | &-bar {
7 | padding: 15px 25px;
8 | }
9 | &-tabs-bar {
10 | .h-tabs-default > .h-tabs-item {
11 | padding: 16px 15px;
12 | font-size: 18px;
13 | }
14 | }
15 | &-bar-s {
16 | padding-top: 8px;
17 | padding-bottom: 8px;
18 | .h-panel-title {
19 | font-size: 15px;
20 | }
21 | }
22 | &-body {
23 | padding: 25px;
24 | }
25 | }
26 |
27 | .h-menu-white .h-menu-li .h-menu-li-selected {
28 | background-color: #f0f6ff;
29 | }
30 |
31 | .h-table {
32 | td, th {
33 | padding: 10px 0 10px 16px;
34 | height: 48px;
35 | }
36 | }
--------------------------------------------------------------------------------
/heyadmin/src/css/richtext-editor.less:
--------------------------------------------------------------------------------
1 | @import (css) "~wangeditor/release/wangEditor.min.css";
2 |
3 | .w-e-text-container {
4 | border-radius: 0 0 3px 3px;
5 | border-color: #e4e4e4 !important;
6 | .w-e-panel-container .w-e-panel-tab-content input[type=text] {
7 | height: 30px;
8 | border-radius: 0px;
9 | &:focus {
10 | box-shadow: none;
11 | }
12 | }
13 | }
14 |
15 | .w-e-toolbar {
16 | border-radius: 3px 3px 0 0;
17 | border-color: #e4e4e4 !important;
18 | }
--------------------------------------------------------------------------------
/heyadmin/src/css/var.js:
--------------------------------------------------------------------------------
1 | const vars = require('heyui/themes/var.js');
2 | Object.assign(vars, {
3 | 'primary-color': '#3788ee',
4 | 'link-color': '#3788ee',
5 | 'blue-color': '#2d7bf4',
6 | 'green-color': '#0acf97',
7 | 'yellow-color': '#f9bc0b',
8 | 'red-color': '#f1556c',
9 | 'hover-background-color': '#f8f8f8',
10 | 'input-height': '32px',
11 | 'layout-header-height': '60px',
12 | 'layout-sider-width': '240px',
13 | 'layout-sider-collapse-width': '70px',
14 | 'menu-dark-color': '#001529',
15 | 'menu-white-background-color': '#ecf8f2',
16 | 'sys-tabs-height': '45px'
17 | });
18 | module.exports = vars;
19 |
--------------------------------------------------------------------------------
/heyadmin/src/css/var.less:
--------------------------------------------------------------------------------
1 | @import (less) "~/heyui/themes/var.less";
2 |
3 | @primary-color: #3788ee;
4 | @red-color: #f1556c;
5 | @green-color: #0acf97;
6 | @yellow-color: #f9bc0b;
7 | @blue-color: #2d7bf4;
8 |
9 | @input-height: 32px;
10 |
11 | @layout-sider-width: 240px;
12 | @layout-header-height: 60px;
13 |
14 | @menu-dark-color: #001529;
15 |
16 | @sys-tabs-height: 45px;
--------------------------------------------------------------------------------
/heyadmin/src/images/avatar.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/heyui/hey-cli-template/8030133de9f131ff5404ec61aec20fb264f4ffa3/heyadmin/src/images/avatar.png
--------------------------------------------------------------------------------
/heyadmin/src/images/error-pages/403.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/heyui/hey-cli-template/8030133de9f131ff5404ec61aec20fb264f4ffa3/heyadmin/src/images/error-pages/403.png
--------------------------------------------------------------------------------
/heyadmin/src/images/error-pages/404.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/heyui/hey-cli-template/8030133de9f131ff5404ec61aec20fb264f4ffa3/heyadmin/src/images/error-pages/404.png
--------------------------------------------------------------------------------
/heyadmin/src/images/error-pages/500.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/heyui/hey-cli-template/8030133de9f131ff5404ec61aec20fb264f4ffa3/heyadmin/src/images/error-pages/500.png
--------------------------------------------------------------------------------
/heyadmin/src/images/folders.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/heyui/hey-cli-template/8030133de9f131ff5404ec61aec20fb264f4ffa3/heyadmin/src/images/folders.png
--------------------------------------------------------------------------------
/heyadmin/src/images/logo.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/heyui/hey-cli-template/8030133de9f131ff5404ec61aec20fb264f4ffa3/heyadmin/src/images/logo.ico
--------------------------------------------------------------------------------
/heyadmin/src/images/logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/heyui/hey-cli-template/8030133de9f131ff5404ec61aec20fb264f4ffa3/heyadmin/src/images/logo.png
--------------------------------------------------------------------------------
/heyadmin/src/js/common/ajax.js:
--------------------------------------------------------------------------------
1 | import axios from 'axios';
2 | import qs from 'qs';
3 | import Utils from './utils';
4 |
5 | const DefaultParam = { repeatable: false };
6 |
7 | let ajax = {
8 | PREFIX: '/api',
9 | Author: Utils.getAuthor() || 'heyui',
10 | requestingApi: new Set(),
11 | extractUrl: function (url) {
12 | return url ? url.split('?')[0] : '';
13 | },
14 | isRequesting: function (url) {
15 | let api = this.extractUrl(url);
16 | return this.requestingApi.has(api);
17 | },
18 | addRequest: function (url) {
19 | let api = this.extractUrl(url);
20 | this.requestingApi.add(api);
21 | },
22 | deleteRequest: function (url) {
23 | let api = this.extractUrl(url);
24 | this.requestingApi.delete(api);
25 | },
26 | get: function (url, param, extendParam) {
27 | let params = {
28 | url,
29 | method: 'GET'
30 | };
31 | if (param) {
32 | ;
33 | params.params = param;
34 | }
35 | return this.ajax(params, extendParam);
36 | },
37 | post: function (url, param, extendParam) {
38 | var params = {
39 | url,
40 | method: 'POST'
41 | };
42 | if (param) params.data = qs.stringify(param);
43 | return this.ajax(params, extendParam);
44 | },
45 | postJson: function (url, paramJson, extendParam) {
46 | return this.ajax({
47 | url,
48 | method: 'POST',
49 | data: paramJson
50 | }, extendParam);
51 | },
52 | patchJson: function (url, paramJson, dataType, extendParam) {
53 | return this.ajax({
54 | url,
55 | method: 'PATCH',
56 | data: paramJson
57 | }, extendParam);
58 | },
59 | delete: function (url, extendParam) {
60 | return this.ajax({
61 | url: url,
62 | method: 'DELETE'
63 | }, extendParam);
64 | },
65 | ajax: function (param, extendParam) {
66 | let params = Utils.extend({}, DefaultParam, param, extendParam || {});
67 | params.crossDomain = params.url.indexOf('http') === 0;
68 | let url = params.url;
69 | if (!params.crossDomain) {
70 | url = params.url = this.PREFIX + params.url;
71 | }
72 | if (params.method != 'GET') {
73 | if (this.isRequesting(url)) {
74 | return new Promise((resolve, reject) => { resolve({ ok: false, msg: '重复请求' }); });
75 | }
76 | if (params.repeatable === false) {
77 | this.addRequest(url);
78 | }
79 | }
80 | let header = {
81 | author: this.Author,
82 | Authorization: Utils.getLocal('token')
83 | };
84 | let defaultParam = {
85 | headers: header,
86 | responseType: 'json',
87 | validateStatus: function (status) {
88 | return true;
89 | },
90 | paramsSerializer: (params) => {
91 | return qs.stringify(params, { allowDots: true });
92 | }
93 | };
94 | if (params.crossDomain) {
95 | defaultParam.headers = {};
96 | }
97 | let that = this;
98 | params = Utils.extend({}, defaultParam, params);
99 | return new Promise((resolve) => {
100 | return axios.request(params).then((response) => {
101 | that.deleteRequest(params.url);
102 | let data = response.data;
103 | let status = response.status;
104 | // 如果后端统一封装返回,即所有的请求都是200, 错误码由返回结果提供,则使用以下代码获取状态
105 | // if (status == 200) {
106 | // status = data.status;
107 | // }
108 | if (status != 200) {
109 | if (status == 401) {
110 | window.top.location = '/login';
111 | return;
112 | }
113 | if (status == 500) {
114 | HeyUI.$Message.error('后台异常');
115 | } else if (status == 404) {
116 | HeyUI.$Message.error('请求不存在');
117 | } else if (status != 200) {
118 | HeyUI.$Message.error(data._msg || '请求异常');
119 | }
120 | }
121 | data.ok = data.status == 200;
122 | resolve(data);
123 | }).catch(() => {
124 | that.deleteRequest(params.url);
125 | resolve({
126 | ok: false
127 | });
128 | });
129 | });
130 | }
131 | };
132 | export default ajax;
133 |
--------------------------------------------------------------------------------
/heyadmin/src/js/common/request.js:
--------------------------------------------------------------------------------
1 | import Ajax from './ajax';
2 |
3 | const Request = {
4 | User: {
5 | info() {
6 | return Ajax.get('/account/info');
7 | }
8 | },
9 | Dict: {
10 | get() {
11 | return Ajax.get(`/dict`);
12 | }
13 | },
14 | Home: {
15 | getMessageList() {
16 | return Ajax.get(`/home/messages`);
17 | }
18 | },
19 | Account: {
20 | menus() {
21 | }
22 | },
23 | Login: {
24 | login(param) {
25 | return Ajax.postJson('/login', param);
26 | },
27 | logout(param) {
28 | return Ajax.post('/logout', param);
29 | }
30 | },
31 | Management: {
32 | users(params) {
33 | return Ajax.get('/management/users', params);
34 | },
35 | roles(params) {
36 | return Ajax.get('/management/roles', params);
37 | }
38 | }
39 | };
40 |
41 | export default Request;
42 |
--------------------------------------------------------------------------------
/heyadmin/src/js/common/utils.js:
--------------------------------------------------------------------------------
1 | import utils from 'hey-utils';
2 |
3 | const rclass = /[\t\r\n\f]/g;
4 |
5 | export default utils.extend({}, utils, {
6 | getClass(elem) {
7 | return (elem.getAttribute && elem.getAttribute('class')) || '';
8 | },
9 | hasClass(elem, selector) {
10 | let className;
11 | className = ` ${selector} `;
12 | if (elem.nodeType === 1 && (` ${this.getClass(elem)} `)
13 | .replace(rclass, ' ')
14 | .indexOf(className) > -1) {
15 | return true;
16 | }
17 |
18 | return false;
19 | }
20 | });
21 |
--------------------------------------------------------------------------------
/heyadmin/src/js/config/autocomplete-config.js:
--------------------------------------------------------------------------------
1 | import jsonp from 'fetch-jsonp';
2 |
3 | const loadData = function (filter, callback) {
4 | jsonp(`https://suggest.taobao.com/sug?code=utf-8&q=${filter}`)
5 | .then(response => response.json())
6 | .then((d) => {
7 | const result = d.result;
8 | const data = [];
9 | result.forEach((r) => {
10 | data.push({
11 | name: r[0],
12 | id: r[1]
13 | });
14 | });
15 | callback(data);
16 | });
17 | };
18 |
19 | const baiduLoadData = function (filter, callback) {
20 | jsonp(`http://suggestion.baidu.com/su?wd=${filter}&p=3&cb=callback`, {
21 | jsonpCallbackFunction: 'callback'
22 | })
23 | .then(response => response.json())
24 | .then((d) => {
25 | callback(d.s);
26 | });
27 | };
28 |
29 | export default function () {
30 | return {
31 | globalSearch: {
32 | loadData: baiduLoadData,
33 | minWord: 0
34 | },
35 | simple: {
36 | loadData,
37 | keyName: 'id',
38 | titleName: 'name',
39 | minWord: 1
40 | },
41 | baidu: {
42 | loadData: baiduLoadData,
43 | minWord: 0
44 | },
45 | company: {
46 | loadData(filter, next) {
47 | let list = [];
48 | for (let i = 0; i < 10; i++) {
49 | list.push({
50 | id: `${i}`,
51 | name: `${filter}${i}`
52 | });
53 | }
54 | next(list);
55 | },
56 | keyName: 'id',
57 | titleName: 'name'
58 | },
59 | account: {
60 | loadData(filter, next) {
61 | let list = [];
62 | let companyId = this.companyId;
63 | let companyName = this.companyName;
64 | for (let i = 0; i < 10; i++) {
65 | list.push({
66 | id: `${companyId}-account${i}`,
67 | name: `${companyName}-account${filter}${i}`
68 | });
69 | }
70 | next(list);
71 | },
72 | keyName: 'id',
73 | titleName: 'name'
74 | }
75 | };
76 | };
77 |
--------------------------------------------------------------------------------
/heyadmin/src/js/config/category-config.js:
--------------------------------------------------------------------------------
1 | let list = [
2 | { id: 1, title: '一级' },
3 | { id: 2, title: '二级' },
4 | { id: 3, title: '三级', disabled: true },
5 | { id: 10, title: '一级-0', parent: '1' },
6 | { id: 11, title: '一级-1', parent: '1' },
7 | { id: 12, title: '一级-2', parent: '1' },
8 | { id: 13, title: '一级-3', parent: '1' },
9 | { id: 14, title: '一级-4', parent: '1' },
10 | { id: 101, title: '一级-0-1', parent: '10' },
11 | { id: 102, title: '一级-0-2', parent: '10' },
12 | { id: 103, title: '一级-0-3', parent: '10' },
13 | { id: 20, title: '二级-0', parent: '2' },
14 | { id: 21, title: '二级-1', parent: '2' },
15 | { id: 22, title: '二级-2', parent: '2' },
16 | { id: 23, title: '二级-3', parent: '2' },
17 | { id: 24, title: '二级-4', parent: '2' },
18 | { id: 30, title: '三级-0', parent: '3' },
19 | { id: 31, title: '三级-1', parent: '3' },
20 | { id: 32, title: '三级-2', parent: '3' },
21 | { id: 33, title: '三级-3', parent: '3' }
22 | ];
23 | export default function () {
24 | return {
25 | simple: {
26 | title: '测试',
27 | keyName: 'id',
28 | parentName: 'parent',
29 | titleName: 'title',
30 | dataMode: 'list',
31 | datas() {
32 | return list;
33 | }
34 | }
35 | };
36 | };
37 |
--------------------------------------------------------------------------------
/heyadmin/src/js/config/demo-components.js:
--------------------------------------------------------------------------------
1 | export default [{
2 | path: '/form',
3 | name: 'Form',
4 | component: (resolve) => require(['components/demo-components/form'], resolve),
5 | meta: { title: '表单', icon: 'icon-paper' }
6 | }, {
7 | path: '/form-detail',
8 | name: 'FormDetail',
9 | component: (resolve) => require(['components/demo-components/form-detail'], resolve),
10 | meta: { title: '表单详情' }
11 | }, {
12 | path: '/autocomplete1',
13 | name: 'Autocomplete1',
14 | component: (resolve) => require(['components/demo-components/autocomplete1'], resolve),
15 | meta: { title: '自动补全' }
16 | }, {
17 | path: '/autocomplete2',
18 | name: 'Autocomplete2',
19 | component: (resolve) => require(['components/demo-components/autocomplete2'], resolve),
20 | meta: { title: '自动补全2' }
21 | }, {
22 | path: '/autocomplete3',
23 | name: 'Autocomplete3',
24 | component: (resolve) => require(['components/demo-components/autocomplete3'], resolve),
25 | meta: { title: '自动补全3' }
26 | }, {
27 | path: '/icons',
28 | name: 'Icons',
29 | component: (resolve) => require(['components/demo-components/icons'], resolve),
30 | meta: { title: '图表列表', icon: 'icon-grid' }
31 | }, {
32 | path: '/form-basic',
33 | name: 'FormBasic',
34 | component: (resolve) => require(['components/demo-components/form/basic'], resolve),
35 | meta: { title: '基础表单', icon: 'icon-paper' }
36 | }, {
37 | path: '/form-create',
38 | name: 'FormCreate',
39 | component: (resolve) => require(['components/demo-components/form/create'], resolve),
40 | meta: { title: '创建表单' }
41 | }, {
42 | path: '/table-basic',
43 | name: 'TableBasic',
44 | component: (resolve) => require(['components/demo-components/table/basic'], resolve),
45 | meta: { title: '基础表格' }
46 | }, {
47 | path: '/table-search',
48 | name: 'TableSearch',
49 | component: (resolve) => require(['components/demo-components/table/search'], resolve),
50 | meta: { title: '查询表格' }
51 | }, {
52 | path: '/table-detail',
53 | name: 'TableDetail',
54 | component: (resolve) => require(['components/demo-components/table/detail'], resolve),
55 | meta: { title: '表格详情' }
56 | }, {
57 | path: '/account-basic',
58 | name: 'AccountBasic',
59 | component: (resolve) => require(['components/demo-components/account/account'], resolve),
60 | meta: { title: '个人中心', icon: 'icon-head' }
61 | }, {
62 | path: '/account-setting/',
63 | name: 'AccountSetting',
64 | component: (resolve) => require(['components/demo-components/account/account-setting'], resolve),
65 | children: [{
66 | path: 'security-setting',
67 | name: 'SecuritySetting',
68 | component: (resolve) => require(['components/demo-components/account/modules/security-setting'], resolve),
69 | meta: { title: '安全设置' }
70 | }, {
71 | path: 'notice-setting',
72 | name: 'NoticeSetting',
73 | component: (resolve) => require(['components/demo-components/account/modules/notice-setting'], resolve),
74 | meta: { title: '通知设置' }
75 | }],
76 | meta: { title: '个人设置' }
77 | }, {
78 | path: '/info-basic',
79 | name: 'InfoBasic',
80 | component: (resolve) => require(['components/demo-components/info/basic'], resolve),
81 | meta: { title: '基础信息' }
82 | }, {
83 | path: '/info-detail',
84 | name: 'InfoDetail',
85 | component: (resolve) => require(['components/demo-components/info/detail'], resolve),
86 | meta: { title: '信息详情' }
87 | }, {
88 | path: '/address-picker',
89 | name: 'AddressPicker',
90 | component: (resolve) => require(['components/demo-components/components/address-picker'], resolve),
91 | meta: { title: '地址选择器' }
92 | }, {
93 | path: '/chart',
94 | name: 'Chart',
95 | component: (resolve) => require(['components/demo-components/components/chart'], resolve),
96 | meta: { title: '图表' }
97 | }, {
98 | path: '/code-editor',
99 | name: 'CodeEditor',
100 | component: (resolve) => require(['components/demo-components/components/code-editor'], resolve),
101 | meta: { title: '代码编辑器' }
102 | }, {
103 | path: '/markdown-editor',
104 | name: 'MarkdownEditor',
105 | component: (resolve) => require(['components/demo-components/components/markdown-editor'], resolve),
106 | meta: { title: 'markdown编辑器' }
107 | }, {
108 | path: '/ricktext-editor',
109 | name: 'RicktextEditor',
110 | component: (resolve) => require(['components/demo-components/components/richtext-editor'], resolve),
111 | meta: { title: '富文本编辑器' }
112 | }, {
113 | path: '/baidu-map',
114 | name: 'BaiduMap',
115 | component: (resolve) => require(['components/demo-components/components/baidu-map'], resolve),
116 | meta: { title: '百度地图' }
117 | }];
118 |
--------------------------------------------------------------------------------
/heyadmin/src/js/config/dict-config.js:
--------------------------------------------------------------------------------
1 | const staticDict = function () {
2 | return {
3 | select: [{ title: '选择1', key: 'a1', other: '其他值' }, { title: '选择2', key: 'a2' }, { title: '选择3', key: 'a3' }],
4 | simple: { 1: '苹果', 2: '梨子', 3: '香蕉', 4: '橙子', 5: '樱桃' }
5 | };
6 | };
7 |
8 | export default staticDict;
9 |
--------------------------------------------------------------------------------
/heyadmin/src/js/config/heyui-config.js:
--------------------------------------------------------------------------------
1 | import dictConfig from './dict-config';
2 | import autocompleteConfig from './autocomplete-config';
3 | import treeConfig from './tree-config';
4 | import categoryConfig from './category-config';
5 |
6 | const heyuiConfig = () => {
7 | const staticDict = dictConfig();
8 | Object.keys(staticDict).forEach((key) => {
9 | HeyUI.addDict(key, staticDict[key]);
10 | });
11 |
12 | HeyUI.config('dict.keyName', 'key');
13 | HeyUI.config('dict.titleName', 'title');
14 |
15 | HeyUI.config('autocomplete.configs', autocompleteConfig());
16 | HeyUI.config('tree.configs', treeConfig());
17 | HeyUI.config('category.configs', categoryConfig());
18 |
19 | HeyUI.config('menu', {
20 | keyName: 'key',
21 | titleName: 'title',
22 | childrenName: 'children'
23 | });
24 | };
25 |
26 | export default heyuiConfig;
27 |
--------------------------------------------------------------------------------
/heyadmin/src/js/config/menu-config.js:
--------------------------------------------------------------------------------
1 | const fullMenus = [
2 | {
3 | title: 'Dashboard',
4 | key: 'Home',
5 | icon: 'icon-monitor',
6 | count: 1
7 | },
8 | {
9 | title: 'Icons',
10 | key: 'Icons',
11 | icon: 'icon-heart'
12 | },
13 | {
14 | title: '列表应用',
15 | key: 'tablelist',
16 | icon: 'icon-grid-2',
17 | children: [
18 | {
19 | title: '基础表格',
20 | key: 'TableBasic'
21 | },
22 | {
23 | title: '查询列表',
24 | key: 'TableSearch'
25 | }
26 | ]
27 | },
28 | {
29 | title: '表单应用',
30 | key: 'form-folder',
31 | icon: 'icon-paper',
32 | children: [
33 | {
34 | title: '基础表单',
35 | key: 'Form'
36 | },
37 | {
38 | title: '表单详情',
39 | key: 'FormDetail'
40 | }
41 | ]
42 | },
43 | {
44 | title: '模糊匹配',
45 | key: 'AutoComplete-folder',
46 | icon: 'icon-disc',
47 | children: [
48 | {
49 | title: '模糊搜索',
50 | key: 'Autocomplete1'
51 | },
52 | {
53 | title: '场景应用',
54 | key: 'Autocomplete2'
55 | },
56 | {
57 | title: '复杂场景',
58 | key: 'Autocomplete3'
59 | }
60 | ]
61 | },
62 | {
63 | title: '扩展组件',
64 | key: 'Advance-folder',
65 | icon: 'icon-bar-graph-2',
66 | children: [
67 | {
68 | title: '图表',
69 | key: 'Chart'
70 | },
71 | {
72 | title: '富文本编辑器',
73 | key: 'RicktextEditor'
74 | },
75 | {
76 | title: '代码编辑器',
77 | key: 'CodeEditor'
78 | },
79 | {
80 | title: 'Markdown编辑器',
81 | key: 'MarkdownEditor'
82 | }, {
83 | title: '百度地图',
84 | key: 'BaiduMap'
85 | }
86 | ]
87 | },
88 | {
89 | title: '系统设置',
90 | key: 'SysSetting',
91 | icon: 'icon-cog',
92 | children: [
93 | {
94 | title: '个人中心',
95 | key: 'AccountBasic'
96 | },
97 | {
98 | title: '安全设置',
99 | key: 'SecuritySetting'
100 | },
101 | {
102 | title: '权限设置',
103 | key: 'Authorization'
104 | }
105 | // {
106 | // title: '用户管理',
107 | // key: 'Users'
108 | // }
109 | ]
110 | }
111 | ];
112 |
113 | const getMenus = function (menuIdList = []) {
114 | return getAuthMenu(fullMenus, menuIdList);
115 | };
116 |
117 | let getAuthMenu = (menus, menuIdList) => {
118 | let configMenu = [];
119 | for (let menu of menus) {
120 | let m = Utils.copy(menu);
121 | if (menuIdList.indexOf(m.key) > -1) {
122 | configMenu.push(m);
123 | }
124 | if (menu.children && menu.children.length) {
125 | m.children = getAuthMenu(menu.children, menuIdList);
126 | }
127 | }
128 | return configMenu;
129 | };
130 |
131 | const getKeys = function (menus) {
132 | let keys = [];
133 | for (let menu of menus) {
134 | keys.push(menu.key);
135 | if (menu.children && menu.children.length) {
136 | keys.push(...getKeys(menu.children));
137 | }
138 | }
139 | return keys;
140 | };
141 |
142 | let fullMenuKeys = getKeys(fullMenus);
143 |
144 | const isAuthPage = function (name) {
145 | let menus = G.get('SYS_MENUS') || [];
146 | if (fullMenuKeys.indexOf(name) > -1 && menus.indexOf(name) == -1) {
147 | return false;
148 | }
149 | return true;
150 | };
151 |
152 | export { getMenus, fullMenus, fullMenuKeys, isAuthPage };
153 |
--------------------------------------------------------------------------------
/heyadmin/src/js/config/router-config.js:
--------------------------------------------------------------------------------
1 | import Vue from 'vue';
2 | import VueRouter from 'vue-router';
3 | import demoComponents from './demo-components';
4 | import { isAuthPage } from 'js/config/menu-config';
5 |
6 | Vue.use(VueRouter);
7 |
8 | const initRouter = () => {
9 | const routerParam = {
10 | mode: 'history',
11 | routes: [{
12 | path: '/login',
13 | name: 'Login',
14 | component: (resolve) => require(['components/login/index'], resolve)
15 | }, {
16 | path: '/',
17 | component: (resolve) => require(['components/app/app-frame'], resolve),
18 | children: [{
19 | path: '',
20 | name: 'Home',
21 | component: (resolve) => require(['components/home/index'], resolve),
22 | meta: { title: '首页', icon: 'icon-monitor' }
23 | }, {
24 | path: '/system-error',
25 | name: 'SystemError',
26 | component: (resolve) => require(['components/error-pages/500'], resolve),
27 | meta: { title: '系统错误' }
28 | }, {
29 | path: '/permission-error',
30 | name: 'PermissionError',
31 | component: (resolve) => require(['components/error-pages/403'], resolve),
32 | meta: { title: '权限错误' }
33 | },
34 | {
35 | path: '/notfound-error',
36 | name: 'NotfoundError',
37 | component: (resolve) => require(['components/error-pages/404'], resolve),
38 | meta: { title: '页面找不到' }
39 | }, {
40 | path: '/authorization',
41 | name: 'Authorization',
42 | component: (resolve) => require(['components/management/authorization'], resolve),
43 | meta: { title: '权限管理' }
44 | }, {
45 | path: '/users',
46 | name: 'Users',
47 | component: (resolve) => require(['components/management/users'], resolve),
48 | meta: { title: '用户管理' }
49 | },
50 | ...demoComponents,
51 | {
52 | path: '*',
53 | name: 'CommonNotfoundError',
54 | component: (resolve) => require(['components/error-pages/404'], resolve),
55 | meta: { title: '页面找不到' }
56 | }]
57 | }]
58 | };
59 |
60 | let router = new VueRouter(routerParam);
61 | let isFirstRouter = true;
62 |
63 | router.beforeEach((to, from, next) => {
64 | if (!isFirstRouter && !isAuthPage(to.name)) {
65 | next({ name: 'PermissionError' });
66 | return;
67 | }
68 | HeyUI.$LoadingBar.start();
69 | if (to.meta && to.meta.title) {
70 | document.title = to.meta.title + ' - 管理应用';
71 | } else {
72 | document.title = '管理系统';
73 | }
74 | isFirstRouter = false;
75 | next();
76 | });
77 | router.afterEach(() => {
78 | HeyUI.$LoadingBar.success();
79 | document.documentElement.scrollTop = 0;
80 | document.body.scrollTop = 0;
81 | let layoutContent = document.querySelector('.h-layout-content');
82 | if (layoutContent) {
83 | layoutContent.scrollTop = 0;
84 | }
85 | // baidu 统计,如果有自己的统计,请至index.html修改至自己的埋点
86 | if (window._hmt) {
87 | window._hmt.push(['_trackPageview', window.location.pathname]);
88 | }
89 | });
90 | return router;
91 | };
92 |
93 | export default initRouter;
94 |
--------------------------------------------------------------------------------
/heyadmin/src/js/config/tree-config.js:
--------------------------------------------------------------------------------
1 | let list = [
2 | { id: 1, title: '一级' },
3 | { id: 2, title: '二级' },
4 | { id: 3, title: '三级', disabled: true },
5 | { id: 10, title: '一级-0', parent: '1' },
6 | { id: 11, title: '一级-1', parent: '1' },
7 | { id: 12, title: '一级-2', parent: '1' },
8 | { id: 13, title: '一级-3', parent: '1' },
9 | { id: 14, title: '一级-4', parent: '1' },
10 | { id: 101, title: '一级-0-1', parent: '10' },
11 | { id: 102, title: '一级-0-2', parent: '10' },
12 | { id: 103, title: '一级-0-3', parent: '10' },
13 | { id: 20, title: '二级-0', parent: '2' },
14 | { id: 21, title: '二级-1', parent: '2' },
15 | { id: 22, title: '二级-2', parent: '2' },
16 | { id: 23, title: '二级-3', parent: '2' },
17 | { id: 24, title: '二级-4', parent: '2' },
18 | { id: 30, title: '三级-0', parent: '3' },
19 | { id: 31, title: '三级-1', parent: '3' },
20 | { id: 32, title: '三级-2', parent: '3' },
21 | { id: 33, title: '三级-3', parent: '3' }
22 | ];
23 |
24 | export default function () {
25 | return {
26 | simple: {
27 | keyName: 'id',
28 | parentName: 'parent',
29 | titleName: 'title',
30 | dataMode: 'list',
31 | datas() {
32 | return list;
33 | }
34 | }
35 | };
36 | };
37 |
--------------------------------------------------------------------------------
/heyadmin/src/js/model/Form.js:
--------------------------------------------------------------------------------
1 | export default new Model({
2 | int: null,
3 | number: null,
4 | url: null,
5 | email: null,
6 | tel: null,
7 | mobile: null,
8 | input: '',
9 | textarea: '测试',
10 | radio: 1,
11 | rate: null,
12 | checkbox: [1],
13 | select1: '人民币',
14 | select2: '',
15 | select3: [],
16 | taginputs: [],
17 | autocomplete: null,
18 | category: null,
19 | money: {
20 | min: null,
21 | max: null
22 | },
23 | date: null,
24 | inputs: [],
25 | things: ['']
26 | })
27 | ;
28 |
--------------------------------------------------------------------------------
/heyadmin/src/js/model/login/Login.js:
--------------------------------------------------------------------------------
1 | export default new Model({
2 | username: '',
3 | password: ''
4 | });
5 |
--------------------------------------------------------------------------------
/heyadmin/src/js/vue/components.js:
--------------------------------------------------------------------------------
1 | import Vue from 'vue';
2 | import SubMenu from 'components/common/sub-menu';
3 | import SearchFilter from 'components/common/search-filter';
4 | import AItem from 'components/common-item/a-item';
5 | import BItem from 'components/common-item/b-item';
6 |
7 | Vue.component('SubMenu', SubMenu);
8 | Vue.component('AItem', AItem);
9 | Vue.component('BItem', BItem);
10 | Vue.component('SearchFilter', SearchFilter);
11 | Vue.component('Qiniu', (resolve) => require(['components/common/qiniu'], resolve));
12 | Vue.component('Chart', (resolve) => require(['components/common/chart'], resolve));
13 | Vue.component('CodeEditor', (resolve) => require(['components/common/code-editor'], resolve));
14 | Vue.component('RichTextEditor', (resolve) => require(['components/common/richtext-editor'], resolve));
15 | Vue.component('MarkdownEditor', (resolve) => require(['components/common/markdown-editor'], resolve));
16 | Vue.component('BaiduMap', (resolve) => require(['components/common/baidu-map'], resolve));
17 |
--------------------------------------------------------------------------------
/heyadmin/src/js/vue/directives.js:
--------------------------------------------------------------------------------
1 | import Vue from 'vue';
2 |
3 | const uriReg = /^((http[s]{0,1}|ftp):\/\/)?[a-zA-Z0-9][-a-zA-Z0-9]{0,62}(\.[a-zA-Z0-9][-a-zA-Z0-9]{0,62})+\.?/;
4 | const isUri = function (value) {
5 | return (value && value.trim() && uriReg.test(value.trim()));
6 | };
7 |
8 | Vue.directive('url', {
9 | bind() {
10 | if (arguments[1] && arguments[1].value) {
11 | let el = arguments[0];
12 | let text = arguments[1].value;
13 | let protocol;
14 | let pre = '';
15 | let aft = '';
16 | if (isUri(text)) {
17 | protocol = (text.indexOf('http') != -1 ? '' : 'http://');
18 | pre = ``;
19 | aft = ` `;
20 | }
21 | el.innerHTML = pre + text + aft;
22 | }
23 | }
24 | });
25 |
--------------------------------------------------------------------------------
/heyadmin/src/js/vue/filters.js:
--------------------------------------------------------------------------------
1 | import Vue from 'vue';
2 | import manba from 'manba';
3 |
4 | Vue.filter('format', (value, format) => {
5 | if (value) {
6 | return Manba(value).format(format || 'l');
7 | }
8 | return '';
9 | });
10 |
11 | Vue.filter('distance', (date) => {
12 | const hours = manba().distance(date, manba.HOUR);
13 | if (hours == 0) {
14 | const mins = manba().distance(date, manba.MINUTE);
15 | return `${mins}分钟`;
16 | } else if (hours < 24) {
17 | return `${hours}小时`;
18 | } else {
19 | const days = manba().distance(date, manba.DAY);
20 | return `${days}天`;
21 | }
22 | });
23 |
--------------------------------------------------------------------------------
/heyadmin/src/js/vuex/store.js:
--------------------------------------------------------------------------------
1 | import Vue from 'vue';
2 | import Vuex from 'vuex';
3 |
4 | Vue.use(Vuex);
5 |
6 | export default new Vuex.Store({
7 | state: {
8 | User: {},
9 | msgCount: {
10 | messages: 2
11 | },
12 | siderCollapsed: false
13 | },
14 | mutations: {
15 | updateAccount(state, data) {
16 | state.User = data;
17 | },
18 | updateSiderCollapse(state, isShow) {
19 | setTimeout(() => {
20 | G.trigger('page_resize');
21 | }, 600);
22 | state.siderCollapsed = isShow;
23 | },
24 | updateMsgCount(state, data) {
25 | state.msgCount = data;
26 | }
27 | },
28 | actions: {
29 | updateAccount(context, data) {
30 | context.commit('updateAccount', data);
31 | },
32 | updateSiderCollapse(context, data) {
33 | context.commit('updateSiderCollapse', data);
34 | },
35 | updateMsgCount(context, data) {
36 | context.commit('updateMsgCount', data);
37 | }
38 | },
39 | getters: {
40 | account: state => {
41 | return state.User;
42 | },
43 | siderCollapsed: state => {
44 | return state.siderCollapsed;
45 | },
46 | msgCount: state => {
47 | return state.msgCount;
48 | }
49 | }
50 | });
51 |
--------------------------------------------------------------------------------
/heyadmin/src/mock/index.js:
--------------------------------------------------------------------------------
1 | import users from './users';
2 | const Mock = require('mockjs');
3 |
4 | Mock.setup({
5 | timeout: 0 - 300
6 | });
7 |
8 | Mock.mock('/api/account/info', 'get', {
9 | 'status': 200,
10 | 'body': {
11 | name: 'vvpvvp',
12 | desc: '执着于理想,纯粹于当下',
13 | email: 'HeyUI@some.com',
14 | org: '某某公司',
15 | dept: '某某部门',
16 | title: '前端开发工程师',
17 | location: '上海市',
18 | tags: ['善解人意', '开朗乐观', '真诚热情', '心地善良', '谦恭有礼', '彬彬有礼', '虚怀若谷', '严于律己', '雍容大度', '热情洋溢', '从容自若', '诚挚', '温厚', '谦让', '勤恳', '耿直']
19 | }
20 | });
21 |
22 | Mock.mock('/api/dict', 'get', {
23 | 'status': 200,
24 | 'body': [{
25 | 'name': 'simple',
26 | 'data': {
27 | '1': '苹果',
28 | '2': '梨子',
29 | '3': '香蕉',
30 | '4': '橙子',
31 | '5': '樱桃'
32 | }
33 | }]
34 | });
35 |
36 | Mock.mock('/api/login', 'post', {
37 | 'status': 200,
38 | 'body': {
39 | 'value': 'test'
40 | }
41 | });
42 |
43 | Mock.mock('/api/logout', 'post', {
44 | 'status': 200
45 | });
46 |
47 | Mock.mock('/api/home/messages', 'get', {
48 | 'status': 200,
49 | 'body': [{
50 | 'id': 1,
51 | 'isReaded': false,
52 | 'title': '任务名称1',
53 | 'description': '你需要在某年某月完成某某任务'
54 | }, {
55 | 'id': 2,
56 | 'isReaded': false,
57 | 'title': '任务名称2',
58 | 'description': '你需要在某年某月完成某某任务'
59 | }, {
60 | 'id': 3,
61 | 'isReaded': true,
62 | 'title': '任务名称3',
63 | 'description': '你需要在某年某月完成某某任务'
64 | }, {
65 | 'id': 4,
66 | 'isReaded': true,
67 | 'title': '任务名称4',
68 | 'description': '你需要在某年某月完成某某任务'
69 | }, {
70 | 'id': 5,
71 | 'isReaded': true,
72 | 'title': '任务名称5',
73 | 'description': '你需要在某年某月完成某某任务'
74 | }]
75 | });
76 |
77 | Mock.mock('/api/management/users', 'get', { status: 200, body: users });
78 |
79 | Mock.mock('/api/management/roles', 'get', {
80 | 'status': 200,
81 | 'body': [{
82 | id: 1,
83 | name: '系统管理员',
84 | description: '最高权限,可操作任何页面和功能'
85 | }, {
86 | id: 2,
87 | name: '普通员工',
88 | description: '普通员工'
89 | }, {
90 | id: 3,
91 | name: 'Leader',
92 | description: '可进行团队数据查看,可导出数据'
93 | }]
94 | });
95 |
--------------------------------------------------------------------------------
/heyadmin/src/mock/users.js:
--------------------------------------------------------------------------------
1 | export default [
2 | { id: '1', name: '万事屋', parent: '-1' },
3 | { id: '1.1', name: '坂田银时', parent: '1' },
4 | { id: '1.2', name: '志村新八', parent: '1' },
5 | { id: '1.3', name: '神乐', parent: '1' },
6 | { id: '1.4', name: '定春', parent: '1' },
7 | { id: '2', name: '真选组', parent: '2' },
8 | { id: '2.1', name: '近藤勋', parent: '2' },
9 | { id: '2.2', name: '土方十四郎', parent: '2' },
10 | { id: '2.3', name: '冲田总悟', parent: '2' },
11 | { id: '2.4', name: '山崎退', parent: '2' },
12 | { id: '2.5', name: '伊东鸭太郎', parent: '2' },
13 | { id: '2.6', name: '松平片栗虎', parent: '2' },
14 | { id: '2.7', name: '神山', parent: '2' },
15 | { id: '2.8', name: '未登场的队士们', parent: '2' },
16 | { id: '3', name: '攘夷志士', parent: '-1' },
17 | { id: '3.1', name: '桂小太郎', parent: '3' },
18 | { id: '3.2', name: '伊丽莎白(艾利撒比斯)', parent: '3' },
19 | { id: '3.3', name: '宫部', parent: '3' },
20 | { id: '4', name: '私设舰队『快援队』', parent: '-1' },
21 | { id: '4.1', name: '坂本辰马', parent: '4' },
22 | { id: '4.2', name: '陆奥', parent: '4' },
23 | { id: '5', name: '私人武装组织『鬼兵队』', parent: '-1' },
24 | { id: '5.1', name: '高杉晋助', parent: '5' },
25 | { id: '5.2', name: '河上万齐', parent: '5' },
26 | { id: '5.3', name: '冈田似蔵', parent: '5' },
27 | { id: '5.4', name: '来岛又子', parent: '5' },
28 | { id: '5.5', name: '武市变平太', parent: '5' },
29 | { id: '6', name: '宇宙海盗『春雨』', parent: '-1' },
30 | { id: '6.1', name: '神威', parent: '6' },
31 | { id: '6.2', name: '阿伏兔', parent: '6' },
32 | { id: '6.3', name: '云业', parent: '6' },
33 | { id: '6.4', name: '陀络', parent: '6' },
34 | { id: '7', name: '歌舞伎町四天王', parent: '-1' },
35 | { id: '7.1', name: '登势大婶', parent: '7' },
36 | { id: '7.2', name: '凯萨琳(卡莎莲)', parent: '7' },
37 | { id: '7.3', name: '玉子', parent: '7' },
38 | { id: '7.4', name: '孔雀姬华佗', parent: '7' },
39 | { id: '7.5', name: '西乡特盛', parent: '7' },
40 | { id: '7.6', name: '侠客泥水次郎长', parent: '7' },
41 | { id: '7.7', name: '黑驹胜男', parent: '7' },
42 | { id: '8', name: '其他经常登场的人', parent: '-1' },
43 | { id: '8.1', name: '吉田松阳', parent: '8' },
44 | { id: '8.2', name: '志村妙', parent: '8' },
45 | { id: '8.3', name: '长谷川泰三', parent: '8' },
46 | { id: '8.4', name: '柳生九兵卫', parent: '8' },
47 | { id: '8.5', name: '几松', parent: '8' },
48 | { id: '8.6', name: '寺门通', parent: '8' },
49 | { id: '8.7', name: '哈达王子(哈打王子)', parent: '8' },
50 | { id: '8.8', name: '服部全藏', parent: '8' },
51 | { id: '8.9', name: '猿飞菖蒲', parent: '8' },
52 | { id: '8.10', name: '屁怒絽', parent: '8' },
53 | { id: '8.11', name: '星海坊主', parent: '8' },
54 | { id: '8.12', name: '结野主播', parent: '8' },
55 | { id: '8.13', name: '花野咲', parent: '8' },
56 | { id: '9', name: '其他曾经登场的重要人物', parent: '-1' },
57 | { id: '9.1', name: '才藏', parent: '9' },
58 | { id: '9.2', name: '阿国', parent: '9' },
59 | { id: '9.3', name: '冲田三叶', parent: '9' },
60 | { id: '9.4', name: '德川茂茂', parent: '9' },
61 | { id: '9.5', name: '月咏', parent: '9' },
62 | { id: '9.6', name: '日轮', parent: '9' },
63 | { id: '9.7', name: '晴太', parent: '9' },
64 | { id: '9.8', name: '白血球', parent: '9' }
65 | ];
66 |
--------------------------------------------------------------------------------
/heyadmin/vue-cli/babel.config.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | presets: [
3 | ['@vue/app', { modules: false }]
4 | ],
5 | sourceType: 'unambiguous'
6 | };
7 |
--------------------------------------------------------------------------------
/heyadmin/vue-cli/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "heyui-admin",
3 | "version": "1.0.0",
4 | "description": "HeyUI components framework.",
5 | "main": "index.js",
6 | "repository": {
7 | "type": "git",
8 | "url": "git+https://github.com/heyui/heyui-admin.git"
9 | },
10 | "homepage": "http://admin.heyui.top/",
11 | "keywords": [
12 | "vue",
13 | "ui",
14 | "framework"
15 | ],
16 | "author": {
17 | "name": "vvpvvp"
18 | },
19 | "license": "MIT",
20 | "dependencies": {
21 | "@babel/polyfill": "^7.4.4",
22 | "axios": "^0.19.0",
23 | "brace": "^0.11.1",
24 | "core-js": "^2.6.9",
25 | "echarts": "^4.2.0-rc.2",
26 | "fetch-jsonp": "^1.1.3",
27 | "hey-global": "0.0.1",
28 | "hey-log": "0.0.8",
29 | "hey-utils": "^0.4.0",
30 | "heyui": "^1.21.0",
31 | "js-model": "^1.4.2",
32 | "lodash.debounce": "^4.0.8",
33 | "manba": "^1.2.8",
34 | "marked": "^0.6.2",
35 | "plupload-es6": "^2.1.11",
36 | "qiniu-js-es6": "^1.0.31",
37 | "qs": "^6.4.0",
38 | "regenerator-runtime": "^0.13.2",
39 | "vue": "^2.6.10",
40 | "vue-router": "^2.5.3",
41 | "vuex": "^2.3.1",
42 | "wangeditor": "^3.1.1"
43 | },
44 | "scripts": {
45 | "serve": "vue-cli-service serve",
46 | "build": "vue-cli-service build",
47 | "lint": "vue-cli-service lint"
48 | },
49 | "devDependencies": {
50 | "@vue/cli-plugin-babel": "^3.4.0",
51 | "@vue/cli-plugin-eslint": "^3.4.0",
52 | "@vue/cli-service": "^3.4.0",
53 | "@vue/eslint-config-standard": "^4.0.0",
54 | "babel-eslint": "^10.0.1",
55 | "eslint": "^5.3.0",
56 | "eslint-plugin-html": "^5.0.3",
57 | "eslint-plugin-import": "^2.16.0",
58 | "eslint-plugin-vue": "^5.2.2",
59 | "mockjs": "^1.0.1-beta3",
60 | "less": "^3.9.0",
61 | "less-loader": "^4.1.0",
62 | "vue-template-compiler": "^2.6.10"
63 | }
64 | }
65 |
--------------------------------------------------------------------------------
/heyadmin/vue-cli/vue.config.js:
--------------------------------------------------------------------------------
1 | const path = require('path');
2 | const webpack = require('webpack');
3 | const globalVars = require('./src/css/var.js');
4 |
5 | module.exports = {
6 | pages: {
7 | index: {
8 | entry: 'src/app.js',
9 | template: 'index.html',
10 | filename: 'index.html',
11 | chunks: ['chunk-vendors', 'chunk-common', 'index']
12 | }
13 | },
14 | css: {
15 | loaderOptions: {
16 | less: {
17 | globalVars
18 | }
19 | }
20 | },
21 | configureWebpack: {
22 | resolve: {
23 | alias: {
24 | model: path.resolve(__dirname, 'src/js/model/'),
25 | js: path.resolve(__dirname, 'src/js/'),
26 | components: path.resolve(__dirname, 'src/components/')
27 | }
28 | },
29 | plugins: [
30 | new webpack.ProvidePlugin({
31 | Utils: [path.resolve(__dirname, 'src/js/common/utils'), 'default'],
32 | Manba: 'manba',
33 | HeyUI: 'heyui',
34 | Model: 'js-model',
35 | G: 'hey-global',
36 | log: 'hey-log',
37 | R: [path.resolve(__dirname, 'src/js/common/request'), 'default']
38 | })
39 | ]
40 | },
41 | devServer: {
42 | // proxy: {
43 | // 此处应该配置为开发服务器的后台地址
44 | // 配置文档: https://cli.vuejs.org/zh/config/#devserver-proxy
45 | // '/api': {
46 | // target: 'http://xxx.xx.xx'
47 | // }
48 | // }
49 | }
50 | };
51 |
--------------------------------------------------------------------------------
/heyui/.eslintrc.json:
--------------------------------------------------------------------------------
1 | {
2 | "root": true,
3 | "env": {
4 | "browser": true,
5 | "commonjs": true,
6 | "es6": true
7 | },
8 | "globals": {
9 | "WEBPACK_DEBUG": false,
10 | "request": false,
11 | "require": false,
12 | "module": false
13 | },
14 | "plugins": [
15 | "html"
16 | ],
17 | "extends": "airbnb-base",
18 | "rules": {
19 | "no-underscore-dangle": [
20 | "error", {
21 | "allow": [
22 | "_status",
23 | "_msg",
24 | "_body",
25 | ]
26 | }
27 | ],
28 | "prefer-arrow-callback": [
29 | "off", {
30 | "allowNamedFunctions": false,
31 | "allowUnboundThis": true
32 | }
33 | ],
34 | "prefer-const": [
35 | "off"
36 | ],
37 | "eqeqeq": [
38 | "off"
39 | ],
40 | "no-plusplus": [
41 | "error", {
42 | "allowForLoopAfterthoughts": true
43 | }
44 | ],
45 | "no-restricted-syntax": [
46 | "off",
47 | "ForInStatement",
48 | "ForOfStatement"
49 | ],
50 | "semi-spacing": [
51 | "off"
52 | ],
53 | "semi": [
54 | "off"
55 | ],
56 | "padding-blocks": [
57 | "off"
58 | ],
59 | "quotes": [
60 | "off"
61 | ],
62 | "comma-dangle": [
63 | "off", {
64 | "arrays": "never",
65 | "objects": "never",
66 | "imports": "never",
67 | "exports": "never",
68 | "functions": "never"
69 | }
70 | ],
71 | "func-names": "off",
72 | "spaced-comment": "off",
73 | "consistent-return": "off",
74 | "radix": "off",
75 | "new-cap": "off"
76 | }
77 | }
78 |
--------------------------------------------------------------------------------
/heyui/.gitignore:
--------------------------------------------------------------------------------
1 | node_modules
2 |
--------------------------------------------------------------------------------
/heyui/README.md:
--------------------------------------------------------------------------------
1 | # vue
2 |
3 | > A HeyUI project
4 |
5 | ## Build Setup
6 |
7 | ``` bash
8 | # install dependencies
9 | npm install
10 |
11 | # serve with hot reload at localhost:9008
12 | hey dev
13 |
14 | # build for production with minification
15 | hey build
16 | ```
17 |
18 | For detailed explanation on how things work, consult the [docs for hey-cli](https://github.com/heyui/hey-cli).
19 |
20 |
21 | ## Notice
22 | HeyUI project use global less setting in *hey.js*, you can use those vars in any *vue* file or *less* file.
23 |
24 | ```
25 | globalVars: './src/css/var.less'
26 | ```
27 |
28 | For detailed using you can see App.vue file.
--------------------------------------------------------------------------------
/heyui/hey.conf.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | port: 9008,
3 | root: "dist",
4 | webpack: {
5 | publicPath: "/",
6 | output: {
7 | "./*html": {
8 | entry: "./src/main"
9 | }
10 | },
11 | global: {},
12 | devServer: {},
13 | externals: {},
14 | globalVars: './src/css/var.less'
15 | },
16 | copy: []
17 | };
18 |
--------------------------------------------------------------------------------
/heyui/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | vue
6 |
7 |
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/heyui/package-lock.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "heyui-sample",
3 | "version": "1.0.0",
4 | "lockfileVersion": 1,
5 | "requires": true,
6 | "dependencies": {
7 | "heyui": {
8 | "version": "1.15.0",
9 | "resolved": "https://registry.npmjs.org/heyui/-/heyui-1.15.0.tgz",
10 | "integrity": "sha512-jpuVLrFifbnxTHMMSNJTfdufuHP2LAhDpg36pdZB7MwLQCk3fiMypwpsHriHDEmbOnEvs+dcoCZNSXx6oMHENw==",
11 | "requires": {
12 | "manba": "^1.2.0"
13 | }
14 | },
15 | "manba": {
16 | "version": "1.2.7",
17 | "resolved": "https://registry.npmjs.org/manba/-/manba-1.2.7.tgz",
18 | "integrity": "sha512-W6UHV6OJQFMVk64n5LVXgsW8I9k/U87Jmjo0hLb83LUOE1d2VFLjpmcDdaeBleQ5HWC2opU8DK5TojMpNNvWrA=="
19 | },
20 | "vue": {
21 | "version": "2.5.13",
22 | "resolved": "https://registry.npmjs.org/vue/-/vue-2.5.13.tgz",
23 | "integrity": "sha512-3D+lY7HTkKbtswDM4BBHgqyq+qo8IAEE8lz8va1dz3LLmttjgo0FxairO4r1iN2OBqk8o1FyL4hvzzTFEdQSEw=="
24 | }
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/heyui/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "heyui-sample",
3 | "description": "A heyui project",
4 | "version": "1.0.0",
5 | "author": "vvpvvp ",
6 | "license": "MIT",
7 | "private": true,
8 | "scripts": {},
9 | "dependencies": {
10 | "heyui": "^1.15.0",
11 | "vue": "^2.5.11"
12 | },
13 | "browserslist": [
14 | "> 1%",
15 | "last 2 versions",
16 | "not ie <= 8"
17 | ],
18 | "devDependencies": {}
19 | }
20 |
--------------------------------------------------------------------------------
/heyui/src/css/index.less:
--------------------------------------------------------------------------------
1 | @import (less) "~heyui/themes/common.less";
--------------------------------------------------------------------------------
/heyui/src/css/var.less:
--------------------------------------------------------------------------------
1 | @import (less) "~/heyui/themes/var.less";
2 | //重新定义主题
3 | @primary-color: #FDA729;
4 | @red-color: #D64244;
5 | @green-color: #3cb357;
6 | @yellow-color: #EAC12C;
7 | @blue-color: #77A2DC;
--------------------------------------------------------------------------------
/heyui/src/main.js:
--------------------------------------------------------------------------------
1 | import Vue from 'vue';
2 | import App from './App';
3 | import HeyUI from 'heyui';
4 | import './css/index.less';
5 |
6 | Vue.use(HeyUI);
7 |
8 | HeyUI.initDict({
9 | select: [{ title: '选择1', key: 'a1', other: '其他值' }, { title: '选择2', key: 'a2' }, { title: '选择3', key: 'a3' }],
10 | simple: { 1: '苹果', 2: '梨子', 3: '香蕉', 4: '橙子', 5: '樱桃', 6: '超长超长超长超长超长超长超长超长超长超长超长超长超长' },
11 | });
12 |
13 | HeyUI.config("autocomplete.default", {
14 | keyName: 'key',
15 | });
16 |
17 | new Vue({
18 | el: '#app',
19 | render: h => h(App)
20 | });
21 |
--------------------------------------------------------------------------------
/iviewui/.eslintrc.json:
--------------------------------------------------------------------------------
1 | {
2 | "root": true,
3 | "env": {
4 | "browser": true,
5 | "commonjs": true,
6 | "es6": true
7 | },
8 | "globals": {
9 | "WEBPACK_DEBUG": false,
10 | "request": false,
11 | "require": false,
12 | "module": false
13 | },
14 | "plugins": [
15 | "html"
16 | ],
17 | "extends": "airbnb-base",
18 | "rules": {
19 | "no-underscore-dangle": [
20 | "error", {
21 | "allow": [
22 | "_status",
23 | "_msg",
24 | "_body",
25 | ]
26 | }
27 | ],
28 | "prefer-arrow-callback": [
29 | "off", {
30 | "allowNamedFunctions": false,
31 | "allowUnboundThis": true
32 | }
33 | ],
34 | "prefer-const": [
35 | "off"
36 | ],
37 | "eqeqeq": [
38 | "off"
39 | ],
40 | "no-plusplus": [
41 | "error", {
42 | "allowForLoopAfterthoughts": true
43 | }
44 | ],
45 | "no-restricted-syntax": [
46 | "off",
47 | "ForInStatement",
48 | "ForOfStatement"
49 | ],
50 | "semi-spacing": [
51 | "off"
52 | ],
53 | "semi": [
54 | "off"
55 | ],
56 | "padding-blocks": [
57 | "off"
58 | ],
59 | "quotes": [
60 | "off"
61 | ],
62 | "comma-dangle": [
63 | "off", {
64 | "arrays": "never",
65 | "objects": "never",
66 | "imports": "never",
67 | "exports": "never",
68 | "functions": "never"
69 | }
70 | ],
71 | "func-names": "off",
72 | "spaced-comment": "off",
73 | "consistent-return": "off",
74 | "radix": "off",
75 | "new-cap": "off"
76 | }
77 | }
78 |
--------------------------------------------------------------------------------
/iviewui/.gitignore:
--------------------------------------------------------------------------------
1 | node_modules
2 |
--------------------------------------------------------------------------------
/iviewui/README.md:
--------------------------------------------------------------------------------
1 | # vue
2 |
3 | > A Vue.js project
4 |
5 | ## Build Setup
6 |
7 | ``` bash
8 | # install dependencies
9 | npm install
10 |
11 | # serve with hot reload at localhost:9008
12 | hey dev
13 |
14 | # build for production with minification
15 | hey build
16 | ```
17 |
18 | For detailed explanation on how things work, consult the [docs for hey-cli](https://github.com/heyui/hey-cli).
19 |
--------------------------------------------------------------------------------
/iviewui/hey.conf.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | port: 9008,
3 | root: "dist",
4 | webpack: {
5 | publicPath: "/",
6 | output: {
7 | "./*html": {
8 | entry: "./src/main"
9 | }
10 | },
11 | global: {},
12 | devServer: {},
13 | externals: {}
14 | },
15 | copy: []
16 | };
17 |
--------------------------------------------------------------------------------
/iviewui/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | vue
6 |
7 |
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/iviewui/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "iview-sample",
3 | "description": "A iview project",
4 | "version": "1.0.0",
5 | "author": "vvpvvp ",
6 | "license": "MIT",
7 | "private": true,
8 | "scripts": {},
9 | "dependencies": {
10 | "iview": "^2.9.2",
11 | "vue": "^2.5.11"
12 | },
13 | "browserslist": [
14 | "> 1%",
15 | "last 2 versions",
16 | "not ie <= 8"
17 | ],
18 | "devDependencies": {}
19 | }
20 |
--------------------------------------------------------------------------------
/iviewui/src/App.vue:
--------------------------------------------------------------------------------
1 |
25 |
26 |
27 |
28 |
51 |
52 |
53 |
54 |
55 |
56 |
57 | Item 1
58 |
59 | Option 1
60 | Option 2
61 | Option 3
62 |
63 |
64 |
65 |
66 | Item 2
67 |
68 | Option 1
69 | Option 2
70 |
71 |
72 |
73 |
74 | Item 3
75 |
76 | Option 1
77 | Option 2
78 |
79 |
80 |
81 |
82 |
83 | Home
84 | Components
85 | Layout
86 |
87 |
88 | Content
89 |
90 |
91 |
92 |
93 |
94 |
95 |
--------------------------------------------------------------------------------
/iviewui/src/main.js:
--------------------------------------------------------------------------------
1 | import Vue from 'vue';
2 | import App from './App';
3 | import iView from 'iview';
4 | import 'iview/dist/styles/iview.css';
5 |
6 | Vue.use(iView);
7 |
8 | new Vue({
9 | el: '#app',
10 | render: h => h(App)
11 | });
--------------------------------------------------------------------------------
/react/README.md:
--------------------------------------------------------------------------------
1 | # vue
2 |
3 | > A Vue.js project
4 |
5 | ## Build Setup
6 |
7 | ``` bash
8 | # install dependencies
9 | npm install
10 |
11 | # serve with hot reload at localhost:9008
12 | hey dev
13 |
14 | # build for production with minification
15 | hey build
16 | ```
17 |
18 | For detailed explanation on how things work, consult the [docs for hey-cli](https://github.com/heyui/hey-cli).
19 |
--------------------------------------------------------------------------------
/react/hey.conf.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | port: 9008,
3 | root: "dist",
4 | react: true,
5 | webpack: {
6 | publicPath: "/",
7 | output: {
8 | "./*html": {
9 | entry: "./src/main"
10 | }
11 | },
12 | global: {},
13 | devServer: {},
14 | externals: {}
15 | },
16 | copy: []
17 | };
18 |
--------------------------------------------------------------------------------
/react/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | ant design
6 |
7 |
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/react/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "react-sample",
3 | "description": "A React project",
4 | "version": "1.0.0",
5 | "author": "vvpvvp ",
6 | "license": "MIT",
7 | "private": true,
8 | "scripts": {},
9 | "dependencies": {
10 | "antd": "^3.2.2",
11 | "lodash": "^4.17.13",
12 | "moment": "^2.20.1",
13 | "react": "^16.2.0",
14 | "react-dom": "^16.8.6"
15 | },
16 | "browserslist": [
17 | "> 1%",
18 | "last 2 versions",
19 | "not ie <= 8"
20 | ],
21 | "devDependencies": {}
22 | }
23 |
--------------------------------------------------------------------------------
/react/src/main.js:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import ReactDOM from 'react-dom';
3 | import { LocaleProvider, DatePicker, message } from 'antd';
4 | // 由于 antd 组件的默认文案是英文,所以需要修改为中文
5 | import zhCN from 'antd/lib/locale-provider/zh_CN';
6 | import moment from 'moment';
7 | import 'moment/locale/zh-cn';
8 | import("antd/dist/antd.less");
9 |
10 | moment.locale('zh-cn');
11 |
12 | class App extends React.Component {
13 | constructor(props) {
14 | super(props);
15 | this.state = {
16 | date: '',
17 | };
18 | }
19 | handleChange(date) {
20 | message.info('您选择的日期是: ' + date.toString());
21 | this.setState({ date });
22 | }
23 | render() {
24 | return (
25 |
26 |
27 |
this.handleChange(value)} />
28 | 当前日期:{this.state.date.toString()}
29 |
30 |
31 | );
32 | }
33 | }
34 |
35 | ReactDOM.render( , document.getElementById('root'));
--------------------------------------------------------------------------------
/simple/.eslintrc.json:
--------------------------------------------------------------------------------
1 | {
2 | "root": true,
3 | "env": {
4 | "browser": true,
5 | "commonjs": true,
6 | "es6": true
7 | },
8 | "globals": {
9 | "WEBPACK_DEBUG": false,
10 | "request": false,
11 | "require": false
12 | },
13 | "plugins": [
14 | "html"
15 | ],
16 | "extends": "airbnb-base",
17 | "rules": {
18 | "no-underscore-dangle": [
19 | "error", {
20 | "allow": [
21 | "_status",
22 | "_msg",
23 | "_body",
24 | ]
25 | }
26 | ],
27 | "prefer-arrow-callback": [
28 | "off", {
29 | "allowNamedFunctions": false,
30 | "allowUnboundThis": true
31 | }
32 | ],
33 | "prefer-const": [
34 | "off"
35 | ],
36 | "eqeqeq": [
37 | "off"
38 | ],
39 | "no-plusplus": [
40 | "error", {
41 | "allowForLoopAfterthoughts": true
42 | }
43 | ],
44 | "no-restricted-syntax": [
45 | "off",
46 | "ForInStatement",
47 | "ForOfStatement"
48 | ],
49 | "semi-spacing": [
50 | "off"
51 | ],
52 | "semi": [
53 | "off"
54 | ],
55 | "padding-blocks": [
56 | "off"
57 | ],
58 | "quotes": [
59 | "off"
60 | ],
61 | "comma-dangle": [
62 | "off", {
63 | "arrays": "never",
64 | "objects": "never",
65 | "imports": "never",
66 | "exports": "never",
67 | "functions": "never"
68 | }
69 | ],
70 | "func-names": "off",
71 | "spaced-comment": "off",
72 | "consistent-return": "off",
73 | "radix": "off",
74 | "new-cap": "off"
75 | }
76 | }
77 |
--------------------------------------------------------------------------------
/simple/.gitignore:
--------------------------------------------------------------------------------
1 | .DS_Store
2 | node_modules/
3 | dist/
4 | npm-debug.log
5 | yarn-error.log
6 |
7 | # Editor directories and files
8 | .idea
9 | *.suo
10 | *.ntvs*
11 | *.njsproj
12 | *.sln
13 |
--------------------------------------------------------------------------------
/simple/README.md:
--------------------------------------------------------------------------------
1 | # simple
2 |
3 | > A simple project
4 |
5 | ## Build Setup
6 |
7 | ``` bash
8 | # install dependencies
9 | npm install
10 |
11 | # serve with hot reload at localhost:9008
12 | hey dev
13 |
14 | # build for production with minification
15 | hey build
16 | ```
17 |
18 | For detailed explanation on how things work, consult the [docs for hey-cli](https://github.com/heyui/hey-cli).
19 |
20 | ## Structure
21 | ```
22 | |-- src
23 | | |-- css
24 | | | |-- index.less
25 | | |-- app.js
26 | |-- hey.js
27 | |-- package.json
28 | |-- index.html
29 | ```
--------------------------------------------------------------------------------
/simple/hey.conf.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | port: 9008,
3 | root: "dist",
4 | webpack: {
5 | publicPath: "/",
6 | output: {
7 | "./*html": {
8 | entry: "./src/app"
9 | }
10 | },
11 | global: {},
12 | devServer: {},
13 | externals: {}
14 | },
15 | copy: []
16 | };
17 |
--------------------------------------------------------------------------------
/simple/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Simple Project
5 |
6 |
7 | Welcome to use hey-cli .
8 | Try more possibilities.
9 |
10 |
--------------------------------------------------------------------------------
/simple/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "hey-template-sample",
3 | "version": "1.0.0",
4 | "description": "hey-cli template sample",
5 | "main": "src/index.html",
6 | "scripts": {
7 | "test": "echo \"Error: no test specified\" && exit 1"
8 | },
9 | "keywords": [
10 | "hey",
11 | "heycli",
12 | "template",
13 | "webpack"
14 | ],
15 | "author": "vvpvvp",
16 | "license": "MIT",
17 | "devDependencies": {
18 | }
19 | }
20 |
--------------------------------------------------------------------------------
/simple/src/app.js:
--------------------------------------------------------------------------------
1 | require("./css/index.less");
2 | const a = 1;
3 | const b = 2;
4 | const c = ['a', 'b', 'c'];
5 | const d = [];
6 | for(let i of c) {
7 | d.push(i);
8 | }
9 | const e = c.map(item => item + item);
10 |
11 | console.log(a);
12 | console.log(b);
13 | console.log(c);
14 | console.log(d);
15 | console.log(e);
16 |
17 | export default {}
--------------------------------------------------------------------------------
/simple/src/css/index.less:
--------------------------------------------------------------------------------
1 | h1{
2 | margin-top: 300px;
3 | text-align: center;
4 | }
5 | h2{
6 | margin-top: 20px;
7 | color: gray;
8 | text-align: center;
9 | }
--------------------------------------------------------------------------------
/viewui/.eslintrc.json:
--------------------------------------------------------------------------------
1 | {
2 | "root": true,
3 | "env": {
4 | "browser": true,
5 | "commonjs": true,
6 | "es6": true
7 | },
8 | "globals": {
9 | "WEBPACK_DEBUG": false,
10 | "request": false,
11 | "require": false,
12 | "module": false
13 | },
14 | "plugins": [
15 | "html"
16 | ],
17 | "extends": "airbnb-base",
18 | "rules": {
19 | "no-underscore-dangle": [
20 | "error", {
21 | "allow": [
22 | "_status",
23 | "_msg",
24 | "_body",
25 | ]
26 | }
27 | ],
28 | "prefer-arrow-callback": [
29 | "off", {
30 | "allowNamedFunctions": false,
31 | "allowUnboundThis": true
32 | }
33 | ],
34 | "prefer-const": [
35 | "off"
36 | ],
37 | "eqeqeq": [
38 | "off"
39 | ],
40 | "no-plusplus": [
41 | "error", {
42 | "allowForLoopAfterthoughts": true
43 | }
44 | ],
45 | "no-restricted-syntax": [
46 | "off",
47 | "ForInStatement",
48 | "ForOfStatement"
49 | ],
50 | "semi-spacing": [
51 | "off"
52 | ],
53 | "semi": [
54 | "off"
55 | ],
56 | "padding-blocks": [
57 | "off"
58 | ],
59 | "quotes": [
60 | "off"
61 | ],
62 | "comma-dangle": [
63 | "off", {
64 | "arrays": "never",
65 | "objects": "never",
66 | "imports": "never",
67 | "exports": "never",
68 | "functions": "never"
69 | }
70 | ],
71 | "func-names": "off",
72 | "spaced-comment": "off",
73 | "consistent-return": "off",
74 | "radix": "off",
75 | "new-cap": "off"
76 | }
77 | }
78 |
--------------------------------------------------------------------------------
/viewui/.gitignore:
--------------------------------------------------------------------------------
1 | node_modules
2 |
--------------------------------------------------------------------------------
/viewui/README.md:
--------------------------------------------------------------------------------
1 | # vue
2 |
3 | > A Vue.js project
4 |
5 | ## Build Setup
6 |
7 | ``` bash
8 | # install dependencies
9 | npm install
10 |
11 | # serve with hot reload at localhost:9008
12 | hey dev
13 |
14 | # build for production with minification
15 | hey build
16 | ```
17 |
18 | For detailed explanation on how things work, consult the [docs for hey-cli](https://github.com/heyui/hey-cli).
19 |
--------------------------------------------------------------------------------
/viewui/hey.conf.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | port: 9008,
3 | root: "dist",
4 | webpack: {
5 | publicPath: "/",
6 | output: {
7 | "./*html": {
8 | entry: "./src/main"
9 | }
10 | },
11 | global: {},
12 | devServer: {},
13 | externals: {}
14 | },
15 | copy: []
16 | };
17 |
--------------------------------------------------------------------------------
/viewui/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | vue
6 |
7 |
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/viewui/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "viewui-sample",
3 | "description": "A viewui project",
4 | "version": "1.0.0",
5 | "author": "sfk ",
6 | "license": "MIT",
7 | "private": true,
8 | "scripts": {},
9 | "dependencies": {
10 | "view-design": "^4.0.0",
11 | "vue": "^2.5.11"
12 | },
13 | "browserslist": [
14 | "> 1%",
15 | "last 2 versions",
16 | "not ie <= 8"
17 | ],
18 | "devDependencies": {}
19 | }
20 |
--------------------------------------------------------------------------------
/viewui/src/App.vue:
--------------------------------------------------------------------------------
1 |
29 |
30 |
31 |
32 |
57 |
58 |
59 |
60 |
61 |
62 |
63 | Item 1
64 |
65 | Option 1
66 | Option 2
67 | Option 3
68 |
69 |
70 |
71 |
72 | Item 2
73 |
74 | Option 1
75 | Option 2
76 |
77 |
78 |
79 |
80 | Item 3
81 |
82 | Option 1
83 | Option 2
84 |
85 |
86 |
87 |
88 |
89 | Home
90 | Components
91 | Layout
92 |
93 |
94 | Content
95 |
96 |
97 |
98 |
99 |
100 |
101 |
--------------------------------------------------------------------------------
/viewui/src/main.js:
--------------------------------------------------------------------------------
1 | import Vue from 'vue';
2 | import App from './App';
3 | import ViewUI from 'view-design';
4 | import 'view-design/dist/styles/iview.css';
5 |
6 | Vue.use(ViewUI);
7 |
8 | new Vue({
9 | el: '#app',
10 | render: h => h(App)
11 | });
--------------------------------------------------------------------------------
/vue/.babelrc:
--------------------------------------------------------------------------------
1 | {
2 | "presets": [
3 | ["env", { "modules": false }],
4 | "stage-3"
5 | ]
6 | }
7 |
--------------------------------------------------------------------------------
/vue/.editorconfig:
--------------------------------------------------------------------------------
1 | root = true
2 |
3 | [*]
4 | charset = utf-8
5 | indent_style = space
6 | indent_size = 2
7 | end_of_line = lf
8 | insert_final_newline = true
9 | trim_trailing_whitespace = true
10 |
--------------------------------------------------------------------------------
/vue/.gitignore:
--------------------------------------------------------------------------------
1 | .DS_Store
2 | node_modules/
3 | dist/
4 | npm-debug.log
5 | yarn-error.log
6 |
7 | # Editor directories and files
8 | .idea
9 | *.suo
10 | *.ntvs*
11 | *.njsproj
12 | *.sln
13 |
--------------------------------------------------------------------------------
/vue/README.md:
--------------------------------------------------------------------------------
1 | # vue
2 |
3 | > A Vue.js project
4 |
5 | ## Build Setup
6 |
7 | ``` bash
8 | # install dependencies
9 | npm install
10 |
11 | # serve with hot reload at localhost:9008
12 | hey dev
13 |
14 | # build for production with minification
15 | hey build
16 | ```
17 |
18 | For detailed explanation on how things work, consult the [docs for hey-cli](https://github.com/heyui/hey-cli).
19 |
--------------------------------------------------------------------------------
/vue/hey.conf.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | port: 9008,
3 | root: "dist",
4 | webpack: {
5 | publicPath: "/",
6 | output: {
7 | "./*html": {
8 | entry: "./src/main"
9 | }
10 | },
11 | global: {},
12 | devServer: {},
13 | externals: {}
14 | },
15 | copy: []
16 | };
17 |
--------------------------------------------------------------------------------
/vue/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | vue
6 |
7 |
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/vue/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "vue-simple",
3 | "description": "A Vue.js project",
4 | "version": "1.0.0",
5 | "author": "vvpvvp ",
6 | "license": "MIT",
7 | "private": true,
8 | "scripts": {},
9 | "dependencies": {
10 | "vue": "^2.5.11"
11 | },
12 | "browserslist": [
13 | "> 1%",
14 | "last 2 versions",
15 | "not ie <= 8"
16 | ],
17 | "devDependencies": {}
18 | }
19 |
--------------------------------------------------------------------------------
/vue/src/App.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
{{ msg }}
5 |
Essential Links
6 |
12 |
Ecosystem
13 |
19 |
20 |
21 |
22 |
32 |
33 |
61 |
--------------------------------------------------------------------------------
/vue/src/assets/logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/heyui/hey-cli-template/8030133de9f131ff5404ec61aec20fb264f4ffa3/vue/src/assets/logo.png
--------------------------------------------------------------------------------
/vue/src/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 |
--------------------------------------------------------------------------------