From 5a7bdd42226960c8140397b1a1a377fb87ca725e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=8D=A1=E8=89=B2?= Date: Thu, 26 Oct 2023 15:45:24 +0800 Subject: [PATCH] feat(abc:qr): will be removed in 18.0.0 (#1667) --- packages/abc/qr/index.en-US.md | 3 +++ packages/abc/qr/index.zh-CN.md | 3 +++ packages/abc/qr/qr.component.ts | 3 +++ packages/abc/qr/qr.module.ts | 3 +++ src/styles/_custom.less | 4 ++-- 5 files changed, 14 insertions(+), 2 deletions(-) diff --git a/packages/abc/qr/index.en-US.md b/packages/abc/qr/index.en-US.md index d5aa151533..59f2231564 100644 --- a/packages/abc/qr/index.en-US.md +++ b/packages/abc/qr/index.en-US.md @@ -5,8 +5,11 @@ title: qr subtitle: QR cols: 1 module: import { QRModule } from '@delon/abc/qr'; +deprecated: 18.0.0 --- +# Will be removed in 18.0.0, please use [nz-qrcode](https://ng.ant.design/components/qr-code) instead. + Generate a QR code based on [qrious](https://github.com/neocotic/qrious). diff --git a/packages/abc/qr/index.zh-CN.md b/packages/abc/qr/index.zh-CN.md index bb71370760..25de5d8ce6 100644 --- a/packages/abc/qr/index.zh-CN.md +++ b/packages/abc/qr/index.zh-CN.md @@ -5,8 +5,11 @@ title: qr subtitle: 二维码 cols: 1 module: import { QRModule } from '@delon/abc/qr'; +deprecated: 18.0.0 --- +# 将在 18.0.0 中移除,请使用 [nz-qrcode](https://ng.ant.design/components/qr-code) 替代 + 基于 [qrious](https://github.com/neocotic/qrious) 生成二维码。 默认二维码的操作并不是刚需的原因,因此采用一种延迟加载脚本的形式,可以通过[全局配置](/docs/global-config)配置来改变默认 CDN 路径,默认情况下使用 `https://cdn.jsdelivr.net/npm/qrious/dist/qrious.min.js`。或安装 `npm i --save qrious` 依赖包并在 `angular.json` 的 `scripts` 引用 `"node_modules/qrious/dist/qrious.min.js"`。 diff --git a/packages/abc/qr/qr.component.ts b/packages/abc/qr/qr.component.ts index db8fe41e5e..92b497140f 100644 --- a/packages/abc/qr/qr.component.ts +++ b/packages/abc/qr/qr.component.ts @@ -21,6 +21,9 @@ import type { NzSafeAny } from 'ng-zorro-antd/core/types'; import { QR_DEFULAT_CONFIG } from './qr.config'; import { QROptions } from './qr.types'; +/** + * @deprecated Will be removed in 18.0.0, please use [nz-qrcode](https://ng.ant.design/components/qr-code) instead. + */ @Component({ selector: 'qr', exportAs: 'qr', diff --git a/packages/abc/qr/qr.module.ts b/packages/abc/qr/qr.module.ts index e462787877..a9b35a7621 100644 --- a/packages/abc/qr/qr.module.ts +++ b/packages/abc/qr/qr.module.ts @@ -5,6 +5,9 @@ import { QRComponent } from './qr.component'; const COMPONENTS = [QRComponent]; +/** + * @deprecated Will be removed in 18.0.0, please use [nz-qrcode](https://ng.ant.design/components/qr-code) instead. + */ @NgModule({ imports: [CommonModule], declarations: COMPONENTS, diff --git a/src/styles/_custom.less b/src/styles/_custom.less index 172931ed9a..1be2de8488 100644 --- a/src/styles/_custom.less +++ b/src/styles/_custom.less @@ -14,9 +14,9 @@ } .menu-deprecated { - opacity: 0.5; - .ant-badge { + color: @error-color; text-decoration: line-through; + opacity: 0.5; } }