Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
M
muChangApp
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
WitCloud
muChangApp
Commits
c9ae7410
Commit
c9ae7410
authored
Aug 29, 2019
by
frank
🏀
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
解决tabs里的页面按键不触发的问题
parent
b6d31174
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
18 additions
and
32 deletions
+18
-32
app-routing.module.ts
src/app/app-routing.module.ts
+1
-0
app.module.ts
src/app/app.module.ts
+2
-1
env-detail.module.ts
src/app/envCtrl/env-detail/env-detail.module.ts
+7
-16
env-detail.page.html
src/app/envCtrl/env-detail/env-detail.page.html
+2
-1
env-fan.page.html
src/app/envCtrl/env-fan/env-fan.page.html
+1
-0
tabs.page.ts
src/app/envCtrl/tabs/tabs.page.ts
+5
-5
other.page.ts
src/app/other/other.page.ts
+0
-9
No files found.
src/app/app-routing.module.ts
View file @
c9ae7410
...
@@ -48,6 +48,7 @@ const routes: Routes = [
...
@@ -48,6 +48,7 @@ const routes: Routes = [
{
path
:
''
,
redirectTo
:
'fan'
,
pathMatch
:
'prefix'
},
{
path
:
''
,
redirectTo
:
'fan'
,
pathMatch
:
'prefix'
},
]
]
},
},
// { path: 'env-detail', loadChildren: './envCtrl/env-detail/env-detail.module#EnvDetailPageModule' },
{
path
:
'env-alarmDetail'
,
component
:
EnvAlarmDetailPage
},
{
path
:
'env-alarmDetail'
,
component
:
EnvAlarmDetailPage
},
{
path
:
'env-alarm-detail'
,
loadChildren
:
'./envCtrl/env-alarm-detail/env-alarm-detail.module#EnvAlarmDetailPageModule'
},
{
path
:
'env-alarm-detail'
,
loadChildren
:
'./envCtrl/env-alarm-detail/env-alarm-detail.module#EnvAlarmDetailPageModule'
},
{
path
:
'tabs'
,
loadChildren
:
'./envCtrl/tabs/tabs.module#TabsPageModule'
},
{
path
:
'tabs'
,
loadChildren
:
'./envCtrl/tabs/tabs.module#TabsPageModule'
},
...
...
src/app/app.module.ts
View file @
c9ae7410
...
@@ -73,11 +73,12 @@ import {EnvAlarmDetailPage} from './envCtrl/env-alarm-detail/env-alarm-detail.pa
...
@@ -73,11 +73,12 @@ import {EnvAlarmDetailPage} from './envCtrl/env-alarm-detail/env-alarm-detail.pa
OtherPage
,
OtherPage
,
SearchPage
,
SearchPage
,
MinePage
,
MinePage
,
EnvDetailPage
,
EnvFanPage
,
EnvFanPage
,
EnvShowerPage
,
EnvShowerPage
,
EnvLightPage
,
EnvLightPage
,
EnvWaterchannelPage
,
EnvWaterchannelPage
,
EnvDetailPage
,
// EnvAnalPage,
// EnvAnalPage,
// EnvAlarmPage,
// EnvAlarmPage,
EnvAlarmDetailPage
,
EnvAlarmDetailPage
,
...
...
src/app/envCtrl/env-detail/env-detail.module.ts
View file @
c9ae7410
...
@@ -17,22 +17,13 @@ const routes: Routes = [
...
@@ -17,22 +17,13 @@ const routes: Routes = [
{
{
path
:
''
,
path
:
''
,
component
:
EnvDetailPage
,
component
:
EnvDetailPage
,
// {
// children: [
// path: 'tab-2-shower',
// {path:'fan', component: EnvFanPage},
// component: EnvShowerPage
// {path:'shower', component: EnvShowerPage},
// },
// {path:'light', component: EnvLightPage},
// {
// {path:'waterchannel', component: EnvWaterchannelPage},
// path: 'tab-2-light',
// {path: '', redirectTo: 'fan',pathMatch:'prefix'},
// component: EnvLightPage
// ]
// },
// {
// path: 'tab-2-channel',
// component: EnvWaterchannelPage
// },
// {
// path:'',
// component: EnvFanPage
// }
}
}
];
];
...
...
src/app/envCtrl/env-detail/env-detail.page.html
View file @
c9ae7410
...
@@ -27,6 +27,7 @@
...
@@ -27,6 +27,7 @@
<!--</ion-buttons>-->
<!--</ion-buttons>-->
<ion-title
mode=
"ios"
style=
"text-align: center;"
>
详情页
</ion-title>
<ion-title
mode=
"ios"
style=
"text-align: center;"
>
详情页
</ion-title>
</ion-toolbar>
</ion-toolbar>
<ion-router-outlet></ion-router-outlet>
<ion-tabs>
<ion-tabs>
<!-- Tab bar -->
<!-- Tab bar -->
<ion-tab-bar
slot=
"top"
>
<ion-tab-bar
slot=
"top"
>
...
@@ -50,5 +51,5 @@
...
@@ -50,5 +51,5 @@
<!--</ion-tab-button>-->
<!--</ion-tab-button>-->
</ion-tab-bar>
</ion-tab-bar>
</ion-tabs>
</ion-tabs>
<ion-router-outlet
name=
"details"
></ion-router-outlet>
</ion-content>
</ion-content>
src/app/envCtrl/env-fan/env-fan.page.html
View file @
c9ae7410
...
@@ -26,6 +26,7 @@
...
@@ -26,6 +26,7 @@
<ion-item
*
ngFor=
"let a of allBtns"
lines=
"full"
insert=
"false"
>
<ion-item
*
ngFor=
"let a of allBtns"
lines=
"full"
insert=
"false"
>
<!--<v-switch [value]="a.value" (click)="toggle(a)" [loading]="a.loading"></v-switch>-->
<!--<v-switch [value]="a.value" (click)="toggle(a)" [loading]="a.loading"></v-switch>-->
<ion-label>
一键控制{{a.l}}
</ion-label>
<ion-label>
一键控制{{a.l}}
</ion-label>
<ion-button>
朱旻大帅哥
</ion-button>
<v-switch
[
value
]="
a
.
v
"
(
click
)="
allCheck
(
a
)"
[
loading
]="
a
.
d
"
></v-switch>
<v-switch
[
value
]="
a
.
v
"
(
click
)="
allCheck
(
a
)"
[
loading
]="
a
.
d
"
></v-switch>
</ion-item>
</ion-item>
<div>
<div>
...
...
src/app/envCtrl/tabs/tabs.page.ts
View file @
c9ae7410
...
@@ -15,11 +15,11 @@ export class TabsPage implements OnInit {
...
@@ -15,11 +15,11 @@ export class TabsPage implements OnInit {
}
}
ngOnInit
()
{
ngOnInit
()
{
this
.
router
.
events
.
subscribe
(
e
=>
{
//
this.router.events.subscribe(e => {
if
(
e
instanceof
ActivationStart
&&
e
.
snapshot
.
outlet
===
'tabs'
)
//
if (e instanceof ActivationStart && e.snapshot.outlet === 'tabs')
console
.
log
(
'DDEDEDEEEEEEEEEDDDDDDDDDDDDDDDDD'
);
//
console.log('DDEDEDEEEEEEEEEDDDDDDDDDDDDDDDDD');
this
.
outlet
.
deactivate
();
//
this.outlet.deactivate();
});
//
});
}
}
...
...
src/app/other/other.page.ts
View file @
c9ae7410
...
@@ -75,15 +75,6 @@ export class OtherPage implements OnInit {
...
@@ -75,15 +75,6 @@ export class OtherPage implements OnInit {
this
.
commTmr
=
window
.
setInterval
(()
=>
{
this
.
commTmr
=
window
.
setInterval
(()
=>
{
console
.
log
(
this
.
comm
.
remain
);
console
.
log
(
this
.
comm
.
remain
);
if
(
this
.
comm
.
remain
>
0
)
{
this
.
comm
.
remain
=
this
.
comm
.
remain
-
1
;
}
if
(
this
.
comm
.
remain
===
0
)
{
this
.
comm
.
isLoading
=
false
;
}
else
{
this
.
comm
.
isLoading
=
true
;
}
},
1000
)
;
},
1000
)
;
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment