Comments (3)
import { defineComponent, ExtractPropTypes, HTMLAttributes } from 'vue';
const childProps = {
label: String
}
export type ChildProps = ExtractPropTypes<typeof childProps> & HTMLAttributes
const Child = defineComponent<ChildProps>({
setup(_, ctx) {
return () => [
<div>{_.label}</div>,
<input {...ctx.attrs}/>
];
}
});
Child.props = childProps
const Parent = defineComponent(() => {
return () => <Child label="test" placeholder="please input"/>;
});
from babel-plugin-jsx.
You should declare type in Child
component.
from babel-plugin-jsx.
Accepted.
from babel-plugin-jsx.
Related Issues (20)
- [BUG] Empty package for version 1.1.2 on npm! HOT 1
- [BUG] 1.1.2 和 1.1.3 版本抛弃了兼容 node 12, 应该是一个 break change HOT 1
- [Question] In the future and Object slot typing be supported by this plugin HOT 2
- [Question] How to pass function slots ? HOT 1
- [BUG] empty string transform to true
- Action Required: Fix Renovate Configuration
- [BUG] empty string transform to true HOT 2
- [Question] How to pass any attribute to the component HOT 2
- [BUG] Excluding a file will prevent it from still getting parsed as JSX causing errors
- Can this plugin be used in a browser? HOT 1
- [BUG] vModel 修饰符不能动态 HOT 2
- [BUG] {} 渲染异常
- [BUG] tsup bundle problem HOT 2
- [BUG] Typescript typings HOT 1
- [BUG] "resolveDirective" is imported from external module "vue" but never used
- [Question] Help配置列表
- [Question] directives:v-model or vModel?v-show or vShow?
- [BUG] Report bug
- [Question] how to make vue jsx ast return to jsx
- [Question] How to set a Symbolic Link in README.md
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from babel-plugin-jsx.