fix(compiler-core): fix slot source location (#3494)

This commit is contained in:
Johnson Chu
2021-03-27 23:20:39 +08:00
committed by GitHub
parent 2121c32e22
commit e752bddb33

View File

@@ -623,7 +623,7 @@ function parseAttribute(
if (match[2]) {
const isSlot = dirName === 'slot'
const startOffset = name.indexOf(match[2])
const startOffset = name.lastIndexOf(match[2])
const loc = getSelection(
context,
getNewPosition(context, start, startOffset),