Replies: 1 comment
-
PS. minimal step is just a steps to reproduce, I'm using NaiveUI, it use jsx, so i have to use jsx. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
minimal step:
pnpm create vue@latest
to create a vuejs project.choose:
TypeScript / JSX support / Vue Router / Pinia / ESLint
.dependencies in package.json:
for example:
src/component/RenderComponent.ts
ts
totsx
.import RenderComponent from './components/RenderComponent'
You did it
, html propertytitle
affectI have searched for a long time and found no perfect solution.
A possible solution is modify
env.d.ts
file, to let ts knowntitle properties is allow
.it works. But when a component do have a props named
title
, something wrong again.change
HelloWorld
component, add a props namedtitle
:this time, can not pass a funtion to props.
does anyone know how to implement:
if component define props, defined props first.
if component not define props, and global custom props define, global custom props first.
if none of them defined, allow html properties like title/onClick etc.
relevant issue: #1077
Beta Was this translation helpful? Give feedback.
All reactions