lkt-item-crud 1.0.10 → 1.0.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/lkt-item-crud.es.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as le, useSlots as ue, ref as
|
|
1
|
+
import { defineComponent as le, useSlots as ue, ref as n, computed as r, watch as B, resolveComponent as w, openBlock as i, createElementBlock as m, createElementVNode as I, toDisplayString as M, renderSlot as R, createCommentVNode as y, withDirectives as V, createBlock as _, withCtx as A, unref as F, vShow as L, createVNode as P } from "vue";
|
|
2
2
|
import { httpCall as oe } from "lkt-http-client";
|
|
3
3
|
import { DataState as re } from "lkt-data-state";
|
|
4
4
|
import de from "lkt-button";
|
|
@@ -7,11 +7,8 @@ import ne from "lkt-loader";
|
|
|
7
7
|
const ie = { class: "lkt-item-crud" }, ce = {
|
|
8
8
|
key: 0,
|
|
9
9
|
class: "lkt-item-crud_header"
|
|
10
|
-
}, ve = { class: "lkt-item-crud_header-title" }, fe = { class: "lkt-item-crud_header-slot" }, pe = {
|
|
10
|
+
}, ve = { class: "lkt-item-crud_header-title" }, fe = { class: "lkt-item-crud_header-slot" }, pe = { class: "lkt-item-crud-buttons" }, me = { key: 1 }, he = { key: 1 }, ke = {
|
|
11
11
|
key: 1,
|
|
12
|
-
class: "lkt-item-crud-buttons"
|
|
13
|
-
}, me = { key: 1 }, ke = { key: 1 }, he = {
|
|
14
|
-
key: 2,
|
|
15
12
|
class: "lkt-item-crud_content"
|
|
16
13
|
}, ye = {
|
|
17
14
|
key: 0,
|
|
@@ -45,143 +42,145 @@ const ie = { class: "lkt-item-crud" }, ce = {
|
|
|
45
42
|
saveValidator: { type: Function, required: !1, default: () => !0 }
|
|
46
43
|
},
|
|
47
44
|
emits: ["update:modelValue", "read", "create", "update", "drop", "perms", "error", "modified-data"],
|
|
48
|
-
setup(t, { expose:
|
|
49
|
-
const e = t,
|
|
45
|
+
setup(t, { expose: N, emit: z }) {
|
|
46
|
+
const e = t, q = ue(), d = z;
|
|
50
47
|
let G = [];
|
|
51
|
-
const l =
|
|
52
|
-
l.value = !0,
|
|
48
|
+
const l = n(!0), o = n(e.modelValue), h = n(G), c = n(!1), v = n(!1), f = n(!1), s = n(200), S = n(null), C = n(null), k = n(new re(o.value)), K = r(() => e.isCreate ? e.createConfirm : e.updateConfirm), T = r(() => e.isCreate ? e.createResource : e.updateResource), Q = r(() => e.isCreate ? { ...e.createData, ...JSON.parse(JSON.stringify(o.value)) } : { ...e.updateData, ...JSON.parse(JSON.stringify(o.value)) }), W = r(() => e.isCreate ? e.createDisabled : e.updateDisabled), D = r(() => !e.isCreate && h.value.includes("update")), b = r(() => !e.isCreate && h.value.includes("drop")), O = async () => {
|
|
49
|
+
l.value = !0, s.value = -1, f.value = !1;
|
|
53
50
|
try {
|
|
54
51
|
const a = await oe(e.readResource, e.readData);
|
|
55
|
-
if (l.value = !1,
|
|
56
|
-
v.value = !1,
|
|
52
|
+
if (l.value = !1, s.value = a.httpStatus, !a.success) {
|
|
53
|
+
v.value = !1, s.value = a.httpStatus, d("error", a.httpStatus);
|
|
57
54
|
return;
|
|
58
55
|
}
|
|
59
|
-
v.value = !0, o.value = a.data, h.value = a.perms,
|
|
56
|
+
v.value = !0, o.value = a.data, h.value = a.perms, k.value.increment(o.value).turnStoredIntoOriginal(), d("read", a);
|
|
60
57
|
} catch {
|
|
61
|
-
l.value = !1, v.value = !1,
|
|
58
|
+
l.value = !1, v.value = !1, s.value = 404, d("error", 404);
|
|
62
59
|
return;
|
|
63
60
|
}
|
|
64
|
-
}, X = r(() => l.value ? !1 : e.title || !!
|
|
61
|
+
}, X = r(() => l.value ? !1 : e.title || !!q["post-title"]);
|
|
65
62
|
B(() => e.modelValue, (a) => {
|
|
66
|
-
o.value = a,
|
|
63
|
+
o.value = a, k.value.increment(a);
|
|
67
64
|
}, { deep: !0 }), B(o, (a) => {
|
|
68
|
-
|
|
69
|
-
}, { deep: !0 }), B(h, () =>
|
|
70
|
-
const
|
|
71
|
-
B(
|
|
65
|
+
d("update:modelValue", o.value), k.value.increment(a);
|
|
66
|
+
}, { deep: !0 }), B(h, () => d("perms", h.value));
|
|
67
|
+
const $ = r(() => W.value || !e.isCreate && !D.value || typeof e.saveValidator == "function" && !e.saveValidator(o.value) ? !1 : k.value.changed());
|
|
68
|
+
B($, (a) => d("modified-data", a)), e.readResource && !e.isCreate ? O() : e.isCreate && (v.value = !0, c.value = !0, l.value = !1);
|
|
72
69
|
const Y = (a, u) => {
|
|
73
|
-
if (l.value = !1,
|
|
74
|
-
f.value = !0,
|
|
70
|
+
if (l.value = !1, s.value = u.httpStatus, !u.success) {
|
|
71
|
+
f.value = !0, d("error", u.httpStatus);
|
|
75
72
|
return;
|
|
76
73
|
}
|
|
77
|
-
f.value = !0,
|
|
74
|
+
f.value = !0, d("drop", u);
|
|
78
75
|
}, Z = (a, u) => {
|
|
79
|
-
if (
|
|
80
|
-
if (l.value = !1,
|
|
81
|
-
f.value = !0,
|
|
76
|
+
if (T.value) {
|
|
77
|
+
if (l.value = !1, s.value = u.httpStatus, !u.success) {
|
|
78
|
+
f.value = !0, d("error", u.httpStatus);
|
|
82
79
|
return;
|
|
83
80
|
}
|
|
84
81
|
f.value = !0;
|
|
85
82
|
}
|
|
86
83
|
let g = e.isCreate ? "create" : "update";
|
|
87
|
-
e.isCreate ||
|
|
88
|
-
}, $ = () => {
|
|
89
|
-
l.value = !0, n.value = -1;
|
|
84
|
+
e.isCreate || k.value.turnStoredIntoOriginal(), u.autoReloadId && (e.readData.id = u.autoReloadId, O()), d(g, u);
|
|
90
85
|
}, x = () => {
|
|
86
|
+
l.value = !0, s.value = -1;
|
|
87
|
+
}, j = () => {
|
|
91
88
|
l.value = !1;
|
|
92
89
|
};
|
|
93
|
-
|
|
90
|
+
N({
|
|
94
91
|
doDrop: () => {
|
|
95
92
|
C.value && typeof C.value.click == "function" && C.value.click();
|
|
96
93
|
},
|
|
97
|
-
doRefresh:
|
|
94
|
+
doRefresh: O,
|
|
98
95
|
doSave: () => {
|
|
99
96
|
S.value && typeof S.value.click == "function" && S.value.click();
|
|
100
97
|
}
|
|
101
98
|
});
|
|
102
|
-
const
|
|
99
|
+
const U = r(() => !e.hiddenDrop && !l.value && c.value && v.value), J = r(() => !e.hiddenSave && !l.value && c.value && v.value), E = r(() => !l.value && !e.isCreate && v.value), ee = r(() => !e.hiddenButtons && (J.value || U.value || E.value));
|
|
103
100
|
return (a, u) => {
|
|
104
|
-
const g = w("lkt-button"), te = w("lkt-field-switch"),
|
|
105
|
-
return
|
|
106
|
-
X.value ? (
|
|
107
|
-
|
|
108
|
-
|
|
101
|
+
const g = w("lkt-button"), te = w("lkt-field-switch"), H = w("lkt-http-info"), ae = w("lkt-loader");
|
|
102
|
+
return i(), m("article", ie, [
|
|
103
|
+
X.value ? (i(), m("header", ce, [
|
|
104
|
+
I("h1", ve, M(t.title), 1),
|
|
105
|
+
I("div", fe, [
|
|
109
106
|
R(a.$slots, "post-title", {
|
|
110
107
|
item: o.value,
|
|
111
108
|
loading: l.value
|
|
112
109
|
})
|
|
113
110
|
])
|
|
114
|
-
])) :
|
|
115
|
-
|
|
116
|
-
t.isCreate ?
|
|
111
|
+
])) : y("", !0),
|
|
112
|
+
V(I("div", pe, [
|
|
113
|
+
t.isCreate ? y("", !0) : V((i(), _(g, {
|
|
117
114
|
key: 0,
|
|
118
|
-
ref: (
|
|
115
|
+
ref: (p) => C.value = p,
|
|
119
116
|
palette: "danger",
|
|
120
117
|
disabled: t.dropDisabled || !b.value,
|
|
121
118
|
"confirm-modal": t.dropConfirm,
|
|
122
119
|
resource: t.dropResource,
|
|
123
120
|
"resource-data": t.dropData,
|
|
124
|
-
onLoading:
|
|
125
|
-
onLoaded:
|
|
121
|
+
onLoading: x,
|
|
122
|
+
onLoaded: j,
|
|
126
123
|
onClick: Y
|
|
127
124
|
}, {
|
|
128
125
|
default: A(() => [
|
|
129
|
-
F(
|
|
126
|
+
F(q)["button-drop"] ? R(a.$slots, "button-drop", {
|
|
130
127
|
key: 0,
|
|
131
128
|
item: o.value,
|
|
132
129
|
editMode: c.value,
|
|
133
130
|
isCreate: t.isCreate,
|
|
134
131
|
canUpdate: D.value,
|
|
135
132
|
canDrop: b.value
|
|
136
|
-
}) : (
|
|
133
|
+
}) : (i(), m("span", me, M(t.dropText), 1))
|
|
137
134
|
]),
|
|
138
135
|
_: 3
|
|
139
136
|
}, 8, ["disabled", "confirm-modal", "resource", "resource-data"])), [
|
|
140
|
-
[
|
|
137
|
+
[L, U.value]
|
|
141
138
|
]),
|
|
142
|
-
|
|
143
|
-
ref: (
|
|
139
|
+
V(P(g, {
|
|
140
|
+
ref: (p) => S.value = p,
|
|
144
141
|
palette: "success",
|
|
145
|
-
disabled:
|
|
142
|
+
disabled: !$.value,
|
|
146
143
|
"confirm-modal": K.value,
|
|
147
|
-
resource:
|
|
144
|
+
resource: T.value,
|
|
148
145
|
"resource-data": Q.value,
|
|
149
|
-
onLoading:
|
|
150
|
-
onLoaded:
|
|
146
|
+
onLoading: x,
|
|
147
|
+
onLoaded: j,
|
|
151
148
|
onClick: Z
|
|
152
149
|
}, {
|
|
153
150
|
default: A(() => [
|
|
154
|
-
F(
|
|
151
|
+
F(q)["button-save"] ? R(a.$slots, "button-save", {
|
|
155
152
|
key: 0,
|
|
156
153
|
item: o.value,
|
|
157
154
|
editMode: c.value,
|
|
158
155
|
isCreate: t.isCreate,
|
|
159
156
|
canUpdate: D.value,
|
|
160
157
|
canDrop: b.value
|
|
161
|
-
}) : (
|
|
158
|
+
}) : (i(), m("span", he, M(t.saveText), 1))
|
|
162
159
|
]),
|
|
163
160
|
_: 3
|
|
164
161
|
}, 8, ["disabled", "confirm-modal", "resource", "resource-data"]), [
|
|
165
|
-
[
|
|
162
|
+
[L, J.value]
|
|
166
163
|
]),
|
|
167
|
-
|
|
164
|
+
V(P(te, {
|
|
168
165
|
modelValue: c.value,
|
|
169
|
-
"onUpdate:modelValue": u[0] || (u[0] = (
|
|
166
|
+
"onUpdate:modelValue": u[0] || (u[0] = (p) => c.value = p),
|
|
170
167
|
label: t.editModeText
|
|
171
168
|
}, null, 8, ["modelValue", "label"]), [
|
|
172
|
-
[
|
|
169
|
+
[L, E.value]
|
|
173
170
|
])
|
|
174
|
-
]
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
171
|
+
], 512), [
|
|
172
|
+
[L, ee.value]
|
|
173
|
+
]),
|
|
174
|
+
l.value ? y("", !0) : (i(), m("div", ke, [
|
|
175
|
+
v.value ? (i(), m("div", ye, [
|
|
176
|
+
f.value ? (i(), _(H, {
|
|
178
177
|
key: 0,
|
|
179
|
-
code:
|
|
178
|
+
code: s.value,
|
|
180
179
|
quick: "",
|
|
181
|
-
palette:
|
|
180
|
+
palette: s.value === 200 ? "success" : "danger",
|
|
182
181
|
"can-close": "",
|
|
183
|
-
onClose: u[1] || (u[1] = (
|
|
184
|
-
}, null, 8, ["code", "palette"])) :
|
|
182
|
+
onClose: u[1] || (u[1] = (p) => f.value = !1)
|
|
183
|
+
}, null, 8, ["code", "palette"])) : y("", !0),
|
|
185
184
|
R(a.$slots, "item", {
|
|
186
185
|
item: o.value,
|
|
187
186
|
loading: l.value,
|
|
@@ -190,18 +189,18 @@ const ie = { class: "lkt-item-crud" }, ce = {
|
|
|
190
189
|
canUpdate: D.value,
|
|
191
190
|
canDrop: b.value
|
|
192
191
|
})
|
|
193
|
-
])) : (
|
|
192
|
+
])) : (i(), _(H, {
|
|
194
193
|
key: 1,
|
|
195
|
-
code:
|
|
194
|
+
code: s.value
|
|
196
195
|
}, null, 8, ["code"]))
|
|
197
196
|
])),
|
|
198
|
-
l.value ? (
|
|
197
|
+
l.value ? (i(), _(ae, { key: 2 })) : y("", !0)
|
|
199
198
|
]);
|
|
200
199
|
};
|
|
201
200
|
}
|
|
202
201
|
});
|
|
203
202
|
const Le = {
|
|
204
|
-
install: (t,
|
|
203
|
+
install: (t, N = {}) => {
|
|
205
204
|
t.component("lkt-item-crud") === void 0 && t.component("lkt-item-crud", Ce), t.component("lkt-button") === void 0 && t.use(de), t.component("lkt-http-info") === void 0 && t.use(se), t.component("lkt-loader") === void 0 && t.use(ne);
|
|
206
205
|
}
|
|
207
206
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(e,p){typeof exports=="object"&&typeof module<"u"?module.exports=p(require("vue"),require("lkt-http-client"),require("lkt-data-state"),require("lkt-button"),require("lkt-http-info"),require("lkt-loader")):typeof define=="function"&&define.amd?define(["vue","lkt-http-client","lkt-data-state","lkt-button","lkt-http-info","lkt-loader"],p):(e=typeof globalThis<"u"?globalThis:e||self,e.LktItemCrud=p(e.Vue,e.LktHttpClient,e.LktDataState,e.LktButton,e.LktHttpInfo,e.LktLoader))})(this,function(e,p,O,E,T,x){"use strict";const B=a=>a&&typeof a=="object"&&"default"in a?a:{default:a},M=B(E),j=B(T),$=B(x),U={class:"lkt-item-crud"},H={key:0,class:"lkt-item-crud_header"},J={class:"lkt-item-crud_header-title"},A={class:"lkt-item-crud_header-slot"},F={
|
|
1
|
+
(function(e,p){typeof exports=="object"&&typeof module<"u"?module.exports=p(require("vue"),require("lkt-http-client"),require("lkt-data-state"),require("lkt-button"),require("lkt-http-info"),require("lkt-loader")):typeof define=="function"&&define.amd?define(["vue","lkt-http-client","lkt-data-state","lkt-button","lkt-http-info","lkt-loader"],p):(e=typeof globalThis<"u"?globalThis:e||self,e.LktItemCrud=p(e.Vue,e.LktHttpClient,e.LktDataState,e.LktButton,e.LktHttpInfo,e.LktLoader))})(this,function(e,p,O,E,T,x){"use strict";const B=a=>a&&typeof a=="object"&&"default"in a?a:{default:a},M=B(E),j=B(T),$=B(x),U={class:"lkt-item-crud"},H={key:0,class:"lkt-item-crud_header"},J={class:"lkt-item-crud_header-title"},A={class:"lkt-item-crud_header-slot"},F={class:"lkt-item-crud-buttons"},P={key:1},z={key:1},G={key:1,class:"lkt-item-crud_content"},K={key:0,class:"lkt-grid-1"},Q={name:"LktItemCrud",inheritAttrs:!1},W=e.defineComponent({...Q,props:{modelValue:{type:Object,required:!1,default:()=>({})},title:{type:String,default:""},editModeText:{type:String,default:"Edition Mode"},saveText:{type:String,default:"Save"},dropText:{type:String,default:"Delete"},hiddenSave:{type:Boolean,default:!1},hiddenDrop:{type:Boolean,default:!1},hiddenButtons:{type:Boolean,default:!1},readResource:{type:String,required:!1},createResource:{type:String,required:!1},updateResource:{type:String,required:!1},dropResource:{type:String,required:!1},readData:{type:Object,required:!1,default:()=>({})},createData:{type:Object,required:!1,default:()=>({})},updateData:{type:Object,required:!1,default:()=>({})},dropData:{type:Object,required:!1,default:()=>({})},isCreate:{type:Boolean,default:!1},createConfirm:{type:String,default:""},updateConfirm:{type:String,default:""},dropConfirm:{type:String,default:""},createDisabled:{type:Boolean,default:!1},updateDisabled:{type:Boolean,default:!1},dropDisabled:{type:Boolean,default:!1},saveValidator:{type:Function,required:!1,default:()=>!0}},emits:["update:modelValue","read","create","update","drop","perms","error","modified-data"],setup(a,{expose:g,emit:X}){const t=a,D=e.useSlots(),n=X;let Y=[];const o=e.ref(!0),d=e.ref(t.modelValue),m=e.ref(Y),u=e.ref(!1),i=e.ref(!1),c=e.ref(!1),s=e.ref(200),h=e.ref(null),v=e.ref(null),k=e.ref(new O.DataState(d.value)),Z=e.computed(()=>t.isCreate?t.createConfirm:t.updateConfirm),w=e.computed(()=>t.isCreate?t.createResource:t.updateResource),ee=e.computed(()=>t.isCreate?{...t.createData,...JSON.parse(JSON.stringify(d.value))}:{...t.updateData,...JSON.parse(JSON.stringify(d.value))}),te=e.computed(()=>t.isCreate?t.createDisabled:t.updateDisabled),S=e.computed(()=>!t.isCreate&&m.value.includes("update")),y=e.computed(()=>!t.isCreate&&m.value.includes("drop")),b=async()=>{o.value=!0,s.value=-1,c.value=!1;try{const l=await p.httpCall(t.readResource,t.readData);if(o.value=!1,s.value=l.httpStatus,!l.success){i.value=!1,s.value=l.httpStatus,n("error",l.httpStatus);return}i.value=!0,d.value=l.data,m.value=l.perms,k.value.increment(d.value).turnStoredIntoOriginal(),n("read",l)}catch{o.value=!1,i.value=!1,s.value=404,n("error",404);return}},ae=e.computed(()=>o.value?!1:t.title||!!D["post-title"]);e.watch(()=>t.modelValue,l=>{d.value=l,k.value.increment(l)},{deep:!0}),e.watch(d,l=>{n("update:modelValue",d.value),k.value.increment(l)},{deep:!0}),e.watch(m,()=>n("perms",m.value));const L=e.computed(()=>te.value||!t.isCreate&&!S.value||typeof t.saveValidator=="function"&&!t.saveValidator(d.value)?!1:k.value.changed());e.watch(L,l=>n("modified-data",l)),t.readResource&&!t.isCreate?b():t.isCreate&&(i.value=!0,u.value=!0,o.value=!1);const le=(l,r)=>{if(o.value=!1,s.value=r.httpStatus,!r.success){c.value=!0,n("error",r.httpStatus);return}c.value=!0,n("drop",r)},oe=(l,r)=>{if(w.value){if(o.value=!1,s.value=r.httpStatus,!r.success){c.value=!0,n("error",r.httpStatus);return}c.value=!0}let C=t.isCreate?"create":"update";t.isCreate||k.value.turnStoredIntoOriginal(),r.autoReloadId&&(t.readData.id=r.autoReloadId,b()),n(C,r)},V=()=>{o.value=!0,s.value=-1},_=()=>{o.value=!1};g({doDrop:()=>{v.value&&typeof v.value.click=="function"&&v.value.click()},doRefresh:b,doSave:()=>{h.value&&typeof h.value.click=="function"&&h.value.click()}});const q=e.computed(()=>!t.hiddenDrop&&!o.value&&u.value&&i.value),N=e.computed(()=>!t.hiddenSave&&!o.value&&u.value&&i.value),R=e.computed(()=>!o.value&&!t.isCreate&&i.value),re=e.computed(()=>!t.hiddenButtons&&(N.value||q.value||R.value));return(l,r)=>{const C=e.resolveComponent("lkt-button"),de=e.resolveComponent("lkt-field-switch"),I=e.resolveComponent("lkt-http-info"),ne=e.resolveComponent("lkt-loader");return e.openBlock(),e.createElementBlock("article",U,[ae.value?(e.openBlock(),e.createElementBlock("header",H,[e.createElementVNode("h1",J,e.toDisplayString(a.title),1),e.createElementVNode("div",A,[e.renderSlot(l.$slots,"post-title",{item:d.value,loading:o.value})])])):e.createCommentVNode("",!0),e.withDirectives(e.createElementVNode("div",F,[a.isCreate?e.createCommentVNode("",!0):e.withDirectives((e.openBlock(),e.createBlock(C,{key:0,ref:f=>v.value=f,palette:"danger",disabled:a.dropDisabled||!y.value,"confirm-modal":a.dropConfirm,resource:a.dropResource,"resource-data":a.dropData,onLoading:V,onLoaded:_,onClick:le},{default:e.withCtx(()=>[e.unref(D)["button-drop"]?e.renderSlot(l.$slots,"button-drop",{key:0,item:d.value,editMode:u.value,isCreate:a.isCreate,canUpdate:S.value,canDrop:y.value}):(e.openBlock(),e.createElementBlock("span",P,e.toDisplayString(a.dropText),1))]),_:3},8,["disabled","confirm-modal","resource","resource-data"])),[[e.vShow,q.value]]),e.withDirectives(e.createVNode(C,{ref:f=>h.value=f,palette:"success",disabled:!L.value,"confirm-modal":Z.value,resource:w.value,"resource-data":ee.value,onLoading:V,onLoaded:_,onClick:oe},{default:e.withCtx(()=>[e.unref(D)["button-save"]?e.renderSlot(l.$slots,"button-save",{key:0,item:d.value,editMode:u.value,isCreate:a.isCreate,canUpdate:S.value,canDrop:y.value}):(e.openBlock(),e.createElementBlock("span",z,e.toDisplayString(a.saveText),1))]),_:3},8,["disabled","confirm-modal","resource","resource-data"]),[[e.vShow,N.value]]),e.withDirectives(e.createVNode(de,{modelValue:u.value,"onUpdate:modelValue":r[0]||(r[0]=f=>u.value=f),label:a.editModeText},null,8,["modelValue","label"]),[[e.vShow,R.value]])],512),[[e.vShow,re.value]]),o.value?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",G,[i.value?(e.openBlock(),e.createElementBlock("div",K,[c.value?(e.openBlock(),e.createBlock(I,{key:0,code:s.value,quick:"",palette:s.value===200?"success":"danger","can-close":"",onClose:r[1]||(r[1]=f=>c.value=!1)},null,8,["code","palette"])):e.createCommentVNode("",!0),e.renderSlot(l.$slots,"item",{item:d.value,loading:o.value,editMode:u.value,isCreate:a.isCreate,canUpdate:S.value,canDrop:y.value})])):(e.openBlock(),e.createBlock(I,{key:1,code:s.value},null,8,["code"]))])),o.value?(e.openBlock(),e.createBlock(ne,{key:2})):e.createCommentVNode("",!0)])}}}),se="";return{install:(a,g={})=>{a.component("lkt-item-crud")===void 0&&a.component("lkt-item-crud",W),a.component("lkt-button")===void 0&&a.use(M.default),a.component("lkt-http-info")===void 0&&a.use(j.default),a.component("lkt-loader")===void 0&&a.use($.default)}}});
|
package/package.json
CHANGED
|
@@ -232,7 +232,7 @@ const showDropButton = computed(() => {
|
|
|
232
232
|
<slot name="post-title" v-bind:item="item" v-bind:loading="isLoading"></slot>
|
|
233
233
|
</div>
|
|
234
234
|
</header>
|
|
235
|
-
<div class="lkt-item-crud-buttons" v-
|
|
235
|
+
<div class="lkt-item-crud-buttons" v-show="showButtons">
|
|
236
236
|
<lkt-button
|
|
237
237
|
:ref="(el:any) => dropButton = el"
|
|
238
238
|
v-show="showDropButton"
|