Browse Source

[修改]删除material组件

beijing
邵佳豪 2 years ago
parent
commit
67ecbdffd6
  1. 64699
      package-lock.json
  2. 1
      package.json
  3. 29
      src/app/ui/paginator/my-paginator.ts
  4. 13
      src/app/ui/paginator/paginator.module.ts
  5. 4
      src/app/ui/ui.module.ts
  6. 15879
      yarn.lock

64699
package-lock.json generated

File diff suppressed because it is too large Load Diff

1
package.json

@ -18,7 +18,6 @@
"@angular/core": "~13.3.11",
"@angular/fire": "^5.3.0",
"@angular/forms": "~13.3.11",
"@angular/material": "~13.3.11",
"@angular/platform-browser": "~13.3.11",
"@angular/platform-browser-dynamic": "~13.3.11",
"@angular/router": "~13.3.11",

29
src/app/ui/paginator/my-paginator.ts

@ -1,29 +0,0 @@
import { MatPaginatorIntl } from '@angular/material/paginator';
const dutchRangeLabel = (page: number, pageSize: number, length: number) => {
if (length === 0 || pageSize === 0) { return `0 到 ${length}`; }
length = Math.max(length, 0);
const startIndex = page * pageSize;
const endIndex = startIndex < length ?
Math.min(startIndex + pageSize, length) :
startIndex + pageSize;
return `${startIndex + 1} - ${endIndex} / ${length}`;
}
export function myPaginator() {
const paginatorIntl = new MatPaginatorIntl();
paginatorIntl.itemsPerPageLabel = '每页条数:';
paginatorIntl.nextPageLabel = '下一页:';
paginatorIntl.previousPageLabel = '上一页:';
paginatorIntl.getRangeLabel = dutchRangeLabel;
return paginatorIntl;
}

13
src/app/ui/paginator/paginator.module.ts

@ -1,13 +0,0 @@
import { NgModule } from '@angular/core';
import { CommonModule } from '@angular/common';
import { MatPaginatorIntl, MatPaginatorModule } from '@angular/material/paginator';
import { myPaginator } from './my-paginator'
@NgModule({
imports: [
CommonModule,
MatPaginatorModule
],
providers: [ { provide: MatPaginatorIntl, useValue: myPaginator() } ]
})
export class PaginatorModule { }

4
src/app/ui/ui.module.ts

@ -14,7 +14,6 @@ import { ChangepasswordComponent } from './changepassword/changepassword.compone
import { IsnoPipe } from '../pipes/boolean.pipe';
import { ConfirmpswDirective } from './changepassword/equal-validator.directive';
import { TimePipe } from '../pipes/time.pipe';
import { PaginatorModule } from './paginator/paginator.module';
import { NzDropDownModule } from 'ng-zorro-antd/dropdown';
import { TitleComponent } from './title/title.component';
import { NzMessageModule } from 'ng-zorro-antd/message';
@ -33,12 +32,11 @@ import { NzMessageModule } from 'ng-zorro-antd/message';
ScrollingModule,
ReactiveFormsModule,
FormsModule,
PaginatorModule,
NzDropDownModule,
NzMessageModule
],
exports:[TitleComponent]
exports: [TitleComponent]
})
export class UiModule { }

15879
yarn.lock

File diff suppressed because it is too large Load Diff
Loading…
Cancel
Save