From a8903f9d800c9151fda147b4a38911f9c3a6c0f3 Mon Sep 17 00:00:00 2001 From: Tinhone Date: Fri, 17 Nov 2023 16:06:55 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E4=BF=AE=E6=94=B9=E7=BB=84=E4=BB=B6?= =?UTF-8?q?=E4=BB=8B=E7=BB=8D=E5=92=8C=E4=BB=A3=E7=A0=81=E6=B3=A8=E9=87=8A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../extra-options/extra-options-panel.ts | 1 + registry/lib/components/style/custom-font-family/index.md | 7 +++++++ registry/lib/components/style/custom-font-family/index.ts | 6 ------ 3 files changed, 8 insertions(+), 6 deletions(-) create mode 100644 registry/lib/components/style/custom-font-family/index.md diff --git a/registry/lib/components/style/custom-font-family/extra-options/extra-options-panel.ts b/registry/lib/components/style/custom-font-family/extra-options/extra-options-panel.ts index aec7c5512..e6f1b1197 100644 --- a/registry/lib/components/style/custom-font-family/extra-options/extra-options-panel.ts +++ b/registry/lib/components/style/custom-font-family/extra-options/extra-options-panel.ts @@ -31,6 +31,7 @@ export interface ExtraOptionsPanelInitData { } } +// 当使用 ExtraOptionsPanel 组件时,如果不传入 initData 所使用的默认数据 export const defaultInitData: ExtraOptionsPanelInitData = { header: { title: { diff --git a/registry/lib/components/style/custom-font-family/index.md b/registry/lib/components/style/custom-font-family/index.md new file mode 100644 index 000000000..3a8333e11 --- /dev/null +++ b/registry/lib/components/style/custom-font-family/index.md @@ -0,0 +1,7 @@ +使用组件提供的字体设置覆盖原版的主站字体,并使主站字体可被自定义。 + +当组件被启用后,几乎所有的元素会立即应用组件提供的字体设置。 + +而 `覆盖*` 选项相当于一个白名单,使用了特殊字体的元素会被加入其中。默认情况下这些元素不会应用组件提供的字体设置,只有在启用对应的 `覆盖*` 选项后才会应用。 + +字体设置写法请参考 [MDN](https://developer.mozilla.org/zh-CN/docs/Web/CSS/font-family)、默认设置与设置说明。 \ No newline at end of file diff --git a/registry/lib/components/style/custom-font-family/index.ts b/registry/lib/components/style/custom-font-family/index.ts index cfa83b73f..0accb9ee7 100644 --- a/registry/lib/components/style/custom-font-family/index.ts +++ b/registry/lib/components/style/custom-font-family/index.ts @@ -12,11 +12,6 @@ const name = camelName const displayName = '自定义字体' -const description = { - 'zh-CN': - '使用组件提供的字体设置覆盖原版的主站字体,并使主站字体可被自定义。字体设置写法请参考 [MDN](https://developer.mozilla.org/zh-CN/docs/Web/CSS/font-family) 、默认设置与设置说明', -} - const tags = [componentsTags.style, componentsTags.general] const entry = () => { @@ -123,7 +118,6 @@ const author = { export const component = defineComponentMetadata({ name, displayName, - description, tags, entry, options,