Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/vue.js/6.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Vue.js vue更改特定du/组件路由器路径_Vue.js_Vuejs2_Vue Component_Vuex_Vue Router - Fatal编程技术网

Vue.js vue更改特定du/组件路由器路径

Vue.js vue更改特定du/组件路由器路径,vue.js,vuejs2,vue-component,vuex,vue-router,Vue.js,Vuejs2,Vue Component,Vuex,Vue Router,嘿,还有一个问题: 组中有一个名为group的div组下面有几个block/div groupparent位于此处: <div v-if="block.blocktype == 'partial'"> <h1>{{block.name}}</h1> <component v-if="block.template_path" :is="block.template_path" :key="block.template_path" v

嘿,还有一个问题:

组中有一个名为group的div组下面有几个block/div

groupparent位于此处:

<div v-if="block.blocktype == 'partial'">
      <h1>{{block.name}}</h1>
      <component v-if="block.template_path" :is="block.template_path" :key="block.template_path" v-bind:bduuid="block.uuid"  v-bind:block_data="block.block_data">
      </component>
    </div>
有人知道如何将路由器路径从“显示约会”更改为“新约会”吗


非常感谢

我不知道我是否得到了正确的答案,但如果您想要页面的动态路径。你可以这样做

例如:

{ path: "baseurl/:appointment/quickedit", component: YourComponent, name: yourComponentName ... }
您可以将关键字设置为router param

this.$router.push("baseurl/show_appointmen/quickedit")
this.$router.push("baseurl/edit_appointmen/quickedit")

在mounted hook中,您可以获得约会参数,并执行您的逻辑。

嘿,谢谢您的回答,但如果我这样做,它会更改整个页面,但我只想将divs路由器从show更改为edit/new,因为我在一个页面中有服务器组件,所以当我只编辑一个div时,不想转到其他页面
{ path: "baseurl/:appointment/quickedit", component: YourComponent, name: yourComponentName ... }
this.$router.push("baseurl/show_appointmen/quickedit")
this.$router.push("baseurl/edit_appointmen/quickedit")