0.0.2 • Published 3 years ago

cipher-table-controls-mixins v0.0.2

Weekly downloads
-
License
MIT
Repository
-
Last release
3 years ago

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: {},
};
0.0.2

3 years ago

0.0.1

3 years ago