diff --git a/package-lock.json b/package-lock.json index a2bec11..30ebda3 100644 --- a/package-lock.json +++ b/package-lock.json @@ -236,14 +236,14 @@ } }, "@angular/animations": { - "version": "9.0.0", - "resolved": "https://registry.npm.taobao.org/@angular/animations/download/@angular/animations-9.0.0.tgz", - "integrity": "sha1-jSuFLFJzvMFh0T+C+q81ZqtWKVE=" + "version": "9.1.12", + "resolved": "https://registry.npm.taobao.org/@angular/animations/download/@angular/animations-9.1.12.tgz", + "integrity": "sha1-HJwaeSvktSsZbKseXIi9MZtgcW0=" }, "@angular/cdk": { - "version": "9.0.0", - "resolved": "https://registry.npm.taobao.org/@angular/cdk/download/@angular/cdk-9.0.0.tgz", - "integrity": "sha1-VzSBeulwRPkNME+g8lycGn+gv5Y=", + "version": "9.2.4", + "resolved": "https://registry.npm.taobao.org/@angular/cdk/download/@angular/cdk-9.2.4.tgz", + "integrity": "sha1-hBOVi9J15MNL47lvVkRGcd0wupM=", "requires": { "parse5": "^5.0.0" }, @@ -444,9 +444,9 @@ "dev": true }, "@angular/material": { - "version": "9.0.0", - "resolved": "https://registry.npm.taobao.org/@angular/material/download/@angular/material-9.0.0.tgz", - "integrity": "sha1-ZVv9TUBHM36ESAufkr6Oga83W5I=" + "version": "9.2.4", + "resolved": "https://registry.npm.taobao.org/@angular/material/download/@angular/material-9.2.4.tgz", + "integrity": "sha1-JmbvYG+7iNYPji8YxeT5Sj3Vctg=" }, "@angular/platform-browser": { "version": "9.0.0", @@ -16640,7 +16640,8 @@ "ansi-regex": { "version": "2.1.1", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "aproba": { "version": "1.2.0", @@ -16683,7 +16684,8 @@ "code-point-at": { "version": "1.1.0", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "concat-map": { "version": "0.0.1", @@ -16694,7 +16696,8 @@ "console-control-strings": { "version": "1.1.0", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "core-util-is": { "version": "1.0.2", @@ -16811,7 +16814,8 @@ "inherits": { "version": "2.0.4", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "ini": { "version": "1.3.5", @@ -16823,6 +16827,7 @@ "version": "1.0.0", "bundled": true, "dev": true, + "optional": true, "requires": { "number-is-nan": "^1.0.0" } @@ -16852,6 +16857,7 @@ "version": "2.9.0", "bundled": true, "dev": true, + "optional": true, "requires": { "safe-buffer": "^5.1.2", "yallist": "^3.0.0" @@ -16870,6 +16876,7 @@ "version": "0.5.1", "bundled": true, "dev": true, + "optional": true, "requires": { "minimist": "0.0.8" } @@ -16972,6 +16979,7 @@ "version": "1.4.0", "bundled": true, "dev": true, + "optional": true, "requires": { "wrappy": "1" } @@ -17057,7 +17065,8 @@ "safe-buffer": { "version": "5.1.2", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "safer-buffer": { "version": "2.1.2", @@ -17093,6 +17102,7 @@ "version": "1.0.2", "bundled": true, "dev": true, + "optional": true, "requires": { "code-point-at": "^1.0.0", "is-fullwidth-code-point": "^1.0.0", @@ -17112,6 +17122,7 @@ "version": "3.0.1", "bundled": true, "dev": true, + "optional": true, "requires": { "ansi-regex": "^2.0.0" } @@ -17155,12 +17166,14 @@ "wrappy": { "version": "1.0.2", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "yallist": { "version": "3.1.1", "bundled": true, - "dev": true + "dev": true, + "optional": true } } }, @@ -17598,7 +17611,8 @@ "console-control-strings": { "version": "1.1.0", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "core-util-is": { "version": "1.0.2", @@ -17758,6 +17772,7 @@ "version": "2.9.0", "bundled": true, "dev": true, + "optional": true, "requires": { "safe-buffer": "^5.1.2", "yallist": "^3.0.0" @@ -17776,6 +17791,7 @@ "version": "0.5.1", "bundled": true, "dev": true, + "optional": true, "requires": { "minimist": "0.0.8" } @@ -17878,6 +17894,7 @@ "version": "1.4.0", "bundled": true, "dev": true, + "optional": true, "requires": { "wrappy": "1" } @@ -17963,7 +17980,8 @@ "safe-buffer": { "version": "5.1.2", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "safer-buffer": { "version": "2.1.2", @@ -17999,6 +18017,7 @@ "version": "1.0.2", "bundled": true, "dev": true, + "optional": true, "requires": { "code-point-at": "^1.0.0", "is-fullwidth-code-point": "^1.0.0", @@ -18062,12 +18081,14 @@ "wrappy": { "version": "1.0.2", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "yallist": { "version": "3.1.1", "bundled": true, - "dev": true + "dev": true, + "optional": true } } }, diff --git a/package.json b/package.json index 6c9be3c..3fce73c 100644 --- a/package.json +++ b/package.json @@ -11,14 +11,14 @@ }, "private": true, "dependencies": { - "@angular/animations": "^9.0.0", - "@angular/cdk": "^9.0.0", + "@angular/animations": "^9.1.12", + "@angular/cdk": "^9.2.4", "@angular/common": "~9.0.0", "@angular/compiler": "~9.0.0", "@angular/core": "~9.0.0", "@angular/fire": "^5.3.0", "@angular/forms": "~9.0.0", - "@angular/material": "^9.0.0", + "@angular/material": "^9.2.4", "@angular/platform-browser": "~9.0.0", "@angular/platform-browser-dynamic": "~9.0.0", "@angular/router": "~9.0.0", diff --git a/src/app/my-paginator.ts b/src/app/my-paginator.ts new file mode 100644 index 0000000..9d5ecbb --- /dev/null +++ b/src/app/my-paginator.ts @@ -0,0 +1,29 @@ +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; + +} diff --git a/src/app/ui/basicinfo-look/basicinfo.component.html b/src/app/ui/basicinfo-look/basicinfo.component.html index 61556ec..045671a 100644 --- a/src/app/ui/basicinfo-look/basicinfo.component.html +++ b/src/app/ui/basicinfo-look/basicinfo.component.html @@ -111,11 +111,11 @@