@fishawack/lab-velocity 0.3.9 → 0.5.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/_base.scss +5 -1
- package/components/_icon.scss +2 -2
- package/components/_menu.scss +65 -17
- package/components/_sidebar.scss +1 -7
- package/components/_table.scss +20 -0
- package/components/_typography.scss +1 -0
- package/components/_upload.scss +1 -0
- package/form/Select.vue +21 -17
- package/form/Upload.vue +79 -0
- package/general.scss +1 -0
- package/index.js +1 -0
- package/navigation/MenuItem.vue +1 -1
- package/navigation/SubMenu.vue +1 -1
- package/package.json +1 -1
package/_base.scss
CHANGED
|
@@ -1 +1,5 @@
|
|
|
1
|
-
@import "element-plus/theme-chalk/base";
|
|
1
|
+
@import "element-plus/theme-chalk/base";
|
|
2
|
+
@import "element-plus/theme-chalk/el-message-box";
|
|
3
|
+
@import "element-plus/theme-chalk/el-message";
|
|
4
|
+
@import "element-plus/theme-chalk/el-notification";
|
|
5
|
+
@import "element-plus/theme-chalk/el-overlay";
|
package/components/_icon.scss
CHANGED
package/components/_menu.scss
CHANGED
|
@@ -1,47 +1,95 @@
|
|
|
1
1
|
@import 'element-plus/theme-chalk/el-menu';
|
|
2
2
|
@import 'element-plus/theme-chalk/el-menu-item';
|
|
3
|
+
@import 'element-plus/theme-chalk/el-sub-menu';
|
|
3
4
|
|
|
4
|
-
ul.
|
|
5
|
+
ul.vel-menu {
|
|
5
6
|
li {
|
|
6
7
|
--el-menu-level-padding : 0;
|
|
7
8
|
padding-right: 0px;
|
|
8
9
|
}
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
10
|
+
.el-sub-menu__title, a, .el-menu-item > * {
|
|
11
|
+
font-size: get-ratio(18px);
|
|
12
|
+
border-left: solid .5 * $spacing transparent;
|
|
13
|
+
padding: 0 2.5 * $spacing !important;
|
|
13
14
|
width: 100%;
|
|
14
|
-
border-left: solid .5 * $spacing $color8;
|
|
15
|
-
box-sizing: border-box;
|
|
16
15
|
display: flex;
|
|
17
16
|
align-items: center;
|
|
18
17
|
overflow: hidden;
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
18
|
+
.vel-icon {
|
|
19
|
+
vertical-align: middle;
|
|
20
|
+
width: 2.5 * $spacing;
|
|
21
|
+
min-width: 2.5 * $spacing;
|
|
22
|
+
fill: currentColor;
|
|
23
|
+
margin-right: .5 * $spacing;
|
|
24
|
+
* {
|
|
25
|
+
vertical-align: middle;
|
|
26
|
+
}
|
|
23
27
|
}
|
|
24
28
|
|
|
25
|
-
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
a {
|
|
32
|
+
height: 100%;
|
|
33
|
+
box-sizing: border-box;
|
|
34
|
+
border-left: solid .5 * $spacing $color8;
|
|
35
|
+
.vel-icon {
|
|
26
36
|
width: 2.5 * $spacing;
|
|
27
37
|
max-width: 2.5 * $spacing;
|
|
28
38
|
min-width: 2.5 * $spacing;
|
|
29
39
|
padding-bottom: 0px;
|
|
30
|
-
* {
|
|
31
|
-
vertical-align: middle;
|
|
32
|
-
}
|
|
33
40
|
}
|
|
41
|
+
&.active{
|
|
42
|
+
border-left-color: $color1;
|
|
43
|
+
}
|
|
44
|
+
|
|
34
45
|
}
|
|
35
46
|
|
|
36
|
-
span {
|
|
47
|
+
span, .el-sub-menu__icon-arrow {
|
|
37
48
|
opacity: 0;
|
|
38
49
|
transition: .2s ease-in-out opacity;
|
|
39
50
|
margin-left: .5 * $spacing;
|
|
40
51
|
}
|
|
41
52
|
|
|
42
53
|
.active & {
|
|
43
|
-
span {
|
|
54
|
+
span,.el-sub-menu__icon-arrow {
|
|
44
55
|
opacity: 1;
|
|
45
56
|
}
|
|
46
57
|
}
|
|
58
|
+
|
|
59
|
+
.el-icon {
|
|
60
|
+
flex-shrink: 1;
|
|
61
|
+
width: auto;
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
|
|
66
|
+
|
|
67
|
+
.vel-sub-menu {
|
|
68
|
+
--el-menu-level-padding: 0;
|
|
69
|
+
.el-menu-item, .vel-sub-menu {
|
|
70
|
+
padding-left: 5 * $spacing !important;
|
|
71
|
+
}
|
|
72
|
+
.el-sub-menu__title {
|
|
73
|
+
height: auto;
|
|
74
|
+
line-height: get-ratio(48px);
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
.vel-menu-item {
|
|
79
|
+
height: auto;
|
|
80
|
+
line-height: get-ratio(48px);
|
|
81
|
+
* {
|
|
82
|
+
vertical-align: middle;
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
.vel-menu {
|
|
87
|
+
display: flex;
|
|
88
|
+
flex-direction: column;
|
|
89
|
+
height: 100%;
|
|
90
|
+
|
|
91
|
+
li:last-child {
|
|
92
|
+
margin-top: auto;
|
|
93
|
+
margin-bottom: 0px;
|
|
94
|
+
}
|
|
47
95
|
}
|
package/components/_sidebar.scss
CHANGED
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
&.active {
|
|
25
25
|
flex-basis: 31.5 * $spacing;
|
|
26
26
|
|
|
27
|
-
.side-bar__button {
|
|
27
|
+
.vel-side-bar__button {
|
|
28
28
|
transform: rotateY(180deg);
|
|
29
29
|
}
|
|
30
30
|
}
|
|
@@ -35,12 +35,6 @@
|
|
|
35
35
|
background-color: transparent;
|
|
36
36
|
border: none;
|
|
37
37
|
cursor: pointer;
|
|
38
|
-
.icon {
|
|
39
|
-
width: 2.5 * $spacing;
|
|
40
|
-
min-width: 2.5 * $spacing;
|
|
41
|
-
padding-bottom: 2.5 * $spacing;
|
|
42
|
-
fill: currentColor;
|
|
43
|
-
}
|
|
44
38
|
&:focus {
|
|
45
39
|
outline: 1px solid;
|
|
46
40
|
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
@import "element-plus/theme-chalk/el-table-column";
|
|
2
|
+
@import "element-plus/theme-chalk/el-table";
|
|
3
|
+
@import "element-plus/theme-chalk/el-pagination";
|
|
4
|
+
|
|
5
|
+
.el-table {
|
|
6
|
+
padding: get-ratio(8px);
|
|
7
|
+
thead tr .el-table__cell{
|
|
8
|
+
background-color: #F7F7F7;
|
|
9
|
+
}
|
|
10
|
+
.el-table__cell {
|
|
11
|
+
padding: get-ratio(8px) get-ratio(12px);
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
.table-wrapper {
|
|
16
|
+
// display: flex;
|
|
17
|
+
display: flex;
|
|
18
|
+
width: 100%;
|
|
19
|
+
max-width: 100%;
|
|
20
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
@import "element-plus/theme-chalk/el-upload";
|
package/form/Select.vue
CHANGED
|
@@ -18,23 +18,27 @@
|
|
|
18
18
|
@clear="this.$emit('clear')"
|
|
19
19
|
@blur="this.$emit('blur')"
|
|
20
20
|
>
|
|
21
|
-
<
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
21
|
+
<template #default>
|
|
22
|
+
<slot name="default">
|
|
23
|
+
<el-option
|
|
24
|
+
v-if="!options[0]?.value"
|
|
25
|
+
v-for="(label, value) in options"
|
|
26
|
+
:key="value"
|
|
27
|
+
:label="label"
|
|
28
|
+
:value="castValue(value)"
|
|
29
|
+
>
|
|
30
|
+
</el-option>
|
|
31
|
+
<el-option
|
|
32
|
+
v-else
|
|
33
|
+
v-for="option in options"
|
|
34
|
+
:key="option.value"
|
|
35
|
+
:label="option.label"
|
|
36
|
+
:disabled="option.disabled"
|
|
37
|
+
:value="castValue(option.value)"
|
|
38
|
+
>
|
|
39
|
+
</el-option>
|
|
40
|
+
</slot>
|
|
41
|
+
</template>
|
|
38
42
|
</el-select>
|
|
39
43
|
</XInput>
|
|
40
44
|
</template>
|
package/form/Upload.vue
ADDED
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<XInput v-bind="$props">
|
|
3
|
+
<template #label>
|
|
4
|
+
<slot name="label" />
|
|
5
|
+
</template>
|
|
6
|
+
|
|
7
|
+
<el-upload
|
|
8
|
+
v-bind="$attrs.props"
|
|
9
|
+
:class="[`${baseClass}`]"
|
|
10
|
+
:name="name"
|
|
11
|
+
:id="name"
|
|
12
|
+
:disabled="disabled"
|
|
13
|
+
:limit="limit"
|
|
14
|
+
:action="action"
|
|
15
|
+
v-model:file-list="content"
|
|
16
|
+
:auto-upload="autoUpload"
|
|
17
|
+
:required="required"
|
|
18
|
+
>
|
|
19
|
+
<template #trigger>
|
|
20
|
+
<slot name="trigger">
|
|
21
|
+
<el-button type="primary">Select file</el-button>
|
|
22
|
+
</slot>
|
|
23
|
+
</template>
|
|
24
|
+
<template #tip>
|
|
25
|
+
<slot name="tip" />
|
|
26
|
+
</template>
|
|
27
|
+
<slot name="default">
|
|
28
|
+
</slot>
|
|
29
|
+
</el-upload>
|
|
30
|
+
</XInput>
|
|
31
|
+
</template>
|
|
32
|
+
|
|
33
|
+
<script>
|
|
34
|
+
import { ElUpload } from "element-plus";
|
|
35
|
+
import input from "./input.js";
|
|
36
|
+
import ElButton from "../basic/Button.vue";
|
|
37
|
+
import XInput from "./input.vue";
|
|
38
|
+
|
|
39
|
+
export default {
|
|
40
|
+
mixins: [input],
|
|
41
|
+
props: {
|
|
42
|
+
...input.props,
|
|
43
|
+
baseClass: {
|
|
44
|
+
type: String,
|
|
45
|
+
default: "vel-upload",
|
|
46
|
+
},
|
|
47
|
+
limit: {
|
|
48
|
+
type: Number,
|
|
49
|
+
default: 1,
|
|
50
|
+
},
|
|
51
|
+
action: {
|
|
52
|
+
type: Function,
|
|
53
|
+
default: null,
|
|
54
|
+
},
|
|
55
|
+
autoUpload: {
|
|
56
|
+
type: Boolean,
|
|
57
|
+
default: false
|
|
58
|
+
}
|
|
59
|
+
},
|
|
60
|
+
|
|
61
|
+
components: {
|
|
62
|
+
XInput,
|
|
63
|
+
ElUpload,
|
|
64
|
+
ElButton,
|
|
65
|
+
},
|
|
66
|
+
|
|
67
|
+
emits: ["upload"],
|
|
68
|
+
|
|
69
|
+
watch: {
|
|
70
|
+
content: {
|
|
71
|
+
immediate: true,
|
|
72
|
+
handler(val) {
|
|
73
|
+
this.handleInput();
|
|
74
|
+
},
|
|
75
|
+
},
|
|
76
|
+
},
|
|
77
|
+
|
|
78
|
+
};
|
|
79
|
+
</script>
|
package/general.scss
CHANGED
package/index.js
CHANGED
|
@@ -10,6 +10,7 @@ export { default as file } from "./form/file.vue";
|
|
|
10
10
|
export { default as Select } from "./form/Select.vue";
|
|
11
11
|
export { default as Switch } from "./form/Switch.vue";
|
|
12
12
|
export { default as Wysiwyg } from "./form/Wysiwyg.vue";
|
|
13
|
+
export { default as Upload } from "./form/Upload.vue";
|
|
13
14
|
|
|
14
15
|
export { default as SideBar } from "./layout/sideBar.vue";
|
|
15
16
|
export { default as Footer } from "./layout/Footer.vue";
|
package/navigation/MenuItem.vue
CHANGED
package/navigation/SubMenu.vue
CHANGED