Skip to content

Commit a6a6d24

Browse files
committed
完善 VueRouteAction 组件
1 parent 7931b73 commit a6a6d24

File tree

4 files changed

+39
-9
lines changed

4 files changed

+39
-9
lines changed

public/app.js

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2337,7 +2337,10 @@ __webpack_require__.r(__webpack_exports__);
23372337
},
23382338
methods: {
23392339
onHandle: function onHandle() {
2340-
if (this.action.httpPath) {} else {//this.$router.push(this.path);
2340+
if (this.action.httpPath) {
2341+
window.location.href = this.http_path;
2342+
} else {
2343+
this.$router.push(this.path);
23412344
}
23422345
}
23432346
},
@@ -2353,7 +2356,17 @@ __webpack_require__.r(__webpack_exports__);
23532356

23542357
return path;
23552358
},
2356-
http_path: function http_path() {},
2359+
http_path: function http_path() {
2360+
var _this2 = this;
2361+
2362+
var path = this.action.httpPath;
2363+
2364+
this._.forEach(this.row, function (value, key) {
2365+
path = _this2._.replace(path, "{" + key + "}", value);
2366+
});
2367+
2368+
return path;
2369+
},
23572370
colum: function colum() {
23582371
return this.scope.colum;
23592372
},
@@ -5760,7 +5773,7 @@ exports = module.exports = __webpack_require__(/*! ../../../node_modules/css-loa
57605773

57615774

57625775
// module
5763-
exports.push([module.i, "#app,\nbody,\nhtml {\n height: 100%;\n}\n\nbody {\n background-color: #f7f7f7;\n font-size: 14px;\n}\n\n.ml-2 {\n margin-left: 2px;\n}\n\n.ml-5 {\n margin-left: 5px;\n}\n\n.mr-5 {\n margin-right: 5px;\n}\n\n.mt-5 {\n margin-top: 5px;\n}\n\n.m-10 {\n margin: 10px;\n}\n\n.ml-10 {\n margin-left: 10px;\n}\n\n.mr-10 {\n margin-right: 10px;\n}\n\n.mb-10 {\n margin-bottom: 10px;\n}\n\n.mt-10 {\n margin-top: 10px;\n}\n\n.m-15 {\n margin: 15px;\n}\n\n.mb-15 {\n margin-bottom: 15px;\n}\n\n.ml-20 {\n margin-left: 20px;\n}\n\n.mt-30 {\n margin-top: 30px;\n}\n\n.mt-50 {\n margin-top: 50px;\n}\n\n.fs-12 {\n font-size: 12px;\n}\n\n.fs-14 {\n font-size: 14px;\n}\n\n.fs-16 {\n font-size: 16px;\n}\n\n.fs-18 {\n font-size: 18px;\n}\n\n.fs-20 {\n font-size: 20px;\n}\n\n.fs-22 {\n font-size: 22px;\n}\n\n.fs-24 {\n font-size: 24px;\n}\n\n.fs-25 {\n font-size: 25px;\n}\n\n.hover {\n cursor: pointer;\n}\n\n.flex {\n display: flex;\n flex-wrap: wrap;\n}\n\n.flex-s {\n display: flex;\n align-items: flex-start;\n flex-wrap: wrap;\n}\n\n.flex-c {\n display: flex;\n align-items: center;\n flex-wrap: wrap;\n}\n\n.flex-c-c {\n display: flex;\n align-items: center;\n justify-content: center;\n flex-wrap: wrap;\n}\n\n.flex-c-sb {\n display: flex;\n align-items: center;\n justify-content: space-between;\n flex-wrap: wrap;\n}\n\n.flex-1 {\n flex: 1;\n}\n\n/**********************************/\n.page-account {\n display: flex;\n flex-direction: column;\n height: 100vh;\n overflow: auto;\n}\n\n.el-card {\n border: none;\n}\n\n.el-popconfirm__main {\n margin: 10px 0;\n}\n\n.el-image-viewer__close {\n color: white;\n}\n\n.el-upload-list__item img {\n object-fit: cover;\n}\n\n.el-select-dropdown__item {\n padding: 0 10px;\n}\n\n/*************************************************/\n/*fade*/\n.fade-enter-active,\n.fade-leave-active {\n -webkit-transition: opacity 0.1s;\n transition: opacity 0.1s;\n}\n\n.fade-enter,\n.fade-leave-active {\n opacity: 0;\n}\n\n/*fade-transform*/\n.fade-transform-leave-active,\n.fade-transform-enter-active {\n -webkit-transition: all 0.5s;\n transition: all 0.5s;\n}\n\n.fade-transform-enter {\n opacity: 0;\n -webkit-transform: translateX(-20px);\n transform: translateX(-20px);\n}\n\n.fade-transform-leave-to {\n opacity: 0;\n -webkit-transform: translateX(20px);\n transform: translateX(20px);\n}", ""]);
5776+
exports.push([module.i, "#app,\nbody,\nhtml {\n height: 100%;\n}\n\nbody {\n background-color: #f7f7f7;\n font-size: 14px;\n}\n\n.ml-2 {\n margin-left: 2px;\n}\n\n.ml-5 {\n margin-left: 5px;\n}\n\n.mr-5 {\n margin-right: 5px;\n}\n\n.mt-5 {\n margin-top: 5px;\n}\n\n.m-10 {\n margin: 10px;\n}\n\n.ml-10 {\n margin-left: 10px;\n}\n\n.mr-10 {\n margin-right: 10px;\n}\n\n.mb-10 {\n margin-bottom: 10px;\n}\n\n.mt-10 {\n margin-top: 10px;\n}\n\n.m-15 {\n margin: 15px;\n}\n\n.mb-15 {\n margin-bottom: 15px;\n}\n\n.mt-15 {\n margin-top: 15px;\n}\n\n.ml-20 {\n margin-left: 20px;\n}\n\n.mt-30 {\n margin-top: 30px;\n}\n\n.mt-50 {\n margin-top: 50px;\n}\n\n.fs-12 {\n font-size: 12px;\n}\n\n.fs-14 {\n font-size: 14px;\n}\n\n.fs-16 {\n font-size: 16px;\n}\n\n.fs-18 {\n font-size: 18px;\n}\n\n.fs-20 {\n font-size: 20px;\n}\n\n.fs-22 {\n font-size: 22px;\n}\n\n.fs-24 {\n font-size: 24px;\n}\n\n.fs-25 {\n font-size: 25px;\n}\n\n.hover {\n cursor: pointer;\n}\n\n.flex {\n display: flex;\n flex-wrap: wrap;\n}\n\n.flex-s {\n display: flex;\n align-items: flex-start;\n flex-wrap: wrap;\n}\n\n.flex-c {\n display: flex;\n align-items: center;\n flex-wrap: wrap;\n}\n\n.flex-c-c {\n display: flex;\n align-items: center;\n justify-content: center;\n flex-wrap: wrap;\n}\n\n.flex-c-sb {\n display: flex;\n align-items: center;\n justify-content: space-between;\n flex-wrap: wrap;\n}\n\n.flex-1 {\n flex: 1;\n}\n\n/**********************************/\n.page-account {\n display: flex;\n flex-direction: column;\n height: 100vh;\n overflow: auto;\n}\n\n.el-card {\n border: none;\n}\n\n.el-popconfirm__main {\n margin: 10px 0;\n}\n\n.el-image-viewer__close {\n color: white;\n}\n\n.el-upload-list__item img {\n object-fit: cover;\n}\n\n.el-select-dropdown__item {\n padding: 0 10px;\n}\n\n/*************************************************/\n/*fade*/\n.fade-enter-active,\n.fade-leave-active {\n -webkit-transition: opacity 0.1s;\n transition: opacity 0.1s;\n}\n\n.fade-enter,\n.fade-leave-active {\n opacity: 0;\n}\n\n/*fade-transform*/\n.fade-transform-leave-active,\n.fade-transform-enter-active {\n -webkit-transition: all 0.5s;\n transition: all 0.5s;\n}\n\n.fade-transform-enter {\n opacity: 0;\n -webkit-transform: translateX(-20px);\n transform: translateX(-20px);\n}\n\n.fade-transform-leave-to {\n opacity: 0;\n -webkit-transform: translateX(20px);\n transform: translateX(20px);\n}", ""]);
57645777

57655778
// exports
57665779

public/mix-manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"/app.js": "/app.js?id=1be6ff1deacba4b06103",
2+
"/app.js": "/app.js?id=16f9cb98a45761e057b8",
33
"/manifest.js": "/manifest.js?id=d9708e48a6c10ccee4bb",
44
"/vendor.js": "/vendor.js?id=f4679ac178c0e413cb28"
55
}

