无法转到vue.js中的下一页

时间:2018-11-16 11:53:13

标签: vue.js

carrier / components / index.vue

curl -s -X POST -H "Content-Type: application/json" --data @/full/path/to/confluent-5.0.0/etc/kafka-connect-jdbc/source-quickstart-sqlite.json http://localhost:18083/connectors

载体/组件/Add.vue

<d-button  @click.native = "addCarrier();"><i class="icon icon-sm"></i><span>New</span></i></d-button>

<script>
import axios from 'axios'
import { ROAST_CONFIG } from '../../../../config/config.js';

import CarrierAdd from  './Add.vue';

var baseUrl = ROAST_CONFIG.API_URL;
export default {
    components: {
        'carrier-add':CarrierAdd,
    },
    data () {
        return {
            form: {
                showTop: false,
                componentLoading:true,
            },
        }
    },
    mounted () {
        setTimeout(() => { 
            this.componentLoading = false;    
        },500);
    },
    methods: {
        addCarrier() {

            alert(this.$parent.currentComponent);
            this.$parent.currentComponent = "carrier-add";
            this.$router.push({name:"CarriersNew"});
        }
    }
}

route.js

从“ page / admin / carriers / index.vue”导入运营商;

<template>
   <h1>Carrier Add</h1>
</template>

我无法从索引页面转到添加页面。我如何去那个页面,请帮帮我。

0 个答案:

没有答案