@kengic/vue 0.16.4 → 0.16.5
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/kengic-vue.js +22 -12
- package/package.json +1 -1
package/dist/kengic-vue.js
CHANGED
@@ -2870,7 +2870,7 @@ const emptyIcon = {
|
|
2870
2870
|
...t.data
|
2871
2871
|
}, r);
|
2872
2872
|
}
|
2873
|
-
}), version = "0.16.
|
2873
|
+
}), version = "0.16.5", data$1 = {
|
2874
2874
|
width: 24,
|
2875
2875
|
height: 24,
|
2876
2876
|
body: '<path fill="currentColor" d="M5 21q-.825 0-1.413-.588T3 19V5q0-.825.588-1.413T5 3h11.175q.4 0 .763.15t.637.425l2.85 2.85q.275.275.425.638t.15.762V12.3q-.475-.2-.988-.263T19 12.05V7.825L16.175 5H5v14h6v2H5ZM5 5v14V5Zm8 17v-1.65q0-.2.075-.388t.225-.337l5.225-5.2q.225-.225.5-.325t.55-.1q.3 0 .575.113t.5.337l.925.925q.2.225.313.5t.112.55q0 .275-.1.563t-.325.512l-5.2 5.2q-.15.15-.338.225T15.65 23H14q-.425 0-.712-.287T13 22Zm7.5-5.575l-.925-.925l.925.925Zm-6 5.075h.95l3.025-3.05l-.45-.475l-.475-.45l-3.05 3.025v.95Zm3.525-3.525l-.475-.45l.925.925l-.45-.475ZM7 10h7q.425 0 .713-.288T15 9V7q0-.425-.288-.713T14 6H7q-.425 0-.713.288T6 7v2q0 .425.288.713T7 10Zm5 8h.1l2.9-2.875V15q0-1.25-.875-2.125T12 12q-1.25 0-2.125.875T9 15q0 1.25.875 2.125T12 18Z"/>'
|
@@ -17127,9 +17127,10 @@ const useKgWarehouseStore = (e) => (store || (store = defineStore("KgWarehouse",
|
|
17127
17127
|
addEventListener(t, r) {
|
17128
17128
|
var a;
|
17129
17129
|
switch (t) {
|
17130
|
-
case "mounted":
|
17130
|
+
case "mounted": {
|
17131
17131
|
this.mountedListeners = [...(a = this.mountedListeners) != null ? a : [], r];
|
17132
17132
|
break;
|
17133
|
+
}
|
17133
17134
|
}
|
17134
17135
|
},
|
17135
17136
|
removeEventListener(t, r) {
|
@@ -17161,12 +17162,18 @@ const useKgWarehouseStore = (e) => (store || (store = defineStore("KgWarehouse",
|
|
17161
17162
|
}
|
17162
17163
|
}).bind(null, e != null ? e : pinia())), store);
|
17163
17164
|
function useKgWarehouse(e) {
|
17164
|
-
const t = useKgWarehouseStore(e)(),
|
17165
|
+
const t = useKg(e), r = useKgWarehouseStore(e)(), a = computed(() => r.getVisible), n = computed(() => {
|
17166
|
+
var o, i, c, u;
|
17167
|
+
if (!r.getWarehouse)
|
17168
|
+
return null;
|
17169
|
+
const s = (o = r.getWarehouse) == null ? void 0 : o.whId, l = (u = (c = (i = t.store).getUseUserStore) == null ? void 0 : c.call(i)) == null ? void 0 : u.getUserWarehouses;
|
17170
|
+
return KgLogger.debug(`KgWarehouse | warehouse | \u5F53\u524D\u4ED3\u5E93: ${s}`), KgLogger.debug("KgWarehouse | warehouse | \u7528\u6237\u4ED3\u5E93\u5217\u8868.", { userWarehouses: l }), l !== void 0 && !(l != null && l.find((d) => d.wh_id === s)) ? (KgLogger.debug("KgWarehouse | warehouse | \u91CD\u7F6E\u5F53\u524D\u4ED3\u5E93."), null) : r.getWarehouse;
|
17171
|
+
});
|
17165
17172
|
return {
|
17166
|
-
store:
|
17167
|
-
visible:
|
17168
|
-
warehouse:
|
17169
|
-
onMounted: onEventFactory(null,
|
17173
|
+
store: r,
|
17174
|
+
visible: a,
|
17175
|
+
warehouse: n,
|
17176
|
+
onMounted: onEventFactory(null, r, "mounted")
|
17170
17177
|
};
|
17171
17178
|
}
|
17172
17179
|
const KgWarehouse$1 = "", getProps = () => ({
|
@@ -17356,18 +17363,21 @@ function createKgWarehouseGuard(e, t) {
|
|
17356
17363
|
return;
|
17357
17364
|
}
|
17358
17365
|
const s = useKgWarehouse(t);
|
17359
|
-
return s.
|
17366
|
+
return s.onMounted(() => {
|
17360
17367
|
var i, c, u, d, p;
|
17361
17368
|
const o = (c = (i = n.store).getUseUserStore) == null ? void 0 : c.call(i);
|
17369
|
+
if (s.warehouse.value) {
|
17370
|
+
KgLogger.debug(`createKgWarehouseGuard() | ${a} | \u4ED3\u5E93\u5DF2\u9009: ${s.warehouse.value.whId}`);
|
17371
|
+
return;
|
17372
|
+
}
|
17362
17373
|
if (((u = o == null ? void 0 : o.getUserWarehouses) == null ? void 0 : u.length) === 1) {
|
17363
|
-
KgLogger.debug(`createKgWarehouseGuard() | ${a} | \u9009\u62E9\u552F\u4E00\u4ED3\u5E93.`);
|
17364
17374
|
const E = (d = o.getUserWarehouses) == null ? void 0 : d[0];
|
17365
|
-
s.store.setWarehouse(new WhDTO({ whId: E.wh_id, whDsc: E.wh_dsc }));
|
17375
|
+
s.store.setWarehouse(new WhDTO({ whId: E.wh_id, whDsc: E.wh_dsc })), KgLogger.debug(`createKgWarehouseGuard() | ${a} | \u9009\u62E9\u552F\u4E00\u4ED3\u5E93: ${E.wh_id}`);
|
17366
17376
|
} else {
|
17367
17377
|
const E = (p = o == null ? void 0 : o.getUserWarehouses) == null ? void 0 : p.find((b) => b.default_flag === 1);
|
17368
|
-
E ? (KgLogger.debug(`createKgWarehouseGuard() | ${a} | \u9009\u62E9\u9ED8\u8BA4\u4ED3\u5E93
|
17378
|
+
E ? (s.store.setWarehouse(new WhDTO({ whId: E.wh_id, whDsc: E.wh_dsc })), KgLogger.debug(`createKgWarehouseGuard() | ${a} | \u9009\u62E9\u9ED8\u8BA4\u4ED3\u5E93: ${E.wh_id}`)) : (s.store.setVisible(!0), KgLogger.debug(`createKgWarehouseGuard() | ${a} | \u6253\u5F00\u4ED3\u5E93\u9009\u62E9\u5F39\u7A97.`));
|
17369
17379
|
}
|
17370
|
-
}), !0
|
17380
|
+
}), !0;
|
17371
17381
|
});
|
17372
17382
|
}
|
17373
17383
|
class KgUtil {
|
package/package.json
CHANGED