md-iview 1.0.12
Sign up to get free protection for your applications and to get access to all the features.
- package/README.md +2 -0
- package/package.json +116 -0
- package/src/components/libs/util.js +117 -0
- package/src/components/md-error-page/403.less +92 -0
- package/src/components/md-error-page/403.vue +34 -0
- package/src/components/md-error-page/404.less +60 -0
- package/src/components/md-error-page/404.vue +34 -0
- package/src/components/md-error-page/500.less +73 -0
- package/src/components/md-error-page/500.vue +36 -0
- package/src/components/md-error-page/demo/index.less +22 -0
- package/src/components/md-error-page/demo/index.vue +97 -0
- package/src/components/md-form-item/index.js +3 -0
- package/src/components/md-icon/icon.vue +77 -0
- package/src/components/md-icon/icons.js +5 -0
- package/src/components/md-icon/index.js +11 -0
- package/src/components/md-icon/style/index.less +1 -0
- package/src/components/md-loading/index.js +55 -0
- package/src/components/md-loading/index.vue +53 -0
- package/src/components/md-loading/md-loading.js +38 -0
- package/src/components/md-print/demo/index.vue +260 -0
- package/src/components/md-print/index.js +123 -0
- package/src/components/md-rich-editor/index.vue +69 -0
- package/src/components/md-rich-editor/module/image-extend/index.js +216 -0
- package/src/components/md-scroll-bar/demo/index.vue +102 -0
- package/src/components/md-scroll-bar/index.js +3 -0
- package/src/components/md-scroll-bar/index.less +90 -0
- package/src/components/md-scroll-bar/index.vue +250 -0
- package/src/components/md-select/index.js +7 -0
- package/src/components/md-select/select.vue +841 -0
- package/src/components/md-shrinkable-menu/components/sidebarMenu.vue +167 -0
- package/src/components/md-shrinkable-menu/components/sidebarMenuShrink.vue +119 -0
- package/src/components/md-shrinkable-menu/demo/data/cachePage.js +1 -0
- package/src/components/md-shrinkable-menu/demo/data/currentPath.js +9 -0
- package/src/components/md-shrinkable-menu/demo/data/menu.js +575 -0
- package/src/components/md-shrinkable-menu/demo/data/menu2.js +1017 -0
- package/src/components/md-shrinkable-menu/demo/data/pageTagsList.js +153 -0
- package/src/components/md-shrinkable-menu/demo/index.less +297 -0
- package/src/components/md-shrinkable-menu/demo/index.vue +285 -0
- package/src/components/md-shrinkable-menu/index.vue +112 -0
- package/src/components/md-shrinkable-menu/sidebar.vue +195 -0
- package/src/components/md-shrinkable-menu/styles/menu.less +5 -0
- package/src/components/md-shrinkable-menu/styles/sidebar.less +363 -0
- package/src/components/md-split-pane/demo/index.vue +101 -0
- package/src/components/md-split-pane/index.js +3 -0
- package/src/components/md-split-pane/index.less +93 -0
- package/src/components/md-split-pane/index.vue +230 -0
- package/src/components/md-table/action-tooltip.vue +45 -0
- package/src/components/md-table/can-edit-v2.vue +823 -0
- package/src/components/md-table/can-edit.vue +723 -0
- package/src/components/md-table/custom-cell.vue +71 -0
- package/src/components/md-table/date-picker-cell-v2.vue +48 -0
- package/src/components/md-table/date-picker-cell.vue +39 -0
- package/src/components/md-table/demo/data/search.js +67 -0
- package/src/components/md-table/demo/data/table2csv.js +200 -0
- package/src/components/md-table/demo/data/table2excel.js +239 -0
- package/src/components/md-table/demo/data/table_data.js +251 -0
- package/src/components/md-table/demo/editable-table.vue +144 -0
- package/src/components/md-table/demo/exportable-table.vue +124 -0
- package/src/components/md-table/demo/widgets/header-search.vue +88 -0
- package/src/components/md-table/drop-down-cell-v2.vue +87 -0
- package/src/components/md-table/drop-down-cell.vue +81 -0
- package/src/components/md-table/editable-expand.vue +143 -0
- package/src/components/md-table/expand.vue +97 -0
- package/src/components/md-table/index.vue +53 -0
- package/src/components/md-table/iview-table/cell.vue +99 -0
- package/src/components/md-table/iview-table/expand.js +21 -0
- package/src/components/md-table/iview-table/export-csv.js +76 -0
- package/src/components/md-table/iview-table/header.js +16 -0
- package/src/components/md-table/iview-table/index.js +2 -0
- package/src/components/md-table/iview-table/mixin.js +31 -0
- package/src/components/md-table/iview-table/table-body.vue +101 -0
- package/src/components/md-table/iview-table/table-head.vue +311 -0
- package/src/components/md-table/iview-table/table-tr.vue +31 -0
- package/src/components/md-table/iview-table/table.vue +1026 -0
- package/src/components/md-table/iview-table/util.js +93 -0
- package/src/components/md-table/libs/table2excel.js +100 -0
- package/src/components/md-table/select-cell-v2.vue +64 -0
- package/src/components/md-table/select-cell.vue +46 -0
- package/src/components/md-table/table.less +76 -0
- package/src/components/md-toolbar/index.vue +171 -0
- package/src/components/md-tree/index.js +2 -0
- package/src/components/md-tree/node.vue +238 -0
- package/src/components/md-tree/render.js +17 -0
- package/src/components/md-tree/tree.vue +241 -0
- package/src/components/utilities/can.js +35 -0
- package/src/directives/index.js +34 -0
- package/src/directives/resize.js +27 -0
- package/src/directives/scroll.js +27 -0
- package/src/directives/style/bg-color.js +23 -0
- package/src/directives/style/color.js +23 -0
- package/src/directives/style/font-size.js +23 -0
- package/src/directives/style/height.js +23 -0
- package/src/directives/style/lineHeight.js +23 -0
- package/src/directives/style/margin.js +48 -0
- package/src/directives/style/opacity.js +23 -0
- package/src/directives/style/padding.js +48 -0
- package/src/directives/style/width.js +24 -0
- package/src/index.js +442 -0
- package/src/locale/lang.js +5 -0
- package/src/mixins/colorable.js +51 -0
- package/src/style/color/bezierEasing.less +110 -0
- package/src/style/color/colorPalette.less +75 -0
- package/src/style/color/colors.less +146 -0
- package/src/style/color/tinyColor.less +1184 -0
- package/src/style/common.less +72 -0
- package/src/style/components/_ripple.less +60 -0
- package/src/style/components/_shrinkable-menu.less +46 -0
- package/src/style/components/_toolbar.less +96 -0
- package/src/style/components/index.less +3 -0
- package/src/style/components/rich-editor.less +6 -0
- package/src/style/index.less +10 -0
- package/src/style/theme.less +155 -0
- package/src/utils/color.js +46 -0
- package/src/utils/console.js +105 -0
- package/src/utils/load.js +79 -0
- package/src/utils/mask.js +139 -0
- package/src/utils/mixins.js +5 -0
- package/src/utils/validate.js +271 -0
package/README.md
ADDED
package/package.json
ADDED
@@ -0,0 +1,116 @@
|
|
1
|
+
{
|
2
|
+
"name": "md-iview",
|
3
|
+
"version": "1.0.12",
|
4
|
+
"description": "",
|
5
|
+
"author": "",
|
6
|
+
"main": "dist/md-view.js",
|
7
|
+
"files": [
|
8
|
+
"dist",
|
9
|
+
"src"
|
10
|
+
],
|
11
|
+
"keywords": [
|
12
|
+
"iview",
|
13
|
+
"md-view",
|
14
|
+
"vue",
|
15
|
+
"component",
|
16
|
+
"components",
|
17
|
+
"ui",
|
18
|
+
"framework"
|
19
|
+
],
|
20
|
+
"scripts": {
|
21
|
+
"dev": "webpack-dev-server --inline --progress --config build/webpack.dev.conf.js",
|
22
|
+
"start": "npm run dev",
|
23
|
+
"build:style": "gulp --gulpfile build/build-style.js",
|
24
|
+
"build:min": "webpack --config build/webpack.min.prod.conf.js",
|
25
|
+
"build:full": "webpack --config build/webpack.full.prod.conf.js",
|
26
|
+
"build": "npm run build:style && npm run build:min && npm run build:full",
|
27
|
+
"build:example": "rimraf dist&&node build/build.js",
|
28
|
+
"build:dist": "rimraf dist&&node build/build-dist.js"
|
29
|
+
},
|
30
|
+
"publishConfig": {
|
31
|
+
"registry": "https://registry.npmjs.org/"
|
32
|
+
},
|
33
|
+
"dependencies": {
|
34
|
+
"axios": "^0.18.0",
|
35
|
+
"babel-plugin-dynamic-import-node": "^2.3.0",
|
36
|
+
"babel-plugin-transform-class-properties": "^6.24.1",
|
37
|
+
"babel-plugin-transform-es5-property-mutators": "^6.24.1",
|
38
|
+
"babel-plugin-transform-object-rest-spread": "^6.26.0",
|
39
|
+
"classnames": "^2.2.6",
|
40
|
+
"compression-webpack-plugin": "^2.0.0",
|
41
|
+
"dayjs": "^1.8.14",
|
42
|
+
"highlight.js": "^9.15.6",
|
43
|
+
"html2canvas": "^1.0.0-rc.3",
|
44
|
+
"iview": "^3.4.2",
|
45
|
+
"js-cookie": "^2.2.0",
|
46
|
+
"md-d3": "^1.0.0",
|
47
|
+
"md-vue-core": "^1.0.3",
|
48
|
+
"omit.js": "^1.0.0",
|
49
|
+
"v-click-outside-x": "^4.0.6",
|
50
|
+
"validator": "^11.0.0",
|
51
|
+
"vue": "^2.5.2",
|
52
|
+
"vue-highlightjs": "^1.3.3",
|
53
|
+
"vue-quill-editor": "^3.0.6",
|
54
|
+
"vue-router": "^3.0.1",
|
55
|
+
"vuedraggable": "^2.16.0",
|
56
|
+
"vuex": "^3.0.1"
|
57
|
+
},
|
58
|
+
"devDependencies": {
|
59
|
+
"autoprefixer": "^7.1.2",
|
60
|
+
"babel-core": "^6.22.1",
|
61
|
+
"babel-helper-vue-jsx-merge-props": "^2.0.3",
|
62
|
+
"babel-loader": "^7.1.1",
|
63
|
+
"babel-plugin-syntax-jsx": "^6.18.0",
|
64
|
+
"babel-plugin-transform-define": "^1.3.0",
|
65
|
+
"babel-plugin-transform-runtime": "^6.22.0",
|
66
|
+
"babel-plugin-transform-vue-jsx": "^3.5.0",
|
67
|
+
"babel-preset-env": "^1.3.2",
|
68
|
+
"babel-preset-stage-2": "^6.22.0",
|
69
|
+
"chalk": "^2.0.1",
|
70
|
+
"copy-webpack-plugin": "^4.0.1",
|
71
|
+
"css-loader": "^0.28.11",
|
72
|
+
"extract-text-webpack-plugin": "^3.0.0",
|
73
|
+
"file-loader": "^1.1.4",
|
74
|
+
"friendly-errors-webpack-plugin": "^1.6.1",
|
75
|
+
"gulp": "^3.9.1",
|
76
|
+
"gulp-autoprefixer": "^5.0.0",
|
77
|
+
"gulp-clean-css": "^3.10.0",
|
78
|
+
"gulp-less": "^4.0.1",
|
79
|
+
"gulp-rename": "^1.4.0",
|
80
|
+
"html-webpack-plugin": "^2.30.1",
|
81
|
+
"iview-loader": "^1.2.2",
|
82
|
+
"less": "^3.9.0",
|
83
|
+
"less-loader": "^4.1.0",
|
84
|
+
"node-notifier": "^5.1.2",
|
85
|
+
"node-sass": "^4.10.0",
|
86
|
+
"optimize-css-assets-webpack-plugin": "^3.2.0",
|
87
|
+
"ora": "^1.2.0",
|
88
|
+
"portfinder": "^1.0.13",
|
89
|
+
"postcss-import": "^11.0.0",
|
90
|
+
"postcss-loader": "^2.0.8",
|
91
|
+
"postcss-url": "^7.2.1",
|
92
|
+
"rimraf": "^2.6.0",
|
93
|
+
"sass-loader": "^7.1.0",
|
94
|
+
"semver": "^5.3.0",
|
95
|
+
"shelljs": "^0.7.6",
|
96
|
+
"style-loader": "^0.23.1",
|
97
|
+
"uglifyjs-webpack-plugin": "^1.1.1",
|
98
|
+
"url-loader": "^0.5.8",
|
99
|
+
"vue-loader": "^13.3.0",
|
100
|
+
"vue-style-loader": "^3.0.1",
|
101
|
+
"vue-template-compiler": "^2.5.2",
|
102
|
+
"webpack": "^3.12.0",
|
103
|
+
"webpack-bundle-analyzer": "^2.9.0",
|
104
|
+
"webpack-dev-server": "^2.9.1",
|
105
|
+
"webpack-merge": "^4.1.0"
|
106
|
+
},
|
107
|
+
"engines": {
|
108
|
+
"node": ">= 6.0.0",
|
109
|
+
"npm": ">= 3.0.0"
|
110
|
+
},
|
111
|
+
"browserslist": [
|
112
|
+
"> 1%",
|
113
|
+
"last 2 versions",
|
114
|
+
"not ie <= 8"
|
115
|
+
]
|
116
|
+
}
|
@@ -0,0 +1,117 @@
|
|
1
|
+
let util = {
|
2
|
+
|
3
|
+
};
|
4
|
+
|
5
|
+
util.inOf = function (arr, targetArr) {
|
6
|
+
let res = true;
|
7
|
+
arr.forEach(item => {
|
8
|
+
if (targetArr.indexOf(item) < 0) {
|
9
|
+
res = false;
|
10
|
+
}
|
11
|
+
});
|
12
|
+
return res;
|
13
|
+
};
|
14
|
+
|
15
|
+
util.oneOf = function (ele, targetArr) {
|
16
|
+
if (targetArr.indexOf(ele) >= 0) {
|
17
|
+
return true;
|
18
|
+
} else {
|
19
|
+
return false;
|
20
|
+
}
|
21
|
+
};
|
22
|
+
|
23
|
+
util.showThisRoute = function (itAccess, currentAccess) {
|
24
|
+
if (typeof itAccess === 'object' && Array.isArray(itAccess)) {
|
25
|
+
return util.oneOf(currentAccess, itAccess);
|
26
|
+
} else {
|
27
|
+
return itAccess === currentAccess;
|
28
|
+
}
|
29
|
+
};
|
30
|
+
|
31
|
+
util.getRouterObjByName = function (routers, name) {
|
32
|
+
if (!name || !routers || !routers.length) {
|
33
|
+
return null;
|
34
|
+
}
|
35
|
+
// debugger;
|
36
|
+
let routerObj = null;
|
37
|
+
for (let item of routers) {
|
38
|
+
if (item.name === name) {
|
39
|
+
return item;
|
40
|
+
}
|
41
|
+
routerObj = util.getRouterObjByName(item.children, name);
|
42
|
+
if (routerObj) {
|
43
|
+
return routerObj;
|
44
|
+
}
|
45
|
+
}
|
46
|
+
return null;
|
47
|
+
};
|
48
|
+
|
49
|
+
util.handleTitle = function (vm, item) {
|
50
|
+
if (typeof item.title === 'object') {
|
51
|
+
return vm.$t(item.title.i18n);
|
52
|
+
} else {
|
53
|
+
return item.title;
|
54
|
+
}
|
55
|
+
};
|
56
|
+
|
57
|
+
util.openNewPage = function (vm, name, argu, query) {
|
58
|
+
let pageOpenedList = vm.$store.state.app.pageOpenedList;
|
59
|
+
let openedPageLen = pageOpenedList.length;
|
60
|
+
let i = 0;
|
61
|
+
let tagHasOpened = false;
|
62
|
+
while (i < openedPageLen) {
|
63
|
+
if (name === pageOpenedList[i].name) { // 页面已经打开
|
64
|
+
vm.$store.commit('pageOpenedList', {
|
65
|
+
index: i,
|
66
|
+
argu: argu,
|
67
|
+
query: query
|
68
|
+
});
|
69
|
+
tagHasOpened = true;
|
70
|
+
break;
|
71
|
+
}
|
72
|
+
i++;
|
73
|
+
}
|
74
|
+
if (!tagHasOpened) {
|
75
|
+
let tag = vm.$store.state.app.tagsList.filter((item) => {
|
76
|
+
if (item.children) {
|
77
|
+
return name === item.children[0].name;
|
78
|
+
} else {
|
79
|
+
return name === item.name;
|
80
|
+
}
|
81
|
+
});
|
82
|
+
tag = tag[0];
|
83
|
+
if (tag) {
|
84
|
+
tag = tag.children ? tag.children[0] : tag;
|
85
|
+
if (argu) {
|
86
|
+
tag.argu = argu;
|
87
|
+
}
|
88
|
+
if (query) {
|
89
|
+
tag.query = query;
|
90
|
+
}
|
91
|
+
vm.$store.commit('increateTag', tag);
|
92
|
+
}
|
93
|
+
}
|
94
|
+
vm.$store.commit('setCurrentPageName', name);
|
95
|
+
};
|
96
|
+
|
97
|
+
util.toDefaultPage = function (routers, name, route, next) {
|
98
|
+
let len = routers.length;
|
99
|
+
let i = 0;
|
100
|
+
let notHandle = true;
|
101
|
+
while (i < len) {
|
102
|
+
if (routers[i].name === name && routers[i].children && routers[i].redirect === undefined) {
|
103
|
+
route.replace({
|
104
|
+
name: routers[i].children[0].name
|
105
|
+
});
|
106
|
+
notHandle = false;
|
107
|
+
next();
|
108
|
+
break;
|
109
|
+
}
|
110
|
+
i++;
|
111
|
+
}
|
112
|
+
if (notHandle) {
|
113
|
+
next();
|
114
|
+
}
|
115
|
+
};
|
116
|
+
|
117
|
+
export default util;
|
@@ -0,0 +1,92 @@
|
|
1
|
+
@import "../../style/theme";
|
2
|
+
@keyframes error403animation {
|
3
|
+
0% {
|
4
|
+
transform: rotateZ(0deg);
|
5
|
+
}
|
6
|
+
40% {
|
7
|
+
transform: rotateZ(-20deg);
|
8
|
+
}
|
9
|
+
45% {
|
10
|
+
transform: rotateZ(-15deg);
|
11
|
+
}
|
12
|
+
50% {
|
13
|
+
transform: rotateZ(-20deg);
|
14
|
+
}
|
15
|
+
55% {
|
16
|
+
transform: rotateZ(-15deg);
|
17
|
+
}
|
18
|
+
60% {
|
19
|
+
transform: rotateZ(-20deg);
|
20
|
+
}
|
21
|
+
100% {
|
22
|
+
transform: rotateZ(0deg);
|
23
|
+
}
|
24
|
+
}
|
25
|
+
.error403{
|
26
|
+
&-body-con{
|
27
|
+
width: 700px;
|
28
|
+
height: 500px;
|
29
|
+
position: absolute;
|
30
|
+
left: 50%;
|
31
|
+
top: 50%;
|
32
|
+
transform: translate(-50%,-50%);
|
33
|
+
&-title{
|
34
|
+
text-align: center;
|
35
|
+
font-size: 240px;
|
36
|
+
font-weight: 700;
|
37
|
+
//color: #2d8cf0;
|
38
|
+
color: @primary-color;
|
39
|
+
height: 260px;
|
40
|
+
line-height: 260px;
|
41
|
+
margin-top: 40px;
|
42
|
+
.error403-0-span{
|
43
|
+
display: inline-block;
|
44
|
+
position: relative;
|
45
|
+
width: 170px;
|
46
|
+
height: 170px;
|
47
|
+
border-radius: 50%;
|
48
|
+
border: 20px solid #ed3f14;
|
49
|
+
color: #ed3f14;
|
50
|
+
margin-right: 10px;
|
51
|
+
i{
|
52
|
+
display: inline-block;
|
53
|
+
font-size: 120px;
|
54
|
+
position: absolute;
|
55
|
+
left: 50%;
|
56
|
+
top: 50%;
|
57
|
+
transform: translate(-50%,-50%);
|
58
|
+
}
|
59
|
+
}
|
60
|
+
.error403-key-span{
|
61
|
+
display: inline-block;
|
62
|
+
position: relative;
|
63
|
+
width: 100px;
|
64
|
+
height: 190px;
|
65
|
+
border-radius: 50%;
|
66
|
+
margin-right: 10px;
|
67
|
+
i{
|
68
|
+
display: inline-block;
|
69
|
+
font-size: 190px;
|
70
|
+
position: absolute;
|
71
|
+
left: 20px;
|
72
|
+
transform: translate(-50%,-60%);
|
73
|
+
transform-origin: center bottom;
|
74
|
+
animation: error403animation 2.8s ease 0s infinite;
|
75
|
+
}
|
76
|
+
}
|
77
|
+
}
|
78
|
+
&-message{
|
79
|
+
display: block;
|
80
|
+
text-align: center;
|
81
|
+
font-size: 30px;
|
82
|
+
font-weight: 500;
|
83
|
+
letter-spacing: 4px;
|
84
|
+
color: #dddde2;
|
85
|
+
}
|
86
|
+
}
|
87
|
+
&-btn-con{
|
88
|
+
text-align: center;
|
89
|
+
padding: 20px 0;
|
90
|
+
margin-bottom: 40px;
|
91
|
+
}
|
92
|
+
}
|
@@ -0,0 +1,34 @@
|
|
1
|
+
<style lang="less" scoped>
|
2
|
+
@import './403.less';
|
3
|
+
</style>
|
4
|
+
|
5
|
+
<template>
|
6
|
+
<div class="error403">
|
7
|
+
<div class="error403-body-con">
|
8
|
+
<Card>
|
9
|
+
<div class="error403-body-con-title">4<span class="error403-0-span"><Icon type="android-lock"></Icon></span>3<span class="error403-key-span"><Icon size="220" type="ios-bolt"></Icon></span></div>
|
10
|
+
<p class="error403-body-con-message">You don't have permission</p>
|
11
|
+
<div class="error403-btn-con">
|
12
|
+
<Button @click="goHome" size="large" style="width: 200px;" type="text">返回首页</Button>
|
13
|
+
<Button @click="backPage" size="large" style="width: 200px;margin-left: 40px;" type="primary">返回上一页</Button>
|
14
|
+
</div>
|
15
|
+
</Card>
|
16
|
+
</div>
|
17
|
+
</div>
|
18
|
+
</template>
|
19
|
+
|
20
|
+
<script>
|
21
|
+
export default {
|
22
|
+
name: 'Error403',
|
23
|
+
methods: {
|
24
|
+
backPage () {
|
25
|
+
this.$router.go(-1);
|
26
|
+
},
|
27
|
+
goHome () {
|
28
|
+
this.$router.push({
|
29
|
+
name: 'home'
|
30
|
+
});
|
31
|
+
}
|
32
|
+
}
|
33
|
+
};
|
34
|
+
</script>
|
@@ -0,0 +1,60 @@
|
|
1
|
+
@import "../../style/theme";
|
2
|
+
@keyframes error404animation {
|
3
|
+
0% {
|
4
|
+
transform: rotateZ(0deg);
|
5
|
+
}
|
6
|
+
20% {
|
7
|
+
transform: rotateZ(-60deg);
|
8
|
+
}
|
9
|
+
40% {
|
10
|
+
transform: rotateZ(-10deg);
|
11
|
+
}
|
12
|
+
60% {
|
13
|
+
transform: rotateZ(50deg);
|
14
|
+
}
|
15
|
+
80% {
|
16
|
+
transform: rotateZ(-20deg);
|
17
|
+
}
|
18
|
+
100% {
|
19
|
+
transform: rotateZ(0deg);
|
20
|
+
}
|
21
|
+
}
|
22
|
+
.error404{
|
23
|
+
&-body-con{
|
24
|
+
width: 700px;
|
25
|
+
height: 500px;
|
26
|
+
position: absolute;
|
27
|
+
left: 50%;
|
28
|
+
top: 50%;
|
29
|
+
transform: translate(-50%,-50%);
|
30
|
+
&-title{
|
31
|
+
text-align: center;
|
32
|
+
font-size: 240px;
|
33
|
+
font-weight: 700;
|
34
|
+
//color: #2d8cf0;
|
35
|
+
color: @primary-color;
|
36
|
+
height: 260px;
|
37
|
+
line-height: 260px;
|
38
|
+
margin-top: 40px;
|
39
|
+
span{
|
40
|
+
display: inline-block;
|
41
|
+
color: #19be6b;
|
42
|
+
font-size: 230px;
|
43
|
+
animation: error404animation 3s ease 0s infinite alternate;
|
44
|
+
}
|
45
|
+
}
|
46
|
+
&-message{
|
47
|
+
display: block;
|
48
|
+
text-align: center;
|
49
|
+
font-size: 30px;
|
50
|
+
font-weight: 500;
|
51
|
+
letter-spacing: 12px;
|
52
|
+
color: #dddde2;
|
53
|
+
}
|
54
|
+
}
|
55
|
+
&-btn-con{
|
56
|
+
text-align: center;
|
57
|
+
padding: 20px 0;
|
58
|
+
margin-bottom: 40px;
|
59
|
+
}
|
60
|
+
}
|
@@ -0,0 +1,34 @@
|
|
1
|
+
<style lang="less" scoped>
|
2
|
+
@import './404.less';
|
3
|
+
</style>
|
4
|
+
|
5
|
+
<template>
|
6
|
+
<div class="error404">
|
7
|
+
<div class="error404-body-con">
|
8
|
+
<Card>
|
9
|
+
<div class="error404-body-con-title">4<span><Icon type="ios-navigate-outline"></Icon></span>4</div>
|
10
|
+
<p class="error404-body-con-message">YOU LOOK LOST</p>
|
11
|
+
<div class="error404-btn-con">
|
12
|
+
<Button @click="goHome" size="large" style="width: 200px;" type="text">返回首页</Button>
|
13
|
+
<Button @click="backPage" size="large" style="width: 200px;margin-left: 40px;" type="primary">返回上一页</Button>
|
14
|
+
</div>
|
15
|
+
</Card>
|
16
|
+
</div>
|
17
|
+
</div>
|
18
|
+
</template>
|
19
|
+
|
20
|
+
<script>
|
21
|
+
export default {
|
22
|
+
name: 'Error404',
|
23
|
+
methods: {
|
24
|
+
backPage () {
|
25
|
+
this.$router.go(-1);
|
26
|
+
},
|
27
|
+
goHome () {
|
28
|
+
this.$router.push({
|
29
|
+
name: 'home'
|
30
|
+
});
|
31
|
+
}
|
32
|
+
}
|
33
|
+
};
|
34
|
+
</script>
|
@@ -0,0 +1,73 @@
|
|
1
|
+
@import "../../style/theme";
|
2
|
+
@keyframes error500animation {
|
3
|
+
0% {
|
4
|
+
transform: rotateZ(0deg);
|
5
|
+
}
|
6
|
+
20% {
|
7
|
+
transform: rotateZ(-10deg);
|
8
|
+
}
|
9
|
+
40% {
|
10
|
+
transform: rotateZ(5deg);
|
11
|
+
}
|
12
|
+
60% {
|
13
|
+
transform: rotateZ(-5deg);
|
14
|
+
}
|
15
|
+
80% {
|
16
|
+
transform: rotateZ(10deg);
|
17
|
+
}
|
18
|
+
100% {
|
19
|
+
transform: rotateZ(0deg);
|
20
|
+
}
|
21
|
+
}
|
22
|
+
.error500{
|
23
|
+
&-body-con{
|
24
|
+
width: 700px;
|
25
|
+
height: 500px;
|
26
|
+
position: absolute;
|
27
|
+
left: 50%;
|
28
|
+
top: 50%;
|
29
|
+
transform: translate(-50%,-50%);
|
30
|
+
&-title{
|
31
|
+
text-align: center;
|
32
|
+
font-size: 240px;
|
33
|
+
font-weight: 700;
|
34
|
+
//color: #2d8cf0;
|
35
|
+
color: @primary-color;
|
36
|
+
height: 260px;
|
37
|
+
line-height: 260px;
|
38
|
+
margin-top: 40px;
|
39
|
+
.error500-0-span{
|
40
|
+
display: inline-block;
|
41
|
+
position: relative;
|
42
|
+
width: 170px;
|
43
|
+
height: 170px;
|
44
|
+
border-radius: 50%;
|
45
|
+
border: 20px solid #ed3f14;
|
46
|
+
color: #ed3f14;
|
47
|
+
margin-right: 10px;
|
48
|
+
i{
|
49
|
+
display: inline-block;
|
50
|
+
font-size: 120px;
|
51
|
+
position: absolute;
|
52
|
+
bottom: -10px;
|
53
|
+
left: 10px;
|
54
|
+
transform-origin: center bottom;
|
55
|
+
animation: error500animation 3s ease 0s infinite alternate;
|
56
|
+
}
|
57
|
+
}
|
58
|
+
}
|
59
|
+
&-message{
|
60
|
+
display: block;
|
61
|
+
text-align: center;
|
62
|
+
font-size: 30px;
|
63
|
+
font-weight: 500;
|
64
|
+
letter-spacing: 4px;
|
65
|
+
color: #dddde2;
|
66
|
+
}
|
67
|
+
}
|
68
|
+
&-btn-con{
|
69
|
+
text-align: center;
|
70
|
+
padding: 20px 0;
|
71
|
+
margin-bottom: 40px;
|
72
|
+
}
|
73
|
+
}
|
@@ -0,0 +1,36 @@
|
|
1
|
+
<style lang="less" scoped>
|
2
|
+
@import './500.less';
|
3
|
+
</style>
|
4
|
+
|
5
|
+
<template>
|
6
|
+
<div class="error500">
|
7
|
+
<div class="error500-body-con">
|
8
|
+
<Card>
|
9
|
+
<div class="error500-body-con-title">
|
10
|
+
5<span class="error500-0-span"><Icon type="social-freebsd-devil"></Icon></span><span class="error500-0-span"><Icon type="social-freebsd-devil"></Icon></span>
|
11
|
+
</div>
|
12
|
+
<p class="error500-body-con-message">Oops! the server is wrong</p>
|
13
|
+
<div class="error500-btn-con">
|
14
|
+
<Button @click="goHome" size="large" style="width: 200px;" type="text">返回首页</Button>
|
15
|
+
<Button @click="backPage" size="large" style="width: 200px;margin-left: 40px;" type="primary">返回上一页</Button>
|
16
|
+
</div>
|
17
|
+
</Card>
|
18
|
+
</div>
|
19
|
+
</div>
|
20
|
+
</template>
|
21
|
+
|
22
|
+
<script>
|
23
|
+
export default {
|
24
|
+
name: 'Error500',
|
25
|
+
methods: {
|
26
|
+
backPage () {
|
27
|
+
this.$router.go(-1);
|
28
|
+
},
|
29
|
+
goHome () {
|
30
|
+
this.$router.push({
|
31
|
+
name: 'home'
|
32
|
+
});
|
33
|
+
}
|
34
|
+
}
|
35
|
+
};
|
36
|
+
</script>
|
@@ -0,0 +1,22 @@
|
|
1
|
+
.error-page{
|
2
|
+
&-show{
|
3
|
+
width: 100%;
|
4
|
+
height: 180px;
|
5
|
+
transform: scale(0.4);
|
6
|
+
}
|
7
|
+
&-cover{
|
8
|
+
position: absolute;
|
9
|
+
width: 100%;
|
10
|
+
height: 100%;
|
11
|
+
left: 0;
|
12
|
+
top: 0;
|
13
|
+
}
|
14
|
+
&-intro-con{
|
15
|
+
height: 180px;
|
16
|
+
p{
|
17
|
+
display: block;
|
18
|
+
width: 100%;
|
19
|
+
text-align: center;
|
20
|
+
}
|
21
|
+
}
|
22
|
+
}
|
@@ -0,0 +1,97 @@
|
|
1
|
+
<style lang="less" scoped>
|
2
|
+
@import '../../../style/common.less';
|
3
|
+
@import 'index.less';
|
4
|
+
</style>
|
5
|
+
|
6
|
+
<template>
|
7
|
+
<div class="error-page">
|
8
|
+
<Row>
|
9
|
+
<Card>
|
10
|
+
<p slot="title">
|
11
|
+
<Icon :size="14" type="ios-navigate-outline"></Icon>
|
12
|
+
404-页面不存在
|
13
|
+
</p>
|
14
|
+
<Row>
|
15
|
+
<Col span="10">
|
16
|
+
<Card dis-hover>
|
17
|
+
<Row>
|
18
|
+
<div class="error-page-show">
|
19
|
+
<error404></error404>
|
20
|
+
</div>
|
21
|
+
<div class="error-page-cover"></div>
|
22
|
+
</Row>
|
23
|
+
</Card>
|
24
|
+
</Col>
|
25
|
+
<Col span="14" class="padding-left-10">
|
26
|
+
<Row type="flex" align="middle" class="error-page-intro-con">
|
27
|
+
<p>当访问的页面不存在时会跳转到404页面,您可以在浏览器地址栏中修改url为一个不存在的路径,体验一下效果</p>
|
28
|
+
</Row>
|
29
|
+
</Col>
|
30
|
+
</Row>
|
31
|
+
</Card>
|
32
|
+
</Row>
|
33
|
+
<Row class="margin-top-10">
|
34
|
+
<Card>
|
35
|
+
<p slot="title">
|
36
|
+
<Icon :size="14" type="android-lock"></Icon>
|
37
|
+
403-权限不足
|
38
|
+
</p>
|
39
|
+
<Row>
|
40
|
+
<Col span="10">
|
41
|
+
<Card dis-hover>
|
42
|
+
<Row>
|
43
|
+
<div class="error-page-show">
|
44
|
+
<error403></error403>
|
45
|
+
</div>
|
46
|
+
<div class="error-page-cover"></div>
|
47
|
+
</Row>
|
48
|
+
</Card>
|
49
|
+
</Col>
|
50
|
+
<Col span="14" class="padding-left-10">
|
51
|
+
<Row type="flex" align="middle" class="error-page-intro-con">
|
52
|
+
<p>在当前登录用户不具有执行当前操作的权限时跳转到该页面,您可以在ajax请求方法中判断返回的状态码为403时跳转到该页面</p>
|
53
|
+
</Row>
|
54
|
+
</Col>
|
55
|
+
</Row>
|
56
|
+
</Card>
|
57
|
+
</Row>
|
58
|
+
<Row class="margin-top-10">
|
59
|
+
<Card>
|
60
|
+
<p slot="title">
|
61
|
+
<Icon :size="14" type="social-freebsd-devil"></Icon>
|
62
|
+
500-服务端错误
|
63
|
+
</p>
|
64
|
+
<Row>
|
65
|
+
<Col span="10">
|
66
|
+
<Card dis-hover>
|
67
|
+
<Row>
|
68
|
+
<div class="error-page-show">
|
69
|
+
<error500></error500>
|
70
|
+
</div>
|
71
|
+
<div class="error-page-cover"></div>
|
72
|
+
</Row>
|
73
|
+
</Card>
|
74
|
+
</Col>
|
75
|
+
<Col span="14" class="padding-left-10">
|
76
|
+
<Row type="flex" align="middle" class="error-page-intro-con">
|
77
|
+
<p>当请求之后出现服务端错误时跳转到该页面,您可以在ajax请求方法中判断返回的状态码为500时跳转到该页面</p>
|
78
|
+
</Row>
|
79
|
+
</Col>
|
80
|
+
</Row>
|
81
|
+
</Card>
|
82
|
+
</Row>
|
83
|
+
</div>
|
84
|
+
</template>
|
85
|
+
|
86
|
+
<script>
|
87
|
+
import Error404 from '../404.vue';
|
88
|
+
import Error500 from '../500.vue';
|
89
|
+
import Error403 from '../403.vue';
|
90
|
+
export default {
|
91
|
+
components: {
|
92
|
+
Error404,
|
93
|
+
Error500,
|
94
|
+
Error403
|
95
|
+
}
|
96
|
+
};
|
97
|
+
</script>
|