@v2coding/ui 0.1.5 → 0.1.9
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/dist/v2coding-ui.esm.js +557 -842
- package/dist/v2coding-ui.min.js +1 -1
- package/dist/v2coding-ui.ssr.js +578 -836
- package/package.json +2 -3
- package/src/components/dialog/dialog.vue +0 -179
- package/src/components/drawer/drawer.vue +0 -523
- package/src/components/exports/index.vue +0 -53
- package/src/components/exports/remote-exports-dialog.vue +0 -202
- package/src/components/field/field.autocomplete.vue +0 -21
- package/src/components/field/field.calendar.vue +0 -117
- package/src/components/field/field.cascade.vue +0 -233
- package/src/components/field/field.checkbox.vue +0 -134
- package/src/components/field/field.color.vue +0 -24
- package/src/components/field/field.date.vue +0 -145
- package/src/components/field/field.fence.vue +0 -856
- package/src/components/field/field.icons.vue +0 -123
- package/src/components/field/field.lnglat.vue +0 -236
- package/src/components/field/field.number.vue +0 -43
- package/src/components/field/field.radio.vue +0 -100
- package/src/components/field/field.rate.vue +0 -37
- package/src/components/field/field.rich.vue +0 -155
- package/src/components/field/field.select.vue +0 -210
- package/src/components/field/field.slider.vue +0 -66
- package/src/components/field/field.switch.vue +0 -14
- package/src/components/field/field.text.vue +0 -66
- package/src/components/field/field.timepicker.vue +0 -70
- package/src/components/field/field.timeselect.vue +0 -24
- package/src/components/field/field.trigger.dialog.vue +0 -50
- package/src/components/field/field.trigger.popover.vue +0 -63
- package/src/components/field/field.upload.file.vue +0 -241
- package/src/components/field/field.upload.image.vue +0 -125
- package/src/components/fill-view/fill-view.vue +0 -43
- package/src/components/form/form.dialog.vue +0 -174
- package/src/components/form/form.drawer.vue +0 -246
- package/src/components/form/form.fieldset.vue +0 -110
- package/src/components/form/form.item.vue +0 -210
- package/src/components/form/form.vue +0 -302
- package/src/components/head-menu/head-menu.vue +0 -188
- package/src/components/head-menu/menu-item.vue +0 -80
- package/src/components/history/history.vue +0 -361
- package/src/components/icon/icon.vue +0 -63
- package/src/components/minimize/minimize.vue +0 -342
- package/src/components/page/page.vue +0 -43
- package/src/components/page/search-page.vue +0 -202
- package/src/components/provider/provider.vue +0 -15
- package/src/components/scroll-view/scroll-view.vue +0 -384
- package/src/components/table/column.vue +0 -262
- package/src/components/table/table.pagination.vue +0 -71
- package/src/components/table/table.select.vue +0 -165
- package/src/components/table/table.vue +0 -807
|
@@ -1,361 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div class="history" v-show="visible">
|
|
3
|
-
<scroll-view ref="menus" class="history-tabs">
|
|
4
|
-
<div
|
|
5
|
-
v-for="item in items"
|
|
6
|
-
:key="item.path"
|
|
7
|
-
:class="['history-menu', current === item.path ? 'is-active' : '']"
|
|
8
|
-
@click="onTabClick(item.path)"
|
|
9
|
-
>
|
|
10
|
-
<span class="ellipsis" :title="item.title">{{ item.title }}</span>
|
|
11
|
-
<i class="el-icon-close" @click.stop="onTabRemove(item.path)"></i>
|
|
12
|
-
</div>
|
|
13
|
-
</scroll-view>
|
|
14
|
-
<div class="contextmenu" :style="contextmenu">
|
|
15
|
-
<div
|
|
16
|
-
class="modal"
|
|
17
|
-
ref="modal"
|
|
18
|
-
:style="{ display: activeContextMenu ? 'block' : 'none' }"
|
|
19
|
-
@click="hideContextMenu"
|
|
20
|
-
></div>
|
|
21
|
-
<el-dropdown
|
|
22
|
-
@command="contextmenuClose"
|
|
23
|
-
trigger="click"
|
|
24
|
-
ref="context"
|
|
25
|
-
placement="top-start"
|
|
26
|
-
class="history-dropdown"
|
|
27
|
-
>
|
|
28
|
-
<span></span>
|
|
29
|
-
<el-dropdown-menu
|
|
30
|
-
class="history-contextmenu"
|
|
31
|
-
slot="dropdown"
|
|
32
|
-
:visible-arrow="false"
|
|
33
|
-
>
|
|
34
|
-
<el-dropdown-item command="left">
|
|
35
|
-
<i class="el-icon-arrow-left"></i>
|
|
36
|
-
关闭左侧
|
|
37
|
-
</el-dropdown-item>
|
|
38
|
-
<el-dropdown-item command="right">
|
|
39
|
-
<i class="el-icon-arrow-right"></i>
|
|
40
|
-
关闭右侧
|
|
41
|
-
</el-dropdown-item>
|
|
42
|
-
<el-dropdown-item command="other">
|
|
43
|
-
<i class="el-icon-close"></i>
|
|
44
|
-
关闭其它
|
|
45
|
-
</el-dropdown-item>
|
|
46
|
-
<el-dropdown-item command="all">
|
|
47
|
-
<i class="el-icon-circle-close"></i>
|
|
48
|
-
全部关闭
|
|
49
|
-
</el-dropdown-item>
|
|
50
|
-
</el-dropdown-menu>
|
|
51
|
-
</el-dropdown>
|
|
52
|
-
</div>
|
|
53
|
-
</div>
|
|
54
|
-
</template>
|
|
55
|
-
|
|
56
|
-
<script>
|
|
57
|
-
import ScrollView from '../scroll-view/scroll-view';
|
|
58
|
-
|
|
59
|
-
export default {
|
|
60
|
-
name: "ui-history",
|
|
61
|
-
components: {ScrollView},
|
|
62
|
-
props: {
|
|
63
|
-
items: Array,
|
|
64
|
-
current: null,
|
|
65
|
-
visible: {
|
|
66
|
-
type: Boolean,
|
|
67
|
-
default: true,
|
|
68
|
-
},
|
|
69
|
-
},
|
|
70
|
-
data() {
|
|
71
|
-
return {
|
|
72
|
-
activeContextMenu: "",
|
|
73
|
-
contextmenu: {
|
|
74
|
-
width: "0px",
|
|
75
|
-
left: "0px",
|
|
76
|
-
},
|
|
77
|
-
};
|
|
78
|
-
},
|
|
79
|
-
watch: {
|
|
80
|
-
async current() {
|
|
81
|
-
if (!this.$refs.menus) {
|
|
82
|
-
return;
|
|
83
|
-
}
|
|
84
|
-
await this.$nextTick();
|
|
85
|
-
await this.$refs.menus.$nextTick();
|
|
86
|
-
this.$refs.menus.scrollToActiveItem();
|
|
87
|
-
},
|
|
88
|
-
},
|
|
89
|
-
mounted() {
|
|
90
|
-
document.addEventListener("contextmenu", this.onContextMenu);
|
|
91
|
-
},
|
|
92
|
-
beforeDestroy() {
|
|
93
|
-
document.removeEventListener("contextmenu", this.onContextMenu);
|
|
94
|
-
},
|
|
95
|
-
methods: {
|
|
96
|
-
showContextMenu() {
|
|
97
|
-
setTimeout(() => {
|
|
98
|
-
this.$refs.context.broadcast("ElDropdownMenu", "visible", true);
|
|
99
|
-
});
|
|
100
|
-
},
|
|
101
|
-
hideContextMenu() {
|
|
102
|
-
this.$refs.context.broadcast("ElDropdownMenu", "visible", false);
|
|
103
|
-
this.activeContextMenu = "";
|
|
104
|
-
},
|
|
105
|
-
onTabClick(path) {
|
|
106
|
-
this.$router.push({ path });
|
|
107
|
-
},
|
|
108
|
-
onTabRemove(path) {
|
|
109
|
-
this.$emit("remove-history", { type: "current", name: path });
|
|
110
|
-
},
|
|
111
|
-
onContextMenu(event) {
|
|
112
|
-
const container = this.$el.querySelector(".ui-scroll-view__nav");
|
|
113
|
-
const index = this.getChildContainIndex(container, event.target);
|
|
114
|
-
const rect = this.$el.getBoundingClientRect();
|
|
115
|
-
if (index !== -1) {
|
|
116
|
-
this.activeContextMenu = this.items[index]?.path;
|
|
117
|
-
this.contextmenu.left = `${event.clientX - rect.left}px`;
|
|
118
|
-
this.contextmenu.top = `${event.clientY - rect.top}px`;
|
|
119
|
-
this.showContextMenu();
|
|
120
|
-
event.preventDefault();
|
|
121
|
-
return false;
|
|
122
|
-
}
|
|
123
|
-
const modal = this.$el.querySelector(".modal");
|
|
124
|
-
if (event.target === modal) {
|
|
125
|
-
event.preventDefault();
|
|
126
|
-
return false;
|
|
127
|
-
}
|
|
128
|
-
return true;
|
|
129
|
-
},
|
|
130
|
-
contextmenuClose(command) {
|
|
131
|
-
this.$emit("remove-history", {
|
|
132
|
-
type: command,
|
|
133
|
-
name: this.activeContextMenu,
|
|
134
|
-
});
|
|
135
|
-
this.hideContextMenu();
|
|
136
|
-
},
|
|
137
|
-
getChildContainIndex(container, target) {
|
|
138
|
-
return Array.from(container.childNodes).findIndex((child) => {
|
|
139
|
-
return this.isContains(child, target);
|
|
140
|
-
});
|
|
141
|
-
},
|
|
142
|
-
isContains(container, target) {
|
|
143
|
-
if (container === target) {
|
|
144
|
-
return true;
|
|
145
|
-
}
|
|
146
|
-
const fn = (childNodes, _target) => {
|
|
147
|
-
return Array.from(childNodes).find((item) => {
|
|
148
|
-
const isEq = item === _target;
|
|
149
|
-
if (isEq) {
|
|
150
|
-
return true;
|
|
151
|
-
}
|
|
152
|
-
if (!item.childNodes.length) {
|
|
153
|
-
return false;
|
|
154
|
-
}
|
|
155
|
-
return fn(item.childNodes, _target);
|
|
156
|
-
});
|
|
157
|
-
};
|
|
158
|
-
return fn(container.childNodes, target);
|
|
159
|
-
},
|
|
160
|
-
},
|
|
161
|
-
};
|
|
162
|
-
</script>
|
|
163
|
-
|
|
164
|
-
<style lang="scss">
|
|
165
|
-
.history {
|
|
166
|
-
flex: none;
|
|
167
|
-
height: 40px;
|
|
168
|
-
position: relative;
|
|
169
|
-
margin: 10px 0 0;
|
|
170
|
-
|
|
171
|
-
.history-tabs.ui-scroll-view__nav-wrap {
|
|
172
|
-
left: 0;
|
|
173
|
-
right: 0;
|
|
174
|
-
top: 0;
|
|
175
|
-
bottom: 0;
|
|
176
|
-
position: absolute;
|
|
177
|
-
align-items: flex-end;
|
|
178
|
-
|
|
179
|
-
.ui-scroll-view__nav-scroll {
|
|
180
|
-
flex: 1;
|
|
181
|
-
}
|
|
182
|
-
|
|
183
|
-
.ui-scroll-view__nav-control {
|
|
184
|
-
width: 20px;
|
|
185
|
-
height: 30px;
|
|
186
|
-
|
|
187
|
-
&.is-disabled {
|
|
188
|
-
.menu-nav-control {
|
|
189
|
-
&::before,
|
|
190
|
-
&::after {
|
|
191
|
-
background: var(--color-primary-light-3);
|
|
192
|
-
}
|
|
193
|
-
}
|
|
194
|
-
}
|
|
195
|
-
}
|
|
196
|
-
|
|
197
|
-
.ui-scroll-view__nav {
|
|
198
|
-
align-items: flex-end;
|
|
199
|
-
}
|
|
200
|
-
|
|
201
|
-
.menu-nav-control {
|
|
202
|
-
height: 30px;
|
|
203
|
-
|
|
204
|
-
&::before,
|
|
205
|
-
&::after {
|
|
206
|
-
width: 3px;
|
|
207
|
-
height: 12px;
|
|
208
|
-
background: var(--color-primary-light-6);
|
|
209
|
-
}
|
|
210
|
-
|
|
211
|
-
&::before {
|
|
212
|
-
bottom: -2px;
|
|
213
|
-
}
|
|
214
|
-
|
|
215
|
-
&::after {
|
|
216
|
-
top: -2px;
|
|
217
|
-
}
|
|
218
|
-
}
|
|
219
|
-
}
|
|
220
|
-
|
|
221
|
-
.contextmenu {
|
|
222
|
-
width: 0;
|
|
223
|
-
height: 0;
|
|
224
|
-
position: absolute;
|
|
225
|
-
top: 0;
|
|
226
|
-
left: 0;
|
|
227
|
-
|
|
228
|
-
.modal {
|
|
229
|
-
position: fixed;
|
|
230
|
-
top: 0;
|
|
231
|
-
left: 0;
|
|
232
|
-
bottom: 0;
|
|
233
|
-
right: 0;
|
|
234
|
-
z-index: 99;
|
|
235
|
-
}
|
|
236
|
-
}
|
|
237
|
-
|
|
238
|
-
.history-menu {
|
|
239
|
-
height: 30px;
|
|
240
|
-
color: #fff;
|
|
241
|
-
font-size: 14px;
|
|
242
|
-
display: flex;
|
|
243
|
-
flex-direction: row;
|
|
244
|
-
align-items: center;
|
|
245
|
-
justify-content: space-between;
|
|
246
|
-
cursor: pointer;
|
|
247
|
-
background: rgba(83,109,139,.6);
|
|
248
|
-
border-radius: 5px 5px 0 0;
|
|
249
|
-
transition: all 0.3s ease-in-out;
|
|
250
|
-
position: relative;
|
|
251
|
-
background: var(--color-primary-light-9);
|
|
252
|
-
|
|
253
|
-
& + .history-menu {
|
|
254
|
-
border-left: 1px solid var(--color-darken-primary-2);
|
|
255
|
-
}
|
|
256
|
-
|
|
257
|
-
&.is-active {
|
|
258
|
-
height: 40px;
|
|
259
|
-
color: #ffffff;
|
|
260
|
-
background: var(--color-darken-primary-2);
|
|
261
|
-
text-shadow: 2px 2px 2px rgba(0, 0, 0, 0.95);
|
|
262
|
-
box-shadow: 7px 5px 5px rgba(0, 0, 0, 0.2);
|
|
263
|
-
z-index: 1;
|
|
264
|
-
}
|
|
265
|
-
|
|
266
|
-
&:hover {
|
|
267
|
-
i {
|
|
268
|
-
opacity: 1;
|
|
269
|
-
}
|
|
270
|
-
}
|
|
271
|
-
|
|
272
|
-
> span {
|
|
273
|
-
flex: 1;
|
|
274
|
-
padding: 0 25px;
|
|
275
|
-
}
|
|
276
|
-
|
|
277
|
-
> i {
|
|
278
|
-
position: absolute;
|
|
279
|
-
top: 2px;
|
|
280
|
-
right: 3px;
|
|
281
|
-
opacity: 0.3;
|
|
282
|
-
width: 14px;
|
|
283
|
-
height: 14px;
|
|
284
|
-
font-size: 12px;
|
|
285
|
-
border-radius: 50%;
|
|
286
|
-
transition: opacity 0.3s ease-in-out;
|
|
287
|
-
|
|
288
|
-
&:hover {
|
|
289
|
-
background-color: var(--color-primary);
|
|
290
|
-
}
|
|
291
|
-
}
|
|
292
|
-
}
|
|
293
|
-
|
|
294
|
-
.el-tabs {
|
|
295
|
-
background: transparent;
|
|
296
|
-
|
|
297
|
-
> .el-tabs__header {
|
|
298
|
-
background: transparent;
|
|
299
|
-
border-bottom: none;
|
|
300
|
-
|
|
301
|
-
.el-tabs__nav {
|
|
302
|
-
border: none;
|
|
303
|
-
}
|
|
304
|
-
|
|
305
|
-
.el-tabs__nav-wrap::after {
|
|
306
|
-
content: unset;
|
|
307
|
-
}
|
|
308
|
-
}
|
|
309
|
-
|
|
310
|
-
> .el-tabs__content {
|
|
311
|
-
padding: 0;
|
|
312
|
-
}
|
|
313
|
-
|
|
314
|
-
.el-tabs__nav-next,
|
|
315
|
-
.el-tabs__nav-prev {
|
|
316
|
-
color: #536d8b;
|
|
317
|
-
width: 20px;
|
|
318
|
-
line-height: 39px;
|
|
319
|
-
text-align: center;
|
|
320
|
-
font-size: 18px;
|
|
321
|
-
}
|
|
322
|
-
|
|
323
|
-
.el-tabs__nav-prev {
|
|
324
|
-
border-right: 1px solid #ddd;
|
|
325
|
-
}
|
|
326
|
-
|
|
327
|
-
.el-tabs__nav-next {
|
|
328
|
-
border-left: 1px solid #ddd;
|
|
329
|
-
}
|
|
330
|
-
|
|
331
|
-
.el-tabs__item {
|
|
332
|
-
margin: 8px;
|
|
333
|
-
border: none;
|
|
334
|
-
height: 34px;
|
|
335
|
-
line-height: 34px;
|
|
336
|
-
background: #2e557e;
|
|
337
|
-
box-shadow: 0 3px 6px rgba(0, 0, 0, 0.16);
|
|
338
|
-
color: #fff;
|
|
339
|
-
display: inline-flex;
|
|
340
|
-
flex-direction: row;
|
|
341
|
-
align-items: center;
|
|
342
|
-
}
|
|
343
|
-
}
|
|
344
|
-
|
|
345
|
-
.history-tab-title {
|
|
346
|
-
width: 6em;
|
|
347
|
-
display: inline-block;
|
|
348
|
-
vertical-align: middle;
|
|
349
|
-
}
|
|
350
|
-
}
|
|
351
|
-
|
|
352
|
-
.history-dropdown {
|
|
353
|
-
position: absolute;
|
|
354
|
-
top: 0;
|
|
355
|
-
left: 0;
|
|
356
|
-
}
|
|
357
|
-
|
|
358
|
-
.history-contextmenu.el-popper {
|
|
359
|
-
margin-top: 0;
|
|
360
|
-
}
|
|
361
|
-
</style>
|
|
@@ -1,63 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<svg :class="['ui-icon', 'ui-icon-' + realName]" aria-hidden="true">
|
|
3
|
-
<use :xlink:href="`#icon-${realName}`"/>
|
|
4
|
-
</svg>
|
|
5
|
-
</template>
|
|
6
|
-
|
|
7
|
-
<script>
|
|
8
|
-
import Iconfont from '../../config/config.iconfont';
|
|
9
|
-
|
|
10
|
-
export default {
|
|
11
|
-
name: 'ui-icon',
|
|
12
|
-
props: {
|
|
13
|
-
name: String,
|
|
14
|
-
},
|
|
15
|
-
data() {
|
|
16
|
-
return {
|
|
17
|
-
icons: [],
|
|
18
|
-
};
|
|
19
|
-
},
|
|
20
|
-
computed: {
|
|
21
|
-
realName({name, icons}) {
|
|
22
|
-
const isIncludes = icons.includes(name);
|
|
23
|
-
if (isIncludes) {
|
|
24
|
-
return name;
|
|
25
|
-
}
|
|
26
|
-
return 'unknown';
|
|
27
|
-
},
|
|
28
|
-
},
|
|
29
|
-
mounted() {
|
|
30
|
-
this.init();
|
|
31
|
-
},
|
|
32
|
-
methods: {
|
|
33
|
-
async init() {
|
|
34
|
-
this.icons = await Iconfont.getIcons();
|
|
35
|
-
},
|
|
36
|
-
},
|
|
37
|
-
};
|
|
38
|
-
</script>
|
|
39
|
-
|
|
40
|
-
<style lang="less" scoped>
|
|
41
|
-
.ui-icon {
|
|
42
|
-
width: 1em;
|
|
43
|
-
height: 1em;
|
|
44
|
-
vertical-align: -0.15em;
|
|
45
|
-
fill: currentColor;
|
|
46
|
-
overflow: hidden;
|
|
47
|
-
display: inline-block;
|
|
48
|
-
|
|
49
|
-
&.ui-icon-loading {
|
|
50
|
-
animation: rotating 2s linear infinite;
|
|
51
|
-
}
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
@keyframes rotating {
|
|
55
|
-
from {
|
|
56
|
-
transform: rotate(0deg)
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
to {
|
|
60
|
-
transform: rotate(1turn)
|
|
61
|
-
}
|
|
62
|
-
}
|
|
63
|
-
</style>
|