File tree Expand file tree Collapse file tree 2 files changed +8
-1
lines changed Expand file tree Collapse file tree 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', () => {
507507 )
508508 } )
509509
510+ test ( 'allow unicode' , ( ) => {
511+ const onError = jest . fn ( )
512+ parseWithVModel ( '<span v-model="变.量" />' , { onError } )
513+
514+ expect ( onError ) . toHaveBeenCalledTimes ( 0 )
515+ } )
516+
510517 test ( 'used on scope variable' , ( ) => {
511518 const onError = jest . fn ( )
512519 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]/
5656export const isSimpleIdentifier = ( name : string ) : boolean =>
5757 ! nonIdentifierRE . test ( name )
5858
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 ] * | \[ [ ^ \] ] + \] ) * $ /
6060export const isMemberExpression = ( path : string ) : boolean => {
6161 if ( ! path ) return false
6262 return memberExpRE . test ( path . trim ( ) )
You can’t perform that action at this time.
0 commit comments