@kengic/core.react 0.0.1-beta.56 → 0.0.1-beta.58
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/kengic-core.react.js
CHANGED
|
@@ -67598,22 +67598,18 @@ function setRef(e) {
|
|
|
67598
67598
|
ref = e;
|
|
67599
67599
|
}
|
|
67600
67600
|
function doKgWorkStation(e = "") {
|
|
67601
|
-
|
|
67601
|
+
let t = {
|
|
67602
67602
|
closeModal() {
|
|
67603
|
-
var
|
|
67604
|
-
((
|
|
67603
|
+
var r, n;
|
|
67604
|
+
((n = (r = kgStore.getState().option) == null ? void 0 : r.KgWorkStation) == null ? void 0 : n.isOn) !== !1 && kgWorkStationStore.dispatch(closeModal({ id: e }));
|
|
67605
67605
|
},
|
|
67606
|
-
get(
|
|
67607
|
-
const
|
|
67608
|
-
return [
|
|
67606
|
+
get(r) {
|
|
67607
|
+
const n = ref(kgWorkStationStore.getState()[e]), a = kgWorkStationStore.subscribe(() => n.value = r(kgWorkStationStore.getState()[e]));
|
|
67608
|
+
return [n, a];
|
|
67609
67609
|
},
|
|
67610
67610
|
getIsVisible() {
|
|
67611
|
-
const
|
|
67612
|
-
return [
|
|
67613
|
-
},
|
|
67614
|
-
getWorkStation() {
|
|
67615
|
-
const t = ref(getIsVisible(e)(kgWorkStationStore.getState())), r = kgWorkStationStore.subscribe(() => t.value = getWorkStation(e)(kgWorkStationStore.getState()));
|
|
67616
|
-
return [t, r];
|
|
67611
|
+
const r = ref(getIsVisible(e)(kgWorkStationStore.getState())), n = kgWorkStationStore.subscribe(() => r.value = getIsVisible(e)(kgWorkStationStore.getState()));
|
|
67612
|
+
return [r, n];
|
|
67617
67613
|
},
|
|
67618
67614
|
id: e,
|
|
67619
67615
|
onMount: si({
|
|
@@ -67627,22 +67623,37 @@ function doKgWorkStation(e = "") {
|
|
|
67627
67623
|
id: e
|
|
67628
67624
|
}),
|
|
67629
67625
|
openModal() {
|
|
67630
|
-
var
|
|
67631
|
-
((
|
|
67626
|
+
var r, n;
|
|
67627
|
+
((n = (r = kgStore.getState().option) == null ? void 0 : r.KgWorkStation) == null ? void 0 : n.isOn) !== !1 && kgWorkStationStore.dispatch(openModal({ id: e }));
|
|
67632
67628
|
},
|
|
67633
|
-
set(
|
|
67634
|
-
var
|
|
67635
|
-
ii(`${e} | doKgWorkStation | set() | 进入`), ((
|
|
67636
|
-
kgWorkStationStore.dispatch(set({ fn:
|
|
67629
|
+
set(r) {
|
|
67630
|
+
var n;
|
|
67631
|
+
ii(`${e} | doKgWorkStation | set() | 进入`), ((n = kgWorkStationStore.getState()[e]) == null ? void 0 : n.isMount) === !0 ? kgWorkStationStore.dispatch(set({ fn: r, id: e })) : this.onMount(async () => (ii(`${e} | doKgWorkStation | set() | dispatch set`), setTimeout(() => {
|
|
67632
|
+
kgWorkStationStore.dispatch(set({ fn: r, id: e }));
|
|
67637
67633
|
}), !1), !0);
|
|
67638
67634
|
},
|
|
67639
67635
|
store: kgWorkStationStore,
|
|
67640
|
-
subscribe(
|
|
67636
|
+
subscribe(r) {
|
|
67641
67637
|
return kgWorkStationStore.subscribe(() => {
|
|
67642
|
-
|
|
67638
|
+
r(kgWorkStationStore.getState()[e]);
|
|
67643
67639
|
});
|
|
67644
|
-
}
|
|
67640
|
+
},
|
|
67641
|
+
workStation: null,
|
|
67642
|
+
workStation$: null
|
|
67645
67643
|
};
|
|
67644
|
+
return t = new Proxy(t, {
|
|
67645
|
+
get(r, n) {
|
|
67646
|
+
switch (n) {
|
|
67647
|
+
case "workStation":
|
|
67648
|
+
return getWorkStation(e)(kgWorkStationStore.getState());
|
|
67649
|
+
case "workStation$": {
|
|
67650
|
+
const a = ref(getWorkStation(e)(kgWorkStationStore.getState())), s = kgWorkStationStore.subscribe(() => a.value = getWorkStation(e)(kgWorkStationStore.getState()));
|
|
67651
|
+
return [a, s];
|
|
67652
|
+
}
|
|
67653
|
+
}
|
|
67654
|
+
return Reflect.get(r, n);
|
|
67655
|
+
}
|
|
67656
|
+
}), t;
|
|
67646
67657
|
}
|
|
67647
67658
|
let _httpClient = null;
|
|
67648
67659
|
function setHttpClient(e) {
|
package/package.json
CHANGED
|
@@ -22,12 +22,6 @@ export interface IDoKgWorkStation {
|
|
|
22
22
|
getIsVisible(): [{
|
|
23
23
|
value: boolean;
|
|
24
24
|
}, () => void];
|
|
25
|
-
/**
|
|
26
|
-
* <p>获取「当前选择的工作站」. 在 vue 项目中使用.</p>
|
|
27
|
-
*/
|
|
28
|
-
getWorkStation(): [{
|
|
29
|
-
value: WorkstationDTO | null;
|
|
30
|
-
}, () => void];
|
|
31
25
|
id: string;
|
|
32
26
|
/**
|
|
33
27
|
* 监听事件: 挂载.
|
|
@@ -60,6 +54,16 @@ export interface IDoKgWorkStation {
|
|
|
60
54
|
* @param fn 回调函数, 可以通过参数 state 获取到最新的数据.
|
|
61
55
|
*/
|
|
62
56
|
subscribe(fn: (state: IKgWorkStationState[string]) => void): () => void;
|
|
57
|
+
/**
|
|
58
|
+
* <p>跟 {@link workStation$} 一样, 但获取的是快照.</p>
|
|
59
|
+
*/
|
|
60
|
+
workStation: WorkstationDTO | null;
|
|
61
|
+
/**
|
|
62
|
+
* <p>获取「当前选择的工作站」. 在 vue 项目中使用.</p>
|
|
63
|
+
*/
|
|
64
|
+
workStation$: [{
|
|
65
|
+
value: WorkstationDTO | null;
|
|
66
|
+
}, () => void];
|
|
63
67
|
}
|
|
64
68
|
/**
|
|
65
69
|
*
|