@v2coding/ui 0.1.7 → 0.1.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.
Files changed (48) hide show
  1. package/dist/v2coding-ui.esm.js +63 -21
  2. package/dist/v2coding-ui.min.js +1 -1
  3. package/dist/v2coding-ui.ssr.js +73 -31
  4. package/package.json +2 -3
  5. package/src/components/dialog/dialog.vue +0 -179
  6. package/src/components/drawer/drawer.vue +0 -523
  7. package/src/components/exports/index.vue +0 -53
  8. package/src/components/exports/remote-exports-dialog.vue +0 -202
  9. package/src/components/field/field.autocomplete.vue +0 -21
  10. package/src/components/field/field.calendar.vue +0 -117
  11. package/src/components/field/field.cascade.vue +0 -233
  12. package/src/components/field/field.checkbox.vue +0 -134
  13. package/src/components/field/field.color.vue +0 -24
  14. package/src/components/field/field.date.vue +0 -145
  15. package/src/components/field/field.fence.vue +0 -856
  16. package/src/components/field/field.icons.vue +0 -123
  17. package/src/components/field/field.lnglat.vue +0 -236
  18. package/src/components/field/field.number.vue +0 -43
  19. package/src/components/field/field.radio.vue +0 -100
  20. package/src/components/field/field.rate.vue +0 -37
  21. package/src/components/field/field.rich.vue +0 -155
  22. package/src/components/field/field.select.vue +0 -210
  23. package/src/components/field/field.slider.vue +0 -66
  24. package/src/components/field/field.switch.vue +0 -14
  25. package/src/components/field/field.text.vue +0 -66
  26. package/src/components/field/field.timepicker.vue +0 -70
  27. package/src/components/field/field.timeselect.vue +0 -24
  28. package/src/components/field/field.trigger.dialog.vue +0 -50
  29. package/src/components/field/field.trigger.popover.vue +0 -63
  30. package/src/components/field/field.upload.file.vue +0 -241
  31. package/src/components/field/field.upload.image.vue +0 -125
  32. package/src/components/fill-view/fill-view.vue +0 -43
  33. package/src/components/form/form.dialog.vue +0 -174
  34. package/src/components/form/form.drawer.vue +0 -246
  35. package/src/components/form/form.fieldset.vue +0 -110
  36. package/src/components/form/form.item.vue +0 -210
  37. package/src/components/form/form.vue +0 -302
  38. package/src/components/history/history.vue +0 -361
  39. package/src/components/icon/icon.vue +0 -63
  40. package/src/components/minimize/minimize.vue +0 -342
  41. package/src/components/page/page.vue +0 -43
  42. package/src/components/page/search-page.vue +0 -202
  43. package/src/components/provider/provider.vue +0 -15
  44. package/src/components/scroll-view/scroll-view.vue +0 -384
  45. package/src/components/table/column.vue +0 -262
  46. package/src/components/table/table.pagination.vue +0 -71
  47. package/src/components/table/table.select.vue +0 -165
  48. package/src/components/table/table.vue +0 -807
