@fishawack/lab-velocity 0.6.4 → 0.7.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/_defaults.scss +9 -0
- package/components/_inputNumber.scss +17 -0
- package/form/InputNumber.vue +90 -0
- package/form/input.js +1 -1
- package/general.scss +2 -9
- package/index.js +1 -0
- package/package.json +1 -1
package/_defaults.scss
CHANGED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
@import "element-plus/theme-chalk/el-input-number";
|
|
2
|
+
|
|
3
|
+
.vel-input-number {
|
|
4
|
+
display: block;
|
|
5
|
+
font-size: 1rem;
|
|
6
|
+
|
|
7
|
+
.el-input__wrapper {
|
|
8
|
+
// padding: .5 * $spacing $spacing;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
.el-input__inner {
|
|
12
|
+
--el-input-inner-height:38px
|
|
13
|
+
}
|
|
14
|
+
.el-input-group__append, .el-input-group__prepend {
|
|
15
|
+
padding: 0 2 * $spacing;
|
|
16
|
+
}
|
|
17
|
+
}
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<XInput v-bind="$props">
|
|
3
|
+
<template #label>
|
|
4
|
+
<slot name="label" />
|
|
5
|
+
</template>
|
|
6
|
+
|
|
7
|
+
<el-input-number
|
|
8
|
+
v-bind="{ ...$attrs, class: undefined }"
|
|
9
|
+
:class="[`${baseClass}`]"
|
|
10
|
+
:name="name"
|
|
11
|
+
:id="name"
|
|
12
|
+
:disabled="disabled"
|
|
13
|
+
:min="min"
|
|
14
|
+
:max="max"
|
|
15
|
+
:size="size"
|
|
16
|
+
:precision="precision"
|
|
17
|
+
:step="step"
|
|
18
|
+
:controls="controls"
|
|
19
|
+
:step-strictly="stepStrictly"
|
|
20
|
+
:placeholder="placeholder"
|
|
21
|
+
v-model="content"
|
|
22
|
+
:required="required"
|
|
23
|
+
@input="handleInput"
|
|
24
|
+
>
|
|
25
|
+
|
|
26
|
+
<template #prefix>
|
|
27
|
+
<slot name="prefix" />
|
|
28
|
+
</template>
|
|
29
|
+
<template #suffix>
|
|
30
|
+
<slot name="suffix" />
|
|
31
|
+
</template>
|
|
32
|
+
<template #decrease-icon>
|
|
33
|
+
<slot name="decrease-icon" />
|
|
34
|
+
</template>
|
|
35
|
+
<template #increase-icon>
|
|
36
|
+
<slot name="increase-icon" />
|
|
37
|
+
</template>
|
|
38
|
+
</el-input-number>
|
|
39
|
+
</XInput>
|
|
40
|
+
</template>
|
|
41
|
+
|
|
42
|
+
<script>
|
|
43
|
+
import { ElInputNumber } from "element-plus";
|
|
44
|
+
import input from "./input.js";
|
|
45
|
+
import XInput from "./input.vue";
|
|
46
|
+
|
|
47
|
+
export default {
|
|
48
|
+
mixins: [input],
|
|
49
|
+
props: {
|
|
50
|
+
...input.props,
|
|
51
|
+
baseClass: {
|
|
52
|
+
type: String,
|
|
53
|
+
default: "vel-input-number",
|
|
54
|
+
},
|
|
55
|
+
min: {
|
|
56
|
+
type: Number,
|
|
57
|
+
default: -Infinity,
|
|
58
|
+
},
|
|
59
|
+
max: {
|
|
60
|
+
type: Number,
|
|
61
|
+
default: Infinity,
|
|
62
|
+
},
|
|
63
|
+
precision: {
|
|
64
|
+
type: Number,
|
|
65
|
+
default: null,
|
|
66
|
+
},
|
|
67
|
+
step: {
|
|
68
|
+
type: Number,
|
|
69
|
+
default: 1,
|
|
70
|
+
},
|
|
71
|
+
stepStrictly: {
|
|
72
|
+
type: Boolean,
|
|
73
|
+
default: true,
|
|
74
|
+
},
|
|
75
|
+
size: {
|
|
76
|
+
type: String,
|
|
77
|
+
default: "default",
|
|
78
|
+
},
|
|
79
|
+
controls: {
|
|
80
|
+
type: Boolean,
|
|
81
|
+
default: true,
|
|
82
|
+
}
|
|
83
|
+
},
|
|
84
|
+
|
|
85
|
+
components: {
|
|
86
|
+
XInput,
|
|
87
|
+
ElInputNumber,
|
|
88
|
+
},
|
|
89
|
+
};
|
|
90
|
+
</script>
|
package/form/input.js
CHANGED
package/general.scss
CHANGED
|
@@ -14,6 +14,7 @@
|
|
|
14
14
|
@import "./components/_cascader.scss";
|
|
15
15
|
@import "./components/_wysiwyg.scss";
|
|
16
16
|
@import "./components/_upload.scss";
|
|
17
|
+
@import "./components/_inputNumber.scss";
|
|
17
18
|
|
|
18
19
|
@import "./components/_breadcrumbs.scss";
|
|
19
20
|
@import "./components/_sidebar.scss";
|
|
@@ -25,12 +26,4 @@
|
|
|
25
26
|
@import "./components/_form.scss";
|
|
26
27
|
|
|
27
28
|
|
|
28
|
-
@import "./_base.scss";
|
|
29
|
-
|
|
30
|
-
body {
|
|
31
|
-
font-family: $primaryFont, sans-serif;
|
|
32
|
-
font-size: get-ratio(16px);
|
|
33
|
-
line-height: 1.5;
|
|
34
|
-
color: $color1;
|
|
35
|
-
background-color: $color3;
|
|
36
|
-
}
|
|
29
|
+
@import "./_base.scss";
|
package/index.js
CHANGED
|
@@ -11,6 +11,7 @@ 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
13
|
export { default as Upload } from "./form/Upload.vue";
|
|
14
|
+
export { default as InputNumber } from "./form/InputNumber.vue";
|
|
14
15
|
|
|
15
16
|
export { default as SideBar } from "./layout/sideBar.vue";
|
|
16
17
|
export { default as Footer } from "./layout/Footer.vue";
|