@neatui/vue 2.16.1 → 2.17.0

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@neatui/vue",
3
- "version": "2.16.1",
3
+ "version": "2.17.0",
4
4
  "description": "basic component ui",
5
5
  "main": "./src/index.ts",
6
6
  "license": "MIT",
@@ -18,17 +18,7 @@
18
18
  <script lang="ts" setup>
19
19
  import { onBeforeUnmount, reactive, watch } from 'vue';
20
20
  import { isFunction } from '@fekit/utils';
21
-
22
- // 弹层队列
23
- if (!(window as any)._FEKIT_LAYER_TASKS) {
24
- (window as any)._FEKIT_LAYER_TASKS = {};
25
- }
26
- const _tasks: any = (window as any)._FEKIT_LAYER_TASKS;
27
-
28
- // 获取活跃的弹层
29
- const getActiveLayer = () => {
30
- return Object.values(_tasks).filter((task: any) => task.view > 0);
31
- };
21
+ import { _tasks, getActiveLayer } from './index';
32
22
 
33
23
  // 类型定义
34
24
  interface Props {
@@ -215,6 +205,7 @@
215
205
 
216
206
  // 卸载弹层
217
207
  onBeforeUnmount(() => {
208
+ // eslint-disable-next-line @typescript-eslint/no-dynamic-delete
218
209
  delete _tasks[id];
219
210
  });
220
211
  </script>
@@ -1,5 +1,8 @@
1
- import Layer from './Layer.vue';
2
- const LayerById = (id: any) => {
3
- return (window as any)._FEKIT_LAYER_TASKS[id];
1
+ export const _tasks: any = {};
2
+ export const _state: any = {};
3
+ export const getActiveLayer = () => {
4
+ return Object.values(_tasks).filter((task: any) => task.view > 0);
5
+ };
6
+ export const LayerById = (id: any) => {
7
+ return _tasks[id];
4
8
  };
5
- export { Layer, LayerById };
@@ -1,4 +1,5 @@
1
- import { Layer, LayerById } from './LayerView';
1
+ import { LayerById } from './LayerView/index';
2
+ import Layer from './LayerView/Layer.vue';
2
3
  import Icon from './Icon.vue';
3
4
  import IFollowView from './IFollowView.vue';
4
5
  import IPickerView from './IPickerView.vue';