@neatui/nuxt 1.3.0 → 1.5.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
|
@@ -18,7 +18,17 @@
|
|
|
18
18
|
<script lang="ts" setup>
|
|
19
19
|
import { onBeforeUnmount, reactive, watch } from 'vue';
|
|
20
20
|
import { isFunction } from '@fekit/utils';
|
|
21
|
-
|
|
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
|
+
};
|
|
22
32
|
|
|
23
33
|
// 类型定义
|
|
24
34
|
interface Props {
|
|
@@ -207,7 +217,6 @@
|
|
|
207
217
|
|
|
208
218
|
// 卸载弹层
|
|
209
219
|
onBeforeUnmount(() => {
|
|
210
|
-
// eslint-disable-next-line @typescript-eslint/no-dynamic-delete
|
|
211
220
|
delete _tasks[id];
|
|
212
221
|
});
|
|
213
222
|
</script>
|
|
@@ -257,7 +266,7 @@
|
|
|
257
266
|
padding: 0.25em;
|
|
258
267
|
margin-left: -1rem;
|
|
259
268
|
text-align: center;
|
|
260
|
-
transform: scale(0.
|
|
269
|
+
transform: scale(0.8);
|
|
261
270
|
transition: all 0.2s;
|
|
262
271
|
border-radius: 50%;
|
|
263
272
|
background:
|
|
@@ -271,7 +280,7 @@
|
|
|
271
280
|
|
|
272
281
|
.fekit-layer-close {
|
|
273
282
|
&:hover {
|
|
274
|
-
transform: scale(0.
|
|
283
|
+
transform: scale(0.8) rotate(90deg);
|
|
275
284
|
}
|
|
276
285
|
&:active {
|
|
277
286
|
transform: scale(0.7) rotate(90deg);
|
|
@@ -1,12 +1,5 @@
|
|
|
1
1
|
import Layer from './Layer.vue';
|
|
2
|
-
|
|
3
|
-
export const _tasks: any = {};
|
|
4
|
-
export const _state: any = {};
|
|
5
|
-
export const getActiveLayer = () => {
|
|
6
|
-
return Object.values(_tasks).filter((task: any) => task.view > 0);
|
|
7
|
-
};
|
|
8
2
|
const LayerById = (id: any) => {
|
|
9
|
-
return
|
|
3
|
+
return (window as any)._FEKIT_LAYER_TASKS[id];
|
|
10
4
|
};
|
|
11
|
-
|
|
12
5
|
export { Layer, LayerById };
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import
|
|
1
|
+
import Layer from './LayerView/Layer.vue';
|
|
2
|
+
import { LayerById } from './LayerView/index';
|
|
2
3
|
import Icon from './Icon.vue';
|
|
3
4
|
import IFollowView from './IFollowView.vue';
|
|
4
5
|
import IPickerView from './IPickerView.vue';
|