@neatui/nuxt 0.1.0 → 1.0.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/BUILD.md +128 -0
- package/README.md +98 -1
- package/SSR_COMPATIBILITY.md +201 -0
- package/USAGE.md +260 -0
- package/nuxt.config.example.ts +37 -0
- package/package.json +29 -11
- package/src/components/basic/IDraggable.vue +87 -65
- package/src/components/basic/IFollowView.vue +32 -23
- package/src/components/basic/IRouterView.vue +38 -23
- package/src/components/basic/IScrollView.vue +11 -7
- package/src/components/basic/Icon.vue +17 -17
- package/src/components/basic/LayerView/Layer.vue +33 -106
- package/src/components/basic/follow.ts +133 -0
- package/src/components/display/Calendar.vue +14 -14
- package/src/components/display/CalendarReg.vue +14 -14
- package/src/components/display/Image.vue +8 -8
- package/src/components/display/PhotoEditor.vue +36 -36
- package/src/components/display/PhotoViewer.vue +8 -8
- package/src/components/display/Tree.vue +6 -6
- package/src/components/display/TreeView.vue +4 -4
- package/src/components/display/index.ts +2 -2
- package/src/components/form/Cascader.vue +19 -19
- package/src/components/form/Checkbox.vue +64 -0
- package/src/components/form/DatePicker.vue +6 -7
- package/src/components/form/DateRangePicker@v3.vue +4 -4
- package/src/components/form/DateRangeView@v3.vue +18 -19
- package/src/components/form/DateView.vue +14 -14
- package/src/components/form/DateView@v2.vue +14 -14
- package/src/components/form/DateView@v3.vue +331 -318
- package/src/components/form/ImgUpload.vue +7 -7
- package/src/components/form/Input@v3.vue +11 -11
- package/src/components/form/MoreSelect@v3.vue +87 -17
- package/src/components/form/MoreSelectList.vue +8 -8
- package/src/components/form/MoreSelectPanel@v3.vue +3 -3
- package/src/components/form/MoreSelectPicker.vue +7 -7
- package/src/components/form/MoreSelectTags.vue +8 -8
- package/src/components/form/PageMoreSelect.vue +14 -14
- package/src/components/form/PageSelect.vue +16 -16
- package/src/components/form/SearchMoreSelect.vue +12 -12
- package/src/components/form/SearchSelect@v3.vue +3 -3
- package/src/components/form/Select@v3.vue +229 -23
- package/src/components/form/SelectList.vue +8 -8
- package/src/components/form/SelectPicker.vue +6 -6
- package/src/components/form/SelectTags.vue +7 -7
- package/src/components/form/SelectTree/SelectTree@v1.vue +5 -5
- package/src/components/form/Switch.vue +38 -103
- package/src/components/form/TextArea.vue +18 -18
- package/src/components/form/Textarea@v2.vue +275 -0
- package/src/components/form/TimeView.vue +14 -14
- package/src/components/form/Upload.vue +806 -297
- package/src/components/form/date.ts +321 -0
- package/src/components/form/index.ts +7 -5
- package/src/components/form/number.ts +3 -0
- package/src/components/form/type.ts +224 -0
- package/src/components/icon/OrderIcon.vue +113 -0
- package/src/components/loader/FormLoader/FormLoader@v2.vue +193 -195
- package/src/components/loader/FormLoader/FormLoader@v3.vue.backup +372 -291
- package/src/components/loader/FormLoader/FormRender@v3.vue.backup +4 -0
- package/src/components/loader/FormLoader/NodeLoader.vue +85 -0
- package/src/components/loader/FormLoader@v1/FormLoader.vue +1 -1
- package/src/components/loader/FormLoader@v1/FormRender.vue +49 -24
- package/src/components/loader/LayerLoader/LayerLoader.vue +318 -0
- package/src/components/loader/LayerLoader/index.ts +2 -0
- package/src/components/loader/LayerLoader/style.scss +77 -0
- package/src/components/loader/LimitLoader/LimitLoader@v3.vue +39 -28
- package/src/components/loader/MoveLoader/MoveLoader.vue +628 -0
- package/src/components/loader/MoveLoader/index.ts +2 -0
- package/src/components/loader/MoveLoader/style.scss +77 -0
- package/src/components/loader/TableLoader/TableLoader.vue +227 -195
- package/src/components/loader/TableLoader/TableRender.vue +141 -0
- package/src/components/loader/TableLoader/index.ts +47 -0
- package/src/components/loader/index.ts +3 -2
- package/src/components/tools/Pagination@a.vue +17 -18
- package/src/components/tools/Pagination@b.vue +16 -16
- package/src/index.ts +2 -1
- package/src/module.ts +169 -0
- package/src/runtime/types.d.ts +36 -0
- package/src/store/{myui.ts → frame.ts} +4 -4
- package/src/utils/theme.ts +14 -0
- package/tsconfig.json +1 -1
- package/src/components/loader/FormLoader/index.ts +0 -2
- package/src/components/loader/LimitLoader/LimitLoader.vue.backup +0 -131
- package/src/components/loader/LimitLoader/LimitLoader@v2.vue.backup +0 -174
- package/src/components/loader/TableLoader/TableColView.vue +0 -115
@@ -0,0 +1,628 @@
|
|
1
|
+
<template>
|
2
|
+
<div id="layer-loader-root" :path="path" :class="`${!path ? '' : 'pr nl-ms'}`" :ui-lines="path ? line : null">
|
3
|
+
<template v-for="(item, idx) in data" :key="idx">
|
4
|
+
<div
|
5
|
+
ui-flex="row xm"
|
6
|
+
class="fekit-layer-loader-item ux-hover nx-ss r-ss pr z1"
|
7
|
+
:data-move="item._move"
|
8
|
+
:class="`${store.active === paths(idx) ? (store.error ? 'bg-risk+o-ss co-risk' : 'bg-main+o-ss co-main fekit-layer-node-active') : ''}${item?.attrs?.hide ? ' o-mm' : ''}`"
|
9
|
+
@mousedown="fMoveSta($event, data, idx, paths(idx))"
|
10
|
+
@mousemove="fMoveIng($event, item, paths(idx))"
|
11
|
+
@mouseout="fMoveOut($event, paths(idx))"
|
12
|
+
@mouseup="fMoveEnd($event, data, item, idx, paths(idx))"
|
13
|
+
>
|
14
|
+
<div :id="`LID${path.replace(/\./g, '')}-${idx}`" :path="paths(idx)" ui-flex="row lt" class="flex-block ny-ss" @click="store.active = paths(idx)">
|
15
|
+
<slot name="prefix" :item="item" :path="paths(idx)">
|
16
|
+
<i :class="`ml-ss mr-xs o-ms icon icon-model-${!path ? 'label' : item.model || 'null'}`"></i>
|
17
|
+
</slot>
|
18
|
+
<slot name="item" :item="item" :path="paths(idx)">
|
19
|
+
<span class="ux-none" ui-omit="1">
|
20
|
+
{{ (item.model === 'text' || !item.model ? item.value : null) || item.label || '‐‐' }}
|
21
|
+
</span>
|
22
|
+
</slot>
|
23
|
+
<slot name="suffix" :item="item" :path="paths(idx)"></slot>
|
24
|
+
</div>
|
25
|
+
|
26
|
+
<!-- Tools 区域 -->
|
27
|
+
<div class="move-tools">
|
28
|
+
<slot name="tools" :item="item" :path="paths(idx)" :moveUp="() => fMoveUp(data, idx)" :moveDown="() => fMoveDown(data, idx)">
|
29
|
+
<!-- 默认的上移下移按钮 -->
|
30
|
+
<button v-if="idx > 0" @click.stop="fMoveUp(data, idx)" class="move-btn" title="上移">↑</button>
|
31
|
+
<button v-if="idx < data.length - 1" @click.stop="fMoveDown(data, idx)" class="move-btn" title="下移">↓</button>
|
32
|
+
</slot>
|
33
|
+
</div>
|
34
|
+
</div>
|
35
|
+
</template>
|
36
|
+
</div>
|
37
|
+
</template>
|
38
|
+
<script setup lang="ts">
|
39
|
+
import { nextTick, reactive, ref, watch, onMounted } from 'vue';
|
40
|
+
|
41
|
+
// 事件定义
|
42
|
+
const store: any = reactive({
|
43
|
+
active: '',
|
44
|
+
error: false,
|
45
|
+
isMouseInLayer: false,
|
46
|
+
layer: {
|
47
|
+
moveing: false,
|
48
|
+
from: null,
|
49
|
+
correct: '',
|
50
|
+
},
|
51
|
+
});
|
52
|
+
const word: any = {};
|
53
|
+
|
54
|
+
// 类型定义
|
55
|
+
interface Props {
|
56
|
+
data?: Array<any>;
|
57
|
+
path?: string;
|
58
|
+
line?: boolean;
|
59
|
+
}
|
60
|
+
// 外部入参
|
61
|
+
const props: any = withDefaults(defineProps<Props>(), {
|
62
|
+
data: () => [],
|
63
|
+
path: '',
|
64
|
+
line: true,
|
65
|
+
});
|
66
|
+
|
67
|
+
// 内部状态
|
68
|
+
const state: any = reactive({});
|
69
|
+
const tools: any = ref(null);
|
70
|
+
|
71
|
+
const ph = ref(0);
|
72
|
+
onMounted(() => {
|
73
|
+
const side = document.getElementById('side-layerloader');
|
74
|
+
ph.value = side?.clientHeight || 0;
|
75
|
+
});
|
76
|
+
|
77
|
+
// 计算路径
|
78
|
+
const paths = (idx: number) => {
|
79
|
+
return props.path ? `${props.path}-${idx}` : `${idx}`;
|
80
|
+
};
|
81
|
+
|
82
|
+
// 上移功能
|
83
|
+
const fMoveUp = (data: any[], idx: number) => {
|
84
|
+
if (idx > 0) {
|
85
|
+
const item = data.splice(idx, 1)[0];
|
86
|
+
data.splice(idx - 1, 0, item);
|
87
|
+
// 更新 active 路径
|
88
|
+
const currentPath = paths(idx);
|
89
|
+
const newPath = props.path ? `${props.path}-${idx - 1}` : `${idx - 1}`;
|
90
|
+
if (store.active === currentPath) {
|
91
|
+
store.active = newPath;
|
92
|
+
}
|
93
|
+
}
|
94
|
+
};
|
95
|
+
|
96
|
+
// 下移功能
|
97
|
+
const fMoveDown = (data: any[], idx: number) => {
|
98
|
+
if (idx < data.length - 1) {
|
99
|
+
const item = data.splice(idx, 1)[0];
|
100
|
+
data.splice(idx + 1, 0, item);
|
101
|
+
// 更新 active 路径
|
102
|
+
const currentPath = paths(idx);
|
103
|
+
const newPath = props.path ? `${props.path}-${idx + 1}` : `${idx + 1}`;
|
104
|
+
if (store.active === currentPath) {
|
105
|
+
store.active = newPath;
|
106
|
+
}
|
107
|
+
}
|
108
|
+
};
|
109
|
+
|
110
|
+
// 是否同祖
|
111
|
+
function inform(from: string, data: string) {
|
112
|
+
const _form = from.split('.');
|
113
|
+
const _data = data.split('.');
|
114
|
+
return _form.every((part, index) => part === _data[index]);
|
115
|
+
}
|
116
|
+
|
117
|
+
// 按住
|
118
|
+
const fMoveSta = (ev: any, data: any, idx: number, paths: any) => {
|
119
|
+
console.log('fMoveSta called:', { paths, pathsLength: paths.length });
|
120
|
+
store.layer.moveing = true;
|
121
|
+
store.layer.from = { data, idx, dom: ev?.currentTarget, y: ev.clientY, paths };
|
122
|
+
|
123
|
+
// 添加拖拽样式
|
124
|
+
ev?.currentTarget?.setAttribute('data-move', 'true');
|
125
|
+
document.body.classList.add('dragging');
|
126
|
+
|
127
|
+
console.log('Drag started:', store.layer.from);
|
128
|
+
};
|
129
|
+
|
130
|
+
const fMoveIng = (ev: any, item: any, paths: any) => {
|
131
|
+
if (!store.layer.moveing) return;
|
132
|
+
console.log('fMoveIng called:', { paths, moveing: store.layer.moveing });
|
133
|
+
const dom = ev?.currentTarget;
|
134
|
+
if (!dom || dom === store.layer.from.dom) return;
|
135
|
+
const rect = dom.getBoundingClientRect();
|
136
|
+
const halfHeight = rect.height / 2 || 1;
|
137
|
+
const offsetY = ev?.layerY ?? ev?.offsetY ?? 0;
|
138
|
+
const mode = offsetY > halfHeight ? 'next' : 'prev';
|
139
|
+
|
140
|
+
store.layer.correct = mode;
|
141
|
+
dom.setAttribute('data-ins', mode);
|
142
|
+
console.log('Move mode:', mode);
|
143
|
+
};
|
144
|
+
|
145
|
+
// 移出
|
146
|
+
const fMoveOut = (ev: any, paths: any) => {
|
147
|
+
if (store.layer.moveing) {
|
148
|
+
ev?.currentTarget?.removeAttribute('data-ins');
|
149
|
+
}
|
150
|
+
};
|
151
|
+
|
152
|
+
// 松开
|
153
|
+
const fMoveEnd = (ev: any, data: any, item: any, idx: number, paths: any) => {
|
154
|
+
console.log('fMoveEnd called:', { paths, moveing: store.layer.moveing });
|
155
|
+
if (store.layer.moveing && !inform(store.layer.from.paths, paths)) {
|
156
|
+
const from = store.layer.from;
|
157
|
+
if (from.data && from.dom !== ev?.currentTarget) {
|
158
|
+
const isAdjacent =
|
159
|
+
(store.layer.correct === 'prev' && from.dom?.nextElementSibling === ev?.currentTarget) ||
|
160
|
+
(store.layer.correct === 'next' && from.dom?.previousElementSibling === ev?.currentTarget);
|
161
|
+
|
162
|
+
if (!isAdjacent) {
|
163
|
+
const [node] = from.data.splice(from.idx, 1);
|
164
|
+
let newPath = paths;
|
165
|
+
|
166
|
+
// Adjust target index if it's after the removed item in the same array
|
167
|
+
let targetIdx = idx;
|
168
|
+
if (from.data === data && from.idx < idx) {
|
169
|
+
targetIdx -= 1;
|
170
|
+
}
|
171
|
+
|
172
|
+
if (store.layer.correct === 'prev') {
|
173
|
+
data.splice(targetIdx, 0, node);
|
174
|
+
newPath = props.path ? `${props.path}-${targetIdx}` : `${targetIdx}`;
|
175
|
+
} else if (store.layer.correct === 'next') {
|
176
|
+
const insertIndex = targetIdx + 1;
|
177
|
+
data.splice(insertIndex, 0, node);
|
178
|
+
newPath = props.path ? `${props.path}-${insertIndex}` : `${insertIndex}`;
|
179
|
+
}
|
180
|
+
|
181
|
+
console.log('Move completed:', { from: from.paths, to: newPath });
|
182
|
+
requestAnimationFrame(() => {
|
183
|
+
store.active = newPath;
|
184
|
+
});
|
185
|
+
}
|
186
|
+
}
|
187
|
+
}
|
188
|
+
|
189
|
+
// 清理拖拽样式
|
190
|
+
ev?.currentTarget?.removeAttribute('data-ins');
|
191
|
+
store.layer.from?.dom?.removeAttribute('data-move');
|
192
|
+
document.body.classList.remove('dragging');
|
193
|
+
|
194
|
+
store.layer.moveing = false;
|
195
|
+
};
|
196
|
+
</script>
|
197
|
+
<style lang="scss">
|
198
|
+
.fekit-json-tree {
|
199
|
+
&,
|
200
|
+
* {
|
201
|
+
user-select: none;
|
202
|
+
}
|
203
|
+
|
204
|
+
&[data-item-moveing='1'] {
|
205
|
+
* {
|
206
|
+
pointer-events: none;
|
207
|
+
}
|
208
|
+
.drag-item-move {
|
209
|
+
pointer-events: auto !important;
|
210
|
+
& > dt:hover {
|
211
|
+
opacity: 0;
|
212
|
+
}
|
213
|
+
}
|
214
|
+
}
|
215
|
+
&[data-page-moveing='1'] {
|
216
|
+
* {
|
217
|
+
pointer-events: none;
|
218
|
+
}
|
219
|
+
.drag-page-move {
|
220
|
+
pointer-events: auto !important;
|
221
|
+
& > dt:hover {
|
222
|
+
opacity: 0;
|
223
|
+
}
|
224
|
+
}
|
225
|
+
}
|
226
|
+
&[data-rows-moveing='1'] {
|
227
|
+
* {
|
228
|
+
pointer-events: none;
|
229
|
+
}
|
230
|
+
.drag-rows-move {
|
231
|
+
pointer-events: auto !important;
|
232
|
+
& > dt:hover {
|
233
|
+
opacity: 0;
|
234
|
+
}
|
235
|
+
}
|
236
|
+
}
|
237
|
+
&[data-opts-moveing='1'] {
|
238
|
+
* {
|
239
|
+
pointer-events: none;
|
240
|
+
}
|
241
|
+
.drag-opts-move {
|
242
|
+
pointer-events: auto !important;
|
243
|
+
& > dt:hover {
|
244
|
+
opacity: 0;
|
245
|
+
}
|
246
|
+
}
|
247
|
+
}
|
248
|
+
|
249
|
+
& > dl {
|
250
|
+
position: relative;
|
251
|
+
padding-left: 0.6em;
|
252
|
+
&::before {
|
253
|
+
left: 0.2em !important;
|
254
|
+
}
|
255
|
+
dl {
|
256
|
+
position: relative;
|
257
|
+
padding-left: 1em;
|
258
|
+
}
|
259
|
+
}
|
260
|
+
|
261
|
+
dl {
|
262
|
+
&::before {
|
263
|
+
position: absolute;
|
264
|
+
display: block;
|
265
|
+
content: '';
|
266
|
+
width: 1px;
|
267
|
+
top: 1.5em;
|
268
|
+
bottom: 0.5em;
|
269
|
+
left: 0.6em;
|
270
|
+
background-color: var(--co-line-o-ls);
|
271
|
+
}
|
272
|
+
}
|
273
|
+
|
274
|
+
dt {
|
275
|
+
display: flex;
|
276
|
+
position: relative;
|
277
|
+
cursor: pointer;
|
278
|
+
justify-content: flex-start;
|
279
|
+
align-items: baseline;
|
280
|
+
align-content: baseline;
|
281
|
+
border-radius: 0.3em;
|
282
|
+
padding: 0 0.3em;
|
283
|
+
&:hover {
|
284
|
+
background-color: var(--co-weak);
|
285
|
+
}
|
286
|
+
|
287
|
+
// 图标
|
288
|
+
&::after {
|
289
|
+
position: absolute;
|
290
|
+
display: inline-block;
|
291
|
+
content: '';
|
292
|
+
width: 0;
|
293
|
+
height: 0;
|
294
|
+
border-width: 0.25em 0 0.25em 0.25em;
|
295
|
+
border-style: solid;
|
296
|
+
border-color: transparent;
|
297
|
+
border-left-color: var(--co-read);
|
298
|
+
top: 0.65em;
|
299
|
+
// margin-top: -0.3em;
|
300
|
+
left: -0.5em;
|
301
|
+
transform: rotate(90deg);
|
302
|
+
border-radius: 30%;
|
303
|
+
}
|
304
|
+
|
305
|
+
&[data-sign]::before {
|
306
|
+
display: inline-block;
|
307
|
+
position: relative;
|
308
|
+
min-width: 1.2em;
|
309
|
+
height: 1.2em;
|
310
|
+
content: attr(data-sign);
|
311
|
+
text-align: center;
|
312
|
+
line-height: 1.2em;
|
313
|
+
font-weight: bold;
|
314
|
+
transform: rotate(0deg) !important;
|
315
|
+
opacity: 0.7;
|
316
|
+
margin-right: 0.3em;
|
317
|
+
font-style: italic;
|
318
|
+
border-radius: 1px;
|
319
|
+
left: 0;
|
320
|
+
top: -0.45em;
|
321
|
+
box-sizing: content-box;
|
322
|
+
padding: 1px;
|
323
|
+
font-size: 0.5em;
|
324
|
+
border: 1px dotted;
|
325
|
+
flex-shrink: 0;
|
326
|
+
}
|
327
|
+
|
328
|
+
&[select='1'] {
|
329
|
+
color: var(--co-main);
|
330
|
+
}
|
331
|
+
|
332
|
+
&.fekit-json-tree-end {
|
333
|
+
&::after {
|
334
|
+
display: none;
|
335
|
+
}
|
336
|
+
}
|
337
|
+
|
338
|
+
&[data-hide='1'] {
|
339
|
+
&::after {
|
340
|
+
transform: rotate(0deg);
|
341
|
+
}
|
342
|
+
& + dd {
|
343
|
+
display: none;
|
344
|
+
}
|
345
|
+
}
|
346
|
+
}
|
347
|
+
}
|
348
|
+
|
349
|
+
.omit-1 {
|
350
|
+
display: block;
|
351
|
+
overflow: hidden;
|
352
|
+
text-align: justify;
|
353
|
+
text-overflow: ellipsis;
|
354
|
+
white-space: nowrap;
|
355
|
+
}
|
356
|
+
|
357
|
+
.fekit-json-tree-menu {
|
358
|
+
position: absolute;
|
359
|
+
height: 1em;
|
360
|
+
line-height: 1em;
|
361
|
+
right: 0;
|
362
|
+
top: 50%;
|
363
|
+
margin-top: -0.5em;
|
364
|
+
opacity: 0;
|
365
|
+
pointer-events: none;
|
366
|
+
|
367
|
+
& > * {
|
368
|
+
margin: 0 0.25em;
|
369
|
+
}
|
370
|
+
}
|
371
|
+
|
372
|
+
dt:hover {
|
373
|
+
.fekit-json-tree-menu {
|
374
|
+
transition: opacity 1s;
|
375
|
+
opacity: 1;
|
376
|
+
pointer-events: auto;
|
377
|
+
}
|
378
|
+
}
|
379
|
+
|
380
|
+
.fekit-json-tree-switch {
|
381
|
+
position: absolute;
|
382
|
+
width: 1em;
|
383
|
+
height: 1em;
|
384
|
+
top: 0.65em;
|
385
|
+
// margin-top: -0.6em;
|
386
|
+
left: -0.9em;
|
387
|
+
z-index: 2;
|
388
|
+
}
|
389
|
+
|
390
|
+
[data-selected='true'] {
|
391
|
+
background: var(--co-main-o-ss) !important;
|
392
|
+
}
|
393
|
+
|
394
|
+
.fekit-json-tree-tools {
|
395
|
+
display: flex;
|
396
|
+
position: relative;
|
397
|
+
cursor: pointer;
|
398
|
+
justify-content: flex-end;
|
399
|
+
align-items: center;
|
400
|
+
align-content: center;
|
401
|
+
flex-wrap: nowrap;
|
402
|
+
flex-shrink: 0;
|
403
|
+
font-size: 0.85em;
|
404
|
+
// width: 1px;
|
405
|
+
opacity: 0;
|
406
|
+
transition: all 0.25s;
|
407
|
+
// & > * {
|
408
|
+
// transform: scale(0.8);
|
409
|
+
// transition: all 0.5s;
|
410
|
+
// }
|
411
|
+
}
|
412
|
+
.drag-page-move,
|
413
|
+
.drag-item-move,
|
414
|
+
.drag-rows-move,
|
415
|
+
.drag-opts-move {
|
416
|
+
cursor: pointer;
|
417
|
+
&:hover {
|
418
|
+
& dt {
|
419
|
+
&:hover {
|
420
|
+
.fekit-json-tree-tools {
|
421
|
+
width: auto;
|
422
|
+
opacity: 1;
|
423
|
+
// & > * {
|
424
|
+
// transform: scale(1);
|
425
|
+
// }
|
426
|
+
}
|
427
|
+
}
|
428
|
+
}
|
429
|
+
}
|
430
|
+
}
|
431
|
+
|
432
|
+
[data-ins] {
|
433
|
+
position: relative;
|
434
|
+
&:hover {
|
435
|
+
box-shadow: inset 0 0 0 100em var(--co-fore) !important;
|
436
|
+
|
437
|
+
& > .parent-hover\:show {
|
438
|
+
opacity: 0 !important;
|
439
|
+
}
|
440
|
+
}
|
441
|
+
}
|
442
|
+
// 插入前面
|
443
|
+
[data-ins='prev'] {
|
444
|
+
&::before {
|
445
|
+
pointer-events: none;
|
446
|
+
position: absolute;
|
447
|
+
display: block;
|
448
|
+
content: '';
|
449
|
+
width: 100%;
|
450
|
+
height: 100%;
|
451
|
+
left: 0;
|
452
|
+
top: 0;
|
453
|
+
z-index: 1;
|
454
|
+
box-shadow: inset 0 1px 0 0 var(--co-main-o-ls);
|
455
|
+
}
|
456
|
+
|
457
|
+
// &[tree-level='2'] {
|
458
|
+
// &::after {
|
459
|
+
// position: absolute;
|
460
|
+
// display: block;
|
461
|
+
// content: '组内';
|
462
|
+
// left: -2rem;
|
463
|
+
// top: -0.25em;
|
464
|
+
// font-size: 0.6em;
|
465
|
+
// font-weight: bold;
|
466
|
+
// }
|
467
|
+
// }
|
468
|
+
}
|
469
|
+
// 插入内部
|
470
|
+
[data-ins='inset'] {
|
471
|
+
&::after {
|
472
|
+
pointer-events: none;
|
473
|
+
position: absolute;
|
474
|
+
display: block;
|
475
|
+
content: '';
|
476
|
+
width: 100%;
|
477
|
+
height: 100%;
|
478
|
+
left: 0;
|
479
|
+
top: 0;
|
480
|
+
z-index: 1;
|
481
|
+
box-shadow: inset 0 0 0 1px var(--co-main-o-ls);
|
482
|
+
}
|
483
|
+
}
|
484
|
+
// 插入后面
|
485
|
+
[data-ins='next'] {
|
486
|
+
&::after {
|
487
|
+
pointer-events: none;
|
488
|
+
position: absolute;
|
489
|
+
display: block;
|
490
|
+
content: '';
|
491
|
+
width: 100%;
|
492
|
+
height: 100%;
|
493
|
+
left: 0;
|
494
|
+
top: 0;
|
495
|
+
z-index: 1;
|
496
|
+
box-shadow: inset 0 -1px 0 0 var(--co-main-o-ls);
|
497
|
+
}
|
498
|
+
|
499
|
+
// &[tree-level='2'] {
|
500
|
+
// &::after {
|
501
|
+
// position: absolute;
|
502
|
+
// display: block;
|
503
|
+
// content: '组内';
|
504
|
+
// left: -2rem;
|
505
|
+
// bottom: -0.25em;
|
506
|
+
// font-size: 0.6em;
|
507
|
+
// font-weight: bold;
|
508
|
+
// }
|
509
|
+
// }
|
510
|
+
}
|
511
|
+
|
512
|
+
.fekit-json-tree-button {
|
513
|
+
&:hover {
|
514
|
+
background: none !important;
|
515
|
+
}
|
516
|
+
|
517
|
+
&::before {
|
518
|
+
display: none !important;
|
519
|
+
}
|
520
|
+
}
|
521
|
+
|
522
|
+
.editing {
|
523
|
+
pointer-events: auto !important;
|
524
|
+
}
|
525
|
+
|
526
|
+
.fekit-json-tree-value {
|
527
|
+
position: relative;
|
528
|
+
padding: 0.25em 0.5em;
|
529
|
+
border-radius: 0.3em;
|
530
|
+
border: 1px solid var(--co-case);
|
531
|
+
}
|
532
|
+
|
533
|
+
.edit-logic-json-tree {
|
534
|
+
& {
|
535
|
+
min-height: 2.5em;
|
536
|
+
border: 1px solid var(--co-case);
|
537
|
+
padding: 0.25em;
|
538
|
+
border-radius: 0.3em;
|
539
|
+
}
|
540
|
+
|
541
|
+
& > dl {
|
542
|
+
position: relative;
|
543
|
+
padding-left: 0.6em;
|
544
|
+
|
545
|
+
&::before {
|
546
|
+
opacity: 0;
|
547
|
+
}
|
548
|
+
|
549
|
+
&[data-group='1'] {
|
550
|
+
&::before {
|
551
|
+
opacity: 1;
|
552
|
+
left: 0.3em !important;
|
553
|
+
width: 5px;
|
554
|
+
top: 0.75em;
|
555
|
+
bottom: 0.75em;
|
556
|
+
background-color: transparent;
|
557
|
+
border: 1px solid var(--co-note);
|
558
|
+
|
559
|
+
border-right: none !important;
|
560
|
+
}
|
561
|
+
}
|
562
|
+
|
563
|
+
dl {
|
564
|
+
position: relative;
|
565
|
+
padding-left: 0;
|
566
|
+
&::before {
|
567
|
+
opacity: 0;
|
568
|
+
}
|
569
|
+
}
|
570
|
+
}
|
571
|
+
|
572
|
+
dt {
|
573
|
+
align-items: baseline;
|
574
|
+
align-content: baseline;
|
575
|
+
|
576
|
+
&[data-sign]::before {
|
577
|
+
position: relative;
|
578
|
+
min-width: 1.2em;
|
579
|
+
height: 1.2em;
|
580
|
+
top: -0.35em;
|
581
|
+
}
|
582
|
+
|
583
|
+
&::after {
|
584
|
+
display: none;
|
585
|
+
}
|
586
|
+
}
|
587
|
+
}
|
588
|
+
|
589
|
+
/* 新增的 MoveLoader 工具样式 */
|
590
|
+
.move-tools {
|
591
|
+
display: flex;
|
592
|
+
align-items: center;
|
593
|
+
gap: 4px;
|
594
|
+
opacity: 0;
|
595
|
+
transition: opacity 0.2s ease;
|
596
|
+
margin-left: 8px;
|
597
|
+
}
|
598
|
+
|
599
|
+
.fekit-layer-loader-item:hover .move-tools {
|
600
|
+
opacity: 1;
|
601
|
+
}
|
602
|
+
|
603
|
+
.move-btn {
|
604
|
+
display: inline-flex;
|
605
|
+
align-items: center;
|
606
|
+
justify-content: center;
|
607
|
+
width: 20px;
|
608
|
+
height: 20px;
|
609
|
+
border: 1px solid var(--co-line);
|
610
|
+
background: var(--co-back);
|
611
|
+
color: var(--co-text);
|
612
|
+
border-radius: 3px;
|
613
|
+
cursor: pointer;
|
614
|
+
font-size: 12px;
|
615
|
+
line-height: 1;
|
616
|
+
transition: all 0.2s ease;
|
617
|
+
|
618
|
+
&:hover {
|
619
|
+
background: var(--co-main);
|
620
|
+
color: var(--co-back);
|
621
|
+
border-color: var(--co-main);
|
622
|
+
}
|
623
|
+
|
624
|
+
&:active {
|
625
|
+
transform: scale(0.95);
|
626
|
+
}
|
627
|
+
}
|
628
|
+
</style>
|
@@ -0,0 +1,77 @@
|
|
1
|
+
.fekit-layer-loader-item {
|
2
|
+
user-select: none;
|
3
|
+
line-height: 1.2;
|
4
|
+
}
|
5
|
+
|
6
|
+
// 箭头
|
7
|
+
[ui-arrow] {
|
8
|
+
position: relative;
|
9
|
+
width: 1em;
|
10
|
+
height: 1em;
|
11
|
+
left: 0.1em;
|
12
|
+
|
13
|
+
// &[ui-arrow~='0'] {
|
14
|
+
// &::before {
|
15
|
+
// position: absolute;
|
16
|
+
// display: inline-block;
|
17
|
+
// content: '';
|
18
|
+
// width: 0.5em;
|
19
|
+
// height: 0.5em;
|
20
|
+
// border: 1px solid currentColor;
|
21
|
+
// top: 0.25em;
|
22
|
+
// left: 0.3em;
|
23
|
+
// border-radius: 50%;
|
24
|
+
// }
|
25
|
+
// }
|
26
|
+
&[ui-arrow~='0'] {
|
27
|
+
height: 1px;
|
28
|
+
border-bottom: 1px dotted var(--co-case);
|
29
|
+
position: relative;
|
30
|
+
left: -5px;
|
31
|
+
}
|
32
|
+
|
33
|
+
&[ui-arrow~='1'] {
|
34
|
+
&::before {
|
35
|
+
position: absolute;
|
36
|
+
display: inline-block;
|
37
|
+
content: '';
|
38
|
+
width: 0;
|
39
|
+
height: 0;
|
40
|
+
border-width: 0.35em 0 0.35em 0.35em;
|
41
|
+
border-style: solid;
|
42
|
+
border-color: transparent;
|
43
|
+
border-left-color: transparent;
|
44
|
+
border-left-color: currentColor;
|
45
|
+
top: 0.2em;
|
46
|
+
left: 0.35em;
|
47
|
+
transform: rotate(90deg);
|
48
|
+
border-radius: 25%;
|
49
|
+
}
|
50
|
+
}
|
51
|
+
|
52
|
+
&[ui-folding~='true']::before {
|
53
|
+
transform: rotate(0deg);
|
54
|
+
}
|
55
|
+
}
|
56
|
+
|
57
|
+
// 线条
|
58
|
+
[ui-lines] {
|
59
|
+
position: relative;
|
60
|
+
&::before {
|
61
|
+
position: absolute;
|
62
|
+
content: '';
|
63
|
+
display: block;
|
64
|
+
width: 5px;
|
65
|
+
height: 100%;
|
66
|
+
left: 0.85em;
|
67
|
+
|
68
|
+
border-left: 1px dotted var(--co-case);
|
69
|
+
border-bottom: 1px dotted var(--co-case);
|
70
|
+
}
|
71
|
+
}
|
72
|
+
|
73
|
+
.fekit-layer-node-active {
|
74
|
+
.layer-loader-tool {
|
75
|
+
opacity: 1;
|
76
|
+
}
|
77
|
+
}
|