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 aec7c5512c..e6f1b1197f 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 0000000000..3a8333e11f --- /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 cfa83b73f7..0accb9ee7c 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,