@mee4dy/crud
Version:
Create a backend and frontend in 5 minutes! With our powerful full stack crud system, customize it to suit you.
3 lines (2 loc) • 1.69 kB
JavaScript
"use strict";const i=require("bootstrap-vue"),u=require("./Th/Index.vue.cjs"),o=require("./Td/Index.vue.cjs");;/* empty css */const c=require("../../../../_virtual/_plugin-vue2_normalizer.cjs"),d={components:{"ui-table-th":u,"ui-table-td":o,"b-overlay":i.BOverlay,"b-table":i.BTable},data(){return{stickyHeader:"calc(100vh - 55px - 20px)",emptyText:"Нет данных"}},computed:{fieldsComputed(){var e;return(((e=this.$attrs)==null?void 0:e.fields)||[]).filter(t=>!t.hidden).map(t=>(t.width&&(t.thStyle={width:t.width}),t))}},methods:{onChange(s,e){this.$emit("update:value",s,e)}}};var b=function(){var e=this,t=e._self._c;return t("div",{staticClass:"crud-ui-table"},[t("b-overlay",{attrs:{show:e.$attrs.busy,rounded:"",opacity:"0.6",spinner:"","spinner-variant":"secondary"}},[t("b-table",e._g(e._b({attrs:{responsive:"",fixed:"",hover:"",bordered:"","show-empty":!e.$attrs.busy,"sticky-header":e.stickyHeader,"label-sort-asc":"","label-sort-desc":"","label-sort-clear":"",fields:e.fieldsComputed},scopedSlots:e._u([{key:"head()",fn:function(r){return[t("ui-table-th",{attrs:{data:r}})]}},{key:"cell()",fn:function(r){return[t("ui-table-td",{attrs:{data:r},on:{change:function(n){return e.onChange(r,n)}}})]}},{key:"empty",fn:function(r){return[t("div",[e._v(e._s(e.emptyText))])]}},e._l(e.$scopedSlots,function(r,n){return{key:n,fn:function(a){return[n.startsWith("cell")?t("ui-table-td",{attrs:{data:a},on:{change:function(l){return e.onChange(a,l)}}},[e._t(n,null,null,a)],2):e._t(n,null,null,a)]}}})],null,!0)},"b-table",e.$attrs,!1),e.$listeners))],1)],1)},_=[],f=c(d,b,_,!1,null,"e3bc55e5");const h=f.exports;module.exports=h;
//# sourceMappingURL=Index.vue.cjs.map