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.
@@ -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
  });
@@ -0,0 +1,11 @@
1
+ // types/global.d.ts
2
+
3
+ // 确保 TypeScript 识别这是一个模块
4
+ export {};
5
+
6
+ declare global {
7
+ interface Window {
8
+ Vue: any;
9
+ $sy: any;
10
+ }
11
+ }
@@ -0,0 +1,4 @@
1
+ // types/global.d.ts
2
+
3
+ // 确保 TypeScript 识别这是一个模块
4
+ export {};
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