diff --git a/CHANGELOG.en-US.md b/CHANGELOG.en-US.md index 71b6c159ddd..306ea76fd43 100644 --- a/CHANGELOG.en-US.md +++ b/CHANGELOG.en-US.md @@ -32,6 +32,7 @@ - `n-dynamic-input` adds `item-class` prop. - `n-slider` adds `on-dragstart` `on-dragend` prop, closes [#5365](https://github.com/tusen-ai/naive-ui/issues/5365). - `n-dialog` adds `close` slot. +- `n-equation` export the `EquationProps` type. ## 2.35.0 diff --git a/CHANGELOG.zh-CN.md b/CHANGELOG.zh-CN.md index 6bd8ceedca4..ccd7e0517c1 100644 --- a/CHANGELOG.zh-CN.md +++ b/CHANGELOG.zh-CN.md @@ -32,6 +32,7 @@ - `n-dynamic-input` 新增 `item-class` 属性 - `n-slider` 新增 `on-dragstart` `on-dragend` 属性,关闭 [#5365](https://github.com/tusen-ai/naive-ui/issues/5365) - `n-dialog` 新增 `close` 插槽 +- `n-equation` 导出 `EquationProps` 类型 ## 2.35.0 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,