$ NavigateTo在created()中不做任何事情

时间:2019-06-14 15:36:53

标签: nativescript nativescript-vue

这是我的代码,我在localstorage中存储了一些内容,因此我想跳过第一页。它成功装入正确的情况,但是我不转到下一页。我用“ EN”进行了测试,它甚至记录了两个日志,这对我来说很奇怪。

created() {
            console.log(this.$store.state.language);
            switch (this.$store.state.language) {
                case null:
                    console.log("Navigate to nowhere");
                    break;
                case "ZH":
                    console.log("Navigate to station zh");
                    this.$navigateTo(zhStationSelect);
                    break;
                case "EN":
                    console.log("Navigate to station eng");
                    this.$navigateTo(enStationSelect);
                    console.log("I can't be logged");
                    break;
            }
        },

0 个答案:

没有答案