0.0.2 • Published 3 years ago
cipher-table-controls-mixins v0.0.2
import
import { tableControls } from 'cipher-table-controls-mixins';
data
data() {
return {
...
tableConfig: tableConfig,
...
};
},
mixins
mixins: [..., tableControls, ...],
computed
computed: {
include() {
return "...,...";
},
exclude() {
return [...];
},
resource() {
return ...;
},
where() {
return ...;
},
formName() {
return ...;
},
},
example
import tableConfig from "./tableConfig";
import { _invoiceWhere } from "@/utils/defaultWheres";
import { tableControls } from 'cipher-table-controls-mixins';
const _resource = process.env.VUE_APP_DEFAULT_INVOICE;
export default {
name: "InvoiceTable",
components: {},
data() {
return {
tableConfig: tableConfig,
};
},
mixins: [tableControls],
computed: {
include() {
return "from,to";
},
exclude() {
return ["items"];
},
resource() {
return _resource;
},
where() {
return _invoiceWhere(this.keywords);
},
formName() {
return "Invoice Form";
},
},
mounted() {},
created() {},
destroyed() {},
methods: {},
};