@neatui/nuxt 0.1.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/README.md +3 -0
- package/package.json +43 -0
- package/rollup.config.js +35 -0
- package/src/components/basic/IDraggable.vue +84 -0
- package/src/components/basic/IDraggable@b.vue +80 -0
- package/src/components/basic/IFollowView.vue +211 -0
- package/src/components/basic/IPickerView.vue +351 -0
- package/src/components/basic/IRouterView.vue +360 -0
- package/src/components/basic/IScrollView.vue +127 -0
- package/src/components/basic/Icon.vue +54 -0
- package/src/components/basic/LayerView/Layer.vue +339 -0
- package/src/components/basic/LayerView/index.ts +5 -0
- package/src/components/basic/index.ts +7 -0
- package/src/components/display/Avatar.vue +1 -0
- package/src/components/display/Badge.vue +1 -0
- package/src/components/display/Calendar.vue +245 -0
- package/src/components/display/CalendarReg.vue +245 -0
- package/src/components/display/Card.vue +1 -0
- package/src/components/display/Carousel.vue +1 -0
- package/src/components/display/ChartView.vue +123 -0
- package/src/components/display/Collapse.vue +1 -0
- package/src/components/display/Desriptions.vue +1 -0
- package/src/components/display/Empty.vue +1 -0
- package/src/components/display/Image.vue +112 -0
- package/src/components/display/List.vue +1 -0
- package/src/components/display/PhotoEditor.vue +181 -0
- package/src/components/display/PhotoViewer.vue +50 -0
- package/src/components/display/Popover.vue +1 -0
- package/src/components/display/QRCode.vue +1 -0
- package/src/components/display/Segmented.vue +1 -0
- package/src/components/display/Statistic.vue +1 -0
- package/src/components/display/Table.vue +1 -0
- package/src/components/display/Tabs.vue +1 -0
- package/src/components/display/Tag.vue +1 -0
- package/src/components/display/Timeline.vue +1 -0
- package/src/components/display/Tooltip.vue +1 -0
- package/src/components/display/Tour.vue +1 -0
- package/src/components/display/Tree.vue +431 -0
- package/src/components/display/TreeView.vue +225 -0
- package/src/components/display/index.ts +8 -0
- package/src/components/form/Cascader.vue +435 -0
- package/src/components/form/DatePicker.vue +124 -0
- package/src/components/form/DateRangePicker@v2.vue.backup +224 -0
- package/src/components/form/DateRangePicker@v3.vue +116 -0
- package/src/components/form/DateRangeView@v3.vue +386 -0
- package/src/components/form/DateView.vue +229 -0
- package/src/components/form/DateView@v2.vue +386 -0
- package/src/components/form/DateView@v3.vue +471 -0
- package/src/components/form/EditUpload.vue +4 -0
- package/src/components/form/ImgUpload.vue +174 -0
- package/src/components/form/Input.vue.backup +230 -0
- package/src/components/form/Input@v3.vue +267 -0
- package/src/components/form/InputNumber.vue +200 -0
- package/src/components/form/InputRange.vue +235 -0
- package/src/components/form/MoreSelect.vue.backup +144 -0
- package/src/components/form/MoreSelect@v3.vue +195 -0
- package/src/components/form/MoreSelectList.vue +125 -0
- package/src/components/form/MoreSelectPanel@v3.vue +190 -0
- package/src/components/form/MoreSelectPicker.vue +124 -0
- package/src/components/form/MoreSelectTags.vue +124 -0
- package/src/components/form/PageMoreSelect.vue +187 -0
- package/src/components/form/PageSelect.vue +189 -0
- package/src/components/form/SearchMoreSelect.vue +173 -0
- package/src/components/form/SearchSelect.vue.backup +194 -0
- package/src/components/form/SearchSelect@v3.vue +202 -0
- package/src/components/form/Select@v3.vue +201 -0
- package/src/components/form/SelectList.vue +58 -0
- package/src/components/form/SelectPicker.vue +97 -0
- package/src/components/form/SelectTags.vue +52 -0
- package/src/components/form/SelectTree/SelectTree@v1.vue +227 -0
- package/src/components/form/Switch.vue +135 -0
- package/src/components/form/TextArea.vue +193 -0
- package/src/components/form/TimePicker.vue +11 -0
- package/src/components/form/TimeView.vue +244 -0
- package/src/components/form/Upload.vue +346 -0
- package/src/components/form/index.ts +82 -0
- package/src/components/loader/FormLoader/FormLoader@v2.vue +422 -0
- package/src/components/loader/FormLoader/FormLoader@v3.vue.backup +318 -0
- package/src/components/loader/FormLoader/index.ts +2 -0
- package/src/components/loader/FormLoader@v1/FormLoader.vue +506 -0
- package/src/components/loader/FormLoader@v1/FormRender.vue +277 -0
- package/src/components/loader/LimitLoader/LimitLoader.vue.backup +131 -0
- package/src/components/loader/LimitLoader/LimitLoader@v2.vue.backup +174 -0
- package/src/components/loader/LimitLoader/LimitLoader@v3.vue +183 -0
- package/src/components/loader/LimitLoader/index.ts +2 -0
- package/src/components/loader/TableLoader/TableColView.vue +115 -0
- package/src/components/loader/TableLoader/TableLoader.vue +360 -0
- package/src/components/loader/TableLoader/index.ts +2 -0
- package/src/components/loader/ViewLoader/ViewLoader@v1.vue +256 -0
- package/src/components/loader/ViewLoader/index.ts +2 -0
- package/src/components/loader/index.ts +5 -0
- package/src/components/tools/FormDraftsView.vue +330 -0
- package/src/components/tools/FormVerifyView.vue +206 -0
- package/src/components/tools/MoreTools.vue +74 -0
- package/src/components/tools/MoreTools@v2.vue +74 -0
- package/src/components/tools/Pagination@a.vue +222 -0
- package/src/components/tools/Pagination@b.vue +221 -0
- package/src/components/tools/index.ts +5 -0
- package/src/index.ts +9 -0
- package/src/shims-vue.d.ts +5 -0
- package/src/store/myui.ts +50 -0
- package/tsconfig.json +24 -0
@@ -0,0 +1,351 @@
|
|
1
|
+
<template>
|
2
|
+
<div ref="dom" :class="btnClass" :style="btnStyle" class="fekit-picker-button" data-aaa="111" @click="toggle">
|
3
|
+
<slot></slot>
|
4
|
+
</div>
|
5
|
+
<Teleport to="#fekit">
|
6
|
+
<div v-if="state.view" :view="state.view" am-view="am" class="fekit-picker">
|
7
|
+
<div :ui-flex="`col cb`" class="fekit-picker-wrap" @animationend="anim" @click="_sys_hide">
|
8
|
+
<div class="picker bg-fore picker-virtual-key">
|
9
|
+
<slot name="options"></slot>
|
10
|
+
</div>
|
11
|
+
</div>
|
12
|
+
</div>
|
13
|
+
</Teleport>
|
14
|
+
</template>
|
15
|
+
<script lang="ts" setup>
|
16
|
+
import { reactive, ref, onMounted } from 'vue';
|
17
|
+
|
18
|
+
// 回调合集
|
19
|
+
const on: any = {
|
20
|
+
show() {},
|
21
|
+
hide() {},
|
22
|
+
open() {},
|
23
|
+
none() {}
|
24
|
+
};
|
25
|
+
|
26
|
+
const area: any = document.querySelector('#fekit');
|
27
|
+
if (!area) {
|
28
|
+
const el = document.createElement('div');
|
29
|
+
el.id = 'fekit';
|
30
|
+
el.style.position = 'absolute';
|
31
|
+
document.body.appendChild(el);
|
32
|
+
}
|
33
|
+
const emits = defineEmits(['update:modelValue', 'show', 'hide']);
|
34
|
+
const props = defineProps({
|
35
|
+
btnClass: { type: String, default: 'dib' },
|
36
|
+
btnStyle: { type: String, default: 'dib' }
|
37
|
+
});
|
38
|
+
|
39
|
+
const dom: any = ref(null);
|
40
|
+
const tip: any = ref(null);
|
41
|
+
const state = reactive({
|
42
|
+
view: 0,
|
43
|
+
show: 0
|
44
|
+
});
|
45
|
+
|
46
|
+
// 开关
|
47
|
+
const toggle = () => {
|
48
|
+
state.view = state.view ? 0 : 2;
|
49
|
+
};
|
50
|
+
|
51
|
+
// 显示弹层
|
52
|
+
const show = (then = () => {}) => {
|
53
|
+
state.view = 2;
|
54
|
+
on.show = then;
|
55
|
+
};
|
56
|
+
|
57
|
+
// 隐藏弹层
|
58
|
+
const hide = (then = () => {}) => {
|
59
|
+
if (state.view === 3) {
|
60
|
+
state.view = 1;
|
61
|
+
on.hide = then;
|
62
|
+
}
|
63
|
+
};
|
64
|
+
|
65
|
+
// 监听动画
|
66
|
+
const anim = () => {
|
67
|
+
if (state.view === 1) {
|
68
|
+
state.view = 0;
|
69
|
+
on.hide();
|
70
|
+
emits('hide');
|
71
|
+
}
|
72
|
+
if (state.view === 2) {
|
73
|
+
state.view = 3;
|
74
|
+
on.show();
|
75
|
+
emits('show');
|
76
|
+
}
|
77
|
+
};
|
78
|
+
|
79
|
+
// 取消
|
80
|
+
const cancel = ({ target }: any = {}) => {
|
81
|
+
if (tip.value && !tip.value?.contains(target) && dom.value && !dom.value.contains(target)) {
|
82
|
+
state.show = 0;
|
83
|
+
}
|
84
|
+
};
|
85
|
+
|
86
|
+
// 点暗层关闭
|
87
|
+
const _sys_hide = (ev: any) => {
|
88
|
+
if (ev.target.className === 'fekit-picker-wrap' && state.view === 3) {
|
89
|
+
state.view = 1;
|
90
|
+
}
|
91
|
+
};
|
92
|
+
|
93
|
+
onMounted(() => {
|
94
|
+
document.addEventListener('click', cancel, true);
|
95
|
+
});
|
96
|
+
|
97
|
+
defineExpose({
|
98
|
+
show,
|
99
|
+
hide
|
100
|
+
});
|
101
|
+
</script>
|
102
|
+
|
103
|
+
<style lang="scss">
|
104
|
+
.fekit-picker-button {
|
105
|
+
& > *,
|
106
|
+
[ui-form-prefix],
|
107
|
+
[ui-form-suffix] {
|
108
|
+
pointer-events: none !important;
|
109
|
+
}
|
110
|
+
}
|
111
|
+
|
112
|
+
.picker {
|
113
|
+
width: 100%;
|
114
|
+
max-height: 50%;
|
115
|
+
border-radius: 0.5em 0.5em 0 0;
|
116
|
+
}
|
117
|
+
|
118
|
+
// 显示动画
|
119
|
+
@keyframes am-show-am {
|
120
|
+
0% {
|
121
|
+
opacity: 0;
|
122
|
+
transform: translate3d(0, 100%, 0) scale3d(1, 1, 1);
|
123
|
+
}
|
124
|
+
100% {
|
125
|
+
opacity: 1;
|
126
|
+
transform: translate3d(0, 0%, 0) scale3d(1, 1, 1);
|
127
|
+
}
|
128
|
+
}
|
129
|
+
|
130
|
+
// 隐藏动画
|
131
|
+
@keyframes am-hide-am {
|
132
|
+
0% {
|
133
|
+
opacity: 1;
|
134
|
+
transform: translate3d(0, 0%, 0) scale3d(1, 1, 1);
|
135
|
+
}
|
136
|
+
100% {
|
137
|
+
opacity: 0;
|
138
|
+
transform: translate3d(0, 100%, 0) scale3d(1, 1, 1);
|
139
|
+
}
|
140
|
+
}
|
141
|
+
|
142
|
+
// 引用显示
|
143
|
+
%am-show-am {
|
144
|
+
transform: translate3d(0, -150%, 0);
|
145
|
+
opacity: 0;
|
146
|
+
transform-style: preserve-3d;
|
147
|
+
}
|
148
|
+
|
149
|
+
// 引用隐藏
|
150
|
+
%am-hide-am {
|
151
|
+
transform: translate3d(0, 0, 0) scale3d(1, 1, 1);
|
152
|
+
opacity: 0;
|
153
|
+
transform-style: preserve-3d;
|
154
|
+
}
|
155
|
+
|
156
|
+
// 传参调用
|
157
|
+
@mixin am-view-am($time: 450ms, $delay: 100ms) {
|
158
|
+
&.show,
|
159
|
+
&[view='2'] {
|
160
|
+
& > * {
|
161
|
+
@extend %am-show-am;
|
162
|
+
animation: am-show-am $time $delay both;
|
163
|
+
}
|
164
|
+
}
|
165
|
+
|
166
|
+
&.hide,
|
167
|
+
&[view='1'] {
|
168
|
+
opacity: 0;
|
169
|
+
transition: ($time + $delay) * (4 * 0.1) ($time + $delay) * (6 * 0.1);
|
170
|
+
pointer-events: none;
|
171
|
+
|
172
|
+
& > * {
|
173
|
+
@extend %am-hide-am;
|
174
|
+
animation: am-hide-am $time $delay both;
|
175
|
+
}
|
176
|
+
}
|
177
|
+
|
178
|
+
&.none,
|
179
|
+
&[view='0'] {
|
180
|
+
display: none;
|
181
|
+
}
|
182
|
+
}
|
183
|
+
|
184
|
+
// 动画时间
|
185
|
+
$time: 400ms;
|
186
|
+
$delay: 100ms;
|
187
|
+
|
188
|
+
// 全套引用
|
189
|
+
[am-view='am'] {
|
190
|
+
&.show,
|
191
|
+
&[view='2'] {
|
192
|
+
& > * {
|
193
|
+
@extend %am-show-am;
|
194
|
+
animation: am-show-am $time $delay both;
|
195
|
+
}
|
196
|
+
}
|
197
|
+
|
198
|
+
&.hide,
|
199
|
+
&[view='1'] {
|
200
|
+
opacity: 0;
|
201
|
+
transition: ($time + $delay) * 0.4 ($time + $delay) * 0.6;
|
202
|
+
pointer-events: none;
|
203
|
+
|
204
|
+
& > * {
|
205
|
+
@extend %am-hide-am;
|
206
|
+
animation: am-hide-am $time $delay ease-in-out both;
|
207
|
+
}
|
208
|
+
}
|
209
|
+
|
210
|
+
&.none,
|
211
|
+
&[view='0'] {
|
212
|
+
display: none;
|
213
|
+
}
|
214
|
+
}
|
215
|
+
|
216
|
+
@keyframes am-dark-show {
|
217
|
+
0% {
|
218
|
+
background-color: rgba(0, 0, 0, 0);
|
219
|
+
}
|
220
|
+
100% {
|
221
|
+
background-color: rgba(0, 0, 0, 0.5);
|
222
|
+
}
|
223
|
+
}
|
224
|
+
|
225
|
+
@keyframes am-dark-hide {
|
226
|
+
0% {
|
227
|
+
background-color: rgba(0, 0, 0, 0.5);
|
228
|
+
}
|
229
|
+
100% {
|
230
|
+
background-color: rgba(0, 0, 0, 0);
|
231
|
+
}
|
232
|
+
}
|
233
|
+
|
234
|
+
// 弹层
|
235
|
+
.fekit-picker {
|
236
|
+
position: fixed;
|
237
|
+
width: 100%;
|
238
|
+
height: 100%;
|
239
|
+
left: 0;
|
240
|
+
top: 0;
|
241
|
+
z-index: 50;
|
242
|
+
background-color: rgba(0, 0, 0, 0);
|
243
|
+
pointer-events: none;
|
244
|
+
transition: all 0.3s;
|
245
|
+
|
246
|
+
&[view~='1'] {
|
247
|
+
animation: am-dark-hide 0.3s both;
|
248
|
+
}
|
249
|
+
|
250
|
+
&[view~='2'],
|
251
|
+
&[view~='3'] {
|
252
|
+
animation: am-dark-show 0.3s both;
|
253
|
+
}
|
254
|
+
|
255
|
+
&-wrap {
|
256
|
+
position: relative;
|
257
|
+
width: 100%;
|
258
|
+
height: 100%;
|
259
|
+
pointer-events: auto;
|
260
|
+
|
261
|
+
& > * {
|
262
|
+
position: relative !important;
|
263
|
+
|
264
|
+
&.com-dialog {
|
265
|
+
max-width: 80%;
|
266
|
+
}
|
267
|
+
}
|
268
|
+
}
|
269
|
+
|
270
|
+
&-close {
|
271
|
+
position: absolute;
|
272
|
+
width: 2rem;
|
273
|
+
height: 2rem;
|
274
|
+
line-height: 2rem;
|
275
|
+
right: 0.5rem;
|
276
|
+
top: 0.5rem;
|
277
|
+
text-align: center;
|
278
|
+
transform: rotate(0deg);
|
279
|
+
transition: all 0.2s;
|
280
|
+
|
281
|
+
&:hover {
|
282
|
+
transform: rotate(-90deg);
|
283
|
+
}
|
284
|
+
}
|
285
|
+
|
286
|
+
&-close {
|
287
|
+
position: absolute;
|
288
|
+
width: 18px;
|
289
|
+
height: 18px;
|
290
|
+
right: 0.5em;
|
291
|
+
top: 0.5em;
|
292
|
+
padding: 0.25em;
|
293
|
+
text-align: center;
|
294
|
+
transition: all 0.2s;
|
295
|
+
border-radius: 50%;
|
296
|
+
background:
|
297
|
+
linear-gradient(45deg, transparent 44%, currentColor 46%, currentColor 54%, transparent 56%) no-repeat center / 50% 50%,
|
298
|
+
linear-gradient(-45deg, transparent 44%, currentColor 46%, currentColor 54%, transparent 56%) no-repeat center / 50% 50%;
|
299
|
+
transform: scale(1) rotate(0deg);
|
300
|
+
opacity: 0.8;
|
301
|
+
transition: all 0.25s;
|
302
|
+
|
303
|
+
&:hover {
|
304
|
+
transform: scale(1) rotate(-90deg);
|
305
|
+
}
|
306
|
+
|
307
|
+
&:active {
|
308
|
+
transform: scale(0.8) rotate(-90deg);
|
309
|
+
}
|
310
|
+
|
311
|
+
&::before {
|
312
|
+
position: absolute;
|
313
|
+
content: '';
|
314
|
+
width: 200%;
|
315
|
+
height: 200%;
|
316
|
+
left: -50%;
|
317
|
+
top: -50%;
|
318
|
+
}
|
319
|
+
}
|
320
|
+
}
|
321
|
+
|
322
|
+
@supports (bottom: constant(safe-area-inset-bottom)) or (bottom: env(safe-area-inset-bottom)) {
|
323
|
+
.picker-virtual-key {
|
324
|
+
padding-bottom: constant(safe-area-inset-bottom) !important;
|
325
|
+
padding-bottom: env(safe-area-inset-bottom) !important;
|
326
|
+
}
|
327
|
+
}
|
328
|
+
|
329
|
+
html {
|
330
|
+
&[size='xs'] {
|
331
|
+
.fekit-picker-close {
|
332
|
+
width: 16px;
|
333
|
+
height: 16px;
|
334
|
+
}
|
335
|
+
}
|
336
|
+
|
337
|
+
&[size='l'] {
|
338
|
+
.fekit-picker-close {
|
339
|
+
width: 20px;
|
340
|
+
height: 20px;
|
341
|
+
}
|
342
|
+
}
|
343
|
+
|
344
|
+
&[size='xl'] {
|
345
|
+
.fekit-picker-close {
|
346
|
+
width: 22px;
|
347
|
+
height: 22px;
|
348
|
+
}
|
349
|
+
}
|
350
|
+
}
|
351
|
+
</style>
|
@@ -0,0 +1,360 @@
|
|
1
|
+
<template>
|
2
|
+
<div :am-view="view" :am-mode="mode" class="iroute-view pr full" :view-full="full ? 1 : 0" @animationend="anim">
|
3
|
+
<div :class="listClass" :style="listStyle" am-view-item="list">
|
4
|
+
<slot name="list" :mode="mode"></slot>
|
5
|
+
</div>
|
6
|
+
<div :class="itemClass" :style="itemStyle" am-view-item="item" ref="itemRef" v-if="view === 'iteming' || view === 'listing' || view === 'item'">
|
7
|
+
<div class="iroute-view-dark" @click="cancel"></div>
|
8
|
+
<div class="iroute-view-body" :style="mode === 'preview' || mode === 'pop-up' ? 'box-shadow: rgba(0, 0, 0, 0.08) -5px 0px 10px 0px;' : 'width: 100%;'">
|
9
|
+
<slot name="item" :mode="mode"></slot>
|
10
|
+
</div>
|
11
|
+
</div>
|
12
|
+
</div>
|
13
|
+
</template>
|
14
|
+
<script setup lang="ts">
|
15
|
+
import { deepcopy } from '@fekit/utils';
|
16
|
+
import { ref, watch, provide, reactive } from 'vue';
|
17
|
+
import { useRoute, useRouter } from 'vue-router';
|
18
|
+
const route = useRoute();
|
19
|
+
const router = useRouter();
|
20
|
+
|
21
|
+
interface Props {
|
22
|
+
full?: boolean | 0 | 1;
|
23
|
+
once?: number;
|
24
|
+
mode?: 'default' | 'preview' | 'pop-up' | 'window';
|
25
|
+
queryName?: string;
|
26
|
+
listClass?: string;
|
27
|
+
listStyle?: string;
|
28
|
+
itemClass?: string;
|
29
|
+
itemStyle?: string;
|
30
|
+
}
|
31
|
+
const props: any = withDefaults(defineProps<Props>(), {
|
32
|
+
full: 0,
|
33
|
+
once: 0,
|
34
|
+
mode: 'default',
|
35
|
+
queryName: 'id',
|
36
|
+
listClass: 'full',
|
37
|
+
listStyle: '',
|
38
|
+
itemClass: 'full',
|
39
|
+
itemStyle: ''
|
40
|
+
});
|
41
|
+
const state: any = reactive({
|
42
|
+
first: 1,
|
43
|
+
list: null,
|
44
|
+
item: null
|
45
|
+
});
|
46
|
+
|
47
|
+
const evs = (v: any = 'list', p: any = 'item') => {
|
48
|
+
return (then: any = () => {}, param: any) => {
|
49
|
+
watch(
|
50
|
+
() => view.value,
|
51
|
+
() => {
|
52
|
+
if (view.value === v) {
|
53
|
+
if (param) {
|
54
|
+
state[p] = param;
|
55
|
+
}
|
56
|
+
if (!state.first) {
|
57
|
+
then({ view: view.value, mode: props.mode, param: deepcopy(state[v] || {}) });
|
58
|
+
} else {
|
59
|
+
state.first = 0;
|
60
|
+
}
|
61
|
+
}
|
62
|
+
},
|
63
|
+
{ deep: true, immediate: true }
|
64
|
+
);
|
65
|
+
};
|
66
|
+
};
|
67
|
+
provide('onlist', evs('list', 'item'));
|
68
|
+
provide('onitem', evs('item', 'list'));
|
69
|
+
|
70
|
+
const init = ref(0);
|
71
|
+
const view = ref('');
|
72
|
+
const anim = (e: any) => {
|
73
|
+
if (
|
74
|
+
e.animationName === 'am-show-default' ||
|
75
|
+
e.animationName === 'am-show-preview' ||
|
76
|
+
e.animationName === 'am-show-pop-up' ||
|
77
|
+
e.animationName === 'am-hide-default' ||
|
78
|
+
e.animationName === 'am-hide-preview' ||
|
79
|
+
e.animationName === 'am-hide-pop-up'
|
80
|
+
) {
|
81
|
+
view.value = route.query[props.queryName] ? 'item' : 'list';
|
82
|
+
}
|
83
|
+
};
|
84
|
+
|
85
|
+
const a = () => {
|
86
|
+
if (init.value) {
|
87
|
+
if (!props.once) {
|
88
|
+
view.value = route.query[props.queryName] ? 'iteming' : 'listing';
|
89
|
+
}
|
90
|
+
} else {
|
91
|
+
view.value = route.query[props.queryName] ? 'item' : 'list';
|
92
|
+
init.value = 1;
|
93
|
+
}
|
94
|
+
};
|
95
|
+
|
96
|
+
watch(() => route.query[props.queryName], a);
|
97
|
+
a();
|
98
|
+
|
99
|
+
// 取消
|
100
|
+
const cancel = ({ target }: any = {}) => {
|
101
|
+
const _query = { ...route.query };
|
102
|
+
delete _query[props.queryName];
|
103
|
+
router.push({ path: route.path, query: _query });
|
104
|
+
};
|
105
|
+
</script>
|
106
|
+
|
107
|
+
<style lang="scss">
|
108
|
+
.iroute-view-dark {
|
109
|
+
position: absolute;
|
110
|
+
width: 100%;
|
111
|
+
height: 100%;
|
112
|
+
left: 0;
|
113
|
+
top: 0;
|
114
|
+
}
|
115
|
+
.iroute-view-body {
|
116
|
+
z-index: 1;
|
117
|
+
flex: 1;
|
118
|
+
overflow: hidden;
|
119
|
+
}
|
120
|
+
|
121
|
+
[am-mode='preview'] {
|
122
|
+
.iroute-view-body > * {
|
123
|
+
height: 100%;
|
124
|
+
}
|
125
|
+
}
|
126
|
+
|
127
|
+
// 默认模式
|
128
|
+
[am-view][am-mode~='default'] {
|
129
|
+
overflow: hidden;
|
130
|
+
|
131
|
+
@keyframes am-show-default {
|
132
|
+
0% {
|
133
|
+
opacity: 0;
|
134
|
+
transform: translate3d(1em, 0, 0);
|
135
|
+
}
|
136
|
+
100% {
|
137
|
+
opacity: 1;
|
138
|
+
transform: translate3d(0, 0, 0);
|
139
|
+
}
|
140
|
+
}
|
141
|
+
@keyframes am-hide-default {
|
142
|
+
0% {
|
143
|
+
opacity: 1;
|
144
|
+
transform: translate3d(0, 0, 0);
|
145
|
+
}
|
146
|
+
100% {
|
147
|
+
opacity: 0;
|
148
|
+
transform: translate3d(1em, 0, 0);
|
149
|
+
}
|
150
|
+
}
|
151
|
+
|
152
|
+
&[view-full~='1'] {
|
153
|
+
position: fixed;
|
154
|
+
width: 100%;
|
155
|
+
height: 100%;
|
156
|
+
left: 0;
|
157
|
+
top: 0;
|
158
|
+
z-index: 15;
|
159
|
+
}
|
160
|
+
|
161
|
+
[am-view-item] {
|
162
|
+
display: none;
|
163
|
+
|
164
|
+
&[am-view-item~='row'] {
|
165
|
+
flex-direction: row !important;
|
166
|
+
}
|
167
|
+
}
|
168
|
+
&[am-view='list'] {
|
169
|
+
[am-view-item~='list'] {
|
170
|
+
flex-direction: column;
|
171
|
+
display: flex;
|
172
|
+
animation: am-show-default 0.35s ease both;
|
173
|
+
}
|
174
|
+
}
|
175
|
+
&[am-view='listing'] {
|
176
|
+
[am-view-item~='item'] {
|
177
|
+
flex-direction: column;
|
178
|
+
display: flex;
|
179
|
+
animation: am-hide-default 0.3s ease-in-out both;
|
180
|
+
}
|
181
|
+
}
|
182
|
+
&[am-view='item'] {
|
183
|
+
[am-view-item~='item'] {
|
184
|
+
display: flex;
|
185
|
+
animation: am-show-default 0.35s ease both;
|
186
|
+
}
|
187
|
+
}
|
188
|
+
&[am-view='iteming'] {
|
189
|
+
[am-view-item~='list'] {
|
190
|
+
display: flex;
|
191
|
+
animation: am-hide-default 0.3s ease-in-out both;
|
192
|
+
}
|
193
|
+
}
|
194
|
+
}
|
195
|
+
|
196
|
+
// 默认模式
|
197
|
+
[am-view][am-mode~='preview'] {
|
198
|
+
overflow: hidden;
|
199
|
+
|
200
|
+
@keyframes am-show-preview {
|
201
|
+
0% {
|
202
|
+
opacity: 0;
|
203
|
+
transform: translate3d(110%, 0, 0);
|
204
|
+
}
|
205
|
+
100% {
|
206
|
+
opacity: 1;
|
207
|
+
transform: translate3d(0, 0, 0);
|
208
|
+
}
|
209
|
+
}
|
210
|
+
@keyframes am-hide-preview {
|
211
|
+
0% {
|
212
|
+
opacity: 1;
|
213
|
+
transform: translate3d(0, 0, 0);
|
214
|
+
}
|
215
|
+
100% {
|
216
|
+
opacity: 0;
|
217
|
+
transform: translate3d(110%, 0, 0);
|
218
|
+
}
|
219
|
+
}
|
220
|
+
|
221
|
+
&[view-full~='1'] {
|
222
|
+
position: fixed;
|
223
|
+
width: 100%;
|
224
|
+
height: 100%;
|
225
|
+
left: 0;
|
226
|
+
top: 0;
|
227
|
+
z-index: 15;
|
228
|
+
}
|
229
|
+
|
230
|
+
[am-view-item] {
|
231
|
+
&[am-view-item~='row'] {
|
232
|
+
flex-direction: row !important;
|
233
|
+
}
|
234
|
+
|
235
|
+
&[am-view-item~='list'] {
|
236
|
+
display: flex;
|
237
|
+
}
|
238
|
+
&[am-view-item~='item'] {
|
239
|
+
position: absolute;
|
240
|
+
top: 0;
|
241
|
+
right: 0;
|
242
|
+
z-index: 10;
|
243
|
+
display: flex;
|
244
|
+
justify-content: flex-end;
|
245
|
+
align-items: stretch;
|
246
|
+
align-content: space-between;
|
247
|
+
pointer-events: none;
|
248
|
+
& > * {
|
249
|
+
pointer-events: auto;
|
250
|
+
}
|
251
|
+
}
|
252
|
+
}
|
253
|
+
&[am-view='list'],
|
254
|
+
&[am-view='listing'] {
|
255
|
+
[am-view-item~='item'] {
|
256
|
+
display: flex;
|
257
|
+
animation: am-hide-preview 0.5s ease-in-out both;
|
258
|
+
}
|
259
|
+
}
|
260
|
+
&[am-view='item'],
|
261
|
+
&[am-view='iteming'] {
|
262
|
+
[am-view-item~='item'] {
|
263
|
+
display: flex;
|
264
|
+
animation: am-show-preview 0.5s ease both;
|
265
|
+
}
|
266
|
+
}
|
267
|
+
|
268
|
+
.side-preview {
|
269
|
+
min-width: 10rem;
|
270
|
+
height: 100%;
|
271
|
+
box-shadow: -0.25em 0 0.5em rgba(0, 0, 0, 0.05);
|
272
|
+
pointer-events: auto;
|
273
|
+
|
274
|
+
&[ui-card~='@a'][ui-card~=':max'] {
|
275
|
+
width: 100%;
|
276
|
+
}
|
277
|
+
}
|
278
|
+
}
|
279
|
+
|
280
|
+
// 弹出窗口
|
281
|
+
[am-view][am-mode~='pop-up'] {
|
282
|
+
overflow: hidden;
|
283
|
+
|
284
|
+
@keyframes am-show-pop-up {
|
285
|
+
0% {
|
286
|
+
opacity: 0;
|
287
|
+
transform: translate3d(0, 0, 0) scale(0.95);
|
288
|
+
}
|
289
|
+
100% {
|
290
|
+
opacity: 1;
|
291
|
+
transform: translate3d(0, 0, 0);
|
292
|
+
}
|
293
|
+
}
|
294
|
+
@keyframes am-hide-pop-up {
|
295
|
+
0% {
|
296
|
+
opacity: 1;
|
297
|
+
transform: translate3d(0, 0, 0);
|
298
|
+
}
|
299
|
+
100% {
|
300
|
+
opacity: 0;
|
301
|
+
transform: translate3d(0, 0, 0) scale(0.95);
|
302
|
+
}
|
303
|
+
}
|
304
|
+
|
305
|
+
&[view-full~='1'] {
|
306
|
+
position: fixed;
|
307
|
+
width: 100%;
|
308
|
+
height: 100%;
|
309
|
+
left: 0;
|
310
|
+
top: 0;
|
311
|
+
z-index: 15;
|
312
|
+
}
|
313
|
+
|
314
|
+
[am-view-item] {
|
315
|
+
&[am-view-item~='row'] {
|
316
|
+
flex-direction: row !important;
|
317
|
+
}
|
318
|
+
|
319
|
+
&[am-view-item~='list'] {
|
320
|
+
display: flex;
|
321
|
+
}
|
322
|
+
&[am-view-item~='item'] {
|
323
|
+
position: fixed;
|
324
|
+
top: 0;
|
325
|
+
right: 0;
|
326
|
+
z-index: 100;
|
327
|
+
display: flex;
|
328
|
+
justify-content: center;
|
329
|
+
align-items: center;
|
330
|
+
align-content: center;
|
331
|
+
pointer-events: none;
|
332
|
+
background-color: rgba(0, 0, 0, 0.5);
|
333
|
+
transition: all 0.35s;
|
334
|
+
& > * {
|
335
|
+
pointer-events: auto;
|
336
|
+
}
|
337
|
+
}
|
338
|
+
}
|
339
|
+
&[am-view='list'],
|
340
|
+
&[am-view='listing'] {
|
341
|
+
[am-view-item~='item'] {
|
342
|
+
display: flex;
|
343
|
+
opacity: 0;
|
344
|
+
& > * {
|
345
|
+
animation: am-hide-pop-up 0.35s ease both;
|
346
|
+
}
|
347
|
+
}
|
348
|
+
}
|
349
|
+
&[am-view='item'],
|
350
|
+
&[am-view='iteming'] {
|
351
|
+
[am-view-item~='item'] {
|
352
|
+
display: flex;
|
353
|
+
opacity: 1;
|
354
|
+
& > * {
|
355
|
+
animation: am-show-pop-up 0.35s ease both;
|
356
|
+
}
|
357
|
+
}
|
358
|
+
}
|
359
|
+
}
|
360
|
+
</style>
|