File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed
packages/anu-vue/src/components/list Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -59,7 +59,7 @@ export const AList = defineComponent({
59
59
*/
60
60
modelValue : {
61
61
type : [ String , Number , Object ] ,
62
- default : null ,
62
+ default : undefined ,
63
63
} ,
64
64
65
65
/**
@@ -97,7 +97,7 @@ export const AList = defineComponent({
97
97
const handleListItemClick = ( index : number ) => {
98
98
const itemValue = options . value [ index ] . value
99
99
selectListItem ( itemValue )
100
- if ( props . modelValue !== null )
100
+ if ( props . modelValue !== undefined )
101
101
emit ( 'update:modelValue' , value . value )
102
102
}
103
103
@@ -123,10 +123,11 @@ export const AList = defineComponent({
123
123
return < li
124
124
onClick = { ( ) => handleListItemClick ( itemIndex ) }
125
125
style = { [ ...styles . value ] }
126
+ data-x = { String ( props . modelValue ) }
126
127
class = { [
127
128
'a-list-item' ,
128
129
{ 'opacity-50 pointer-events-none' : listItem . disable } ,
129
- props . modelValue !== null
130
+ props . modelValue !== undefined
130
131
? [ ...classes . value , 'cursor-pointer' ]
131
132
: '' ,
132
133
'flex items-center gap-$a-list-item-gap m-$a-list-item-margin p-$a-list-item-padding min-h-$a-list-item-min-height' ,
You can’t perform that action at this time.
0 commit comments