mirror of
https://github.com/vuejs/babel-plugin-jsx.git
synced 2026-03-28 13:34:29 +08:00
chore: improve tsconfig
This commit is contained in:
@@ -169,15 +169,15 @@ const App = {
|
||||
```
|
||||
|
||||
```jsx
|
||||
<input v-model={[val, ['modifier']]} />;
|
||||
;<input v-model={[val, ['modifier']]} />
|
||||
// 或者
|
||||
<input v-model_modifier={val} />
|
||||
;<input v-model_modifier={val} />
|
||||
```
|
||||
|
||||
```jsx
|
||||
<A v-model={[val, 'argument', ['modifier']]} />;
|
||||
;<A v-model={[val, 'argument', ['modifier']]} />
|
||||
// 或者
|
||||
<input v-model:argument_modifier={val} />
|
||||
;<input v-model:argument_modifier={val} />
|
||||
```
|
||||
|
||||
会编译成:
|
||||
|
||||
@@ -173,15 +173,15 @@ const App = {
|
||||
```
|
||||
|
||||
```jsx
|
||||
<input v-model={[val, ['modifier']]} />;
|
||||
;<input v-model={[val, ['modifier']]} />
|
||||
// Or
|
||||
<input v-model_modifier={val} />
|
||||
;<input v-model_modifier={val} />
|
||||
```
|
||||
|
||||
```jsx
|
||||
<A v-model={[val, 'argument', ['modifier']]} />;
|
||||
;<A v-model={[val, 'argument', ['modifier']]} />
|
||||
// Or
|
||||
<input v-model:argument_modifier={val} />
|
||||
;<input v-model:argument_modifier={val} />
|
||||
```
|
||||
|
||||
Will compile to:
|
||||
|
||||
@@ -11,7 +11,7 @@ import type { State, VueJSXPluginOptions } from './interface'
|
||||
import type * as BabelCore from '@babel/core'
|
||||
import type { NodePath, Visitor } from '@babel/traverse'
|
||||
|
||||
export { VueJSXPluginOptions }
|
||||
export type { VueJSXPluginOptions }
|
||||
|
||||
const hasJSX = (parentPath: NodePath<t.Program>) => {
|
||||
let fileHasJSX = false
|
||||
|
||||
Reference in New Issue
Block a user