@@ -1,342 +0,0 @@
1
- <template>
2
- <div :class="['minimize', direction, theme, {collapse: value, hover}]" @click="handleToggle">
3
- <div class="line"></div>
4
- <div class="indicator">
5
-
6
- </div>
7
- </div>
8
- </template>
9
-
10
- <script>
11
- export default {
12
- name: 'ui-minimize',
13
- props: {
14
- direction: {
15
- validator: (val) => ['top', 'right', 'bottom', 'left'].indexOf(val) !== -1,
16
- },
17
- value: {
18
- type: Boolean,
19
- default: false,
20
- },
21
- theme: String,
22
- },
23
- data() {
24
- return {
25
- hover: false,
26
- };
27
- },
28
- computed: {
29
- isVertical() {
30
- return ['left', 'right'].includes(this.direction);
31
- },
32
- },
33
- watch: {
34
- value (v) {
35
- this.doCollapse(v);
36
- },
37
- },
38
- mounted() {
39
- this.init();
40
- this.doCollapse(this.value);
41
- },
42
- beforeDestroy() {
43
- const parent = this.$el.parentElement;
44
- parent && parent.removeEventListener('mouseenter', this.onMouseEnter);
45
- parent && parent.removeEventListener('mouseleave', this.onMouseLeave);
46
- },
47
- methods: {
48
- init() {
49
- const parent = this.$el.parentElement;
50
- const style = parent.style;
51
- // init style
52
- style.position = 'relative';
53
- style.transitionProperty = 'width, height';
54
- style.transitionDuration = '300ms';
55
- style.transitionTimingFunction = 'ease-in-out';
56
- // init mouse event
57
- parent.addEventListener('mouseenter', this.onMouseEnter);
58
- parent.addEventListener('mouseleave', this.onMouseLeave);
59
- },
60
- onMouseEnter() {
61
- this.hover = true;
62
- },
63
- onMouseLeave() {
64
- this.hover = false;
65
- },
66
- handleToggle() {
67
- this.$emit('input', !this.value);
68
- this.$emit('change', !this.value);
69
- },
70
- doCollapse(collapse) {
71
- const parent = this.$el.parentElement;
72
- const style = parent.style;
73
- if (collapse) { // 收起
74
- if (this.isVertical) {
75
- parent.childNodes.forEach((node) => {
76
- if (node !== this.$el) {
77
- node.style && node.style.setProperty('transform', 'scaleX(0)');
78
- }
79
- });
80
- style && style.setProperty('width', '0');
81
- } else {
82
- parent.childNodes.forEach((node) => {
83
- if (node !== this.$el) {
84
- node.style && node.style.setProperty('transform', 'scaleY(0)');
85
- }
86
- });
87
- style && style.setProperty('height', '0');
88
- }
89
- } else { // 展开
90
- if (this.isVertical) {
91
- style && style.removeProperty('width');
92
- } else {
93
- style && style.removeProperty('height');
94
- }
95
- parent.childNodes.forEach((node) => {
96
- if (node !== this.$el && node.style) {
97
- node.style && node.style.removeProperty('transform');
98
- }
99
- });
100
- }
101
- },
102
- },
103
- };
104
- </script>
105
-
106
- <style lang="less" scoped>
107
- @visibleWidth: 14px;
108
- @indicatorWidth: 36px;
109
-
110
- .minimize {
111
- position: absolute;
112
- display: flex;
113
- align-items: center;
114
- cursor: pointer;
115
- .line {
116
- position: absolute;
117
- background-color: #ccc;
118
- transition-duration: 200ms;
119
- transition-property: background-color, width, height;
120
- transition-timing-function: ease-in-out;
121
- }
122
- .indicator {
123
- opacity: 0.6;
124
- background-color: #ccc;
125
- transition-duration: 200ms;
126
- transition-property: background-color, opacity;
127
- transition-timing-function: ease-in-out;
128
- }
129
- &.hover .indicator {
130
- opacity: 1;
131
- }
132
- &.top,
133
- &.bottom {
134
- left: 0;
135
- right: 0;
136
- height: @visibleWidth;
137
- flex-direction: column;
138
- .line {
139
- height: 1px;
140
- width: 100%;
141
- }
142
- .indicator {
143
- width: @indicatorWidth;
144
- height: 100%;
145
- display: flex;
146
- align-items: center;
147
- justify-content: center;
148
- flex-direction: row;
149
- &::before,
150
- &::after {
151
- content: '';
152
- display: block;
153
- position: relative;
154
- width: 10px;
155
- height: 2px;
156
- background-color: #fff;
157
- transition: all 300ms ease-in-out;
158
- }
159
- &::before {
160
- left: 1px;
161
- }
162
- &::after {
163
- right: 1px;
164
- }
165
- }
166
- &:hover {
167
- .line {
168
- height: 2px;
169
- background-color: #3da8f5;
170
- }
171
- .indicator {
172
- opacity: 1;
173
- background-color: #3da8f5;
174
- }
175
- }
176
- }
177
- &.left,
178
- &.right {
179
- width: @visibleWidth;
180
- top: 0;
181
- bottom: 0;
182
- flex-direction: row;
183
- .line {
184
- width: 1px;
185
- height: 100%;
186
- }
187
- .indicator {
188
- width: 100%;
189
- height: @indicatorWidth;
190
- display: flex;
191
- align-items: center;
192
- justify-content: center;
193
- flex-direction: column;
194
- &::before,
195
- &::after {
196
- content: '';
197
- display: block;
198
- position: relative;
199
- width: 2px;
200
- height: 10px;
201
- background-color: #fff;
202
- transition: all 300ms ease-in-out;
203
- }
204
- &::before {
205
- bottom: -1px;
206
- }
207
- &::after {
208
- top: -1px;
209
- }
210
- }
211
- &:hover {
212
- .line {
213
- width: 2px;
214
- background-color: #3da8f5;
215
- }
216
- .indicator {
217
- opacity: 1;
218
- background-color: #3da8f5;
219
- }
220
- }
221
- }
222
- &.top {
223
- bottom: -(@visibleWidth);
224
- .line {
225
- top: 0;
226
- }
227
- .indicator {
228
- border-radius: 0 0 4px 4px;
229
- }
230
- &:hover {
231
- .indicator::before {
232
- transform: rotate(-24deg);
233
- }
234
- .indicator::after {
235
- transform: rotate(24deg);
236
- }
237
- }
238
- &.collapse:hover {
239
- .indicator {
240
- opacity: 1;
241
-
242
- &::before {
243
- transform: rotate(24deg);
244
- }
245
-
246
- &::after {
247
- transform: rotate(-24deg);
248
- }
249
- }
250
- }
251
- }
252
- &.right {
253
- left: -(@visibleWidth);
254
- .line {
255
- right: 0;
256
- }
257
- .indicator {
258
- border-radius: 4px 0 0 4px;
259
- }
260
- &:hover {
261
- .indicator::before {
262
- transform: rotate(-24deg);
263
- }
264
- .indicator::after {
265
- transform: rotate(24deg);
266
- }
267
- }
268
- &.collapse {
269
- .indicator {
270
- opacity: 1;
271
-
272
- &::before {
273
- transform: rotate(24deg);
274
- }
275
-
276
- &::after {
277
- transform: rotate(-24deg);
278
- }
279
- }
280
- }
281
- }
282
- &.bottom {
283
- top: -(@visibleWidth);
284
- .line {
285
- bottom: 0;
286
- }
287
- .indicator {
288
- border-radius: 4px 4px 0 0;
289
- }
290
- &:hover {
291
- .indicator::before {
292
- transform: rotate(24deg);
293
- }
294
- .indicator::after {
295
- transform: rotate(-24deg);
296
- }
297
- }
298
- &.collapse {
299
- .indicator {
300
- opacity: 1;
301
-
302
- &::before {
303
- transform: rotate(-24deg);
304
- }
305
-
306
- &::after {
307
- transform: rotate(24deg);
308
- }
309
- }
310
- }
311
- }
312
- &.left {
313
- right: -(@visibleWidth);
314
- .line {
315
- left: 0;
316
- }
317
- .indicator {
318
- border-radius: 0 4px 4px 0;
319
- }
320
- &:hover {
321
- .indicator::before {
322
- transform: rotate(24deg);
323
- }
324
- .indicator::after {
325
- transform: rotate(-24deg);
326
- }
327
- }
328
- &.collapse {
329
- .indicator {
330
- opacity: 1;
331
-
332
- &::before {
333
- transform: rotate(-24deg);
334
- }
335
- &::after {
336
- transform: rotate(24deg);
337
- }
338
- }
339
- }
340
- }
341
- }
342
- </style>
@@ -1,43 +0,0 @@
1
- <template>
2
- <document-title :title="titleReal">
3
- <div class="ui-page" :class="{'ui-page-direction-row': direction === 'row'}">
4
- <slot></slot>
5
- </div>
6
- </document-title>
7
- </template>
8
- <script>
9
- import DocumentTitle from '../document-title';
10
-
11
- export default {
12
- name: 'ui-page',
13
- inheritAttrs: false,
14
- components: {DocumentTitle},
15
- props: {
16
- direction: {
17
- type: String,
18
- validator: (val) => ['row', 'column'].includes(val),
19
- default: 'column',
20
- },
21
- title: {
22
- type: String,
23
- },
24
- },
25
- computed: {
26
- titleReal() {
27
- return this.title || this.$route.meta.name || '';
28
- },
29
- },
30
- };
31
- </script>
32
- <style lang="less">
33
- .ui-page {
34
- display: flex;
35
- flex-direction: column;
36
- overflow: auto;
37
- position: relative;
38
-
39
- &.ui-page-direction-row {
40
- flex-direction: row;
41
- }
42
- }
43
- </style>
@@ -1,202 +0,0 @@
1
- <template>
2
- <document-title :title="title">
3
- <multipane class="router-search-page" >
4
- <div class="page-search-conditions" :class="{collapse}" :style="searchConditionsStyle">
5
- <div v-show="!collapse" class="search-content">
6
- <slot name="search"></slot>
7
- </div>
8
- <div class="indicator" @click="toggleCollapse"></div>
9
- </div>
10
- <multipane-resizer v-show="!collapse"/>
11
- <div class="page-search-content" :class="{'page-content-direction-row': direction === 'row'}">
12
- <slot></slot>
13
- </div>
14
- </multipane>
15
- </document-title>
16
- </template>
17
-
18
- <script>
19
- import {Multipane, MultipaneResizer} from 'vue-multipane';
20
- import DocumentTitle from '../document-title';
21
-
22
- export default {
23
- name: 'ui-search-page',
24
- components: {
25
- Multipane,
26
- MultipaneResizer,
27
- DocumentTitle,
28
- },
29
- props: {
30
- value: {
31
- type: String,
32
- default: '360px',
33
- },
34
- min: {
35
- type: String,
36
- default: '200px',
37
- },
38
- max: {
39
- type: String,
40
- default: '600px',
41
- },
42
- direction: {
43
- type: String,
44
- validator: (val) => ['row', 'column'].includes(val),
45
- default: 'column',
46
- },
47
- },
48
- data() {
49
- return {
50
- collapse: false,
51
- }
52
- },
53
- computed: {
54
- title() {
55
- return this.$route.meta.name || '';
56
- },
57
- searchConditionsStyle() {
58
- let width = this.value;
59
- let min = this.min;
60
- if (this.collapse) {
61
- min = 0;
62
- width = 0;
63
- }
64
- return {
65
- width: width,
66
- minWidth: min,
67
- maxWidth: this.max,
68
- };
69
- },
70
- },
71
- methods: {
72
- toggleCollapse() {
73
- this.collapse = !this.collapse;
74
- },
75
- },
76
- };
77
- </script>
78
-
79
- <style lang="scss">
80
-
81
- .router-search-page {
82
- height: 100%;
83
-
84
- .page-search-conditions {
85
- display: flex;
86
- flex-direction: column;
87
- position: relative;
88
-
89
- .search-content {
90
- flex: 1;
91
- display: flex;
92
- flex-direction: column;
93
- }
94
-
95
- .indicator {
96
- position: absolute;
97
- top: 50%;
98
- right: 0;
99
- transform: translateY(-50%);
100
- width: 14px;
101
- height: 36px;
102
- opacity: 0.3;
103
- background-color: #ccc;
104
- transition-duration: 200ms;
105
- transition-property: background-color, opacity;
106
- transition-timing-function: ease-in-out;
107
- display: flex;
108
- align-items: center;
109
- justify-content: center;
110
- flex-direction: column;
111
- border-radius: 4px 0 0 4px;
112
- cursor: pointer;
113
-
114
- &:hover {
115
- opacity: 1;
116
- background-color: var(--color-primary);
117
- }
118
-
119
- &:hover:before {
120
- transform: rotate(24deg);
121
- }
122
- &:hover:after {
123
- transform: rotate(-24deg);
124
- }
125
-
126
- &::before,
127
- &::after {
128
- content: '';
129
- display: block;
130
- position: relative;
131
- width: 2px;
132
- height: 10px;
133
- background-color: #fff;
134
- transition: all 300ms ease-in-out;
135
- }
136
- &::before {
137
- bottom: -1px;
138
- }
139
- &::after {
140
- top: -1px;
141
- }
142
- }
143
-
144
- &.collapse {
145
- z-index: 2;
146
-
147
- .indicator {
148
- border-radius: 0 4px 4px 0;
149
- right: -14px;
150
-
151
- &:hover:before {
152
- transform: rotate(-24deg);
153
- }
154
- &:hover:after {
155
- transform: rotate(24deg);
156
- }
157
- }
158
- }
159
- }
160
-
161
- .page-search-content {
162
- flex: 1;
163
- position: relative;
164
- display: flex;
165
- flex-direction: column;
166
- overflow: auto;
167
-
168
- &.page-search-content-direction-row {
169
- flex-direction: row;
170
- }
171
- }
172
-
173
- &.layout-v > .multipane-resizer {
174
- margin: 0;
175
- left: 0;
176
- position: relative;
177
-
178
- &.collapse {
179
- display: none;
180
- }
181
-
182
- &:before {
183
- display: block;
184
- content: "";
185
- width: 3px;
186
- height: 40px;
187
- position: absolute;
188
- top: 50%;
189
- left: 50%;
190
- transform: translate(-50%, -50%);
191
- border-left: 1px solid #ccc;
192
- border-right: 1px solid #ccc;
193
- }
194
-
195
- &:hover {
196
- &:before {
197
- border-color: #999;
198
- }
199
- }
200
- }
201
- }
202
- </style>
@@ -1,15 +0,0 @@
1
- <template>
2
- <div id="main">
3
- <router-view/>
4
- </div>
5
- </template>
6
-
7
- <script>
8
- export default {
9
- name: 'UiProvider',
10
- };
11
- </script>
12
-
13
- <style scoped>
14
-
15
- </style>