Skip to content

Commit 01a6e4b

Browse files
authored
fix(plugin-vue): use __vccOpts for vue-class-component (#5374)
1 parent ee30ad7 commit 01a6e4b

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

packages/plugin-vue/src/helper.ts

+3-2
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,10 @@ export const EXPORT_HELPER_ID = 'plugin-vue:export-helper'
22

33
export const helperCode = `
44
export default (sfc, props) => {
5+
const target = sfc.__vccOpts || sfc;
56
for (const [key, val] of props) {
6-
sfc[key] = val
7+
target[key] = val;
78
}
8-
return sfc
9+
return target;
910
}
1011
`

0 commit comments

Comments
 (0)