Skip to content

Commit 1cf377f

Browse files
committed
bind value as property for <select> (fix vuejs#4369)
1 parent a8f4139 commit 1cf377f

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/platforms/web/util/attrs.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,10 @@
33
import { makeMap } from 'shared/util'
44

55
// attributes that should be using props for binding
6+
const acceptValue = makeMap('input,textarea,option,select')
67
export const mustUseProp = (tag: string, attr: string): boolean => {
78
return (
8-
(attr === 'value' && (tag === 'input' || tag === 'textarea' || tag === 'option')) ||
9+
(attr === 'value' && acceptValue(tag)) ||
910
(attr === 'selected' && tag === 'option') ||
1011
(attr === 'checked' && tag === 'input') ||
1112
(attr === 'muted' && tag === 'video')

0 commit comments

Comments
 (0)