sykj 0.1.0 → 0.1.2
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/README.md +0 -13
- package/lib/{common.js → common.ts} +5 -5
- package/lib/focus.ts +35 -0
- package/package.json +1 -1
- package/packages/keyboard/{index.js → index.ts} +2 -2
- package/packages/keyboard/src/Keyboardcon.vue +944 -987
- package/packages/loading/{index.js → index.ts} +2 -2
- package/types/global.d.ts +11 -0
- package/types/index.d.ts +4 -0
- package/lib/focus.js +0 -34
- /package/lib/{store.js → store.ts} +0 -0
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import Loading1 from "./Loading1.vue";
|
|
2
2
|
import Loading2 from "./Loading2.vue";
|
|
3
|
-
|
|
3
|
+
import { App } from "vue";
|
|
4
4
|
const components = [Loading1, Loading2];
|
|
5
5
|
|
|
6
6
|
components.forEach((i) => {
|
|
7
|
-
i.install = function (Vue) {
|
|
7
|
+
i.install = function (Vue: App) {
|
|
8
8
|
Vue.component(i.name, i);
|
|
9
9
|
};
|
|
10
10
|
});
|
package/types/index.d.ts
ADDED
package/lib/focus.js
DELETED
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
// import { useKeyStore } from "./store";
|
|
2
|
-
// console.log("🚀 ~ file: focus.ts:3 ~ useKeyStore:", useKeyStore)
|
|
3
|
-
const globalKey = window.$sy.key;
|
|
4
|
-
// const keyStore = useKeyStore()
|
|
5
|
-
|
|
6
|
-
let st = null;
|
|
7
|
-
document.addEventListener("focusin", (event) => {
|
|
8
|
-
if (
|
|
9
|
-
event.target?.tagName === "INPUT" ||
|
|
10
|
-
event.target?.tagName === "TEXTAREA"
|
|
11
|
-
) {
|
|
12
|
-
console.log(
|
|
13
|
-
"🚀 ~ file: focus.js:15 ~ document.addEventListener ~ event.target:",
|
|
14
|
-
event.target
|
|
15
|
-
);
|
|
16
|
-
|
|
17
|
-
clearTimeout(st);
|
|
18
|
-
globalKey.open();
|
|
19
|
-
globalKey.currentElement = event.target;
|
|
20
|
-
}
|
|
21
|
-
});
|
|
22
|
-
document.addEventListener("focusout", (event) => {
|
|
23
|
-
st = setTimeout(() => {
|
|
24
|
-
globalKey.close();
|
|
25
|
-
}, 100);
|
|
26
|
-
if (
|
|
27
|
-
event.target?.tagName === "INPUT" ||
|
|
28
|
-
event.target?.tagName === "TEXTAREA"
|
|
29
|
-
) {
|
|
30
|
-
// window.showKeyboard()
|
|
31
|
-
globalKey.currentElement = null;
|
|
32
|
-
console.log(2);
|
|
33
|
-
}
|
|
34
|
-
});
|
|
File without changes
|