daiwei 11 mesiacov pred
rodič
commit
78a11fe8d5

+ 1 - 1
packages/compiler-dom/__tests__/transforms/__snapshots__/vModel.spec.ts.snap

@@ -48,7 +48,7 @@ return function render(_ctx, _cache) {
 }"
 `;
 
-exports[`compiler: transform v-model > input with v-bind shorthand type should use dynamic model 1`] = `
+exports[`compiler: transform v-model > input with v-bind shorthand type after v-model should use dynamic model 1`] = `
 "const _Vue = Vue
 
 return function render(_ctx, _cache) {

+ 2 - 2
packages/compiler-dom/__tests__/transforms/vModel.spec.ts

@@ -63,8 +63,8 @@ describe('compiler: transform v-model', () => {
     expect(generate(root).code).toMatchSnapshot()
   })
 
-  test('input with v-bind shorthand type should use dynamic model', () => {
-    const root = transformWithModel('<input :type v-model="model" />')
+  test('input with v-bind shorthand type after v-model should use dynamic model', () => {
+    const root = transformWithModel('<input v-model="model" :type/>')
 
     expect(root.helpers).toContain(V_MODEL_DYNAMIC)
     expect(generate(root).code).toMatchSnapshot()