Vue.js 如何在单击按钮时关闭Vuesax弹出屏幕?

Vue.js 如何在单击按钮时关闭Vuesax弹出屏幕?,vue.js,popup,vue-component,Vue.js,Popup,Vue Component,我已经在VueSax弹出屏幕内创建了一个表单,表单将在单击按钮时提交,但一旦提交发件人,弹出窗口就不会关闭。请帮助输入代码 单击submit按钮后,它将点击下面的方法 createRecord() { this.$vs.loading(); jwt.createLeads(this.newRecord).then((response) => { this.$vs.loading.close();

我已经在VueSax弹出屏幕内创建了一个表单,表单将在单击按钮时提交,但一旦提交发件人,弹出窗口就不会关闭。请帮助输入代码

单击submit按钮后,它将点击下面的方法

  createRecord() {

        this.$vs.loading();


          jwt.createLeads(this.newRecord).then((response) => {

            this.$vs.loading.close();

            this.$store.dispatch("userManagement/upsertToState", { type: "Leads", data: response.data.leads });

            this.newRecord.leadtype = this.newRecord.first_name = this.newRecord.last_name = this.newRecord.email_id = this.newRecord.phone_number = this.newRecord.location = this.newRecord.postcode = this.newRecord.lead_address = this.newRecord.gender = this.newRecord.lead_source = this.newRecord.required_sub = this.newRecord.teach_mode = this.newRecord.location_pref = this.newRecord.lead_frequency = this.newRecord.session_duration = this.newRecord.pref_days = this.newRecord.pref_time_slot = this.newRecord.tutor_pref = this.newRecord.lead_owner = this.newRecord.notes = ''

           alert("Lead Creation Success");
           location.reload();
        }).catch((error) => {
            console.log(error)

            this.$vs.loading.close();


            this.$vs.notify({
                title: 'Error',
                text: 'There was an error creating the Lead',
                iconPack: 'feather',
                icon: 'icon-alert-circle',
                color: 'danger'
            });
        });

    },

在API部分的vuesax文档中,我可以看到“active.sync”道具通过更改此道具的值来确定弹出窗口是否处于活动状态(可见),您可以关闭弹出窗口。