@fishawack/lab-velocity 2.0.0-beta.1 → 2.0.0-beta.3
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/_Build/vue/components/Icon.vue +33 -0
- package/_Build/vue/components/Svg.vue +45 -0
- package/_Build/vue/components/basic/Button.vue +109 -0
- package/_Build/vue/components/basic/link.vue +64 -0
- package/_Build/vue/components/form/Cascader.vue +85 -0
- package/_Build/vue/components/form/Checkbox.vue +39 -0
- package/_Build/vue/components/form/CheckboxGroup.vue +91 -0
- package/_Build/vue/components/form/DatePicker.vue +116 -0
- package/_Build/vue/components/form/InputNumber.vue +89 -0
- package/_Build/vue/components/form/Select.vue +109 -0
- package/_Build/vue/components/form/Switch.vue +63 -0
- package/_Build/vue/components/form/Upload.vue +101 -0
- package/_Build/vue/components/form/Wysiwyg.vue +127 -0
- package/_Build/vue/components/form/Wysiwyg2.vue +577 -0
- package/_Build/vue/components/form/basic.vue +106 -0
- package/_Build/vue/components/form/color.vue +22 -0
- package/_Build/vue/components/form/file.vue +89 -0
- package/_Build/vue/components/form/input.js +79 -0
- package/_Build/vue/components/form/input.vue +105 -0
- package/_Build/vue/components/layout/Alert.vue +38 -0
- package/_Build/vue/components/layout/Footer.vue +50 -0
- package/_Build/vue/components/layout/Header.vue +13 -0
- package/_Build/vue/components/layout/Loader.vue +59 -0
- package/_Build/vue/components/layout/Tooltip.vue +46 -0
- package/_Build/vue/components/layout/pageTitle.vue +18 -0
- package/_Build/vue/components/layout/sideBar.vue +25 -0
- package/_Build/vue/components/navigation/Breadcrumbs.vue +37 -0
- package/_Build/vue/components/navigation/BreadcrumbsItem.vue +19 -0
- package/_Build/vue/components/navigation/Menu.vue +14 -0
- package/_Build/vue/components/navigation/MenuItem.vue +20 -0
- package/_Build/vue/components/navigation/MenuItemGroup.vue +20 -0
- package/_Build/vue/components/navigation/SubMenu.vue +20 -0
- package/_Build/vue/modules/AuthModule/adminRoutes/PCompanies/Children/Upload/upload.vue +251 -0
- package/_Build/vue/modules/AuthModule/adminRoutes/PCompanies/Children/create.vue +62 -0
- package/_Build/vue/modules/AuthModule/adminRoutes/PCompanies/Children/edit.vue +98 -0
- package/_Build/vue/modules/AuthModule/adminRoutes/PCompanies/Children/index.vue +90 -0
- package/_Build/vue/modules/AuthModule/adminRoutes/PCompanies/Children/partials/form.vue +173 -0
- package/_Build/vue/modules/AuthModule/adminRoutes/PCompanies/Children/show.vue +262 -0
- package/_Build/vue/modules/AuthModule/adminRoutes/PCompanies/parent.vue +36 -0
- package/_Build/vue/modules/AuthModule/adminRoutes/PUsers/Children/create.vue +112 -0
- package/_Build/vue/modules/AuthModule/adminRoutes/PUsers/Children/edit.vue +103 -0
- package/_Build/vue/modules/AuthModule/adminRoutes/PUsers/Children/index.vue +112 -0
- package/_Build/vue/modules/AuthModule/adminRoutes/PUsers/Children/partials/form.vue +169 -0
- package/_Build/vue/modules/AuthModule/adminRoutes/PUsers/Children/show.vue +120 -0
- package/_Build/vue/modules/AuthModule/adminRoutes/PUsers/parent.vue +36 -0
- package/_Build/vue/modules/AuthModule/components/AuthModal.vue +105 -0
- package/_Build/vue/modules/AuthModule/components/Chip.vue +70 -0
- package/_Build/vue/modules/AuthModule/components/Chips.vue +26 -0
- package/_Build/vue/modules/AuthModule/components/FormRole.vue +115 -0
- package/_Build/vue/modules/AuthModule/components/VBreadcrumbs.vue +33 -0
- package/_Build/vue/modules/AuthModule/components/VFormFooter.vue +46 -0
- package/_Build/vue/modules/AuthModule/components/VPageHeader.vue +38 -0
- package/_Build/vue/modules/AuthModule/components/VPasswordValidation.vue +106 -0
- package/_Build/vue/modules/AuthModule/components/VRoleLegend.vue +43 -0
- package/_Build/vue/modules/AuthModule/components/VTable.vue +127 -0
- package/_Build/vue/modules/AuthModule/components/VTableSorter.vue +240 -0
- package/_Build/vue/modules/AuthModule/js/FakeAPI.js +78 -0
- package/_Build/vue/modules/AuthModule/js/axios.js +62 -0
- package/_Build/vue/modules/AuthModule/js/router.js +295 -0
- package/_Build/vue/modules/AuthModule/js/store.js +62 -0
- package/_Build/vue/modules/AuthModule/routes/account-exists.vue +33 -0
- package/_Build/vue/modules/AuthModule/routes/change-password.vue +165 -0
- package/_Build/vue/modules/AuthModule/routes/container.vue +34 -0
- package/_Build/vue/modules/AuthModule/routes/expired-reset.vue +78 -0
- package/_Build/vue/modules/AuthModule/routes/expired-verification.vue +100 -0
- package/_Build/vue/modules/AuthModule/routes/force-reset.vue +152 -0
- package/_Build/vue/modules/AuthModule/routes/forgot.vue +91 -0
- package/_Build/vue/modules/AuthModule/routes/login.vue +143 -0
- package/_Build/vue/modules/AuthModule/routes/logincallback.vue +41 -0
- package/_Build/vue/modules/AuthModule/routes/loginheadless.vue +21 -0
- package/_Build/vue/modules/AuthModule/routes/loginsso.vue +134 -0
- package/_Build/vue/modules/AuthModule/routes/logout.vue +21 -0
- package/_Build/vue/modules/AuthModule/routes/logoutheadless.vue +27 -0
- package/_Build/vue/modules/AuthModule/routes/register.vue +174 -0
- package/_Build/vue/modules/AuthModule/routes/reset.vue +133 -0
- package/_Build/vue/modules/AuthModule/routes/success-forgot.vue +119 -0
- package/_Build/vue/modules/AuthModule/routes/success-reset.vue +35 -0
- package/_Build/vue/modules/AuthModule/routes/success-verify.vue +32 -0
- package/_Build/vue/modules/AuthModule/routes/verify.vue +113 -0
- package/package.json +3 -9
- package/components/_alert.scss +0 -5
- package/components/_basic.scss +0 -55
- package/components/_breadcrumbs.scss +0 -39
- package/components/_button.scss +0 -304
- package/components/_cascader.scss +0 -12
- package/components/_checkbox.scss +0 -41
- package/components/_chip.scss +0 -24
- package/components/_collapse.scss +0 -24
- package/components/_datepicker.scss +0 -52
- package/components/_footer.scss +0 -46
- package/components/_form.scss +0 -24
- package/components/_header.scss +0 -54
- package/components/_icon.scss +0 -25
- package/components/_input.scss +0 -0
- package/components/_inputNumber.scss +0 -22
- package/components/_link.scss +0 -44
- package/components/_loader.scss +0 -43
- package/components/_menu.scss +0 -112
- package/components/_pageTitle.scss +0 -8
- package/components/_permissionLegend.scss +0 -18
- package/components/_select.scss +0 -29
- package/components/_sidebar.scss +0 -56
- package/components/_switch.scss +0 -14
- package/components/_table.scss +0 -20
- package/components/_tooltip.scss +0 -4
- package/components/_typography.scss +0 -162
- package/components/_upload.scss +0 -15
- package/components/_wysiwyg.scss +0 -7
- package/components/_wysiwyg2.scss +0 -142
- package/modules/_AuthModule.scss +0 -212
- package/modules/_AuthVariables.scss +0 -7
- package/modules/_modal.scss +0 -24
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="vel-icon">
|
|
3
|
+
<VSvg v-bind="$props" />
|
|
4
|
+
</div>
|
|
5
|
+
</template>
|
|
6
|
+
|
|
7
|
+
<script>
|
|
8
|
+
import VSvg from "./Svg.vue";
|
|
9
|
+
|
|
10
|
+
export default {
|
|
11
|
+
props: {
|
|
12
|
+
name: {
|
|
13
|
+
type: String,
|
|
14
|
+
required: true,
|
|
15
|
+
},
|
|
16
|
+
embed: {
|
|
17
|
+
type: Boolean,
|
|
18
|
+
default: false,
|
|
19
|
+
},
|
|
20
|
+
asis: {
|
|
21
|
+
type: Boolean,
|
|
22
|
+
default: false,
|
|
23
|
+
},
|
|
24
|
+
artboard: {
|
|
25
|
+
type: Boolean,
|
|
26
|
+
default: false,
|
|
27
|
+
},
|
|
28
|
+
},
|
|
29
|
+
components: {
|
|
30
|
+
VSvg,
|
|
31
|
+
},
|
|
32
|
+
};
|
|
33
|
+
</script>
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div v-if="embed">
|
|
3
|
+
<component v-if="embed" :is="icon" class="vel-svg" />
|
|
4
|
+
</div>
|
|
5
|
+
<svg v-else class="vel-svg">
|
|
6
|
+
<use :xlink:href="'#' + name" />
|
|
7
|
+
</svg>
|
|
8
|
+
</template>
|
|
9
|
+
|
|
10
|
+
<script>
|
|
11
|
+
import { defineAsyncComponent } from "vue";
|
|
12
|
+
export default {
|
|
13
|
+
props: {
|
|
14
|
+
name: {
|
|
15
|
+
type: String,
|
|
16
|
+
required: true,
|
|
17
|
+
},
|
|
18
|
+
embed: {
|
|
19
|
+
type: Boolean,
|
|
20
|
+
default: false,
|
|
21
|
+
},
|
|
22
|
+
asis: {
|
|
23
|
+
type: Boolean,
|
|
24
|
+
default: false,
|
|
25
|
+
},
|
|
26
|
+
},
|
|
27
|
+
data() {
|
|
28
|
+
return {
|
|
29
|
+
icons: import.meta.glob(
|
|
30
|
+
`../../handlebars/generated/embed/**/*.svg`,
|
|
31
|
+
{ query: "?component" },
|
|
32
|
+
),
|
|
33
|
+
};
|
|
34
|
+
},
|
|
35
|
+
computed: {
|
|
36
|
+
icon() {
|
|
37
|
+
return defineAsyncComponent(() =>
|
|
38
|
+
this.icons[
|
|
39
|
+
`../../handlebars/generated/embed/svg${this.asis ? "--asis" : ""}--${this.name}.svg`
|
|
40
|
+
](),
|
|
41
|
+
);
|
|
42
|
+
},
|
|
43
|
+
},
|
|
44
|
+
};
|
|
45
|
+
</script>
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<el-button
|
|
3
|
+
:class="[`vel-button ${baseClass}__button`]"
|
|
4
|
+
:name="name"
|
|
5
|
+
:id="name"
|
|
6
|
+
:disabled="disabled"
|
|
7
|
+
:round="round"
|
|
8
|
+
:circle="circle"
|
|
9
|
+
:size="size"
|
|
10
|
+
:text="text"
|
|
11
|
+
:tag="tag"
|
|
12
|
+
:autofocus="autofocus"
|
|
13
|
+
:native-type="nativeType"
|
|
14
|
+
:type="type"
|
|
15
|
+
:link="link"
|
|
16
|
+
:plain="plain"
|
|
17
|
+
:loading="loading"
|
|
18
|
+
:customIcon="customIcon"
|
|
19
|
+
:href="href"
|
|
20
|
+
:target="target"
|
|
21
|
+
>
|
|
22
|
+
<slot />
|
|
23
|
+
</el-button>
|
|
24
|
+
</template>
|
|
25
|
+
|
|
26
|
+
<script>
|
|
27
|
+
import { ElButton } from "element-plus";
|
|
28
|
+
|
|
29
|
+
export default {
|
|
30
|
+
props: {
|
|
31
|
+
baseClass: {
|
|
32
|
+
type: String,
|
|
33
|
+
default: "vel-button",
|
|
34
|
+
},
|
|
35
|
+
type: {
|
|
36
|
+
type: String,
|
|
37
|
+
default: null,
|
|
38
|
+
},
|
|
39
|
+
name: {
|
|
40
|
+
type: String,
|
|
41
|
+
default: null,
|
|
42
|
+
},
|
|
43
|
+
nativeType: {
|
|
44
|
+
type: String,
|
|
45
|
+
default: "button",
|
|
46
|
+
},
|
|
47
|
+
size: {
|
|
48
|
+
type: String,
|
|
49
|
+
default: "default",
|
|
50
|
+
},
|
|
51
|
+
round: {
|
|
52
|
+
type: Boolean,
|
|
53
|
+
default: false,
|
|
54
|
+
},
|
|
55
|
+
circle: {
|
|
56
|
+
type: Boolean,
|
|
57
|
+
default: false,
|
|
58
|
+
},
|
|
59
|
+
disabled: {
|
|
60
|
+
type: Boolean,
|
|
61
|
+
default: false,
|
|
62
|
+
},
|
|
63
|
+
autofocus: {
|
|
64
|
+
type: Boolean,
|
|
65
|
+
default: false,
|
|
66
|
+
},
|
|
67
|
+
text: {
|
|
68
|
+
type: Boolean,
|
|
69
|
+
default: false,
|
|
70
|
+
},
|
|
71
|
+
link: {
|
|
72
|
+
type: Boolean,
|
|
73
|
+
default: false,
|
|
74
|
+
},
|
|
75
|
+
plain: {
|
|
76
|
+
type: Boolean,
|
|
77
|
+
default: false,
|
|
78
|
+
},
|
|
79
|
+
tag: {
|
|
80
|
+
type: String,
|
|
81
|
+
default: "button",
|
|
82
|
+
},
|
|
83
|
+
loading: {
|
|
84
|
+
type: Boolean,
|
|
85
|
+
default: false,
|
|
86
|
+
},
|
|
87
|
+
customIcon: {
|
|
88
|
+
type: String,
|
|
89
|
+
default: null,
|
|
90
|
+
},
|
|
91
|
+
iconClasses: {
|
|
92
|
+
type: String,
|
|
93
|
+
default: "",
|
|
94
|
+
},
|
|
95
|
+
href: {
|
|
96
|
+
type: String,
|
|
97
|
+
default: null,
|
|
98
|
+
},
|
|
99
|
+
target: {
|
|
100
|
+
type: String,
|
|
101
|
+
default: null,
|
|
102
|
+
},
|
|
103
|
+
},
|
|
104
|
+
|
|
105
|
+
components: {
|
|
106
|
+
ElButton,
|
|
107
|
+
},
|
|
108
|
+
};
|
|
109
|
+
</script>
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<el-link
|
|
3
|
+
:class="[
|
|
4
|
+
`link ${baseClass} vel-link--${size} ${underline ? 'vel-link--underline' : ''}`,
|
|
5
|
+
]"
|
|
6
|
+
:name="name"
|
|
7
|
+
:underline="underline"
|
|
8
|
+
:id="name"
|
|
9
|
+
:disabled="disabled"
|
|
10
|
+
:href="href"
|
|
11
|
+
:target="target"
|
|
12
|
+
>
|
|
13
|
+
<slot />
|
|
14
|
+
</el-link>
|
|
15
|
+
</template>
|
|
16
|
+
|
|
17
|
+
<script>
|
|
18
|
+
import { ElLink } from "element-plus";
|
|
19
|
+
|
|
20
|
+
export default {
|
|
21
|
+
props: {
|
|
22
|
+
baseClass: {
|
|
23
|
+
type: String,
|
|
24
|
+
default: "vel-link",
|
|
25
|
+
},
|
|
26
|
+
type: {
|
|
27
|
+
type: String,
|
|
28
|
+
default: null,
|
|
29
|
+
},
|
|
30
|
+
underline: {
|
|
31
|
+
type: Boolean,
|
|
32
|
+
default: true,
|
|
33
|
+
},
|
|
34
|
+
href: {
|
|
35
|
+
type: String,
|
|
36
|
+
default: null,
|
|
37
|
+
},
|
|
38
|
+
target: {
|
|
39
|
+
type: String,
|
|
40
|
+
default: null,
|
|
41
|
+
},
|
|
42
|
+
size: {
|
|
43
|
+
type: String,
|
|
44
|
+
default: "default",
|
|
45
|
+
},
|
|
46
|
+
name: {
|
|
47
|
+
type: String,
|
|
48
|
+
default: null,
|
|
49
|
+
},
|
|
50
|
+
disabled: {
|
|
51
|
+
type: Boolean,
|
|
52
|
+
default: false,
|
|
53
|
+
},
|
|
54
|
+
autofocus: {
|
|
55
|
+
type: Boolean,
|
|
56
|
+
default: false,
|
|
57
|
+
},
|
|
58
|
+
},
|
|
59
|
+
|
|
60
|
+
components: {
|
|
61
|
+
ElLink,
|
|
62
|
+
},
|
|
63
|
+
};
|
|
64
|
+
</script>
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<XInput v-bind="$props">
|
|
3
|
+
<template #label>
|
|
4
|
+
<slot name="label" />
|
|
5
|
+
</template>
|
|
6
|
+
<el-cascader
|
|
7
|
+
class="block"
|
|
8
|
+
v-model="content"
|
|
9
|
+
:options="options"
|
|
10
|
+
:placeholder="placeholder"
|
|
11
|
+
:clearable="clearable"
|
|
12
|
+
:show-all-levels="showAllLevels"
|
|
13
|
+
:props="{
|
|
14
|
+
multiple: multiple,
|
|
15
|
+
checkStrictly: checkStrictly,
|
|
16
|
+
}"
|
|
17
|
+
/>
|
|
18
|
+
</XInput>
|
|
19
|
+
</template>
|
|
20
|
+
|
|
21
|
+
<script>
|
|
22
|
+
import { ElCascader } from "element-plus";
|
|
23
|
+
import input from "./input.js";
|
|
24
|
+
import XInput from "./input.vue";
|
|
25
|
+
|
|
26
|
+
export default {
|
|
27
|
+
mixins: [input],
|
|
28
|
+
props: {
|
|
29
|
+
baseClass: {
|
|
30
|
+
type: String,
|
|
31
|
+
default: "vel-cascader",
|
|
32
|
+
},
|
|
33
|
+
multiple: {
|
|
34
|
+
type: Boolean,
|
|
35
|
+
default: false,
|
|
36
|
+
},
|
|
37
|
+
checkStrictly: {
|
|
38
|
+
type: Boolean,
|
|
39
|
+
default: false,
|
|
40
|
+
},
|
|
41
|
+
clearable: {
|
|
42
|
+
type: Boolean,
|
|
43
|
+
default: false,
|
|
44
|
+
},
|
|
45
|
+
showAllLevels: {
|
|
46
|
+
type: Boolean,
|
|
47
|
+
default: false,
|
|
48
|
+
},
|
|
49
|
+
options: {
|
|
50
|
+
type: Array,
|
|
51
|
+
default: [],
|
|
52
|
+
},
|
|
53
|
+
...input.props,
|
|
54
|
+
},
|
|
55
|
+
components: {
|
|
56
|
+
XInput,
|
|
57
|
+
ElCascader,
|
|
58
|
+
},
|
|
59
|
+
|
|
60
|
+
emits: ["change", "clear", "blur"],
|
|
61
|
+
methods: {
|
|
62
|
+
castValue(value) {
|
|
63
|
+
if (
|
|
64
|
+
!_.isNull(value) &&
|
|
65
|
+
typeof value === "string" &&
|
|
66
|
+
!isNaN(Number(value))
|
|
67
|
+
) {
|
|
68
|
+
return parseInt(value);
|
|
69
|
+
}
|
|
70
|
+
return value;
|
|
71
|
+
},
|
|
72
|
+
handleInput(value, $event) {
|
|
73
|
+
this.$emit("change", value);
|
|
74
|
+
},
|
|
75
|
+
},
|
|
76
|
+
|
|
77
|
+
data() {
|
|
78
|
+
return {
|
|
79
|
+
pr: {
|
|
80
|
+
multiple: true,
|
|
81
|
+
},
|
|
82
|
+
};
|
|
83
|
+
},
|
|
84
|
+
};
|
|
85
|
+
</script>
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<XInput v-bind="$props">
|
|
3
|
+
<el-checkbox
|
|
4
|
+
:class="[`${baseClass}__checkbox`]"
|
|
5
|
+
:id="name"
|
|
6
|
+
:disabled="disabled"
|
|
7
|
+
v-model="content"
|
|
8
|
+
:required="required"
|
|
9
|
+
@change="handleInput"
|
|
10
|
+
>
|
|
11
|
+
</el-checkbox>
|
|
12
|
+
</XInput>
|
|
13
|
+
</template>
|
|
14
|
+
|
|
15
|
+
<script>
|
|
16
|
+
import { ElCheckbox } from "element-plus";
|
|
17
|
+
import input from "./input.js";
|
|
18
|
+
import XInput from "./input.vue";
|
|
19
|
+
|
|
20
|
+
export default {
|
|
21
|
+
mixins: [input],
|
|
22
|
+
props: {
|
|
23
|
+
...input.props,
|
|
24
|
+
modelValue: {
|
|
25
|
+
type: Boolean,
|
|
26
|
+
default: null,
|
|
27
|
+
},
|
|
28
|
+
baseClass: {
|
|
29
|
+
type: String,
|
|
30
|
+
default: "vel-checkbox",
|
|
31
|
+
},
|
|
32
|
+
},
|
|
33
|
+
|
|
34
|
+
components: {
|
|
35
|
+
XInput,
|
|
36
|
+
ElCheckbox,
|
|
37
|
+
},
|
|
38
|
+
};
|
|
39
|
+
</script>
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<XInput v-bind="$props">
|
|
3
|
+
<el-checkbox-group
|
|
4
|
+
:class="[`${baseClass}__wrapper`]"
|
|
5
|
+
:id="name"
|
|
6
|
+
:disabled="disabled"
|
|
7
|
+
:size="size"
|
|
8
|
+
:min="min"
|
|
9
|
+
:max="max"
|
|
10
|
+
v-model="content"
|
|
11
|
+
:required="required"
|
|
12
|
+
@change="handleInput"
|
|
13
|
+
:checkboxButton="checkboxButton"
|
|
14
|
+
>
|
|
15
|
+
<el-checkbox
|
|
16
|
+
v-if="!checkboxButton"
|
|
17
|
+
:key="index"
|
|
18
|
+
v-for="({ label, value, disabled }, index) in options"
|
|
19
|
+
:label="label"
|
|
20
|
+
:value="value"
|
|
21
|
+
:disabled="disabled"
|
|
22
|
+
>
|
|
23
|
+
<slot name="label" :label="label" :value="value">
|
|
24
|
+
<span v-html="label"></span>
|
|
25
|
+
</slot>
|
|
26
|
+
</el-checkbox>
|
|
27
|
+
<el-checkbox-button
|
|
28
|
+
v-else
|
|
29
|
+
:key="indexB"
|
|
30
|
+
v-for="({ label, value, disabled }, indexB) in options"
|
|
31
|
+
:label="label"
|
|
32
|
+
:value="value"
|
|
33
|
+
:disabled="disabled"
|
|
34
|
+
>
|
|
35
|
+
<slot name="label" :label="label" :value="value">
|
|
36
|
+
<span v-html="label"></span>
|
|
37
|
+
</slot>
|
|
38
|
+
</el-checkbox-button>
|
|
39
|
+
</el-checkbox-group>
|
|
40
|
+
</XInput>
|
|
41
|
+
</template>
|
|
42
|
+
|
|
43
|
+
<script>
|
|
44
|
+
import { ElCheckbox } from "element-plus";
|
|
45
|
+
import { ElCheckboxButton } from "element-plus";
|
|
46
|
+
import { ElCheckboxGroup } from "element-plus";
|
|
47
|
+
import input from "./input.js";
|
|
48
|
+
import XInput from "./input.vue";
|
|
49
|
+
|
|
50
|
+
export default {
|
|
51
|
+
mixins: [input],
|
|
52
|
+
props: {
|
|
53
|
+
...input.props,
|
|
54
|
+
modelValue: {
|
|
55
|
+
type: Array,
|
|
56
|
+
default: [],
|
|
57
|
+
},
|
|
58
|
+
baseClass: {
|
|
59
|
+
type: String,
|
|
60
|
+
default: "vel-checkbox-group",
|
|
61
|
+
},
|
|
62
|
+
checkboxButton: {
|
|
63
|
+
type: Boolean,
|
|
64
|
+
default: false,
|
|
65
|
+
},
|
|
66
|
+
size: {
|
|
67
|
+
type: String,
|
|
68
|
+
default: "default",
|
|
69
|
+
},
|
|
70
|
+
min: {
|
|
71
|
+
type: Number,
|
|
72
|
+
default: 0,
|
|
73
|
+
},
|
|
74
|
+
max: {
|
|
75
|
+
type: Number,
|
|
76
|
+
default: 100,
|
|
77
|
+
},
|
|
78
|
+
options: {
|
|
79
|
+
type: Array,
|
|
80
|
+
default: [],
|
|
81
|
+
},
|
|
82
|
+
},
|
|
83
|
+
|
|
84
|
+
components: {
|
|
85
|
+
XInput,
|
|
86
|
+
ElCheckbox,
|
|
87
|
+
ElCheckboxButton,
|
|
88
|
+
ElCheckboxGroup,
|
|
89
|
+
},
|
|
90
|
+
};
|
|
91
|
+
</script>
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<XInput v-bind="$props">
|
|
3
|
+
<template #label>
|
|
4
|
+
<slot name="label" />
|
|
5
|
+
</template>
|
|
6
|
+
|
|
7
|
+
<el-date-picker
|
|
8
|
+
v-bind="$attrs.props"
|
|
9
|
+
:type="type"
|
|
10
|
+
:disabled="disabled"
|
|
11
|
+
:disabled-date="disabledDate"
|
|
12
|
+
-
|
|
13
|
+
:placeholder="placeholder"
|
|
14
|
+
:shortcuts="shortcuts"
|
|
15
|
+
:size="size"
|
|
16
|
+
class="w-100 vel-datepicker"
|
|
17
|
+
v-model="content"
|
|
18
|
+
@change="handleInput"
|
|
19
|
+
:value-format="valueFormat"
|
|
20
|
+
:date-format="dateFormat"
|
|
21
|
+
:time-format="timeFormat"
|
|
22
|
+
:format="format"
|
|
23
|
+
:popper-class="popperClass"
|
|
24
|
+
:prefix-icon="prefixIcon"
|
|
25
|
+
/>
|
|
26
|
+
</XInput>
|
|
27
|
+
</template>
|
|
28
|
+
<script>
|
|
29
|
+
import dayjs from "dayjs";
|
|
30
|
+
import { ElDatePicker } from "element-plus";
|
|
31
|
+
|
|
32
|
+
import input from "./input.js";
|
|
33
|
+
import XInput from "./input.vue";
|
|
34
|
+
|
|
35
|
+
export default {
|
|
36
|
+
mixins: [input],
|
|
37
|
+
props: {
|
|
38
|
+
...input.props,
|
|
39
|
+
type: {
|
|
40
|
+
type: String,
|
|
41
|
+
validator: (value) =>
|
|
42
|
+
[
|
|
43
|
+
"date",
|
|
44
|
+
"year",
|
|
45
|
+
"years",
|
|
46
|
+
"month",
|
|
47
|
+
"months",
|
|
48
|
+
"date",
|
|
49
|
+
"dates",
|
|
50
|
+
"datetime",
|
|
51
|
+
"week",
|
|
52
|
+
"datetimerange",
|
|
53
|
+
"daterange",
|
|
54
|
+
"monthrange",
|
|
55
|
+
"yearrange",
|
|
56
|
+
].includes(value),
|
|
57
|
+
default: "date",
|
|
58
|
+
},
|
|
59
|
+
format: {
|
|
60
|
+
type: String,
|
|
61
|
+
},
|
|
62
|
+
valueFormat: {
|
|
63
|
+
type: String,
|
|
64
|
+
},
|
|
65
|
+
dateFormat: {
|
|
66
|
+
type: String,
|
|
67
|
+
},
|
|
68
|
+
timeFormat: {
|
|
69
|
+
type: String,
|
|
70
|
+
},
|
|
71
|
+
baseClass: {
|
|
72
|
+
type: String,
|
|
73
|
+
default: "vel-datepicker",
|
|
74
|
+
},
|
|
75
|
+
minDate: {
|
|
76
|
+
type: [Date, String],
|
|
77
|
+
},
|
|
78
|
+
maxDate: {
|
|
79
|
+
type: [Date, String],
|
|
80
|
+
},
|
|
81
|
+
shortcuts: {
|
|
82
|
+
type: Array,
|
|
83
|
+
default: [],
|
|
84
|
+
},
|
|
85
|
+
size: {
|
|
86
|
+
type: String,
|
|
87
|
+
default: "default",
|
|
88
|
+
},
|
|
89
|
+
popperClass: {
|
|
90
|
+
type: String,
|
|
91
|
+
default: "vel-popper",
|
|
92
|
+
},
|
|
93
|
+
prefixIcon: {
|
|
94
|
+
type: String,
|
|
95
|
+
},
|
|
96
|
+
},
|
|
97
|
+
components: {
|
|
98
|
+
XInput,
|
|
99
|
+
ElDatePicker,
|
|
100
|
+
},
|
|
101
|
+
|
|
102
|
+
methods: {
|
|
103
|
+
disabledDate(date) {
|
|
104
|
+
if (this.minDate && dayjs(date).isBefore(this.minDate)) {
|
|
105
|
+
return true;
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
if (this.maxDate && dayjs(date).isAfter(this.maxDate)) {
|
|
109
|
+
return true;
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
return false;
|
|
113
|
+
},
|
|
114
|
+
},
|
|
115
|
+
};
|
|
116
|
+
</script>
|
|
@@ -0,0 +1,89 @@
|
|
|
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
|
+
<template #prefix>
|
|
26
|
+
<slot name="prefix" />
|
|
27
|
+
</template>
|
|
28
|
+
<template #suffix>
|
|
29
|
+
<slot name="suffix" />
|
|
30
|
+
</template>
|
|
31
|
+
<template #decrease-icon>
|
|
32
|
+
<slot name="decrease-icon" />
|
|
33
|
+
</template>
|
|
34
|
+
<template #increase-icon>
|
|
35
|
+
<slot name="increase-icon" />
|
|
36
|
+
</template>
|
|
37
|
+
</el-input-number>
|
|
38
|
+
</XInput>
|
|
39
|
+
</template>
|
|
40
|
+
|
|
41
|
+
<script>
|
|
42
|
+
import { ElInputNumber } from "element-plus";
|
|
43
|
+
import input from "./input.js";
|
|
44
|
+
import XInput from "./input.vue";
|
|
45
|
+
|
|
46
|
+
export default {
|
|
47
|
+
mixins: [input],
|
|
48
|
+
props: {
|
|
49
|
+
...input.props,
|
|
50
|
+
baseClass: {
|
|
51
|
+
type: String,
|
|
52
|
+
default: "vel-input-number",
|
|
53
|
+
},
|
|
54
|
+
min: {
|
|
55
|
+
type: Number,
|
|
56
|
+
default: -Infinity,
|
|
57
|
+
},
|
|
58
|
+
max: {
|
|
59
|
+
type: Number,
|
|
60
|
+
default: Infinity,
|
|
61
|
+
},
|
|
62
|
+
precision: {
|
|
63
|
+
type: Number,
|
|
64
|
+
default: null,
|
|
65
|
+
},
|
|
66
|
+
step: {
|
|
67
|
+
type: Number,
|
|
68
|
+
default: 1,
|
|
69
|
+
},
|
|
70
|
+
stepStrictly: {
|
|
71
|
+
type: Boolean,
|
|
72
|
+
default: true,
|
|
73
|
+
},
|
|
74
|
+
size: {
|
|
75
|
+
type: String,
|
|
76
|
+
default: "default",
|
|
77
|
+
},
|
|
78
|
+
controls: {
|
|
79
|
+
type: Boolean,
|
|
80
|
+
default: true,
|
|
81
|
+
},
|
|
82
|
+
},
|
|
83
|
+
|
|
84
|
+
components: {
|
|
85
|
+
XInput,
|
|
86
|
+
ElInputNumber,
|
|
87
|
+
},
|
|
88
|
+
};
|
|
89
|
+
</script>
|