表格内的Vue组件

时间:2018-08-07 15:04:15

标签: laravel-5 vue.js vue-component

我在Laravel Project中创建了Vue组件

TableComponent.vue

<template>
  <tr>
      <th>Header 1</th>
      <th>Header 2</th>
      <th>Header 3</th>
      <th>Header 4</th>
      <th>Header 5</th>
  </tr>
</template>

<script>
    export default {
        mounted() {
            console.log('Component mounted.')
        }
    }
</script>

我想在其中显示它

welcome.blade.php

<div id="id">
    <table>
        <thead>
            <table-component></table-component>
        </thead>
    </table>
</div>

谢谢!

1 个答案:

答案 0 :(得分:0)

尝试并查看我的代码后。我通过添加 welcome.blade.php 解决了这一问题。也许因为我添加了,所以我需要添加。 谢谢!

相关问题