File tree 2 files changed +8
-1
lines changed
2 files changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -507,6 +507,13 @@ describe('compiler: transform v-model', () => {
507
507
)
508
508
} )
509
509
510
+ test ( 'allow unicode' , ( ) => {
511
+ const onError = jest . fn ( )
512
+ parseWithVModel ( '<span v-model="变.量" />' , { onError } )
513
+
514
+ expect ( onError ) . toHaveBeenCalledTimes ( 0 )
515
+ } )
516
+
510
517
test ( 'used on scope variable' , ( ) => {
511
518
const onError = jest . fn ( )
512
519
parseWithVModel ( '<span v-for="i in list" v-model="i" />' , {
Original file line number Diff line number Diff line change @@ -56,7 +56,7 @@ const nonIdentifierRE = /^\d|[^\$\w]/
56
56
export const isSimpleIdentifier = ( name : string ) : boolean =>
57
57
! nonIdentifierRE . test ( name )
58
58
59
- const memberExpRE = / ^ [ A - Z a - z _ $ ] [ \w $ ] * (?: \s * \. \s * [ A - Z a - z _ $ ] [ \w $ ] * | \[ [ ^ \] ] + \] ) * $ /
59
+ const memberExpRE = / ^ [ A - Z a - z _ $ \xA0 - \uFFFF ] [ \w $ \xA0 - \uFFFF ] * (?: \s * \. \s * [ A - Z a - z _ $ \xA0 - \uFFFF ] [ \w $ \xA0 - \uFFFF ] * | \[ [ ^ \] ] + \] ) * $ /
60
60
export const isMemberExpression = ( path : string ) : boolean => {
61
61
if ( ! path ) return false
62
62
return memberExpRE . test ( path . trim ( ) )
You can’t perform that action at this time.
0 commit comments