Using plugins cordova in project with Vue

I need to implement this plugin in my project

The problem is how can I use the variable “cordova.plugins” in the project in Vue3, I’ve been testing and I’m getting the return that the variable cordova.plugins doesn’t exist.

I’m calling my method inside the “onMounted” of my components/app.vue file as shown below:

onMounted(() => {
        f7ready(() => {
          // Init cordova APIs (see cordova-app.js)
          if (device.cordova) {
            cordovaApp.init(f7);

            
            //
          }
            alert(2)
          //
            const idfaPlugin = cordova.plugins.idfa;

            idfaPlugin.getInfo()
                .then(info => {
                    if (!info.trackingLimited) {
                        return info.idfa || info.aaid;
                    } else if (info.trackingPermission === idfaPlugin.TRACKING_PERMISSION_NOT_DETERMINED) {
                        return idfaPlugin.requestPermission().then(result => {
                            if (result === idfaPlugin.TRACKING_PERMISSION_AUTHORIZED) {
                                return idfaPlugin.getInfo().then(info => {
                                    return info.idfa || info.aaid;
                                });
                            }
                        });
                    }
                })
                .then(idfaOrAaid => {
                    if (idfaOrAaid) {
                        alert(idfaOrAaid);
                    }
                });
          //

          // Call F7 APIs here
        });
      });

I would like to know how to fix this.

try this: const idfa Plugin = window.cordova.plugins.idfa;
make sure your cordova.js is import