【发布时间】:2019-07-12 03:07:12
【问题描述】:
我有一个带有 div 和一个按钮的 vue 组件,进入另一个 div 我有两个组件
<script>
export default {
name: 'excursion-backend-component',
methods:{
doRedirection: function () {
window.location = APP_URL+"/excursiones/create";
}
},
mounted() {
console.log(APP_URL+"/excursiones/create");
console.log("aaaa");
}
}
</script>
<template>
<div class="container">
<h3>Adicionar excursión</h3>
<div style="text-align: right">
<a class="btn btn-primary" :href="doRedirection"><i class="fa fa-plus"></i> Adicionar</a>
</div>
<br>
<div>
<excursion-list-component></excursion-list-component>
<excursion-add-component></excursion-add-component>
</div>
</div>
</template>
但我没有看到导航器上的按钮。
怎么了?
【问题讨论】:
-
Ufff 对不起,我在 view laravel 上调用了 excursion-list-component 组件。正确的做法是放通用组件。 (版主。如果你想删除这个问题......)
-
如果您认为这是一个好问题并且对其他用户有帮助,您可以回答自己的问题。如果这是一个基本的错字,那么我会投票关闭它。
标签: laravel button vue.js components