@mee4dy/crud
Version:
Create a backend and frontend in 5 minutes! With our powerful full stack crud system, customize it to suit you.
70 lines (69 loc) • 2.47 kB
JavaScript
import l from "./Boolean.vue.js";
import d from "./Date.vue.js";
import r from "./Datetime.vue.js";
import s from "./Link.vue.js";
import n from "./Number.vue.js";
import u from "./Value.vue.js";
/* empty css */
import o from "../../../../../_virtual/_plugin-vue2_normalizer.js";
const f = {
components: {
"ui-table-td-boolean": l,
"ui-table-td-date": d,
"ui-table-td-datetime": r,
"ui-table-td-link": s,
"ui-table-td-number": n,
"ui-table-td-value": u
},
props: {
data: {
type: Object
}
},
computed: {
field() {
var e;
return (e = this.data) == null ? void 0 : e.field;
},
fieldType() {
var e;
return ((e = this.field) == null ? void 0 : e.type) || "value";
},
tooltip() {
var e;
return (e = this.field) == null ? void 0 : e.tooltip;
},
prefix() {
var e;
return (e = this.field) == null ? void 0 : e.prefix;
},
suffix() {
var e;
return (e = this.field) == null ? void 0 : e.suffix;
},
hasSlot() {
return !!this.$slots.default;
},
centered() {
var e;
return ((e = this.field) == null ? void 0 : e.centered) || ["boolean"].includes(this.fieldType);
}
}
};
var p = function() {
var i;
var t = this, a = t._self._c;
return a("div", { staticClass: "crud-ui-table-td", class: { "crud-ui-table-td--center": t.centered }, style: { width: (i = this.field) == null ? void 0 : i.width }, attrs: { title: t.tooltip } }, [t.hasSlot ? t._t("default") : [t.prefix ? a("span", { staticClass: "crud-ui-table-td-prefix" }, [t._v(t._s(t.prefix))]) : t._e(), t.fieldType === "boolean" ? a("ui-table-td-boolean", t._g({ attrs: { data: t.data } }, t.$listeners)) : t.fieldType === "date" ? a("ui-table-td-date", t._g({ attrs: { data: t.data } }, t.$listeners)) : t.fieldType === "datetime" ? a("ui-table-td-datetime", t._g({ attrs: { data: t.data } }, t.$listeners)) : t.fieldType === "link" ? a("ui-table-td-link", t._g({ attrs: { data: t.data } }, t.$listeners)) : t.fieldType === "number" ? a("ui-table-td-number", t._g({ attrs: { data: t.data } }, t.$listeners)) : a("ui-table-td-value", [t._v(t._s(t.data.value))]), t.suffix ? a("span", { staticClass: "crud-ui-table-td-suffix" }, [t._v(t._s(t.suffix))]) : t._e()]], 2);
}, b = [], m = /* @__PURE__ */ o(
f,
p,
b,
!1,
null,
"c2d61204"
);
const $ = m.exports;
export {
$ as default
};
//# sourceMappingURL=Index.vue.js.map