ibiz-grid-timepicker.component.js 723 字节
Newer Older
MoneyQ's avatar
MoneyQ committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25
"use strict";
Vue.component('ibiz-grid-timepicker', {
    template: "\n    <time-picker style=\"width: 100%;\" type=\"time\" :format=\"fmt\" v-model=\"value\" transfer @on-change=\"setValue\"></time-picker>\n    ",
    data: function () {
        return {
            value: '',
            fmt: '',
            rowData: null,
            column: null,
            grid: null
        };
    },
    created: function () {
        this.value = this.params.value;
        this.fmt = this.params.fmt;
    },
    methods: {
        getValue: function () {
            return this.value;
        },
        setValue: function (val) {
            this.grid.colValueChange(this.column.name, val, this.rowData);
        }
    }
});