From 3e90021dac2ef378e8ac1a050aab411ea407cb58 Mon Sep 17 00:00:00 2001 From: jahnli Date: Tue, 19 Sep 2023 10:44:22 +0800 Subject: [PATCH] feat(n-equation): export `EquationProps` type --- CHANGELOG.en-US.md | 1 + CHANGELOG.zh-CN.md | 1 + src/equation/index.ts | 1 + src/equation/src/Equation.tsx | 3 +++ 4 files changed, 6 insertions(+) diff --git a/CHANGELOG.en-US.md b/CHANGELOG.en-US.md index 8a3eab7b38f..4cef7247788 100644 --- a/CHANGELOG.en-US.md +++ b/CHANGELOG.en-US.md @@ -48,6 +48,7 @@ - `n-tree` adds node information for `render-switcher-icon` props, closes [#4815](https://github.com/tusen-ai/naive-ui/issues/4815). - `n-input-number` export the `select` method. - `n-data-table` adds `n-data-table-tr--expanded` class to expanded rows, and `n-data-table-tr n-data-table-tr--expand` class to the additional row, closes [#4420](https://github.com/tusen-ai/naive-ui/issues/4420). +- `n-equation` export the `EquationProps` type. ### i18n diff --git a/CHANGELOG.zh-CN.md b/CHANGELOG.zh-CN.md index 82aa0fd87da..76b6902a7fd 100644 --- a/CHANGELOG.zh-CN.md +++ b/CHANGELOG.zh-CN.md @@ -48,6 +48,7 @@ - `n-tree` 为 `render-switcher-icon` 属性添加节点信息,关闭 [#4815](https://github.com/tusen-ai/naive-ui/issues/4815) - `n-input-number` 导出 `select` 方法 - `n-data-table` 新增 `n-data-table-tr--expanded` class 到展开行,新增 `n-data-table-tr n-data-table-tr--expand` class 到附加行,关闭 [#4420](https://github.com/tusen-ai/naive-ui/issues/4420). +- `n-equation` 导出 `EquationProps` 类型. ### i18n diff --git a/src/equation/index.ts b/src/equation/index.ts index dfa64dc0e04..2aaf9539eeb 100644 --- a/src/equation/index.ts +++ b/src/equation/index.ts @@ -1 +1,2 @@ export { Equation as NEquation, equationProps } from './src/Equation' +export type { EquationProps } from './src/Equation' diff --git a/src/equation/src/Equation.tsx b/src/equation/src/Equation.tsx index b5fdb15653c..aaaaf486051 100644 --- a/src/equation/src/Equation.tsx +++ b/src/equation/src/Equation.tsx @@ -2,6 +2,7 @@ import { h, defineComponent, computed, type PropType, inject } from 'vue' import type { KatexOptions } from 'katex' import type { Katex } from '../../config-provider/src/katex' import { configProviderInjectionKey } from '../../config-provider/src/context' +import type { ExtractPublicPropTypes } from '../../_utils' export const equationProps = { value: String, @@ -9,6 +10,8 @@ export const equationProps = { katexOptions: Object as PropType } as const +export type EquationProps = ExtractPublicPropTypes + export const Equation = defineComponent({ name: 'Equation', props: equationProps,