Skip to content

Commit

Permalink
fix: style
Browse files Browse the repository at this point in the history
  • Loading branch information
OpportunityLiu committed Nov 24, 2023
1 parent 2c69252 commit 9975b52
Show file tree
Hide file tree
Showing 9 changed files with 4,542 additions and 3,131 deletions.
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -63,15 +63,15 @@
"devDependencies": {
"@angular-devkit/build-angular": "^17.0.3",
"@angular/animations": "^17.0.4",
"@angular/cdk": "^17.0.1",
"@angular/cdk": "^16.2.12",
"@angular/cli": "^17.0.3",
"@angular/common": "^17.0.4",
"@angular/compiler": "^17.0.4",
"@angular/compiler-cli": "^17.0.4",
"@angular/core": "^17.0.4",
"@angular/forms": "^17.0.4",
"@angular/language-service": "^17.0.4",
"@angular/material": "^17.0.1",
"@angular/material": "^16.2.12",
"@angular/platform-browser": "^17.0.4",
"@angular/platform-browser-dynamic": "^17.0.4",
"@angular/router": "^17.0.4",
Expand Down Expand Up @@ -105,4 +105,4 @@
"typescript": "~5.2.2",
"zone.js": "~0.14.2"
}
}
}
7,228 changes: 4,299 additions & 2,929 deletions pnpm-lock.yaml

Large diffs are not rendered by default.

33 changes: 31 additions & 2 deletions src/browser/app/app.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,10 @@ import { MatLegacyFormFieldModule as MatFormFieldModule } from '@angular/materia
import { MatLegacyInputModule as MatInputModule } from '@angular/material/legacy-input';
import { MatToolbarModule } from '@angular/material/toolbar';
import { MatLegacyTooltipModule as MatTooltipModule } from '@angular/material/legacy-tooltip';
import { MatLegacyPaginatorModule as MatPaginatorModule } from '@angular/material/legacy-paginator';
import {
MatLegacyPaginatorModule as MatPaginatorModule,
MatLegacyPaginatorIntl,
} from '@angular/material/legacy-paginator';
import { MatLegacyProgressBarModule as MatProgressBarModule } from '@angular/material/legacy-progress-bar';
import { MatLegacyProgressSpinnerModule as MatProgressSpinnerModule } from '@angular/material/legacy-progress-spinner';
import { MatSortModule } from '@angular/material/sort';
Expand Down Expand Up @@ -80,7 +83,33 @@ import { environment } from '../environments/environment';
registrationStrategy: 'registerWhenStable:30000',
}),
],
providers: [ehHttpInterceptorProvider, TitleService],
providers: [
ehHttpInterceptorProvider,
TitleService,
{
provide: MatLegacyPaginatorIntl,
useFactory: () => {
const i = new MatLegacyPaginatorIntl();
i.itemsPerPageLabel = '每页条数';
i.nextPageLabel = '下一页';
i.previousPageLabel = '上一页';
i.firstPageLabel = '首页';
i.lastPageLabel = '尾页';
i.getRangeLabel = (page, pageSize, length) => {
if (length === 0 || pageSize === 0) {
return `0 / ${length}`;
}
length = Math.max(length, 0);
const startIndex = page * pageSize;
// If the start index exceeds the list length, do not try and fix the end index to the end.
const endIndex =
startIndex < length ? Math.min(startIndex + pageSize, length) : startIndex + pageSize;
return `${startIndex + 1} - ${endIndex} / ${length}`;
};
return i;
},
},
],
bootstrap: [AppComponent],
})
export class AppModule {}
Loading

0 comments on commit 9975b52

Please sign in to comment.