@kengic/core.react 0.0.1-beta.57 → 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,25 +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(getWorkStation(e)(kgWorkStationStore.getState())), r = kgWorkStationStore.subscribe(() => t.value = getWorkStation(e)(kgWorkStationStore.getState()));
|
|
67616
|
-
return [t, r];
|
|
67617
|
-
},
|
|
67618
|
-
getWorkStationSnapshot() {
|
|
67619
|
-
return getWorkStation(e)(kgWorkStationStore.getState());
|
|
67611
|
+
const r = ref(getIsVisible(e)(kgWorkStationStore.getState())), n = kgWorkStationStore.subscribe(() => r.value = getIsVisible(e)(kgWorkStationStore.getState()));
|
|
67612
|
+
return [r, n];
|
|
67620
67613
|
},
|
|
67621
67614
|
id: e,
|
|
67622
67615
|
onMount: si({
|
|
@@ -67630,22 +67623,37 @@ function doKgWorkStation(e = "") {
|
|
|
67630
67623
|
id: e
|
|
67631
67624
|
}),
|
|
67632
67625
|
openModal() {
|
|
67633
|
-
var
|
|
67634
|
-
((
|
|
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 }));
|
|
67635
67628
|
},
|
|
67636
|
-
set(
|
|
67637
|
-
var
|
|
67638
|
-
ii(`${e} | doKgWorkStation | set() | 进入`), ((
|
|
67639
|
-
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 }));
|
|
67640
67633
|
}), !1), !0);
|
|
67641
67634
|
},
|
|
67642
67635
|
store: kgWorkStationStore,
|
|
67643
|
-
subscribe(
|
|
67636
|
+
subscribe(r) {
|
|
67644
67637
|
return kgWorkStationStore.subscribe(() => {
|
|
67645
|
-
|
|
67638
|
+
r(kgWorkStationStore.getState()[e]);
|
|
67646
67639
|
});
|
|
67647
|
-
}
|
|
67640
|
+
},
|
|
67641
|
+
workStation: null,
|
|
67642
|
+
workStation$: null
|
|
67648
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;
|
|
67649
67657
|
}
|
|
67650
67658
|
let _httpClient = null;
|
|
67651
67659
|
function setHttpClient(e) {
|
package/package.json
CHANGED
|
@@ -22,16 +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
|
-
/**
|
|
32
|
-
* <p>跟 {@link getWorkStation} 一样, 但获取的是快照.</p>
|
|
33
|
-
*/
|
|
34
|
-
getWorkStationSnapshot(): WorkstationDTO | null;
|
|
35
25
|
id: string;
|
|
36
26
|
/**
|
|
37
27
|
* 监听事件: 挂载.
|
|
@@ -64,6 +54,16 @@ export interface IDoKgWorkStation {
|
|
|
64
54
|
* @param fn 回调函数, 可以通过参数 state 获取到最新的数据.
|
|
65
55
|
*/
|
|
66
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];
|
|
67
67
|
}
|
|
68
68
|
/**
|
|
69
69
|
*
|