Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit c7afaf4

Browse files
fix: prepend vm for function arg spread apply context
1 parent 16159be commit c7afaf4

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

‎test.js‎

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,3 +37,11 @@ test('should work', () => {
3737
`<div id="foo" class="bar"></div>`
3838
)
3939
})
40+
41+
test('arg spread', () => {
42+
const res = compile(`
43+
<button @click="(...args) => { store.foo(...args) }">Go</button>
44+
`)
45+
const code = transpile(`function render() {${res.render}}`)
46+
expect(code).toMatch(`_vm.store.foo.apply(_vm.store, args)`)
47+
})

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /