@neatui/nuxt 1.0.7 → 1.0.8

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/nuxt",
3
- "version": "1.0.7",
3
+ "version": "1.0.8",
4
4
  "description": "NeatUI component library for Nuxt 3",
5
5
  "main": "./src/index.ts",
6
6
  "license": "MIT",
@@ -3,7 +3,7 @@
3
3
  <div :class="listClass" :style="listStyle" am-view-item="list">
4
4
  <slot name="list" :mode="mode"></slot>
5
5
  </div>
6
- <div :class="itemClass" :style="itemStyle" am-view-item="item" ref="itemRef" v-if="view === 'iteming' || view === 'listing' || view === 'item'">
6
+ <div v-if="view === 'iteming' || view === 'listing' || view === 'item'" ref="itemRef" :class="itemClass" :style="itemStyle" am-view-item="item">
7
7
  <div class="iroute-view-dark" @click="cancel"></div>
8
8
  <div class="iroute-view-body" :style="mode === 'preview' || mode === 'pop-up' ? '' : 'width: 100%;'">
9
9
  <slot name="item" :mode="mode"></slot>
@@ -64,17 +64,17 @@
64
64
  );
65
65
  };
66
66
  };
67
- provide('onlist', evs('list', 'item'));
68
- provide('onitem', evs('item', 'list'));
69
67
 
70
68
  const init = ref(0);
71
69
  const view = ref('');
72
70
  const anim = (e: any) => {
73
71
  if (
74
72
  e.animationName === 'am-show-default' ||
73
+ e.animationName === 'am-show-window' ||
75
74
  e.animationName === 'am-show-preview' ||
76
75
  e.animationName === 'am-show-pop-up' ||
77
76
  e.animationName === 'am-hide-default' ||
77
+ e.animationName === 'am-hide-window' ||
78
78
  e.animationName === 'am-hide-preview' ||
79
79
  e.animationName === 'am-hide-pop-up'
80
80
  ) {
@@ -93,12 +93,17 @@
93
93
  }
94
94
  };
95
95
 
96
- watch(() => route.query[props.queryName], a);
97
- a();
96
+ if (import.meta.client) {
97
+ provide('onlist', evs('list', 'item'));
98
+ provide('onitem', evs('item', 'list'));
99
+ watch(() => route.query[props.queryName], a);
100
+ a();
101
+ }
98
102
 
99
103
  // 取消
100
- const cancel = ({ target }: any = {}) => {
104
+ const cancel = () => {
101
105
  const _query = { ...route.query };
106
+ // eslint-disable-next-line @typescript-eslint/no-dynamic-delete
102
107
  delete _query[props.queryName];
103
108
  router.push({ path: route.path, query: _query });
104
109
  };
@@ -172,27 +177,27 @@
172
177
  }
173
178
  }
174
179
  &[am-view='list'] {
175
- & > [am-view-item~='list'] {
180
+ [am-view-item~='list'] {
176
181
  flex-direction: column;
177
182
  display: flex;
178
183
  animation: am-show-default 0.35s ease both;
179
184
  }
180
185
  }
181
186
  &[am-view='listing'] {
182
- & > [am-view-item~='item'] {
187
+ [am-view-item~='item'] {
183
188
  flex-direction: column;
184
189
  display: flex;
185
190
  animation: am-hide-default 0.3s ease-in-out both;
186
191
  }
187
192
  }
188
193
  &[am-view='item'] {
189
- & > [am-view-item~='item'] {
194
+ [am-view-item~='item'] {
190
195
  display: flex;
191
196
  animation: am-show-default 0.35s ease both;
192
197
  }
193
198
  }
194
199
  &[am-view='iteming'] {
195
- & > [am-view-item~='list'] {
200
+ [am-view-item~='list'] {
196
201
  display: flex;
197
202
  animation: am-hide-default 0.3s ease-in-out both;
198
203
  }
@@ -259,14 +264,14 @@
259
264
  }
260
265
  &[am-view='list'],
261
266
  &[am-view='listing'] {
262
- & > [am-view-item~='item'] {
267
+ [am-view-item~='item'] {
263
268
  display: flex;
264
269
  animation: am-hide-preview 0.5s ease-in-out both;
265
270
  }
266
271
  }
267
272
  &[am-view='item'],
268
273
  &[am-view='iteming'] {
269
- & > [am-view-item~='item'] {
274
+ [am-view-item~='item'] {
270
275
  display: flex;
271
276
  animation: am-show-preview 0.5s ease both;
272
277
  }
@@ -353,7 +358,7 @@
353
358
  }
354
359
  &[am-view='list'],
355
360
  &[am-view='listing'] {
356
- & > [am-view-item~='item'] {
361
+ [am-view-item~='item'] {
357
362
  display: flex;
358
363
  opacity: 0;
359
364
  & > * {
@@ -363,7 +368,7 @@
363
368
  }
364
369
  &[am-view='item'],
365
370
  &[am-view='iteming'] {
366
- & > [am-view-item~='item'] {
371
+ [am-view-item~='item'] {
367
372
  display: flex;
368
373
  opacity: 1;
369
374
  & > * {
@@ -372,4 +377,73 @@
372
377
  }
373
378
  }
374
379
  }
380
+
381
+ // 窗口模式
382
+ [am-view][am-mode~='window'] {
383
+ overflow: hidden;
384
+
385
+ @keyframes am-show-default {
386
+ 0% {
387
+ opacity: 0;
388
+ transform: translate3d(1em, 0, 0);
389
+ }
390
+ 100% {
391
+ opacity: 1;
392
+ transform: translate3d(0, 0, 0);
393
+ }
394
+ }
395
+ @keyframes am-hide-default {
396
+ 0% {
397
+ opacity: 1;
398
+ transform: translate3d(0, 0, 0);
399
+ }
400
+ 100% {
401
+ opacity: 0;
402
+ transform: translate3d(1em, 0, 0);
403
+ }
404
+ }
405
+
406
+ &[view-full~='1'] {
407
+ position: fixed;
408
+ width: 100%;
409
+ height: 100%;
410
+ left: 0;
411
+ top: 0;
412
+ z-index: 15;
413
+ }
414
+
415
+ [am-view-item] {
416
+ display: none;
417
+
418
+ &[am-view-item~='row'] {
419
+ flex-direction: row !important;
420
+ }
421
+ }
422
+ &[am-view='list'] {
423
+ [am-view-item~='list'] {
424
+ flex-direction: column;
425
+ display: flex;
426
+ animation: am-show-default 0s ease both;
427
+ }
428
+ }
429
+ &[am-view='listing'] {
430
+ [am-view-item~='item'] {
431
+ flex-direction: column;
432
+ display: flex;
433
+ animation: am-hide-default 0s ease-in-out both;
434
+ }
435
+ }
436
+ &[am-view='item'] {
437
+ [am-view-item~='item'] {
438
+ display: flex;
439
+ animation: am-show-default 0s ease both;
440
+ }
441
+ }
442
+ &[am-view='iteming'] {
443
+ [am-view-item~='list'] {
444
+ display: flex;
445
+ animation: am-hide-default 0s ease-in-out both;
446
+ }
447
+ }
448
+ }
375
449
  </style>
@@ -1,4 +1,5 @@
1
- import { Layer, LayerById } from './LayerView';
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';