Skip to content

Commit 6d339a1

Browse files
update
1 parent 10cdbb8 commit 6d339a1

File tree

12 files changed

+206
-22
lines changed

12 files changed

+206
-22
lines changed

src/components/confirmDialog/index.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ export default class dialogConfirmComponent extends Vue {
103103
}
104104
}
105105
.content {
106-
padding: 16px 22px 16px 24px;
106+
padding: 16px;
107107
font-size: 14px;
108108
line-height: 21px;
109109
}

src/components/myBanner/index.vue

Lines changed: 18 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
<template>
2-
<q-banner dense class="my-banner" v-show="show" :class="bannerType">
2+
<q-banner
3+
dense
4+
class="my-banner"
5+
v-show="show"
6+
:class="[bannerType, showClose ? 'p-r-32' : 'p-r-16']"
7+
>
38
<template v-slot:avatar>
49
<q-icon
510
name="info"
@@ -15,8 +20,8 @@
1520
/>
1621
</template>
1722
<div class="content" :id="bid + '-' + bannerType + '-banner-content'"></div>
18-
<div class="close" @click.prevent.stop="show = false" v-if="showCLose">
19-
<q-icon name="app:navigation-close"></q-icon>
23+
<div class="close" @click.prevent.stop="show = false" v-if="showClose">
24+
<q-icon name="cancel"></q-icon>
2025
</div>
2126
</q-banner>
2227
</template>
@@ -28,7 +33,7 @@ import { Component, Prop, Vue } from 'vue-facing-decorator';
2833
export default class BannerComponent extends Vue {
2934
@Prop({ default: '' }) content!: string;
3035
@Prop({ default: '' }) bid!: string;
31-
@Prop({ default: false }) showCLose?: boolean;
36+
@Prop({ default: false }) showClose?: boolean;
3237
@Prop({ default: 'success' }) bannerType!: string;
3338
public show = true;
3439
mounted() {
@@ -47,7 +52,9 @@ export default class BannerComponent extends Vue {
4752
<style lang="scss" scoped>
4853
.my-banner {
4954
border-radius: 8px;
50-
padding: 12px 16px;
55+
padding-top: 12px;
56+
padding-bottom: 12px;
57+
padding-left: 16px;
5158
position: relative;
5259
&.warn {
5360
background: $yellow-1;
@@ -62,18 +69,22 @@ export default class BannerComponent extends Vue {
6269
border: 1px solid rgba($negative, 0.5);
6370
}
6471
&.primary {
65-
background: $blue-1;
72+
background: rgba($blue, 0.2);
6673
border: 1px solid rgba($primary, 0.5);
6774
}
6875
.icon {
6976
font-size: 20px;
7077
}
7178
.close {
7279
position: absolute;
73-
right: 16px;
80+
right: 8px;
7481
top: 50%;
7582
transform: translateY(-50%);
7683
cursor: pointer;
84+
color: $grey-5;
85+
&:hover {
86+
color: $grey-3;
87+
}
7788
}
7889
}
7990
</style>

src/components/textToInput/index.vue

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
<template>
2-
<q-input outlined class="text-to-input" v-model="text" :loading="_loading">
2+
<q-input
3+
outlined
4+
class="text-to-input"
5+
v-model="text"
6+
:loading="_loading"
7+
dense
8+
>
39
<template v-slot:append>
410
<q-icon
511
name="app:text-to-input-close"

src/css/lib/_utils.scss

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -184,6 +184,18 @@
184184
user-select: none;
185185
position: relative;
186186
&.outline {
187+
background: #ffffff;
188+
box-sizing: border-box;
189+
font-family: NotoSansSC-SemiBold, NotoSansSC-Bold;
190+
}
191+
&.negative {
192+
border: solid 1px $negative;
193+
color: $negative;
194+
background: #ffffff;
195+
box-sizing: border-box;
196+
font-family: NotoSansSC-SemiBold, NotoSansSC-Bold;
197+
}
198+
&.primary {
187199
border: solid 1px $primary;
188200
color: $primary;
189201
background: #ffffff;
@@ -214,6 +226,12 @@
214226
border-radius: 50%;
215227
background-color: $black;
216228
}
229+
&.grey {
230+
color: $grey;
231+
&::before {
232+
background-color: $grey;
233+
}
234+
}
217235
&.green {
218236
color: $green;
219237
&::before {

src/css/quasar.variables.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ $negative-2: rgb(234, 6, 6, 0.08);
2424
$yellow: rgb(237, 106, 12);
2525
$yellow-1: rgb(253, 246, 236);
2626
$yellow-2: rgb(237, 106, 12, 0.08);
27-
$green: rgba(45, 166, 65, 1);
27+
$green: #2da641;
2828
$green-1: rgb(225, 243, 216);
2929
$green-2: rgb(103, 194, 58, 0.08);
3030
$grey: #969799;

src/index.template.html

Lines changed: 69 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,9 +41,77 @@
4141
<script src="<%= process.env.NODE_ENV !== 'production'?'/':'/v3-admin/'%>map/china.js"></script>
4242
<script src="<%= process.env.NODE_ENV !== 'production'?'/':'/v3-admin/'%>three/threejs.js"></script>
4343
<script src="<%= process.env.NODE_ENV !== 'production'?'/':'/v3-admin/'%>three/orbit-controls.js"></script>
44+
<style>
45+
.q-spinner-html {
46+
vertical-align: middle;
47+
}
48+
.q-spinner-mat-html {
49+
animation: q-spin 2s linear infinite;
50+
transform-origin: center center;
51+
position: absolute;
52+
left: 50%;
53+
top: 50%;
54+
transform: translate(-50%, -50%);
55+
color: #3b4170;
56+
}
57+
.q-spinner-mat-html .path {
58+
stroke-dasharray: 1, 200 /* rtl:ignore */;
59+
stroke-dashoffset: 0 /* rtl:ignore */;
60+
animation: q-mat-dash 1.5s ease-in-out infinite;
61+
}
62+
@keyframes q-spin {
63+
0% {
64+
transform: rotate3d(0, 0, 1, 0deg) /* rtl:ignore */;
65+
}
66+
25% {
67+
transform: rotate3d(0, 0, 1, 90deg) /* rtl:ignore */;
68+
}
69+
50% {
70+
transform: rotate3d(0, 0, 1, 180deg) /* rtl:ignore */;
71+
}
72+
75% {
73+
transform: rotate3d(0, 0, 1, 270deg) /* rtl:ignore */;
74+
}
75+
100% {
76+
transform: rotate3d(0, 0, 1, 359deg) /* rtl:ignore */;
77+
}
78+
}
79+
@keyframes q-mat-dash {
80+
0% {
81+
stroke-dasharray: 1, 200;
82+
stroke-dashoffset: 0;
83+
}
84+
50% {
85+
stroke-dasharray: 89, 200;
86+
stroke-dashoffset: -35px;
87+
}
88+
100% {
89+
stroke-dasharray: 89, 200;
90+
stroke-dashoffset: -124px;
91+
}
92+
}
93+
</style>
4494
</head>
4595
<body>
4696
<!-- DO NOT touch the following DIV -->
47-
<div id="q-app"></div>
97+
<div id="q-app">
98+
<svg
99+
class="q-spinner-html q-spinner-mat-html"
100+
width="68"
101+
height="68"
102+
viewBox="25 25 50 50"
103+
>
104+
<circle
105+
class="path"
106+
cx="50"
107+
cy="50"
108+
r="20"
109+
fill="none"
110+
stroke="currentColor"
111+
stroke-width="5"
112+
stroke-miterlimit="10"
113+
></circle>
114+
</svg>
115+
</div>
48116
</body>
49117
</html>

src/pages/components/color.vue

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,25 @@
66
}}</q-avatar>
77
{{ item }}
88
</q-chip>
9+
<div class="row">
10+
<div class="my-status grey">my-status grey</div>
11+
<div class="my-status green">my-status green</div>
12+
<div class="my-status red">my-status red</div>
13+
<div class="my-status yellow">my-status yellow</div>
14+
<div class="my-status blue">my-status blue</div>
15+
</div>
16+
<div class="row">
17+
<span class="my-button outline primary">my-button outline primary</span>
18+
<span class="my-button outline negative">my-button outline negative</span>
19+
<span class="my-button disabled">my-button outline</span>
20+
</div>
21+
<div class="row">
22+
<span class="my-label blue">my-label blue</span>
23+
<span class="my-label green">my-label green</span>
24+
<span class="my-label yellow">my-label yellow</span>
25+
<span class="my-label red">my-label red</span>
26+
<span class="my-label grey">my-label grey</span>
27+
</div>
928
</div>
1029
</template>
1130

src/pages/components/notice.vue

Lines changed: 44 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,39 @@
11
<template>
22
<div class="q-pa-md q-gutter-y-sm column items-center">
3+
<MyTooltip
4+
content="tip tip tip tip tip tip tip tip tip tip tip tip tip tip tip tip"
5+
style="width: 100px"
6+
>
7+
</MyTooltip>
8+
<TextToInput
9+
value="text text"
10+
:that="textToInputThat"
11+
:loading="textToInputLoading"
12+
@confirm="textToInputConfirm"
13+
@close="textToInputClose"
14+
>
15+
</TextToInput>
16+
<MyBanner
17+
content="ok ok ok ok ok ok ok ok ok ok ok ok"
18+
bid="notice-banner-1"
19+
bannerType="warn"
20+
:showClose="true"
21+
></MyBanner>
22+
<MyBanner
23+
content="ok ok ok ok ok ok ok ok ok ok ok ok"
24+
bid="notice-banner-2"
25+
bannerType="success"
26+
></MyBanner>
27+
<MyBanner
28+
content="ok ok ok ok ok ok ok ok ok ok ok ok"
29+
bid="notice-banner-3"
30+
bannerType="negative"
31+
></MyBanner>
32+
<MyBanner
33+
content="ok ok ok ok ok ok ok ok ok ok ok ok"
34+
bid="notice-banner-4"
35+
bannerType="primary"
36+
></MyBanner>
337
<div class="q-pa-md q-gutter-sm">
438
<q-banner dense class="bg-primary text-white">
539
Unfortunately, the credit card did not go through, please try again.
@@ -18,7 +52,6 @@
1852
<q-btn flat color="primary" label="Turn on Wifi" />
1953
</template>
2054
</q-banner>
21-
2255
<q-banner dense inline-actions class="text-white bg-red">
2356
You have lost connection to the internet. This app is offline.
2457
<template v-slot:action>
@@ -205,6 +238,16 @@ const alerts = [
205238
name: 'myComponentNotice',
206239
})
207240
export default class myComponentNotice extends Vue {
241+
private textToInputLoading = false;
242+
private textToInputThat = { a: 1, b: 2 };
243+
private textToInputConfirm({ value, that }: { value: string; that: any }) {
244+
console.log(value);
245+
console.log(that);
246+
}
247+
private textToInputClose({ value, that }: { value: string; that: any }) {
248+
console.log(value);
249+
console.log(that);
250+
}
208251
private showNotif(position: any) {
209252
const { color, multiLine, icon, message, avatar } =
210253
alerts[Math.floor(Math.random() * 10) % alerts.length];

src/router/index.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,11 @@ import {
55
createWebHistory,
66
} from 'vue-router';
77
import { constantRoutes } from './routes';
8+
import setting from 'src/setting.json';
89
const router = createRouter({
9-
history: createWebHashHistory('/'),
10+
history: createWebHashHistory(
11+
process.env.NODE_ENV === 'production' ? setting.publicPath : '/'
12+
),
1013
routes: constantRoutes,
1114
});
1215

src/router/routes.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,9 @@ import { PermissionModule } from 'src/store/modules/permission';
1919
*/
2020
function redirect(to: any) {
2121
const routes = PermissionModule.routes;
22-
return `${routes[1].path}${routes[1].children![0].path ? '/' : ''}`;
22+
return `${routes[1].path}${
23+
routes[1] && routes[1].children && routes[1].children![0].path ? '/' : ''
24+
}`;
2325
}
2426
export const constantRoutes: RouteRecordRaw[] = [
2527
{

0 commit comments

Comments
 (0)