File tree Expand file tree Collapse file tree 1 file changed +14
-11
lines changed Expand file tree Collapse file tree 1 file changed +14
-11
lines changed Original file line number Diff line number Diff line change @@ -27,22 +27,25 @@ export default defineComponent({
2727 large : 'lg' ,
2828 small : 'sm' ,
2929 } ,
30- sLoading : ! ! this . loading ,
30+ sLoading : false ,
3131 hasTwoCNChar : false ,
3232 } ;
3333 } ,
3434 watch : {
35- loading ( val , preVal ) {
36- if ( preVal && typeof preVal !== 'boolean' ) {
37- clearTimeout ( this . delayTimeout ) ;
38- }
39- if ( val && typeof val !== 'boolean' && val . delay ) {
40- this . delayTimeout = setTimeout ( ( ) => {
35+ loading : {
36+ handler ( val , preVal ) {
37+ if ( preVal && typeof preVal !== 'boolean' ) {
38+ clearTimeout ( this . delayTimeout ) ;
39+ }
40+ if ( val && typeof val !== 'boolean' && val . delay ) {
41+ this . delayTimeout = setTimeout ( ( ) => {
42+ this . sLoading = ! ! val ;
43+ } , val . delay ) ;
44+ } else {
4145 this . sLoading = ! ! val ;
42- } , val . delay ) ;
43- } else {
44- this . sLoading = ! ! val ;
45- }
46+ }
47+ } ,
48+ immediate : true ,
4649 } ,
4750 } ,
4851 mounted ( ) {
You can’t perform that action at this time.
0 commit comments