Skip to content

Commit f503530

Browse files
committed
fix: fix vue 2 jsx transform error
1 parent 6a01395 commit f503530

File tree

32 files changed

+37
-32
lines changed

32 files changed

+37
-32
lines changed

babel.config.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,12 @@ module.exports = {
1616
},
1717
],
1818
'@babel/preset-typescript',
19-
isVue2 && '@vue/babel-preset-jsx',
19+
isVue2 && [
20+
'@vue/babel-preset-jsx',
21+
{
22+
compositionAPI: true,
23+
},
24+
],
2025
].filter(Boolean),
2126
plugins: [isVue3 && '@vue/babel-plugin-jsx'].filter(Boolean),
2227
env: {

src/plots/area/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ export type AreaChartProps = Writeable<
99

1010
const AreaChart = defineComponent<AreaChartProps>({
1111
name: 'AreaChart',
12-
setup(props, ctx) {
12+
setup: (props, ctx) => {
1313
return () => <BaseChart chart={Area} {...ctx.attrs} {...props} />
1414
},
1515
})

src/plots/bar/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ export type BarChartProps = Writeable<
99

1010
const BarChart = defineComponent<BarChartProps>({
1111
name: 'BarChart',
12-
setup(props, ctx) {
12+
setup: (props, ctx) => {
1313
return () => <BaseChart chart={Bar} {...ctx.attrs} {...props} />
1414
},
1515
})

src/plots/bidirectional-bar/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ export type BidirectionalBarChartProps = Writeable<
1010

1111
const BidirectionalBarChart = defineComponent<BidirectionalBarChartProps>({
1212
name: 'BidirectionalBarChart',
13-
setup(props, ctx) {
13+
setup: (props, ctx) => {
1414
return () => (
1515
<BaseChart chart={BidirectionalBar} {...ctx.attrs} {...props} />
1616
)

src/plots/box/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ export type BoxChartProps = Writeable<
99

1010
const BoxChart = defineComponent<BoxChartProps>({
1111
name: 'BoxChart',
12-
setup(props, ctx) {
12+
setup: (props, ctx) => {
1313
return () => <BaseChart chart={Box} {...ctx.attrs} {...props} />
1414
},
1515
})

src/plots/bullet/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ export type BulletChartProps = Writeable<
99

1010
const BulletChart = defineComponent<BulletChartProps>({
1111
name: 'BulletChart',
12-
setup(props, ctx) {
12+
setup: (props, ctx) => {
1313
return () => <BaseChart chart={Bullet} {...ctx.attrs} {...props} />
1414
},
1515
})

src/plots/chord/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ export type ChordChartProps = Writeable<
99

1010
const ChordChart = defineComponent<ChordChartProps>({
1111
name: 'ChordChart',
12-
setup(props, ctx) {
12+
setup: (props, ctx) => {
1313
return () => <BaseChart chart={Chord} {...ctx.attrs} {...props} />
1414
},
1515
})

src/plots/column/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ export type ColumnChartProps = Writeable<
99

1010
const ColumnChart = defineComponent<ColumnChartProps>({
1111
name: 'ColumnChart',
12-
setup(props, ctx) {
12+
setup: (props, ctx) => {
1313
return () => <BaseChart chart={Column} {...ctx.attrs} {...props} />
1414
},
1515
})

src/plots/dual-axes/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ export type DualAxesChartProps = Writeable<
99

1010
const DualAxesChart = defineComponent<DualAxesChartProps>({
1111
name: 'DualAxesChart',
12-
setup(props, ctx) {
12+
setup: (props, ctx) => {
1313
return () => <BaseChart chart={DualAxes} {...ctx.attrs} {...props} />
1414
},
1515
})

src/plots/funnel/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ export type FunnelChartProps = Writeable<
99

1010
const FunnelChart = defineComponent<FunnelChartProps>({
1111
name: 'FunnelChart',
12-
setup(props, ctx) {
12+
setup: (props, ctx) => {
1313
return () => <BaseChart chart={Funnel} {...ctx.attrs} {...props} />
1414
},
1515
})

0 commit comments

Comments
 (0)