x-essential-lib 0.10.5 → 0.10.7
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/index.js +6 -6
- package/package.json +4 -10
package/dist/index.js
CHANGED
|
@@ -113,7 +113,7 @@ async function waitMs(ms) {
|
|
|
113
113
|
async function waitUtil(conditionFunc, timeout, interval) {
|
|
114
114
|
const timestamp = Date.now();
|
|
115
115
|
return new Promise((resolve) => {
|
|
116
|
-
const check =
|
|
116
|
+
const check = () => {
|
|
117
117
|
if (conditionFunc()) resolve(true);
|
|
118
118
|
else if (timeout && Date.now() - timestamp > timeout) resolve(false);
|
|
119
119
|
else setTimeout(check, interval ?? 30);
|
|
@@ -125,9 +125,9 @@ function appAppear(name, diff) {
|
|
|
125
125
|
const appElement = document.getElementById("single-spa-application:" + name);
|
|
126
126
|
if (!appElement) return;
|
|
127
127
|
appElement.classList.remove("app-fade", "app-left", "app-right", "app-reset");
|
|
128
|
+
if (diff === 0) return;
|
|
128
129
|
if (diff > 0) appElement.classList.add("app-left");
|
|
129
|
-
else
|
|
130
|
-
else appElement.classList.add("app-fade");
|
|
130
|
+
else appElement.classList.add("app-right");
|
|
131
131
|
setTimeout(() => {
|
|
132
132
|
appElement.classList.add("app-reset");
|
|
133
133
|
}, 50);
|
|
@@ -590,7 +590,7 @@ function onBeforeChange(toPath, fromPath, lastAppPath) {
|
|
|
590
590
|
const diff = toRouteMeta.level - fromRouteMeta.level;
|
|
591
591
|
if (sameApp) if (diff > 0) routeTransName.value = "inner-left";
|
|
592
592
|
else if (diff < 0) routeTransName.value = "inner-right";
|
|
593
|
-
else routeTransName.value = "
|
|
593
|
+
else routeTransName.value = "";
|
|
594
594
|
else {
|
|
595
595
|
routeTransName.value = "";
|
|
596
596
|
appAppear(toRouteMeta.app, diff);
|
|
@@ -728,8 +728,8 @@ function useMicroApp(dark, locale, permissionObjects, permissionChecksum, lastAp
|
|
|
728
728
|
provideLastAppPath(lastAppPath);
|
|
729
729
|
provideViews(views);
|
|
730
730
|
const theme = useTheme();
|
|
731
|
-
watchEffect(() => {
|
|
732
|
-
theme.change(finalDark.value ? "dark" : "light");
|
|
731
|
+
watchEffect(async () => {
|
|
732
|
+
await theme.change(finalDark.value ? "dark" : "light");
|
|
733
733
|
});
|
|
734
734
|
const handleBack = () => {
|
|
735
735
|
if (!isEmpty(views)) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "x-essential-lib",
|
|
3
|
-
"version": "0.10.
|
|
3
|
+
"version": "0.10.7",
|
|
4
4
|
"files": [
|
|
5
5
|
"dist"
|
|
6
6
|
],
|
|
@@ -41,8 +41,8 @@
|
|
|
41
41
|
"typescript": "^6.0.3",
|
|
42
42
|
"vite": "^8.0.16",
|
|
43
43
|
"x-config-lib": "^0.1.5",
|
|
44
|
-
"x-config-oxfmt": "^0.1.
|
|
45
|
-
"x-config-oxlint": "^0.1.
|
|
44
|
+
"x-config-oxfmt": "^0.1.4",
|
|
45
|
+
"x-config-oxlint": "^0.1.4"
|
|
46
46
|
},
|
|
47
47
|
"peerDependencies": {
|
|
48
48
|
"axios": "^1.18.0",
|
|
@@ -52,13 +52,7 @@
|
|
|
52
52
|
"vuetify": "^4.1.2"
|
|
53
53
|
},
|
|
54
54
|
"lint-staged": {
|
|
55
|
+
"*.{js,jsx,ts,tsx,vue}": "oxlint",
|
|
55
56
|
"*": "oxfmt --no-error-on-unmatched-pattern"
|
|
56
|
-
},
|
|
57
|
-
"inlinedDependencies": {
|
|
58
|
-
"@vueuse/core": "14.3.0",
|
|
59
|
-
"@vueuse/shared": "14.3.0",
|
|
60
|
-
"js-cookie": "3.0.8",
|
|
61
|
-
"lodash-es": "4.18.1",
|
|
62
|
-
"mitt": "3.0.1"
|
|
63
57
|
}
|
|
64
58
|
}
|