@mixd-id/web-scaffold 0.1.230406047 → 0.1.230406049
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 +1 -1
- package/src/components/IconMenu.vue +95 -0
- package/src/components/IconPlus.vue +89 -0
- package/src/components/Image.vue +7 -2
- package/src/components/ListView.vue +6 -3
- package/src/components/VirtualScroll.vue +0 -1
- package/src/components/VirtualTable.vue +2 -3
- package/src/index.js +2 -0
- package/src/themes/default/index.js +5 -4
package/package.json
CHANGED
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div :style="computedStyle" :class="computedClass">
|
|
3
|
+
<div :style="lineStyle"></div>
|
|
4
|
+
<div :style="lineStyle"></div>
|
|
5
|
+
<div :style="lineStyle"></div>
|
|
6
|
+
</div>
|
|
7
|
+
</template>
|
|
8
|
+
|
|
9
|
+
<script>
|
|
10
|
+
|
|
11
|
+
export default {
|
|
12
|
+
|
|
13
|
+
props: {
|
|
14
|
+
|
|
15
|
+
width: {
|
|
16
|
+
type: String,
|
|
17
|
+
required: true
|
|
18
|
+
},
|
|
19
|
+
|
|
20
|
+
height: {
|
|
21
|
+
type: String,
|
|
22
|
+
required: true
|
|
23
|
+
},
|
|
24
|
+
|
|
25
|
+
color: String,
|
|
26
|
+
|
|
27
|
+
state: {
|
|
28
|
+
type: Number,
|
|
29
|
+
default: 1
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
},
|
|
33
|
+
|
|
34
|
+
computed: {
|
|
35
|
+
|
|
36
|
+
computedClass(){
|
|
37
|
+
return [
|
|
38
|
+
this.$style.comp,
|
|
39
|
+
this.state === 2 ? this.$style.active : ''
|
|
40
|
+
]
|
|
41
|
+
.join(' ')
|
|
42
|
+
},
|
|
43
|
+
|
|
44
|
+
computedStyle(){
|
|
45
|
+
return {
|
|
46
|
+
height: parseInt(this.height) + 'px',
|
|
47
|
+
width: parseInt(this.width) + 'px'
|
|
48
|
+
}
|
|
49
|
+
},
|
|
50
|
+
|
|
51
|
+
lineStyle(){
|
|
52
|
+
return {
|
|
53
|
+
backgroundColor: this.color
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
</script>
|
|
62
|
+
|
|
63
|
+
<style module>
|
|
64
|
+
|
|
65
|
+
.comp{
|
|
66
|
+
@apply relative flex justify-center items-center;
|
|
67
|
+
}
|
|
68
|
+
.comp>*{
|
|
69
|
+
transition: all 400ms cubic-bezier(0.25, 1, 0.5, 1);
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
.comp>*:nth-child(1){
|
|
73
|
+
@apply absolute top-0 left-0 right-0 h-[2px] rounded-sm;
|
|
74
|
+
}
|
|
75
|
+
.comp>*:nth-child(2){
|
|
76
|
+
@apply w-full h-[2px] rounded-sm ml-[5px];
|
|
77
|
+
}
|
|
78
|
+
.comp>*:nth-child(3){
|
|
79
|
+
@apply absolute bottom-0 left-[5px] right-0 h-[2px] rounded-sm;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
.comp.active>*:nth-child(1){
|
|
83
|
+
transform: rotate(-45deg);
|
|
84
|
+
transform-origin: 100% 0;
|
|
85
|
+
}
|
|
86
|
+
.comp.active>*:nth-child(2){
|
|
87
|
+
@apply opacity-0;
|
|
88
|
+
}
|
|
89
|
+
.comp.active>*:nth-child(3){
|
|
90
|
+
@apply left-0;
|
|
91
|
+
transform: rotate(45deg);
|
|
92
|
+
transform-origin: 100% 100%;
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
</style>
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div :style="computedStyle" :class="computedClass">
|
|
3
|
+
<div :style="lineStyle"></div>
|
|
4
|
+
<div :style="lineStyle"></div>
|
|
5
|
+
</div>
|
|
6
|
+
</template>
|
|
7
|
+
|
|
8
|
+
<script>
|
|
9
|
+
|
|
10
|
+
export default{
|
|
11
|
+
|
|
12
|
+
props: {
|
|
13
|
+
|
|
14
|
+
width: {
|
|
15
|
+
type: String,
|
|
16
|
+
required: true
|
|
17
|
+
},
|
|
18
|
+
|
|
19
|
+
height: {
|
|
20
|
+
type: String,
|
|
21
|
+
required: true
|
|
22
|
+
},
|
|
23
|
+
|
|
24
|
+
color: String,
|
|
25
|
+
|
|
26
|
+
state: {
|
|
27
|
+
type: Number,
|
|
28
|
+
default: 1
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
},
|
|
32
|
+
|
|
33
|
+
computed: {
|
|
34
|
+
|
|
35
|
+
computedClass() {
|
|
36
|
+
return [
|
|
37
|
+
this.$style.comp,
|
|
38
|
+
this.state === 2 ? this.$style.active : ''
|
|
39
|
+
]
|
|
40
|
+
.join(' ')
|
|
41
|
+
},
|
|
42
|
+
|
|
43
|
+
computedStyle() {
|
|
44
|
+
return {
|
|
45
|
+
height: parseInt(this.height) + 'px',
|
|
46
|
+
width: parseInt(this.width) + 'px'
|
|
47
|
+
}
|
|
48
|
+
},
|
|
49
|
+
|
|
50
|
+
lineStyle(){
|
|
51
|
+
return {
|
|
52
|
+
backgroundColor: this.color
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
</script>
|
|
60
|
+
|
|
61
|
+
<style module>
|
|
62
|
+
|
|
63
|
+
.comp{
|
|
64
|
+
@apply inline-block relative;
|
|
65
|
+
}
|
|
66
|
+
.comp>*{
|
|
67
|
+
transition: all 400ms cubic-bezier(0.25, 1, 0.5, 1);
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
.comp>*:first-child{
|
|
71
|
+
@apply absolute top-0 bottom-0 w-[2px];
|
|
72
|
+
left: 50%;
|
|
73
|
+
transform: translate3d(-50%, 0, 0);
|
|
74
|
+
}
|
|
75
|
+
.comp>*:last-child{
|
|
76
|
+
@apply absolute left-0 right-0 h-[2px];
|
|
77
|
+
top: 50%;
|
|
78
|
+
transform: translate3d(0, -50%, 0);
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
.comp.active>*:first-child{
|
|
82
|
+
transform: rotate(-90deg);
|
|
83
|
+
transform-origin: 50% 50%;
|
|
84
|
+
}
|
|
85
|
+
.comp.active>*:last-child{
|
|
86
|
+
opacity: 0;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
</style>
|
package/src/components/Image.vue
CHANGED
|
@@ -133,17 +133,22 @@ export default{
|
|
|
133
133
|
if(window.innerWidth > b && screens[b] in src){
|
|
134
134
|
var img = new Image()
|
|
135
135
|
img.addEventListener('load', () => {
|
|
136
|
+
if(img.getAttribute('data-src') !== this.src) return
|
|
136
137
|
this.status = 2
|
|
137
138
|
this.actualSrc = img.src
|
|
138
139
|
})
|
|
139
|
-
img.addEventListener('error', () => {
|
|
140
|
+
img.addEventListener('error', (err) => {
|
|
141
|
+
if(img.getAttribute('data-src') !== this.src) return
|
|
140
142
|
this.status = 3
|
|
141
143
|
this.actualSrc = this.defaultSrc
|
|
142
144
|
})
|
|
143
145
|
img.src = src[screens[b]]
|
|
146
|
+
img.setAttribute('data-src', this.src)
|
|
144
147
|
this.status = 1
|
|
148
|
+
break
|
|
145
149
|
}
|
|
146
150
|
}
|
|
151
|
+
|
|
147
152
|
}
|
|
148
153
|
}
|
|
149
154
|
else if(this.src instanceof File){
|
|
@@ -207,4 +212,4 @@ export default{
|
|
|
207
212
|
@apply bg-text-200 animate-pulse;
|
|
208
213
|
}
|
|
209
214
|
|
|
210
|
-
</style>
|
|
215
|
+
</style>
|
|
@@ -60,7 +60,7 @@
|
|
|
60
60
|
</Textbox>
|
|
61
61
|
</div>
|
|
62
62
|
|
|
63
|
-
<div v-if="mediaPrefix === 'sm'" class="px-6 py-4">
|
|
63
|
+
<div v-if="mediaPrefix === 'sm'" class="px-6 py-4 border-b-[1px] border-text-50">
|
|
64
64
|
<Textbox :placeholder="$t('Search...')" :clearable="true" @clear="clearSearch" v-model="preset.search"
|
|
65
65
|
@keyup.enter="load" :class="$style.searchBox">
|
|
66
66
|
<template #start>
|
|
@@ -296,7 +296,10 @@ export default{
|
|
|
296
296
|
return this.socketEmit2(this.configStoreObj.src,
|
|
297
297
|
{ key:this.configStoreObj.name ?? 'ListView' })
|
|
298
298
|
.then((config) => {
|
|
299
|
-
|
|
299
|
+
if(config && Array.isArray(config.columns)){
|
|
300
|
+
Object.assign(this.config, config ?? {})
|
|
301
|
+
}
|
|
302
|
+
|
|
300
303
|
this.configLoaded = true
|
|
301
304
|
this.$nextTick(() => this.calcMediaPrefix())
|
|
302
305
|
})
|
|
@@ -562,7 +565,7 @@ export default{
|
|
|
562
565
|
<style module>
|
|
563
566
|
|
|
564
567
|
.comp{
|
|
565
|
-
@apply flex-1 flex flex-col
|
|
568
|
+
@apply flex-1 flex flex-col;
|
|
566
569
|
}
|
|
567
570
|
|
|
568
571
|
.header{
|
|
@@ -400,7 +400,7 @@ export default{
|
|
|
400
400
|
|
|
401
401
|
.comp{
|
|
402
402
|
@apply flex flex-col overflow-hidden;
|
|
403
|
-
@apply border-[1px] border-text-50 rounded-sm
|
|
403
|
+
@apply border-[1px] border-text-50 rounded-sm;
|
|
404
404
|
}
|
|
405
405
|
|
|
406
406
|
.comp>*:last-child{
|
|
@@ -408,7 +408,7 @@ export default{
|
|
|
408
408
|
}
|
|
409
409
|
|
|
410
410
|
.header{
|
|
411
|
-
@apply border-b-[1px] border-text-50
|
|
411
|
+
@apply border-b-[1px] border-text-50;
|
|
412
412
|
}
|
|
413
413
|
|
|
414
414
|
.headerCol{
|
|
@@ -420,7 +420,6 @@ export default{
|
|
|
420
420
|
overflow: hidden;
|
|
421
421
|
will-change: auto;
|
|
422
422
|
min-width: 100%;
|
|
423
|
-
@apply bg-base-500;
|
|
424
423
|
}
|
|
425
424
|
|
|
426
425
|
.spacer{
|
package/src/index.js
CHANGED
|
@@ -224,6 +224,8 @@ export default{
|
|
|
224
224
|
app.component('HTMLEditor', defineAsyncComponent(() => import("./components/HTMLEditor.vue")))
|
|
225
225
|
app.component('Ahref', defineAsyncComponent(() => import("./components/Ahref.vue")))
|
|
226
226
|
app.component('Switch', defineAsyncComponent(() => import("./components/Switch.vue")))
|
|
227
|
+
app.component('IconMenu', defineAsyncComponent(() => import("./components/IconMenu.vue")))
|
|
228
|
+
app.component('IconPlus', defineAsyncComponent(() => import("./components/IconPlus.vue")))
|
|
227
229
|
app.component('Image', defineAsyncComponent(() => import("./components/Image.vue")))
|
|
228
230
|
app.component('Image360', defineAsyncComponent(() => import("./components/Image360.vue")))
|
|
229
231
|
app.component('ImagePreview', defineAsyncComponent(() => import("./components/ImagePreview.vue")))
|
|
@@ -18,7 +18,7 @@ const plugin = Plugin(function({ addBase, config, theme }) {
|
|
|
18
18
|
|
|
19
19
|
'--base-50': '255, 255, 255',
|
|
20
20
|
'--base-200': '222, 224, 227',
|
|
21
|
-
'--base-300': '
|
|
21
|
+
'--base-300': '255, 255, 255',
|
|
22
22
|
'--base-400': '246, 248, 251',
|
|
23
23
|
'--base-500': '255, 255, 255',
|
|
24
24
|
'--base': '236, 236, 236',
|
|
@@ -86,13 +86,15 @@ const plugin = Plugin(function({ addBase, config, theme }) {
|
|
|
86
86
|
'text-rendering': 'optimizeLegibility',
|
|
87
87
|
'fontSize': '14px',
|
|
88
88
|
'touchAction': "pan-x pan-y",
|
|
89
|
-
'backgroundColor': 'rgba(var(--base-
|
|
89
|
+
'backgroundColor': 'rgba(var(--base-300), 100)'
|
|
90
90
|
},
|
|
91
91
|
|
|
92
92
|
'@media screen and (orientation: portrait)': {
|
|
93
93
|
'body': {
|
|
94
94
|
'fontSize': '16px',
|
|
95
|
-
}
|
|
95
|
+
},
|
|
96
|
+
|
|
97
|
+
"input, input[type='text'], input[type='number'], textarea": { fontSize:"16px" }
|
|
96
98
|
},
|
|
97
99
|
|
|
98
100
|
'::-webkit-scrollbar': {
|
|
@@ -137,7 +139,6 @@ const plugin = Plugin(function({ addBase, config, theme }) {
|
|
|
137
139
|
|
|
138
140
|
'.flex-1': { minHeight: "0px", minWidth: "0px" }
|
|
139
141
|
|
|
140
|
-
|
|
141
142
|
})
|
|
142
143
|
|
|
143
144
|
}, {
|