We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
renderTnodeJSX
{}
// packages/components/hooks/tnode.ts export const useTNodeJSX = () => { const instance = getCurrentInstance(); return function (name: string, options?: OptionsType) { const slotFirst = getSlotFirst(options); .... if ((isPropsEmpty || slotFirst) && (instance.slots[camelCase(name)] || instance.slots[kebabCase(name)])) { return handleSlots(instance, name, params); } return propsNode; }; };
count
// packages/components/badge/props.ts /** 徽标右上角内容。可以是数字,也可以是文字。如:'new'/3/99+ */ count: { type: [String, Number, Function] as PropType<TdBadgeProps['count']>, default: 0, },
关于如何判断用户是否传某个 props,可参考 https://github.com/Tencent/tdesign-vue-next/blob/develop/packages/components/hooks/useVModel.ts#L20
The text was updated successfully, but these errors were encountered:
👋 @zhangpaopao0609,感谢给 TDesign 提出了 issue。 请根据 issue 模版确保背景信息的完善,我们将调查并尽快回复你。
Sorry, something went wrong.
close as completed
uyarn
zhangpaopao0609
No branches or pull requests
问题: 当前的
renderTnodeJSX
渲染 props 和 slots 存在优先级问题{}
,将导致默认渲染的是 slot,即 slot 优先级更高count
。如果按照 props 优先级更高的原则,用户填写 slots 就没有意义了解决方案
The text was updated successfully, but these errors were encountered: