A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/vuejs/vue/commit/a6169d1eb71d64eacddf1738e72d21725e2bff00 below:

fix static input type being overwritten by v-bind object … · vuejs/vue@a6169d1 · GitHub

File tree Expand file treeCollapse file tree 2 files changed

+12

-1

lines changed

Filter options

Expand file treeCollapse file tree 2 files changed

+12

-1

lines changed Original file line number Diff line number Diff line change

@@ -34,7 +34,7 @@ function preTransformNode (el: ASTElement, options: CompilerOptions) {

34 34

if (map[':type'] || map['v-bind:type']) {

35 35

typeBinding = getBindingAttr(el, 'type')

36 36

}

37 -

if (!typeBinding && map['v-bind']) {

37 +

if (!map.type && !typeBinding && map['v-bind']) {

38 38

typeBinding = `(${map['v-bind']}).type`

39 39

}

40 40 Original file line number Diff line number Diff line change

@@ -337,4 +337,15 @@ describe('Directive v-model checkbox', () => {

337 337

expect(vm.$el.children[1].textContent).toBe('false')

338 338

}).then(done)

339 339

})

340 + 341 +

// #7811

342 +

it('type should not be overwritten by v-bind', () => {

343 +

const vm = new Vue({

344 +

data: {

345 +

test: true

346 +

},

347 +

template: '<input type="checkbox" v-model="test" v-bind="$attrs">'

348 +

}).$mount()

349 +

expect(vm.$el.type).toBe('checkbox')

350 +

})

340 351

})

You can’t perform that action at this time.


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4