@@ -4,7 +4,7 @@ import HighlightOption from './highlight-option';
4
4
import { CommonClassNameType } from '../hooks/useCommonClassName' ;
5
5
import { AutoCompleteOptionObj , TdAutoCompleteProps } from './type' ;
6
6
import log from '../_common/js/log' ;
7
- import { usePrefixClass } from '../hooks/useConfig' ;
7
+ import { useConfig , usePrefixClass } from '../hooks/useConfig' ;
8
8
import { on , off } from '../utils/dom' ;
9
9
import isString from 'lodash/isString' ;
10
10
import escapeRegExp from 'lodash/escapeRegExp' ;
@@ -30,6 +30,8 @@ export default defineComponent({
30
30
const active = ref ( '' ) ;
31
31
const classPrefix = usePrefixClass ( ) ;
32
32
33
+ const { globalConfig } = useConfig ( 'autoComplete' ) ;
34
+
33
35
const classes = computed ( ( ) => `${ classPrefix . value } -select__list` ) ;
34
36
const optionClasses = computed ( ( ) => [
35
37
`${ classPrefix . value } -select-option` ,
@@ -138,7 +140,8 @@ export default defineComponent({
138
140
} ) ;
139
141
140
142
return ( ) => {
141
- if ( ! tOptions . value . length ) return null ;
143
+ if ( ! tOptions . value . length )
144
+ return < div className = { `${ classPrefix . value } -auto-complete__panel--empty` } > { globalConfig . value . empty } </ div > ;
142
145
return (
143
146
< ul class = { classes . value } >
144
147
{ tOptions . value . map ( ( item ) => {
0 commit comments