Browse Source

[完善]页面优化

develop
陈鹏飞 5 years ago
parent
commit
9ff3e9b5e7
  1. 2
      src/app/tabbar/tabbar.component.html
  2. 10
      src/app/ui/changepassword/changepassword.component.ts
  3. 8
      src/styles.scss

2
src/app/tabbar/tabbar.component.html

@ -26,7 +26,7 @@
<mat-menu #appMenu="matMenu">
<button mat-menu-item [routerLink]="['/datacollection/userdata']" >
<mat-icon>perm_identity</mat-icon>
<span>修改资料</span>
<span>个人资料</span>
</button>
<button mat-menu-item (click)='changpsw()'>
<mat-icon>verified_user</mat-icon>

10
src/app/ui/changepassword/changepassword.component.ts

@ -1,6 +1,9 @@
import { Component, OnInit } from '@angular/core';
import { HttpClient } from '@angular/common/http'
import { MatDialogRef } from '@angular/material/dialog';
import { MatSnackBar, MatSnackBarConfig } from '@angular/material/snack-bar';
@Component({
selector: 'app-changepassword',
@ -10,7 +13,7 @@ import { MatDialogRef } from '@angular/material/dialog';
export class ChangepasswordComponent implements OnInit {
constructor(private http:HttpClient,
constructor(private http:HttpClient,public snackBar: MatSnackBar,
public dialogRef: MatDialogRef<ChangepasswordComponent>) { }
ngOnInit() {
@ -25,8 +28,11 @@ export class ChangepasswordComponent implements OnInit {
password: e.password
}
).subscribe(data=> {
alert('密码修改成功')
this.dialogRef.close(data);
const config = new MatSnackBarConfig();
config.verticalPosition = 'top';
config.duration = 3000
this.snackBar.open('密码修改成功','确定',config);
},(err) =>
{this.errmsg = err}
)

8
src/styles.scss

@ -3,7 +3,7 @@ html,body{
width: 100%;
height: 100%;
margin:0 auto;
padding:0;
padding:0;
}
ul,ol,dl,li,dt,dd,p,form,input,h1,h2,h3,h4,h5,h6,section,article,aside,header,footer,nav,figure,time,mark,main,canvas{
// margin:0;
@ -62,6 +62,6 @@ table td.mat-footer-cell:last-of-type{
.example-sidenav-content {
overflow-x: hidden; overflow-y: auto;
}
.mat-tab-body-wrapper{
overflow: auto!important
}
.mat-tab-body-wrapper{
overflow: auto!important
}
Loading…
Cancel
Save