UNPKG

@mee4dy/crud

Version:

Create a backend and frontend in 5 minutes! With our powerful full stack crud system, customize it to suit you.

63 lines (62 loc) 2.16 kB
import { BOverlay as i, BTable as o } from "bootstrap-vue"; import u from "./Th/Index.vue.js"; import d from "./Td/Index.vue.js"; /* empty css */ import c from "../../../../_virtual/_plugin-vue2_normalizer.js"; const f = { components: { "ui-table-th": u, "ui-table-td": d, "b-overlay": i, "b-table": o }, data() { return { stickyHeader: "calc(100vh - 55px - 20px)", emptyText: "Нет данных" }; }, computed: { fieldsComputed() { var t; return (((t = this.$attrs) == null ? void 0 : t.fields) || []).filter((e) => !e.hidden).map((e) => (e.width && (e.thStyle = { width: e.width }), e)); } }, methods: { onChange(s, t) { this.$emit("update:value", s, t); } } }; var b = function() { var t = this, e = t._self._c; return e("div", { staticClass: "crud-ui-table" }, [e("b-overlay", { attrs: { show: t.$attrs.busy, rounded: "", opacity: "0.6", spinner: "", "spinner-variant": "secondary" } }, [e("b-table", t._g(t._b({ attrs: { responsive: "", fixed: "", hover: "", bordered: "", "show-empty": !t.$attrs.busy, "sticky-header": t.stickyHeader, "label-sort-asc": "", "label-sort-desc": "", "label-sort-clear": "", fields: t.fieldsComputed }, scopedSlots: t._u([{ key: "head()", fn: function(r) { return [e("ui-table-th", { attrs: { data: r } })]; } }, { key: "cell()", fn: function(r) { return [e("ui-table-td", { attrs: { data: r }, on: { change: function(n) { return t.onChange(r, n); } } })]; } }, { key: "empty", fn: function(r) { return [e("div", [t._v(t._s(t.emptyText))])]; } }, t._l(t.$scopedSlots, function(r, n) { return { key: n, fn: function(a) { return [n.startsWith("cell") ? e("ui-table-td", { attrs: { data: a }, on: { change: function(l) { return t.onChange(a, l); } } }, [t._t(n, null, null, a)], 2) : t._t(n, null, null, a)]; } }; })], null, !0) }, "b-table", t.$attrs, !1), t.$listeners))], 1)], 1); }, m = [], p = /* @__PURE__ */ c( f, b, m, !1, null, "e3bc55e5" ); const k = p.exports; export { k as default }; //# sourceMappingURL=Index.vue.js.map