resources/js/components/widgets/Actions/VueRouteAction.vue

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,9 @@ export default {
1313
methods: {
1414
onHandle() {
1515
if (this.action.httpPath) {
16+
window.location.href = this.http_path;
1617
} else {
17-
//this.$router.push(this.path);
18+
this.$router.push(this.path);
1819
}
1920
}
2021
},
@@ -26,7 +27,13 @@ export default {
2627
});
2728
return path;
2829
},
29-
http_path() {},
30+
http_path() {
31+
let path = this.action.httpPath;
32+
this._.forEach(this.row, (value, key) => {
33+
path = this._.replace(path, "{" + key + "}", value);
34+
});
35+
return path;
36+
},
3037
colum() {
3138
return this.scope.colum;
3239
},

resources/js/styles/admin.scss

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,15 @@ body {
2020
.mr-5 {
2121
margin-right: 5px;
2222
}
23-
.mt-5{
23+
24+
.mt-5 {
2425
margin-top: 5px;
2526
}
26-
.m-10{
27+
28+
.m-10 {
2729
margin: 10px;
2830
}
31+
2932
.ml-10 {
3033
margin-left: 10px;
3134
}
@@ -42,13 +45,18 @@ body {
4245
margin-top: 10px;
4346
}
4447

45-
.m-15{
48+
.m-15 {
4649
margin: 15px;
4750
}
51+
4852
.mb-15 {
4953
margin-bottom: 15px;
5054
}
5155

56+
.mt-15 {
57+
margin-top: 15px;
58+
}
59+
5260
.ml-20 {
5361
margin-left: 20px;
5462
}
@@ -101,11 +109,13 @@ body {
101109
display: flex;
102110
flex-wrap: wrap;
103111
}
112+
104113
.flex-s {
105114
display: flex;
106115
align-items: flex-start;
107116
flex-wrap: wrap;
108117
}
118+
109119
.flex-c {
110120
display: flex;
111121
align-items: center;

0 commit comments

Comments
 (0)