|
@@ -638,6 +638,26 @@ describe('compiler: v-for', () => {
|
|
|
})
|
|
})
|
|
|
})
|
|
})
|
|
|
})
|
|
})
|
|
|
|
|
+
|
|
|
|
|
+ test('template v-for key no prefixing on attribute key', () => {
|
|
|
|
|
+ const {
|
|
|
|
|
+ node: { codegenNode }
|
|
|
|
|
+ } = parseWithForTransform(
|
|
|
|
|
+ '<template v-for="item in items" key="key">test</template>',
|
|
|
|
|
+ { prefixIdentifiers: true }
|
|
|
|
|
+ )
|
|
|
|
|
+ const innerBlock = codegenNode.children.arguments[1].returns
|
|
|
|
|
+ expect(innerBlock).toMatchObject({
|
|
|
|
|
+ type: NodeTypes.VNODE_CALL,
|
|
|
|
|
+ tag: FRAGMENT,
|
|
|
|
|
+ props: createObjectMatcher({
|
|
|
|
|
+ key: {
|
|
|
|
|
+ type: NodeTypes.SIMPLE_EXPRESSION,
|
|
|
|
|
+ content: 'key'
|
|
|
|
|
+ }
|
|
|
|
|
+ })
|
|
|
|
|
+ })
|
|
|
|
|
+ })
|
|
|
})
|
|
})
|
|
|
|
|
|
|
|
describe('codegen', () => {
|
|
describe('codegen', () => {
|