xgqfrms™, xgqfrms® : xgqfrms's offical website of cnblogs! xgqfrms™, xgqfrms® : xgqfrms's offical website of GitHub!

vue & this.$refs.form.methods bugs

vue & this.$refs.form.methods bugs

组件方法调用的 form不匹配

    async saveClick () {
        // 调用 detailRef 组件的 copyPushClick 方法
        let params = this.$refs.detailRef.copyPushClick('detailsForm');
        console.log('tree click params ', JSON.stringify(params, null, 4));
        // 复制 推送 校验
        console.log('this.$refs.detailRef', this.$refs.detailRef);
        console.log('this.selfMenuKey', this.selfMenuKey);
        // ✅
        if(this.selfMenuKey  !== 'campaign') {
            const isValidate = this.$refs.detailRef.copyPushFormChecker('detailsForm');
            if(!isValidate) {
                return;
            }
        }
        // ❌
        // const isValidate = this.$refs.detailRef.copyPushFormChecker('detailsForm');
        // if(!isValidate) {
        //     return;
        // }
  }

refs

https://developer.aliyun.com/article/712112

https://github.com/vuejs/vue/issues/3842



©xgqfrms 2012-2020

www.cnblogs.com 发布文章使用:只允许注册用户才可以访问!

原创文章,版权所有©️xgqfrms, 禁止转载 🈲️,侵权必究⚠️!


posted @ 2021-03-18 16:08  xgqfrms  阅读(214)  评论(0编辑  收藏  举报