@mee4dy/crud
Version:
Create a backend and frontend in 5 minutes! With our powerful full stack crud system, customize it to suit you.
54 lines (53 loc) • 1.46 kB
JavaScript
import { BDropdown as d, BDropdownForm as a, BFormCheckbox as i } from "bootstrap-vue";
/* empty css */
import l from "../../../../_virtual/_plugin-vue2_normalizer.js";
const c = {
components: {
"b-dropdown": d,
"b-dropdown-form": a,
"b-form-checkbox": i
},
props: {
fields: {
type: Array,
default: () => []
}
},
computed: {
fieldsComputed() {
return (this.fields || []).map((e) => ({
...e,
value: !e.hidden
}));
}
},
methods: {
onChangeField(r, e) {
const t = (this.fields || []).map((o) => (o.key === r && (o.hidden = !e), o));
this.$emit("fields:change", t);
}
}
};
var m = function() {
var t;
var e = this, n = e._self._c;
return (t = e.fields) != null && t.length ? n("b-dropdown", { ref: "dropdown", staticClass: "crud-ui-panel-settings", attrs: { size: "sm", text: "Колонки" } }, [n("b-dropdown-form", e._l(e.fieldsComputed, function(o) {
return n("b-form-checkbox", { key: o.key, staticClass: "mb-1 px-2", on: { change: function(s) {
return e.onChangeField(o.key, s);
} }, model: { value: o.value, callback: function(s) {
e.$set(o, "value", s);
}, expression: "field.value" } }, [e._v(e._s(o.label))]);
}), 1)], 1) : e._e();
}, p = [], f = /* @__PURE__ */ l(
c,
m,
p,
!1,
null,
"92a28d7e"
);
const b = f.exports;
export {
b as default
};
//# sourceMappingURL=Settings.vue.js.map