diff --git a/src/checkbox/src/CheckMark.tsx b/src/checkbox/src/CheckMark.tsx index 4897034d68b..c1c89eaf83e 100644 --- a/src/checkbox/src/CheckMark.tsx +++ b/src/checkbox/src/CheckMark.tsx @@ -1,6 +1,7 @@ +import type { VNode } from 'vue' import { h } from 'vue' -export default ( +export default (): VNode => ( diff --git a/src/checkbox/src/Checkbox.tsx b/src/checkbox/src/Checkbox.tsx index 5e9633e94ca..558fd2a4905 100644 --- a/src/checkbox/src/Checkbox.tsx +++ b/src/checkbox/src/Checkbox.tsx @@ -32,8 +32,8 @@ import { } from '../../_utils' import { checkboxLight } from '../styles' import { checkboxGroupInjectionKey } from './CheckboxGroup' -import CheckMark from './CheckMark' -import LineMark from './LineMark' +import renderCheckMark from './CheckMark' +import renderLineMark from './LineMark' import style from './styles/index.cssr' export const checkboxProps = { @@ -246,8 +246,8 @@ export default defineComponent({ colorTableHeader, colorTableHeaderModal, colorTableHeaderPopover, - checkMarkColor, - checkMarkColorDisabled, + renderCheckMarkColor, + renderCheckMarkColorDisabled, border, borderFocus, borderDisabled, @@ -255,7 +255,7 @@ export default defineComponent({ boxShadowFocus, textColor, textColorDisabled, - checkMarkColorDisabledChecked, + renderCheckMarkColorDisabledChecked, colorDisabledChecked, borderDisabledChecked, labelPadding, @@ -286,9 +286,10 @@ export default defineComponent({ '--n-color-disabled-checked': colorDisabledChecked, '--n-text-color': textColor, '--n-text-color-disabled': textColorDisabled, - '--n-check-mark-color': checkMarkColor, - '--n-check-mark-color-disabled': checkMarkColorDisabled, - '--n-check-mark-color-disabled-checked': checkMarkColorDisabledChecked, + '--n-check-mark-color': renderCheckMarkColor, + '--n-check-mark-color-disabled': renderCheckMarkColorDisabled, + '--n-check-mark-color-disabled-checked': + renderCheckMarkColorDisabledChecked, '--n-font-size': fontSize, '--n-label-padding': labelPadding } @@ -389,11 +390,11 @@ export default defineComponent({ key="indeterminate" class={`${mergedClsPrefix}-checkbox-icon`} > - {LineMark} + {renderLineMark()} ) : (
) }} diff --git a/src/checkbox/src/LineMark.tsx b/src/checkbox/src/LineMark.tsx index 2053beb42f9..802bda3254e 100644 --- a/src/checkbox/src/LineMark.tsx +++ b/src/checkbox/src/LineMark.tsx @@ -1,6 +1,7 @@ +import type { VNode } from 'vue' import { h } from 'vue' -export default ( +export default (): VNode => (