@fishawack/lab-velocity 0.4.0 → 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/_menu.scss +3 -3
- package/components/_upload.scss +1 -0
- package/form/Upload.vue +79 -0
- package/general.scss +1 -0
- package/index.js +1 -0
- 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/_menu.scss
CHANGED
|
@@ -16,14 +16,14 @@ ul.vel-menu {
|
|
|
16
16
|
align-items: center;
|
|
17
17
|
overflow: hidden;
|
|
18
18
|
.vel-icon {
|
|
19
|
-
* {
|
|
20
|
-
vertical-align: middle;
|
|
21
|
-
}
|
|
22
19
|
vertical-align: middle;
|
|
23
20
|
width: 2.5 * $spacing;
|
|
24
21
|
min-width: 2.5 * $spacing;
|
|
25
22
|
fill: currentColor;
|
|
26
23
|
margin-right: .5 * $spacing;
|
|
24
|
+
* {
|
|
25
|
+
vertical-align: middle;
|
|
26
|
+
}
|
|
27
27
|
}
|
|
28
28
|
|
|
29
29
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
@import "element-plus/theme-chalk/el-upload";
|
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";
|