first commit
This commit is contained in:
1
src/application/.pydio
Normal file
1
src/application/.pydio
Normal file
@@ -0,0 +1 @@
|
||||
55e88823-96b5-4e92-a121-1743226e7284
|
||||
23
src/application/app.tsx
Normal file
23
src/application/app.tsx
Normal file
@@ -0,0 +1,23 @@
|
||||
/*
|
||||
* Copyright (c) 2020. bmy
|
||||
*/
|
||||
|
||||
import "@less/imports.less"
|
||||
import { Component } from 'vue-property-decorator';
|
||||
import { VueCustomize } from "@logic/base.type";
|
||||
|
||||
@Component
|
||||
export default class App extends VueCustomize {
|
||||
protected render () {
|
||||
return (
|
||||
<div id="app">
|
||||
<div id="nav">
|
||||
<router-link to="/Home">Home</router-link>
|
||||
|
|
||||
<router-link to="/About">About</router-link>
|
||||
</div>
|
||||
<router-view/>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
}
|
||||
1
src/application/assets/.pydio
Normal file
1
src/application/assets/.pydio
Normal file
@@ -0,0 +1 @@
|
||||
e9a6fea5-8124-47ee-8764-2a2b38559e29
|
||||
1
src/application/assets/less/.pydio
Normal file
1
src/application/assets/less/.pydio
Normal file
@@ -0,0 +1 @@
|
||||
08d2ddbb-779b-48d9-a2f0-eff54b1a49ba
|
||||
1
src/application/assets/less/common/.pydio
Normal file
1
src/application/assets/less/common/.pydio
Normal file
@@ -0,0 +1 @@
|
||||
984cb101-d8c8-46fc-bdf2-404c29895807
|
||||
463
src/application/assets/less/common/normalize.less
vendored
Normal file
463
src/application/assets/less/common/normalize.less
vendored
Normal file
@@ -0,0 +1,463 @@
|
||||
/*
|
||||
* Copyright (c) 2020. bmy
|
||||
*/
|
||||
|
||||
html, body, #app {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
html {
|
||||
font-family: sans-serif; /* 1 */
|
||||
line-height: 1.15; /* 2 */
|
||||
-ms-text-size-adjust: 100%; /* 3 */
|
||||
-webkit-text-size-adjust: 100%; /* 3 */
|
||||
}
|
||||
|
||||
body {
|
||||
line-height: 1.5;
|
||||
font-size: 16px;
|
||||
width: 100%;
|
||||
-webkit-tap-highlight-color: rgba(0, 0, 0, 0);
|
||||
background-color: #fafafa;
|
||||
color: rgba(0, 0, 0, 0.87);
|
||||
}
|
||||
|
||||
li {
|
||||
list-style: none;
|
||||
}
|
||||
|
||||
article,
|
||||
aside,
|
||||
footer,
|
||||
header,
|
||||
nav,
|
||||
section {
|
||||
display: block;
|
||||
}
|
||||
|
||||
/**
|
||||
* Correct the font size and margin on `h1` elements within `section` and
|
||||
* `article` contexts in Chrome, Firefox, and Safari.
|
||||
*/
|
||||
|
||||
h1 {
|
||||
font-size: 2em;
|
||||
margin: 0.67em 0;
|
||||
}
|
||||
|
||||
/* Grouping content
|
||||
========================================================================== */
|
||||
|
||||
/**
|
||||
* Add the correct display in IE 9-.
|
||||
* 1. Add the correct display in IE.
|
||||
*/
|
||||
|
||||
figcaption,
|
||||
figure,
|
||||
main { /* 1 */
|
||||
display: block;
|
||||
}
|
||||
|
||||
/**
|
||||
* Add the correct margin in IE 8.
|
||||
*/
|
||||
|
||||
figure {
|
||||
margin: 1em 40px;
|
||||
}
|
||||
|
||||
/**
|
||||
* 1. Add the correct box sizing in Firefox.
|
||||
* 2. Show the overflow in Edge and IE.
|
||||
*/
|
||||
|
||||
hr {
|
||||
box-sizing: content-box; /* 1 */
|
||||
height: 0; /* 1 */
|
||||
overflow: visible; /* 2 */
|
||||
}
|
||||
|
||||
/**
|
||||
* 1. Correct the inheritance and scaling of font size in all browsers.
|
||||
* 2. Correct the odd `em` font sizing in all browsers.
|
||||
*/
|
||||
|
||||
pre {
|
||||
font-family: monospace, monospace; /* 1 */
|
||||
font-size: 1em; /* 2 */
|
||||
white-space: pre-wrap;
|
||||
word-break: break-all;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
/* Text-level semantics
|
||||
========================================================================== */
|
||||
|
||||
/**
|
||||
* 1. Remove the gray background on active links in IE 10.
|
||||
* 2. Remove gaps in links underline in iOS 8+ and Safari 8+.
|
||||
*/
|
||||
|
||||
a {
|
||||
text-decoration: none;
|
||||
background-color: transparent; /* 1 */
|
||||
-webkit-text-decoration-skip: objects; /* 2 */
|
||||
user-select: none;
|
||||
-webkit-user-select: none;
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove the outline on focused links when they are also active or hovered
|
||||
* in all browsers (opinionated).
|
||||
*/
|
||||
|
||||
a:active,
|
||||
a:hover {
|
||||
outline-width: 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* 1. Remove the bottom border in Firefox 39-.
|
||||
* 2. Add the correct text decoration in Chrome, Edge, IE, Opera, and Safari.
|
||||
*/
|
||||
|
||||
abbr[title] {
|
||||
border-bottom: none; /* 1 */
|
||||
text-decoration: underline; /* 2 */
|
||||
text-decoration: underline dotted; /* 2 */
|
||||
}
|
||||
|
||||
/**
|
||||
* Prevent the duplicate application of `bolder` by the next rule in Safari 6.
|
||||
*/
|
||||
|
||||
b,
|
||||
strong {
|
||||
font-weight: inherit;
|
||||
}
|
||||
|
||||
/**
|
||||
* Add the correct font weight in Chrome, Edge, and Safari.
|
||||
*/
|
||||
|
||||
b,
|
||||
strong {
|
||||
font-weight: bolder;
|
||||
}
|
||||
|
||||
/**
|
||||
* 1. Correct the inheritance and scaling of font size in all browsers.
|
||||
* 2. Correct the odd `em` font sizing in all browsers.
|
||||
*/
|
||||
|
||||
code,
|
||||
kbd,
|
||||
samp {
|
||||
font-family: monospace, monospace; /* 1 */
|
||||
font-size: 1em; /* 2 */
|
||||
}
|
||||
|
||||
/**
|
||||
* Add the correct font style in Android 4.3-.
|
||||
*/
|
||||
|
||||
dfn {
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
/**
|
||||
* Add the correct background and color in IE 9-.
|
||||
*/
|
||||
|
||||
mark {
|
||||
background-color: #ff0;
|
||||
color: #000;
|
||||
}
|
||||
|
||||
/**
|
||||
* Add the correct font size in all browsers.
|
||||
*/
|
||||
|
||||
small {
|
||||
font-size: 80%;
|
||||
}
|
||||
|
||||
/**
|
||||
* Prevent `sub` and `sup` elements from affecting the line height in
|
||||
* all browsers.
|
||||
*/
|
||||
|
||||
sub,
|
||||
sup {
|
||||
font-size: 75%;
|
||||
line-height: 0;
|
||||
position: relative;
|
||||
vertical-align: baseline;
|
||||
}
|
||||
|
||||
sub {
|
||||
bottom: -0.25em;
|
||||
}
|
||||
|
||||
sup {
|
||||
top: -0.5em;
|
||||
}
|
||||
|
||||
/* Embedded content
|
||||
========================================================================== */
|
||||
|
||||
/**
|
||||
* Add the correct display in IE 9-.
|
||||
*/
|
||||
|
||||
audio,
|
||||
video {
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
/**
|
||||
* Add the correct display in iOS 4-7.
|
||||
*/
|
||||
|
||||
audio:not([controls]) {
|
||||
display: none;
|
||||
height: 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove the border on images inside links in IE 10-.
|
||||
*/
|
||||
|
||||
img {
|
||||
border-style: none;
|
||||
}
|
||||
|
||||
/**
|
||||
* Hide the overflow in IE.
|
||||
*/
|
||||
|
||||
svg:not(:root) {
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
/* Forms
|
||||
========================================================================== */
|
||||
|
||||
/**
|
||||
* 1. Change the font styles in all browsers (opinionated).
|
||||
* 2. Remove the margin in Firefox and Safari.
|
||||
*/
|
||||
|
||||
button,
|
||||
input,
|
||||
optgroup,
|
||||
select,
|
||||
textarea {
|
||||
font-family: sans-serif; /* 1 */
|
||||
font-size: 100%; /* 1 */
|
||||
line-height: 1.15; /* 1 */
|
||||
margin: 0; /* 2 */
|
||||
}
|
||||
|
||||
/**
|
||||
* Show the overflow in IE.
|
||||
* 1. Show the overflow in Edge.
|
||||
*/
|
||||
|
||||
button,
|
||||
input { /* 1 */
|
||||
overflow: visible;
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove the inheritance of text transform in Edge, Firefox, and IE.
|
||||
* 1. Remove the inheritance of text transform in Firefox.
|
||||
*/
|
||||
|
||||
button,
|
||||
select { /* 1 */
|
||||
text-transform: none;
|
||||
}
|
||||
|
||||
/**
|
||||
* 1. Prevent a WebKit bug where (2) destroys native `audio` and `video`
|
||||
* controls in Android 4.
|
||||
* 2. Correct the inability to style clickable types in iOS and Safari.
|
||||
*/
|
||||
|
||||
button,
|
||||
html [type="button"], /* 1 */
|
||||
[type="reset"],
|
||||
[type="submit"] {
|
||||
-webkit-appearance: button; /* 2 */
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove the inner border and padding in Firefox.
|
||||
*/
|
||||
|
||||
button::-moz-focus-inner,
|
||||
[type="button"]::-moz-focus-inner,
|
||||
[type="reset"]::-moz-focus-inner,
|
||||
[type="submit"]::-moz-focus-inner {
|
||||
border-style: none;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* Restore the focus styles unset by the previous rule.
|
||||
*/
|
||||
|
||||
button:-moz-focusring,
|
||||
[type="button"]:-moz-focusring,
|
||||
[type="reset"]:-moz-focusring,
|
||||
[type="submit"]:-moz-focusring {
|
||||
outline: 1px dotted ButtonText;
|
||||
}
|
||||
|
||||
/**
|
||||
* Change the border, margin, and padding in all browsers (opinionated).
|
||||
*/
|
||||
|
||||
fieldset {
|
||||
border: 1px solid #c0c0c0;
|
||||
margin: 0 2px;
|
||||
padding: 0.35em 0.625em 0.75em;
|
||||
}
|
||||
|
||||
/**
|
||||
* 1. Correct the text wrapping in Edge and IE.
|
||||
* 2. Correct the color inheritance from `fieldset` elements in IE.
|
||||
* 3. Remove the padding so developers are not caught out when they zero out
|
||||
* `fieldset` elements in all browsers.
|
||||
*/
|
||||
|
||||
legend {
|
||||
box-sizing: border-box; /* 1 */
|
||||
color: inherit; /* 2 */
|
||||
display: table; /* 1 */
|
||||
max-width: 100%; /* 1 */
|
||||
padding: 0; /* 3 */
|
||||
white-space: normal; /* 1 */
|
||||
}
|
||||
|
||||
/**
|
||||
* 1. Add the correct display in IE 9-.
|
||||
* 2. Add the correct vertical alignment in Chrome, Firefox, and Opera.
|
||||
*/
|
||||
|
||||
progress {
|
||||
display: inline-block; /* 1 */
|
||||
vertical-align: baseline; /* 2 */
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove the default vertical scrollbar in IE.
|
||||
*/
|
||||
|
||||
textarea {
|
||||
overflow: auto;
|
||||
resize: vertical;
|
||||
}
|
||||
|
||||
/**
|
||||
* 1. Add the correct box sizing in IE 10-.
|
||||
* 2. Remove the padding in IE 10-.
|
||||
*/
|
||||
|
||||
[type="checkbox"],
|
||||
[type="radio"] {
|
||||
box-sizing: border-box; /* 1 */
|
||||
padding: 0; /* 2 */
|
||||
}
|
||||
|
||||
/**
|
||||
* Correct the cursor style of increment and decrement buttons in Chrome.
|
||||
*/
|
||||
|
||||
[type="number"]::-webkit-inner-spin-button,
|
||||
[type="number"]::-webkit-outer-spin-button {
|
||||
height: auto;
|
||||
}
|
||||
|
||||
/**
|
||||
* 1. Correct the odd appearance in Chrome and Safari.
|
||||
* 2. Correct the outline style in Safari.
|
||||
*/
|
||||
|
||||
[type="search"] {
|
||||
-webkit-appearance: textfield; /* 1 */
|
||||
outline-offset: -2px; /* 2 */
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove the inner padding and cancel buttons in Chrome and Safari on macOS.
|
||||
*/
|
||||
|
||||
[type="search"]::-webkit-search-cancel-button,
|
||||
[type="search"]::-webkit-search-decoration {
|
||||
-webkit-appearance: none;
|
||||
}
|
||||
|
||||
/**
|
||||
* 1. Correct the inability to style clickable types in iOS and Safari.
|
||||
* 2. Change font properties to `inherit` in Safari.
|
||||
*/
|
||||
|
||||
::-webkit-file-upload-button {
|
||||
-webkit-appearance: button; /* 1 */
|
||||
font: inherit; /* 2 */
|
||||
}
|
||||
|
||||
/* Interactive
|
||||
========================================================================== */
|
||||
|
||||
/*
|
||||
* Add the correct display in IE 9-.
|
||||
* 1. Add the correct display in Edge, IE, and Firefox.
|
||||
*/
|
||||
|
||||
details, /* 1 */
|
||||
menu {
|
||||
display: block;
|
||||
}
|
||||
|
||||
/*
|
||||
* Add the correct display in all browsers.
|
||||
*/
|
||||
|
||||
summary {
|
||||
display: list-item;
|
||||
}
|
||||
|
||||
/* Scripting
|
||||
========================================================================== */
|
||||
|
||||
/**
|
||||
* Add the correct display in IE 9-.
|
||||
*/
|
||||
|
||||
canvas {
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
/**
|
||||
* Add the correct display in IE.
|
||||
*/
|
||||
|
||||
template {
|
||||
display: none;
|
||||
}
|
||||
|
||||
/* Hidden
|
||||
========================================================================== */
|
||||
|
||||
/**
|
||||
* Add the correct display in IE 10-.
|
||||
*/
|
||||
|
||||
[hidden] {
|
||||
display: none;
|
||||
}
|
||||
8
src/application/assets/less/common/resetUi.less
Normal file
8
src/application/assets/less/common/resetUi.less
Normal file
@@ -0,0 +1,8 @@
|
||||
/*
|
||||
* Copyright (c) 2020. bmy
|
||||
*/
|
||||
|
||||
// 重置ui框架css
|
||||
.el-button {
|
||||
width: 300px;
|
||||
}
|
||||
1
src/application/assets/less/components/.pydio
Normal file
1
src/application/assets/less/components/.pydio
Normal file
@@ -0,0 +1 @@
|
||||
29ff899f-7099-4b35-97d9-7eb12e8b1b67
|
||||
6
src/application/assets/less/imports.less
Normal file
6
src/application/assets/less/imports.less
Normal file
@@ -0,0 +1,6 @@
|
||||
/*
|
||||
* Copyright (c) 2020. bmy
|
||||
*/
|
||||
// 公共css
|
||||
@import "./common/normalize";
|
||||
@import "./common/resetUi";
|
||||
1
src/application/assets/less/mixin/.pydio
Normal file
1
src/application/assets/less/mixin/.pydio
Normal file
@@ -0,0 +1 @@
|
||||
e36141e2-2743-4aa7-89cf-e34088c48df2
|
||||
3
src/application/assets/less/mixin/_.less
Normal file
3
src/application/assets/less/mixin/_.less
Normal file
@@ -0,0 +1,3 @@
|
||||
|
||||
@import "./color.less";
|
||||
@import "./index.less";
|
||||
313
src/application/assets/less/mixin/color.less
Normal file
313
src/application/assets/less/mixin/color.less
Normal file
@@ -0,0 +1,313 @@
|
||||
/*
|
||||
* Copyright (c) 2020. bmy
|
||||
*/
|
||||
|
||||
// 公共css样式,可以在 页面组件中直接使用变量名称
|
||||
// 具体看 components/home.styl
|
||||
@theme-color: red;
|
||||
@test-color: yellow;
|
||||
|
||||
@red50: #ffebee;
|
||||
@red100: #ffcdd2;
|
||||
@red200: #ef9a9a;
|
||||
@red300: #e57373;
|
||||
@red400: #ef5350;
|
||||
@red500: #f44336;
|
||||
@red600: #e53935;
|
||||
@red700: #d32f2f;
|
||||
@red800: #c62828;
|
||||
@red900: #b71c1c;
|
||||
@redA100: #ff8a80;
|
||||
@redA200: #ff5252;
|
||||
@redA400: #ff1744;
|
||||
@redA700: #d50000;
|
||||
@red: @red500;
|
||||
|
||||
@pink50: #fce4ec;
|
||||
@pink100: #f8bbd0;
|
||||
@pink200: #f48fb1;
|
||||
@pink300: #f06292;
|
||||
@pink400: #ec407a;
|
||||
@pink500: #e91e63;
|
||||
@pink600: #d81b60;
|
||||
@pink700: #c2185b;
|
||||
@pink800: #ad1457;
|
||||
@pink900: #880e4f;
|
||||
@pinkA100: #ff80ab;
|
||||
@pinkA200: #ff4081;
|
||||
@pinkA400: #f50057;
|
||||
@pinkA700: #c51162;
|
||||
@pink: @pink500;
|
||||
|
||||
@purple50: #f3e5f5;
|
||||
@purple100: #e1bee7;
|
||||
@purple200: #ce93d8;
|
||||
@purple300: #ba68c8;
|
||||
@purple400: #ab47bc;
|
||||
@purple500: #9c27b0;
|
||||
@purple600: #8e24aa;
|
||||
@purple700: #7b1fa2;
|
||||
@purple800: #6a1b9a;
|
||||
@purple900: #4a148c;
|
||||
@purpleA100: #ea80fc;
|
||||
@purpleA200: #e040fb;
|
||||
@purpleA400: #d500f9;
|
||||
@purpleA700: #aa00ff;
|
||||
@purple: @purple500;
|
||||
|
||||
@deepPurple50: #ede7f6;
|
||||
@deepPurple100: #d1c4e9;
|
||||
@deepPurple200: #b39ddb;
|
||||
@deepPurple300: #9575cd;
|
||||
@deepPurple400: #7e57c2;
|
||||
@deepPurple500: #673ab7;
|
||||
@deepPurple600: #5e35b1;
|
||||
@deepPurple700: #512da8;
|
||||
@deepPurple800: #4527a0;
|
||||
@deepPurple900: #311b92;
|
||||
@deepPurpleA100: #b388ff;
|
||||
@deepPurpleA200: #7c4dff;
|
||||
@deepPurpleA400: #651fff;
|
||||
@deepPurpleA700: #6200ea;
|
||||
@deepPurple: @deepPurple500;
|
||||
|
||||
@indigo50: #e8eaf6;
|
||||
@indigo100: #c5cae9;
|
||||
@indigo200: #9fa8da;
|
||||
@indigo300: #7986cb;
|
||||
@indigo400: #5c6bc0;
|
||||
@indigo500: #3f51b5;
|
||||
@indigo600: #3949ab;
|
||||
@indigo700: #303f9f;
|
||||
@indigo800: #283593;
|
||||
@indigo900: #1a237e;
|
||||
@indigoA100: #8c9eff;
|
||||
@indigoA200: #536dfe;
|
||||
@indigoA400: #3d5afe;
|
||||
@indigoA700: #304ffe;
|
||||
@indigo: @indigo500;
|
||||
|
||||
@blue50: #e3f2fd;
|
||||
@blue100: #bbdefb;
|
||||
@blue200: #90caf9;
|
||||
@blue300: #64b5f6;
|
||||
@blue400: #42a5f5;
|
||||
@blue500: #2196f3;
|
||||
@blue600: #1e88e5;
|
||||
@blue700: #1976d2;
|
||||
@blue800: #1565c0;
|
||||
@blue900: #0d47a1;
|
||||
@blueA100: #82b1ff;
|
||||
@blueA200: #448aff;
|
||||
@blueA400: #2979ff;
|
||||
@blueA700: #2962ff;
|
||||
@blue: @blue500;
|
||||
|
||||
@lightBlue50: #e1f5fe;
|
||||
@lightBlue100: #b3e5fc;
|
||||
@lightBlue200: #81d4fa;
|
||||
@lightBlue300: #4fc3f7;
|
||||
@lightBlue400: #29b6f6;
|
||||
@lightBlue500: #03a9f4;
|
||||
@lightBlue600: #039be5;
|
||||
@lightBlue700: #0288d1;
|
||||
@lightBlue800: #0277bd;
|
||||
@lightBlue900: #01579b;
|
||||
@lightBlueA100: #80d8ff;
|
||||
@lightBlueA200: #40c4ff;
|
||||
@lightBlueA400: #00b0ff;
|
||||
@lightBlueA700: #0091ea;
|
||||
@lightBlue: @lightBlue500;
|
||||
|
||||
@cyan50: #e0f7fa;
|
||||
@cyan100: #b2ebf2;
|
||||
@cyan200: #80deea;
|
||||
@cyan300: #4dd0e1;
|
||||
@cyan400: #26c6da;
|
||||
@cyan500: #00bcd4;
|
||||
@cyan600: #00acc1;
|
||||
@cyan700: #0097a7;
|
||||
@cyan800: #00838f;
|
||||
@cyan900: #006064;
|
||||
@cyanA100: #84ffff;
|
||||
@cyanA200: #18ffff;
|
||||
@cyanA400: #00e5ff;
|
||||
@cyanA700: #00b8d4;
|
||||
@cyan: @cyan500;
|
||||
|
||||
@teal50: #e0f2f1;
|
||||
@teal100: #b2dfdb;
|
||||
@teal200: #80cbc4;
|
||||
@teal300: #4db6ac;
|
||||
@teal400: #26a69a;
|
||||
@teal500: #009688;
|
||||
@teal600: #00897b;
|
||||
@teal700: #00796b;
|
||||
@teal800: #00695c;
|
||||
@teal900: #004d40;
|
||||
@tealA100: #a7ffeb;
|
||||
@tealA200: #64ffda;
|
||||
@tealA400: #1de9b6;
|
||||
@tealA700: #00bfa5;
|
||||
@teal: @teal500;
|
||||
|
||||
@green50: #e8f5e9;
|
||||
@green100: #c8e6c9;
|
||||
@green200: #a5d6a7;
|
||||
@green300: #81c784;
|
||||
@green400: #66bb6a;
|
||||
@green500: #4caf50;
|
||||
@green600: #43a047;
|
||||
@green700: #388e3c;
|
||||
@green800: #2e7d32;
|
||||
@green900: #1b5e20;
|
||||
@greenA100: #b9f6ca;
|
||||
@greenA200: #69f0ae;
|
||||
@greenA400: #00e676;
|
||||
@greenA700: #00c853;
|
||||
@green: @green500;
|
||||
|
||||
@lightGreen50: #f1f8e9;
|
||||
@lightGreen100: #dcedc8;
|
||||
@lightGreen200: #c5e1a5;
|
||||
@lightGreen300: #aed581;
|
||||
@lightGreen400: #9ccc65;
|
||||
@lightGreen500: #8bc34a;
|
||||
@lightGreen600: #7cb342;
|
||||
@lightGreen700: #689f38;
|
||||
@lightGreen800: #558b2f;
|
||||
@lightGreen900: #33691e;
|
||||
@lightGreenA100: #ccff90;
|
||||
@lightGreenA200: #b2ff59;
|
||||
@lightGreenA400: #76ff03;
|
||||
@lightGreenA700: #64dd17;
|
||||
@lightGreen: @lightGreen500;
|
||||
|
||||
@lime50: #f9fbe7;
|
||||
@lime100: #f0f4c3;
|
||||
@lime200: #e6ee9c;
|
||||
@lime300: #dce775;
|
||||
@lime400: #d4e157;
|
||||
@lime500: #cddc39;
|
||||
@lime600: #c0ca33;
|
||||
@lime700: #afb42b;
|
||||
@lime800: #9e9d24;
|
||||
@lime900: #827717;
|
||||
@limeA100: #f4ff81;
|
||||
@limeA200: #eeff41;
|
||||
@limeA400: #c6ff00;
|
||||
@limeA700: #aeea00;
|
||||
@lime: @lime500;
|
||||
|
||||
@yellow50: #fffde7;
|
||||
@yellow100: #fff9c4;
|
||||
@yellow200: #fff59d;
|
||||
@yellow300: #fff176;
|
||||
@yellow400: #ffee58;
|
||||
@yellow500: #ffeb3b;
|
||||
@yellow600: #fdd835;
|
||||
@yellow700: #fbc02d;
|
||||
@yellow800: #f9a825;
|
||||
@yellow900: #f57f17;
|
||||
@yellowA100: #ffff8d;
|
||||
@yellowA200: #ffff00;
|
||||
@yellowA400: #ffea00;
|
||||
@yellowA700: #ffd600;
|
||||
@yellow: @yellow500;
|
||||
|
||||
@amber50: #fff8e1;
|
||||
@amber100: #ffecb3;
|
||||
@amber200: #ffe082;
|
||||
@amber300: #ffd54f;
|
||||
@amber400: #ffca28;
|
||||
@amber500: #ffc107;
|
||||
@amber600: #ffb300;
|
||||
@amber700: #ffa000;
|
||||
@amber800: #ff8f00;
|
||||
@amber900: #ff6f00;
|
||||
@amberA100: #ffe57f;
|
||||
@amberA200: #ffd740;
|
||||
@amberA400: #ffc400;
|
||||
@amberA700: #ffab00;
|
||||
@amber: @amber500;
|
||||
|
||||
@orange50: #fff3e0;
|
||||
@orange100: #ffe0b2;
|
||||
@orange200: #ffcc80;
|
||||
@orange300: #ffb74d;
|
||||
@orange400: #ffa726;
|
||||
@orange500: #ff9800;
|
||||
@orange600: #fb8c00;
|
||||
@orange700: #f57c00;
|
||||
@orange800: #ef6c00;
|
||||
@orange900: #e65100;
|
||||
@orangeA100: #ffd180;
|
||||
@orangeA200: #ffab40;
|
||||
@orangeA400: #ff9100;
|
||||
@orangeA700: #ff6d00;
|
||||
@orange: @orange500;
|
||||
|
||||
@deepOrange50: #fbe9e7;
|
||||
@deepOrange100: #ffccbc;
|
||||
@deepOrange200: #ffab91;
|
||||
@deepOrange300: #ff8a65;
|
||||
@deepOrange400: #ff7043;
|
||||
@deepOrange500: #ff5722;
|
||||
@deepOrange600: #f4511e;
|
||||
@deepOrange700: #e64a19;
|
||||
@deepOrange800: #d84315;
|
||||
@deepOrange900: #bf360c;
|
||||
@deepOrangeA100: #ff9e80;
|
||||
@deepOrangeA200: #ff6e40;
|
||||
@deepOrangeA400: #ff3d00;
|
||||
@deepOrangeA700: #dd2c00;
|
||||
@deepOrange: @deepOrange500;
|
||||
|
||||
@brown50: #efebe9;
|
||||
@brown100: #d7ccc8;
|
||||
@brown200: #bcaaa4;
|
||||
@brown300: #a1887f;
|
||||
@brown400: #8d6e63;
|
||||
@brown500: #795548;
|
||||
@brown600: #6d4c41;
|
||||
@brown700: #5d4037;
|
||||
@brown800: #4e342e;
|
||||
@brown900: #3e2723;
|
||||
@brown: @brown500;
|
||||
|
||||
@blueGrey50: #eceff1;
|
||||
@blueGrey100: #cfd8dc;
|
||||
@blueGrey200: #b0bec5;
|
||||
@blueGrey300: #90a4ae;
|
||||
@blueGrey400: #78909c;
|
||||
@blueGrey500: #607d8b;
|
||||
@blueGrey600: #546e7a;
|
||||
@blueGrey700: #455a64;
|
||||
@blueGrey800: #37474f;
|
||||
@blueGrey900: #263238;
|
||||
@blueGrey: @blueGrey500;
|
||||
|
||||
@grey50: #fafafa;
|
||||
@grey100: #f5f5f5;
|
||||
@grey200: #eeeeee;
|
||||
@grey300: #e0e0e0;
|
||||
@grey400: #bdbdbd;
|
||||
@grey500: #9e9e9e;
|
||||
@grey600: #757575;
|
||||
@grey700: #616161;
|
||||
@grey800: #424242;
|
||||
@grey900: #212121;
|
||||
@grey: @grey500;
|
||||
|
||||
@black: #000000;
|
||||
@white: #ffffff;
|
||||
|
||||
@transparent: rgba(0, 0, 0, 0);
|
||||
@fullBlack: rgba(0, 0, 0, 1);
|
||||
@darkBlack: rgba(0, 0, 0, 0.87);
|
||||
@lightBlack: rgba(0, 0, 0, 0.54);
|
||||
@minBlack: rgba(0, 0, 0, 0.26);
|
||||
@faintBlack: rgba(0, 0, 0, 0.12);
|
||||
@fullWhite: rgba(255, 255, 255, 1);
|
||||
@darkWhite: rgba(255, 255, 255, 0.87);
|
||||
@lightWhite: rgba(255, 255, 255, 0.54);
|
||||
297
src/application/assets/less/mixin/index.less
Normal file
297
src/application/assets/less/mixin/index.less
Normal file
@@ -0,0 +1,297 @@
|
||||
/*
|
||||
* Copyright (c) 2020. bmy
|
||||
*/
|
||||
|
||||
.clearfix() {
|
||||
&:after,
|
||||
&:before {
|
||||
content: " ";
|
||||
display: table;
|
||||
}
|
||||
&:after {
|
||||
clear: both;
|
||||
}
|
||||
}
|
||||
|
||||
.hairline(@position, @color) when (@position = top) {
|
||||
&:before {
|
||||
content: '';
|
||||
position: absolute;
|
||||
left: 0;
|
||||
top: 0;
|
||||
bottom: auto;
|
||||
right: auto;
|
||||
height: 1px;
|
||||
width: 100%;
|
||||
background-color: @color;
|
||||
display: block;
|
||||
z-index: 15;
|
||||
// .transform-origin(50% 0%);
|
||||
html.pixel-ratio-2 & {
|
||||
.transform(scaleY(0.5));
|
||||
}
|
||||
|
||||
html.pixel-ratio-3 & {
|
||||
.transform(scaleY(0.33));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.hairline(@position, @color) when (@position = left) {
|
||||
&:before {
|
||||
content: '';
|
||||
position: absolute;
|
||||
left: 0;
|
||||
top: 0;
|
||||
bottom: auto;
|
||||
right: auto;
|
||||
width: 1px;
|
||||
height: 100%;
|
||||
background-color: @color;
|
||||
display: block;
|
||||
z-index: 15;
|
||||
// .transform-origin(0% 50%);
|
||||
html.pixel-ratio-2 & {
|
||||
.transform(scaleX(0.5));
|
||||
}
|
||||
|
||||
html.pixel-ratio-3 & {
|
||||
.transform(scaleX(0.33));
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
.hairline(@position, @color) when (@position = bottom) {
|
||||
&:after {
|
||||
content: '';
|
||||
position: absolute;
|
||||
left: 0;
|
||||
bottom: 0;
|
||||
right: auto;
|
||||
top: auto;
|
||||
height: 1px;
|
||||
width: 100%;
|
||||
background-color: @color;
|
||||
display: block;
|
||||
z-index: 15;
|
||||
|
||||
html.pixel-ratio-2 & {
|
||||
.transform(scaleY(0.5));
|
||||
}
|
||||
|
||||
html.pixel-ratio-3 & {
|
||||
.transform(scaleY(0.33));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.hairline(@position, @color) when (@position = right) {
|
||||
&:after {
|
||||
content: '';
|
||||
position: absolute;
|
||||
right: 0;
|
||||
top: 0;
|
||||
left: auto;
|
||||
bottom: auto;
|
||||
width: 1px;
|
||||
height: 100%;
|
||||
background-color: @color;
|
||||
display: block;
|
||||
z-index: 15;
|
||||
// .transform-origin(100% 50%);
|
||||
html.pixel-ratio-2 & {
|
||||
.transform(scaleX(0.5));
|
||||
}
|
||||
|
||||
html.pixel-ratio-3 & {
|
||||
.transform(scaleX(0.33));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// For right and bottom
|
||||
.hairline-remove(@position) when not (@position = left) and not (@position = top) {
|
||||
&:after {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
|
||||
// For left and top
|
||||
.hairline-remove(@position) when not (@position = right) and not (@position = bottom) {
|
||||
&:before {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
|
||||
// For right and bottom
|
||||
.hairline-color(@position, @color) when not (@position = left) and not (@position = top) {
|
||||
&:after {
|
||||
background-color: @color;
|
||||
}
|
||||
}
|
||||
|
||||
// For left and top
|
||||
.hairline-color(@position, @color) when not (@position = right) and not (@position = bottom) {
|
||||
&:before {
|
||||
background-color: @color;
|
||||
}
|
||||
}
|
||||
|
||||
// Encoded SVG Background
|
||||
.encoded-svg-background(@svg) {
|
||||
@url: `encodeURIComponent(@{svg})`;
|
||||
background-image: url("data:image/svg+xml;charset=utf-8,@{url}");
|
||||
}
|
||||
|
||||
// Preserve3D
|
||||
.preserve3d() {
|
||||
-webkit-transform-style: preserve-3d;
|
||||
-moz-transform-style: preserve-3d;
|
||||
-ms-transform-style: preserve-3d;
|
||||
transform-style: preserve-3d;
|
||||
}
|
||||
|
||||
// Shadow
|
||||
.depth(@level:1) {
|
||||
& when (@level = 0) {
|
||||
box-shadow: none;
|
||||
}
|
||||
& when (@level = 1) {
|
||||
box-shadow: 0 2px 1px -1px rgba(0, 0, 0, .2), 0 1px 1px 0 rgba(0, 0, 0, .14), 0 1px 3px 0 rgba(0, 0, 0, .12);
|
||||
}
|
||||
& when (@level = 2) {
|
||||
box-shadow: 0 3px 1px -2px rgba(0, 0, 0, .2), 0 2px 2px 0 rgba(0, 0, 0, .14), 0 1px 5px 0 rgba(0, 0, 0, .12);
|
||||
}
|
||||
& when (@level = 3) {
|
||||
box-shadow: 0 3px 3px -2px rgba(0, 0, 0, .2), 0 3px 4px 0 rgba(0, 0, 0, .14), 0 1px 8px 0 rgba(0, 0, 0, .12);
|
||||
}
|
||||
& when (@level = 4) {
|
||||
box-shadow: 0 2px 4px -1px rgba(0, 0, 0, .2), 0 4px 5px 0 rgba(0, 0, 0, .14), 0 1px 10px 0 rgba(0, 0, 0, .12);
|
||||
}
|
||||
& when (@level = 5) {
|
||||
box-shadow: 0 3px 5px -1px rgba(0, 0, 0, .2), 0 5px 8px 0 rgba(0, 0, 0, .14), 0 1px 14px 0 rgba(0, 0, 0, .12);
|
||||
}
|
||||
& when (@level = 6) {
|
||||
box-shadow: 0 3px 5px -1px rgba(0, 0, 0, .2), 0 6px 10px 0 rgba(0, 0, 0, .14), 0 1px 18px 0 rgba(0, 0, 0, .12);
|
||||
}
|
||||
& when (@level = 7) {
|
||||
box-shadow: 0 4px 5px -2px rgba(0, 0, 0, .2), 0 7px 10px 1px rgba(0, 0, 0, .14), 0 2px 16px 1px rgba(0, 0, 0, .12);
|
||||
}
|
||||
& when (@level = 8) {
|
||||
box-shadow: 0 5px 5px -3px rgba(0, 0, 0, .2), 0 8px 10px 1px rgba(0, 0, 0, .14), 0 3px 14px 2px rgba(0, 0, 0, .12);
|
||||
}
|
||||
& when (@level = 9) {
|
||||
box-shadow: 0 5px 6px -3px rgba(0, 0, 0, .2), 0 9px 12px 1px rgba(0, 0, 0, .14), 0 3px 16px 2px rgba(0, 0, 0, .12);
|
||||
}
|
||||
& when (@level = 10) {
|
||||
box-shadow: 0 6px 6px -3px rgba(0, 0, 0, .2), 0 10px 14px 1px rgba(0, 0, 0, .14), 0 4px 18px 3px rgba(0, 0, 0, .12);
|
||||
}
|
||||
& when (@level = 11) {
|
||||
box-shadow: 0 6px 7px -4px rgba(0, 0, 0, .2), 0 11px 15px 1px rgba(0, 0, 0, .14), 0 4px 20px 3px rgba(0, 0, 0, .12);
|
||||
}
|
||||
& when (@level = 12) {
|
||||
box-shadow: 0 7px 8px -4px rgba(0, 0, 0, .2), 0 12px 17px 2px rgba(0, 0, 0, .14), 0 5px 22px 4px rgba(0, 0, 0, .12);
|
||||
}
|
||||
& when (@level = 13) {
|
||||
box-shadow: 0 7px 8px -4px rgba(0, 0, 0, .2), 0 13px 19px 2px rgba(0, 0, 0, .14), 0 5px 24px 4px rgba(0, 0, 0, .12);
|
||||
}
|
||||
& when (@level = 14) {
|
||||
box-shadow: 0 7px 9px -4px rgba(0, 0, 0, .2), 0 14px 21px 2px rgba(0, 0, 0, .14), 0 5px 26px 4px rgba(0, 0, 0, .12);
|
||||
}
|
||||
& when (@level = 15) {
|
||||
box-shadow: 0 8px 9px -5px rgba(0, 0, 0, .2), 0 15px 22px 2px rgba(0, 0, 0, .14), 0 6px 28px 5px rgba(0, 0, 0, .12);
|
||||
}
|
||||
& when (@level = 16) {
|
||||
box-shadow: 0 8px 10px -5px rgba(0, 0, 0, .2), 0 16px 24px 2px rgba(0, 0, 0, .14), 0 6px 30px 5px rgba(0, 0, 0, .12);
|
||||
}
|
||||
& when (@level = 17) {
|
||||
box-shadow: 0 8px 11px -5px rgba(0, 0, 0, .2), 0 17px 26px 2px rgba(0, 0, 0, .14), 0 6px 32px 5px rgba(0, 0, 0, .12);
|
||||
}
|
||||
& when (@level = 18) {
|
||||
box-shadow: 0 9px 11px -5px rgba(0, 0, 0, .2), 0 18px 28px 2px rgba(0, 0, 0, .14), 0 7px 34px 6px rgba(0, 0, 0, .12);
|
||||
}
|
||||
& when (@level = 19) {
|
||||
box-shadow: 0 9px 12px -6px rgba(0, 0, 0, .2), 0 19px 29px 2px rgba(0, 0, 0, .14), 0 7px 36px 6px rgba(0, 0, 0, .12);
|
||||
}
|
||||
& when (@level = 20) {
|
||||
box-shadow: 0 10px 13px -6px rgba(0, 0, 0, .2), 0 20px 31px 3px rgba(0, 0, 0, .14), 0 8px 38px 7px rgba(0, 0, 0, .12);
|
||||
}
|
||||
& when (@level = 21) {
|
||||
box-shadow: 0 10px 13px -6px rgba(0, 0, 0, .2), 0 21px 33px 3px rgba(0, 0, 0, .14), 0 8px 40px 7px rgba(0, 0, 0, .12);
|
||||
}
|
||||
& when (@level = 22) {
|
||||
box-shadow: 0 10px 14px -6px rgba(0, 0, 0, .2), 0 22px 35px 3px rgba(0, 0, 0, .14), 0 8px 42px 7px rgba(0, 0, 0, .12);
|
||||
}
|
||||
& when (@level = 23) {
|
||||
box-shadow: 0 11px 14px -7px rgba(0, 0, 0, .2), 0 23px 36px 3px rgba(0, 0, 0, .14), 0 9px 44px 8px rgba(0, 0, 0, .12);
|
||||
}
|
||||
& when (@level = 24) {
|
||||
box-shadow: 0 11px 15px -7px rgba(0, 0, 0, .2), 0 24px 38px 3px rgba(0, 0, 0, .14), 0 9px 46px 8px rgba(0, 0, 0, .12);
|
||||
}
|
||||
// & when (@level = 1) {
|
||||
// box-shadow: rgba(0, 0, 0, 0.117647) 0px 1px 6px, rgba(0, 0, 0, 0.117647) 0px 1px 4px;
|
||||
// }
|
||||
// & when (@level = 2) {
|
||||
// box-shadow: rgba(0, 0, 0, 0.156863) 0px 3px 10px, rgba(0, 0, 0, 0.227451) 0px 3px 10px;
|
||||
// }
|
||||
// & when (@level = 3) {
|
||||
// box-shadow: rgba(0, 0, 0, 0.188235) 0px 10px 30px, rgba(0, 0, 0, 0.227451) 0px 6px 10px;
|
||||
// }
|
||||
// & when (@level = 4) {
|
||||
// box-shadow: rgba(0, 0, 0, 0.247059) 0px 14px 45px, rgba(0, 0, 0, 0.219608) 0px 10px 18px;
|
||||
// }
|
||||
// & when (@level = 5) {
|
||||
// box-shadow: rgba(0, 0, 0, 0.298039) 0px 19px 60px, rgba(0, 0, 0, 0.219608) 0px 15px 20px;
|
||||
// }
|
||||
}
|
||||
|
||||
// Highlighted Links
|
||||
.active-highlight(@color:rgba(255, 255, 255, 0.15)) {
|
||||
&:before {
|
||||
content: '';
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
position: absolute;
|
||||
left: 0;
|
||||
top: 0;
|
||||
background-color: @color;
|
||||
background-repeat: no-repeat;
|
||||
background-position: center;
|
||||
background-size: 100% 100%;
|
||||
opacity: 0;
|
||||
pointer-events: none;
|
||||
.transition(600ms);
|
||||
}
|
||||
&.active-state:before,
|
||||
html:not(.watch-active-state) &:active:before {
|
||||
opacity: 1;
|
||||
.transition(150ms);
|
||||
}
|
||||
}
|
||||
|
||||
.active-highlight-color(@color) {
|
||||
&:before {
|
||||
background-image: -webkit-radial-gradient(center, circle cover, @color 66%, rgba(red(@color), green(@color), blue(@color), 0) 66%);
|
||||
background-image: radial-gradient(circle at center, @color 66%, rgba(red(@color), green(@color), blue(@color), 0) 66%);
|
||||
}
|
||||
}
|
||||
|
||||
// No Scrollbar
|
||||
.no-scrollbar() {
|
||||
&::-webkit-scrollbar {
|
||||
display: none !important;
|
||||
width: 0 !important;
|
||||
height: 0 !important;
|
||||
-webkit-appearance: none;
|
||||
opacity: 0 !important;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
.ellipsis() {
|
||||
white-space: nowrap;
|
||||
text-overflow: ellipsis;
|
||||
overflow: hidden;
|
||||
word-wrap: break-word;
|
||||
}
|
||||
1
src/application/assets/less/page/.pydio
Normal file
1
src/application/assets/less/page/.pydio
Normal file
@@ -0,0 +1 @@
|
||||
88b35c97-9424-4ba5-a009-00ba813fb0fa
|
||||
8
src/application/assets/less/page/About.less
Normal file
8
src/application/assets/less/page/About.less
Normal file
@@ -0,0 +1,8 @@
|
||||
/*
|
||||
* Copyright (c) 2020. bmy
|
||||
*/
|
||||
|
||||
@import "../mixin/_";
|
||||
|
||||
.About {
|
||||
}
|
||||
11
src/application/assets/less/page/Home.less
Normal file
11
src/application/assets/less/page/Home.less
Normal file
@@ -0,0 +1,11 @@
|
||||
/*
|
||||
* Copyright (c) 2020. bmy
|
||||
*/
|
||||
|
||||
@import "../mixin/_";
|
||||
|
||||
.home {
|
||||
h1 {
|
||||
color: @theme-color;
|
||||
}
|
||||
}
|
||||
1
src/application/components/.pydio
Normal file
1
src/application/components/.pydio
Normal file
@@ -0,0 +1 @@
|
||||
50ce6829-d7b9-49e3-91b2-ead60352a710
|
||||
27
src/application/components/HelloWorld.tsx
Normal file
27
src/application/components/HelloWorld.tsx
Normal file
@@ -0,0 +1,27 @@
|
||||
/*
|
||||
* Copyright (c) 2020. bmy
|
||||
*/
|
||||
|
||||
import { Component, Prop, Vue } from 'vue-property-decorator';
|
||||
|
||||
@Component
|
||||
export default class HelloWorld extends Vue {
|
||||
|
||||
@Prop({ default: 'default value' }) public readonly msg!: string;
|
||||
|
||||
private mounted () {
|
||||
}
|
||||
|
||||
private showAlert () {
|
||||
alert("showAlert")
|
||||
}
|
||||
|
||||
private render () {
|
||||
return (
|
||||
<div class="hello">
|
||||
<h1>{ this.msg }</h1>
|
||||
<h2 onClick={ () => this.showAlert() }>HelloWorld组件点击事件:{ this.msg }</h2>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
}
|
||||
1
src/application/logic/.pydio
Normal file
1
src/application/logic/.pydio
Normal file
@@ -0,0 +1 @@
|
||||
e99cbd4e-9620-464d-ad1f-a319540d4885
|
||||
39
src/application/logic/base.logic.ts
Normal file
39
src/application/logic/base.logic.ts
Normal file
@@ -0,0 +1,39 @@
|
||||
/*
|
||||
* Copyright (c) 2020. bmy
|
||||
*/
|
||||
|
||||
import { VueCustomize } from "@logic/base.type";
|
||||
|
||||
/**
|
||||
* logic 层的父类
|
||||
* 主要实现 页面公共参数和ajax方法的地方
|
||||
*/
|
||||
export class BaseLogic {
|
||||
|
||||
// 保存Vue对象
|
||||
public _!: any;
|
||||
|
||||
public page: number = 1;
|
||||
public total_page: number = 1;
|
||||
public count: number = 10;
|
||||
|
||||
// $refs 类型
|
||||
public $refs!: { [key: string]: Vue | Element | Vue[] | Element[] };
|
||||
public $confirm!: any;
|
||||
public $message!: any;
|
||||
// 请求的总页数
|
||||
public TotalCount!: string;
|
||||
|
||||
// 请求参数
|
||||
public PageParams: { limit: number, page: number } = {
|
||||
limit : 10, page : 1
|
||||
}
|
||||
|
||||
/**
|
||||
* 【页面中公共的多次被用到的接口】可以在这个父类中定义,
|
||||
* 子类logic中直接使用,避免方法的冗余
|
||||
* @constructor
|
||||
*/
|
||||
public async DepartmentListRequest(): Promise<void> {
|
||||
}
|
||||
}
|
||||
31
src/application/logic/base.type.ts
Normal file
31
src/application/logic/base.type.ts
Normal file
@@ -0,0 +1,31 @@
|
||||
/*
|
||||
* Copyright (c) 2023. bmy
|
||||
* Email:2271608011@qq.com
|
||||
* Github:https://github.com/helpcode
|
||||
*/
|
||||
|
||||
import { Vue } from 'vue-property-decorator';
|
||||
|
||||
// 组件中路由元信息的类型
|
||||
export interface RouterMeta {
|
||||
title?: string,
|
||||
isLogin?: boolean,
|
||||
showNav: boolean,
|
||||
}
|
||||
|
||||
// 对 logic 的部分通用变量和方法进行约束的接口
|
||||
export interface Methods {
|
||||
StartUp(): Promise<void>;
|
||||
PageLeave?(): Promise<void>;
|
||||
}
|
||||
|
||||
// tsx组件中一些方法找不到声明文件,需要在这里定义
|
||||
export class VueCustomize extends Vue {
|
||||
$setToken!: (token: string) => void
|
||||
$test!: () => string
|
||||
$formatDate!: (data: number) => string
|
||||
$isLogin!: () => void
|
||||
$setStorage!: (key: String, data: any) => void
|
||||
$getStorage!: (key: String) => any
|
||||
}
|
||||
|
||||
1
src/application/logic/page/.pydio
Normal file
1
src/application/logic/page/.pydio
Normal file
@@ -0,0 +1 @@
|
||||
d3709c65-896f-4fce-83c8-72248f572930
|
||||
18
src/application/logic/page/about.logic.ts
Normal file
18
src/application/logic/page/about.logic.ts
Normal file
@@ -0,0 +1,18 @@
|
||||
/*
|
||||
* Copyright (c) 2020. bmy
|
||||
*/
|
||||
|
||||
import { Autowired } from "@ann/ioc.annotation";
|
||||
import { BaseLogic } from "@logic/base.logic";
|
||||
import { Methods, VueCustomize } from "@logic/base.type";
|
||||
|
||||
export class AboutLogic <T extends VueCustomize> extends BaseLogic implements Methods {
|
||||
|
||||
constructor(_: T) {
|
||||
super();
|
||||
this._ = _
|
||||
}
|
||||
|
||||
public async StartUp (): Promise<void> {
|
||||
}
|
||||
}
|
||||
51
src/application/logic/page/home.logic.ts
Normal file
51
src/application/logic/page/home.logic.ts
Normal file
@@ -0,0 +1,51 @@
|
||||
/*
|
||||
* Copyright (c) 2020. bmy
|
||||
* Email:2271608011@qq.com
|
||||
* Github:https://github.com/helpcode
|
||||
*/
|
||||
import { Autowired } from "@ann/ioc.annotation";
|
||||
import { UserService, ResponseType } from "@service/user.service";
|
||||
import { BaseLogic } from "@logic/base.logic";
|
||||
import { Methods, VueCustomize } from "@logic/base.type";
|
||||
|
||||
export class HomeLogic<T extends VueCustomize> extends BaseLogic implements Methods {
|
||||
|
||||
@Autowired()
|
||||
public readonly UserService!: UserService;
|
||||
|
||||
public title: string = "12222";
|
||||
|
||||
public List: ResponseType[] = [];
|
||||
|
||||
// constructor() {
|
||||
// super();
|
||||
// }
|
||||
|
||||
constructor(_: T) {
|
||||
super();
|
||||
console.log("constructor params: ", _);
|
||||
this._ = _
|
||||
}
|
||||
|
||||
/**
|
||||
* 在这里面调用需要打开页面就执行的ajax请求
|
||||
* @constructor
|
||||
*/
|
||||
public async StartUp (): Promise<void> {
|
||||
await this.getData();
|
||||
}
|
||||
|
||||
/**
|
||||
* 请求首页数据
|
||||
*/
|
||||
public async getData (): Promise<void> {
|
||||
this.List = await this.UserService.UserList({ type: 1, page: 1 });
|
||||
console.log("this.List: ", this.List);
|
||||
|
||||
// let res = await this.UserService.login({ type: 2, page: 2 });
|
||||
// console.log("this.res: ", res);
|
||||
|
||||
//
|
||||
// await this._.$router.push('/About')
|
||||
}
|
||||
}
|
||||
1
src/application/page/.pydio
Normal file
1
src/application/page/.pydio
Normal file
@@ -0,0 +1 @@
|
||||
9b3b1288-db3f-4438-9341-a54217a9d678
|
||||
39
src/application/page/about.tsx
Normal file
39
src/application/page/about.tsx
Normal file
@@ -0,0 +1,39 @@
|
||||
/*
|
||||
* Copyright (c) 2020. bmy
|
||||
*/
|
||||
import "@pageLess/About.less";
|
||||
import { Component, Vue } from 'vue-property-decorator';
|
||||
import { AboutLogic } from "@logic/page/about.logic";
|
||||
import { RawLocation, Route } from 'vue-router';
|
||||
import { VueCustomize, RouterMeta } from "@logic/base.type";
|
||||
import { Autowired } from "@ann/ioc.annotation";
|
||||
|
||||
@Component
|
||||
export default class About extends VueCustomize {
|
||||
|
||||
@Autowired(About)
|
||||
private logic!: AboutLogic<About>
|
||||
|
||||
private RouterMeta: RouterMeta = {
|
||||
title: '关于我页面',
|
||||
showNav: true,
|
||||
isLogin: true
|
||||
};
|
||||
|
||||
public async created () {
|
||||
await this.logic.StartUp();
|
||||
};
|
||||
|
||||
// 路由拦截器
|
||||
beforeRouteEnter (to: Route, from: Route, next: (to?: RawLocation | false | ((vm: Vue) => void)) => void) {
|
||||
next();
|
||||
}
|
||||
|
||||
protected render () {
|
||||
return (
|
||||
<div class="About">
|
||||
About
|
||||
</div>
|
||||
)
|
||||
}
|
||||
}
|
||||
78
src/application/page/home.tsx
Normal file
78
src/application/page/home.tsx
Normal file
@@ -0,0 +1,78 @@
|
||||
/*
|
||||
* Copyright (c) 2020. bmy
|
||||
* Email:2271608011@qq.com
|
||||
* Github:https://github.com/helpcode
|
||||
*/
|
||||
|
||||
import "@pageLess/Home.less";
|
||||
import { Component } from 'vue-property-decorator';
|
||||
import HelloWorld from '@components/HelloWorld';
|
||||
import { HomeLogic } from "@logic/page/home.logic";
|
||||
import { Getter } from "vuex-class";
|
||||
import { IndexUtils } from "@utils/index.utils";
|
||||
import { Autowired } from "@ann/ioc.annotation";
|
||||
import { VueCustomize, RouterMeta } from "@logic/base.type";
|
||||
// import { toClass, toInterface, configFilePath } from "json-class-interface";
|
||||
|
||||
|
||||
@Component
|
||||
export default class Home extends VueCustomize {
|
||||
|
||||
public RouterMeta: RouterMeta = {
|
||||
title: '首页',
|
||||
showNav: true,
|
||||
isLogin: true
|
||||
}
|
||||
|
||||
@Autowired(Home)
|
||||
private logic!: HomeLogic<Home>
|
||||
|
||||
@Autowired()
|
||||
public readonly Utils!: IndexUtils;
|
||||
|
||||
@Getter('GettersTabsContentArr')
|
||||
public readonly getterFoo!: Array<any>;
|
||||
|
||||
|
||||
public async created() {
|
||||
await this.logic.StartUp();
|
||||
}
|
||||
|
||||
public ClickButton(): JSX.Element {
|
||||
return (
|
||||
<a-button type="primary" onClick={async () => {
|
||||
console.log("按钮被点击22222");
|
||||
}}>
|
||||
Primary
|
||||
</a-button>
|
||||
)
|
||||
}
|
||||
|
||||
public back() {
|
||||
console.log("qqqq");
|
||||
}
|
||||
|
||||
|
||||
protected render() {
|
||||
return (
|
||||
<div class="home">
|
||||
<img src="/img/baidu.png" alt="" />
|
||||
<h1 on-click={this.back}>111</h1>
|
||||
<HelloWorld msg="向HelloWorld props传参" />
|
||||
<input type="text" v-model={this.logic.title} />
|
||||
<h2>{this.logic.title}</h2>
|
||||
{this.ClickButton()}
|
||||
<ul>
|
||||
{
|
||||
this.logic.List.map(v => {
|
||||
return <li>
|
||||
{v.user_id}
|
||||
{v.user_name}
|
||||
</li>
|
||||
})
|
||||
}
|
||||
</ul>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user