Newer
Older
make_invoice / app / src / components / table-container.js
import Vue from '../../../node_modules/vue/dist/vue.js';
require('./th-items.js');
require('./table-record.js');

Vue.component('table-container', {
    data: function () {
        return {
            basic_info: null
        }
    },
    template: `
    <div class="table-container">
        <table class="table is-striped">
            <thead>
                <th-items></th-items>
            </thead>
            <tfoot>
                <th-items></th-items>
            </tfoot>
            <tbody>
                <table-record v-for="(basic_info, index) in basic_info_list"
                    :key="index" :pos="index" :basic_info="basic_info">
                </table-record>
            </tbody>
        </table>
    </div>
    `,
    created: function () {
        this.basic_info_list = require('../assets/basic_info.json');
    }
});