@fishawack/lab-velocity 1.11.1 → 2.0.0-beta.1
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/README.md +13 -7
- package/_base.scss +1 -1
- package/_defaults.scss +2 -3
- package/_variables.scss +16 -18
- package/components/_alert.scss +2 -2
- package/components/_basic.scss +5 -4
- package/components/_breadcrumbs.scss +7 -8
- package/components/_button.scss +11 -12
- package/components/_cascader.scss +1 -1
- package/components/_checkbox.scss +27 -26
- package/components/_chip.scss +24 -0
- package/components/_collapse.scss +2 -3
- package/components/_datepicker.scss +7 -6
- package/components/_footer.scss +1 -1
- package/components/_form.scss +6 -4
- package/components/_header.scss +4 -5
- package/components/_icon.scss +4 -3
- package/components/_inputNumber.scss +4 -3
- package/components/_link.scss +7 -7
- package/components/_loader.scss +3 -4
- package/components/_menu.scss +22 -22
- package/components/_pageTitle.scss +3 -3
- package/components/_permissionLegend.scss +18 -0
- package/components/_select.scss +3 -2
- package/components/_sidebar.scss +5 -6
- package/components/_switch.scss +2 -2
- package/components/_table.scss +3 -3
- package/components/_tooltip.scss +2 -2
- package/components/_typography.scss +71 -62
- package/components/_upload.scss +1 -1
- package/components/_wysiwyg.scss +3 -2
- package/components/_wysiwyg2.scss +37 -31
- package/general.scss +1 -2
- package/index.js +38 -30
- package/modules/_AuthModule.scss +32 -29
- package/modules/_AuthVariables.scss +3 -3
- package/modules/_modal.scss +3 -3
- package/package.json +109 -102
- package/vendor.scss +2 -2
- package/AuthModule/components/AuthModal.vue +0 -110
- package/AuthModule/components/VPasswordValidation.vue +0 -66
- package/AuthModule/js/AuthAxios.js +0 -59
- package/AuthModule/js/AuthRoutes.js +0 -186
- package/AuthModule/js/AuthStore.js +0 -99
- package/AuthModule/js/FakeAPI.js +0 -84
- package/AuthModule/routes/account-exists.vue +0 -35
- package/AuthModule/routes/change-password.vue +0 -162
- package/AuthModule/routes/container.vue +0 -38
- package/AuthModule/routes/expired-reset.vue +0 -76
- package/AuthModule/routes/expired-verification.vue +0 -100
- package/AuthModule/routes/force-reset.vue +0 -142
- package/AuthModule/routes/forgot.vue +0 -87
- package/AuthModule/routes/login.vue +0 -138
- package/AuthModule/routes/logincallback.vue +0 -46
- package/AuthModule/routes/loginheadless.vue +0 -16
- package/AuthModule/routes/loginsso.vue +0 -127
- package/AuthModule/routes/logout.vue +0 -21
- package/AuthModule/routes/register.vue +0 -156
- package/AuthModule/routes/reset.vue +0 -123
- package/AuthModule/routes/success-forgot.vue +0 -117
- package/AuthModule/routes/success-reset.vue +0 -35
- package/AuthModule/routes/success-verify.vue +0 -29
- package/AuthModule/routes/verify.vue +0 -110
- package/Icon.vue +0 -33
- package/Svg.vue +0 -40
- package/basic/Button.vue +0 -111
- package/basic/link.vue +0 -63
- package/form/Cascader.vue +0 -85
- package/form/Checkbox.vue +0 -39
- package/form/CheckboxGroup.vue +0 -69
- package/form/DatePicker.vue +0 -100
- package/form/InputNumber.vue +0 -90
- package/form/Select.vue +0 -110
- package/form/Switch.vue +0 -63
- package/form/Upload.vue +0 -103
- package/form/Wysiwyg.vue +0 -127
- package/form/Wysiwyg2.vue +0 -278
- package/form/basic.vue +0 -88
- package/form/color.vue +0 -22
- package/form/file.vue +0 -89
- package/form/input.js +0 -79
- package/form/input.vue +0 -85
- package/layout/Alert.vue +0 -38
- package/layout/Footer.vue +0 -35
- package/layout/Header.vue +0 -15
- package/layout/Loader.vue +0 -39
- package/layout/Tooltip.vue +0 -46
- package/layout/pageTitle.vue +0 -18
- package/layout/sideBar.vue +0 -27
- package/navigation/Breadcrumbs.vue +0 -32
- package/navigation/BreadcrumbsItem.vue +0 -19
- package/navigation/Menu.vue +0 -16
- package/navigation/MenuItem.vue +0 -20
- package/navigation/MenuItemGroup.vue +0 -20
- package/navigation/SubMenu.vue +0 -20
package/basic/Button.vue
DELETED
|
@@ -1,111 +0,0 @@
|
|
|
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
|
-
|
|
23
|
-
<slot />
|
|
24
|
-
|
|
25
|
-
</el-button>
|
|
26
|
-
</template>
|
|
27
|
-
|
|
28
|
-
<script>
|
|
29
|
-
import { ElButton } from "element-plus";
|
|
30
|
-
|
|
31
|
-
export default {
|
|
32
|
-
props: {
|
|
33
|
-
baseClass: {
|
|
34
|
-
type: String,
|
|
35
|
-
default: "vel-button",
|
|
36
|
-
},
|
|
37
|
-
type: {
|
|
38
|
-
type: String,
|
|
39
|
-
default: null,
|
|
40
|
-
},
|
|
41
|
-
name: {
|
|
42
|
-
type: String,
|
|
43
|
-
default: null,
|
|
44
|
-
},
|
|
45
|
-
nativeType: {
|
|
46
|
-
type: String,
|
|
47
|
-
default: "button",
|
|
48
|
-
},
|
|
49
|
-
size: {
|
|
50
|
-
type: String,
|
|
51
|
-
default: "default",
|
|
52
|
-
},
|
|
53
|
-
round: {
|
|
54
|
-
type: Boolean,
|
|
55
|
-
default: false,
|
|
56
|
-
},
|
|
57
|
-
circle: {
|
|
58
|
-
type: Boolean,
|
|
59
|
-
default: false,
|
|
60
|
-
},
|
|
61
|
-
disabled: {
|
|
62
|
-
type: Boolean,
|
|
63
|
-
default: false,
|
|
64
|
-
},
|
|
65
|
-
autofocus: {
|
|
66
|
-
type: Boolean,
|
|
67
|
-
default: false,
|
|
68
|
-
},
|
|
69
|
-
text: {
|
|
70
|
-
type: Boolean,
|
|
71
|
-
default: false,
|
|
72
|
-
},
|
|
73
|
-
link: {
|
|
74
|
-
type: Boolean,
|
|
75
|
-
default: false,
|
|
76
|
-
},
|
|
77
|
-
plain: {
|
|
78
|
-
type: Boolean,
|
|
79
|
-
default: false,
|
|
80
|
-
},
|
|
81
|
-
tag: {
|
|
82
|
-
type: String,
|
|
83
|
-
default: "button",
|
|
84
|
-
},
|
|
85
|
-
loading: {
|
|
86
|
-
type: Boolean,
|
|
87
|
-
default: false,
|
|
88
|
-
},
|
|
89
|
-
customIcon: {
|
|
90
|
-
type: String,
|
|
91
|
-
default: null,
|
|
92
|
-
},
|
|
93
|
-
iconClasses: {
|
|
94
|
-
type: String,
|
|
95
|
-
default: "",
|
|
96
|
-
},
|
|
97
|
-
href: {
|
|
98
|
-
type: String,
|
|
99
|
-
default: null,
|
|
100
|
-
},
|
|
101
|
-
target: {
|
|
102
|
-
type: String,
|
|
103
|
-
default: null,
|
|
104
|
-
},
|
|
105
|
-
},
|
|
106
|
-
|
|
107
|
-
components: {
|
|
108
|
-
ElButton
|
|
109
|
-
},
|
|
110
|
-
};
|
|
111
|
-
</script>
|
package/basic/link.vue
DELETED
|
@@ -1,63 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<el-link
|
|
3
|
-
:class="[`link ${baseClass} vel-link--${size} ${ underline ? 'vel-link--underline' : ''}`]"
|
|
4
|
-
:name="name"
|
|
5
|
-
:underline="underline"
|
|
6
|
-
:id="name"
|
|
7
|
-
:disabled="disabled"
|
|
8
|
-
:href="href"
|
|
9
|
-
:target="target"
|
|
10
|
-
>
|
|
11
|
-
<slot />
|
|
12
|
-
|
|
13
|
-
</el-link>
|
|
14
|
-
</template>
|
|
15
|
-
|
|
16
|
-
<script>
|
|
17
|
-
import { ElLink } from "element-plus";
|
|
18
|
-
|
|
19
|
-
export default {
|
|
20
|
-
props: {
|
|
21
|
-
baseClass: {
|
|
22
|
-
type: String,
|
|
23
|
-
default: "vel-link",
|
|
24
|
-
},
|
|
25
|
-
type: {
|
|
26
|
-
type: String,
|
|
27
|
-
default: null,
|
|
28
|
-
},
|
|
29
|
-
underline: {
|
|
30
|
-
type: Boolean,
|
|
31
|
-
default: true
|
|
32
|
-
},
|
|
33
|
-
href: {
|
|
34
|
-
type: String,
|
|
35
|
-
default: null,
|
|
36
|
-
},
|
|
37
|
-
target: {
|
|
38
|
-
type: String,
|
|
39
|
-
default: null,
|
|
40
|
-
},
|
|
41
|
-
size: {
|
|
42
|
-
type: String,
|
|
43
|
-
default: "default",
|
|
44
|
-
},
|
|
45
|
-
name: {
|
|
46
|
-
type: String,
|
|
47
|
-
default: null,
|
|
48
|
-
},
|
|
49
|
-
disabled: {
|
|
50
|
-
type: Boolean,
|
|
51
|
-
default: false,
|
|
52
|
-
},
|
|
53
|
-
autofocus: {
|
|
54
|
-
type: Boolean,
|
|
55
|
-
default: false,
|
|
56
|
-
},
|
|
57
|
-
},
|
|
58
|
-
|
|
59
|
-
components: {
|
|
60
|
-
ElLink,
|
|
61
|
-
},
|
|
62
|
-
};
|
|
63
|
-
</script>
|
package/form/Cascader.vue
DELETED
|
@@ -1,85 +0,0 @@
|
|
|
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>
|
package/form/Checkbox.vue
DELETED
|
@@ -1,39 +0,0 @@
|
|
|
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>
|
package/form/CheckboxGroup.vue
DELETED
|
@@ -1,69 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<XInput v-bind="$props">
|
|
3
|
-
<el-checkbox-group :class="[`${baseClass}__wrapper`]" :id="name" :disabled="disabled" :size="size" :min="min"
|
|
4
|
-
:max="max" v-model="content" :required="required" @change="handleInput" :checkboxButton="checkboxButton">
|
|
5
|
-
<el-checkbox v-if="!checkboxButton" :key="index" v-for="({ label, value, disabled }, index) in options"
|
|
6
|
-
:label="label" :value="value" :disabled="disabled">
|
|
7
|
-
<slot name="label" :label="label" :value="value">
|
|
8
|
-
<span v-html="label"></span>
|
|
9
|
-
</slot>
|
|
10
|
-
</el-checkbox>
|
|
11
|
-
<el-checkbox-button v-else :key="indexB" v-for="({ label, value, disabled }, indexB) in options"
|
|
12
|
-
:label="label" :value="value" :disabled="disabled">
|
|
13
|
-
<slot name="label" :label="label" :value="value">
|
|
14
|
-
<span v-html="label"></span>
|
|
15
|
-
</slot>
|
|
16
|
-
</el-checkbox-button>
|
|
17
|
-
</el-checkbox-group>
|
|
18
|
-
</XInput>
|
|
19
|
-
</template>
|
|
20
|
-
|
|
21
|
-
<script>
|
|
22
|
-
import { ElCheckbox } from "element-plus";
|
|
23
|
-
import { ElCheckboxButton } from "element-plus";
|
|
24
|
-
import { ElCheckboxGroup } from "element-plus";
|
|
25
|
-
import input from "./input.js";
|
|
26
|
-
import XInput from "./input.vue";
|
|
27
|
-
|
|
28
|
-
export default {
|
|
29
|
-
mixins: [input],
|
|
30
|
-
props: {
|
|
31
|
-
...input.props,
|
|
32
|
-
modelValue: {
|
|
33
|
-
type: Array,
|
|
34
|
-
default: [],
|
|
35
|
-
},
|
|
36
|
-
baseClass: {
|
|
37
|
-
type: String,
|
|
38
|
-
default: "vel-checkbox-group",
|
|
39
|
-
},
|
|
40
|
-
checkboxButton: {
|
|
41
|
-
type: Boolean,
|
|
42
|
-
default: false,
|
|
43
|
-
},
|
|
44
|
-
size: {
|
|
45
|
-
type: String,
|
|
46
|
-
default: "default",
|
|
47
|
-
},
|
|
48
|
-
min: {
|
|
49
|
-
type: Number,
|
|
50
|
-
default: 0,
|
|
51
|
-
},
|
|
52
|
-
max: {
|
|
53
|
-
type: Number,
|
|
54
|
-
default: 100,
|
|
55
|
-
},
|
|
56
|
-
options: {
|
|
57
|
-
type: Array,
|
|
58
|
-
default: [],
|
|
59
|
-
},
|
|
60
|
-
},
|
|
61
|
-
|
|
62
|
-
components: {
|
|
63
|
-
XInput,
|
|
64
|
-
ElCheckbox,
|
|
65
|
-
ElCheckboxButton,
|
|
66
|
-
ElCheckboxGroup,
|
|
67
|
-
},
|
|
68
|
-
};
|
|
69
|
-
</script>
|
package/form/DatePicker.vue
DELETED
|
@@ -1,100 +0,0 @@
|
|
|
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
|
-
- :placeholder="placeholder"
|
|
13
|
-
:shortcuts="shortcuts"
|
|
14
|
-
:size="size"
|
|
15
|
-
class="w-100 vel-datepicker"
|
|
16
|
-
v-model="content"
|
|
17
|
-
@change="handleInput"
|
|
18
|
-
:value-format="valueFormat"
|
|
19
|
-
:date-format="dateFormat"
|
|
20
|
-
:time-format="timeFormat"
|
|
21
|
-
:format="format"
|
|
22
|
-
:popper-class="popperClass"
|
|
23
|
-
:prefix-icon="prefixIcon"
|
|
24
|
-
/>
|
|
25
|
-
</XInput>
|
|
26
|
-
</template>
|
|
27
|
-
<script>
|
|
28
|
-
import dayjs from "dayjs";
|
|
29
|
-
import { ElDatePicker } from "element-plus";
|
|
30
|
-
|
|
31
|
-
import input from "./input.js";
|
|
32
|
-
import XInput from "./input.vue";
|
|
33
|
-
|
|
34
|
-
export default {
|
|
35
|
-
mixins: [input],
|
|
36
|
-
props: {
|
|
37
|
-
...input.props,
|
|
38
|
-
type: {
|
|
39
|
-
type: String,
|
|
40
|
-
validator: (value) => ['date', 'year', 'years', 'month', 'months', 'date', 'dates', 'datetime', 'week', 'datetimerange', 'daterange', 'monthrange', 'yearrange'].includes(value),
|
|
41
|
-
default: "date",
|
|
42
|
-
},
|
|
43
|
-
format: {
|
|
44
|
-
type: String
|
|
45
|
-
},
|
|
46
|
-
valueFormat: {
|
|
47
|
-
type: String
|
|
48
|
-
},
|
|
49
|
-
dateFormat: {
|
|
50
|
-
type: String
|
|
51
|
-
},
|
|
52
|
-
timeFormat: {
|
|
53
|
-
type: String
|
|
54
|
-
},
|
|
55
|
-
baseClass: {
|
|
56
|
-
type: String,
|
|
57
|
-
default: "vel-datepicker",
|
|
58
|
-
},
|
|
59
|
-
minDate: {
|
|
60
|
-
type: [Date, String],
|
|
61
|
-
},
|
|
62
|
-
maxDate: {
|
|
63
|
-
type: [Date, String],
|
|
64
|
-
},
|
|
65
|
-
shortcuts: {
|
|
66
|
-
type: Array,
|
|
67
|
-
default: [],
|
|
68
|
-
},
|
|
69
|
-
size: {
|
|
70
|
-
type: String,
|
|
71
|
-
default: "default",
|
|
72
|
-
},
|
|
73
|
-
popperClass: {
|
|
74
|
-
type: String,
|
|
75
|
-
default: "vel-popper",
|
|
76
|
-
},
|
|
77
|
-
prefixIcon: {
|
|
78
|
-
type: String,
|
|
79
|
-
},
|
|
80
|
-
},
|
|
81
|
-
components: {
|
|
82
|
-
XInput,
|
|
83
|
-
ElDatePicker,
|
|
84
|
-
},
|
|
85
|
-
|
|
86
|
-
methods: {
|
|
87
|
-
disabledDate(date) {
|
|
88
|
-
if (this.minDate && dayjs(date).isBefore(this.minDate)) {
|
|
89
|
-
return true;
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
if (this.maxDate && dayjs(date).isAfter(this.maxDate)) {
|
|
93
|
-
return true;
|
|
94
|
-
}
|
|
95
|
-
|
|
96
|
-
return false;
|
|
97
|
-
},
|
|
98
|
-
},
|
|
99
|
-
};
|
|
100
|
-
</script>
|
package/form/InputNumber.vue
DELETED
|
@@ -1,90 +0,0 @@
|
|
|
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/Select.vue
DELETED
|
@@ -1,110 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<XInput v-bind="$props">
|
|
3
|
-
<template #label>
|
|
4
|
-
<slot name="label" />
|
|
5
|
-
</template>
|
|
6
|
-
|
|
7
|
-
<el-select
|
|
8
|
-
v-model="content"
|
|
9
|
-
:class="baseClass"
|
|
10
|
-
:multiple="multiple"
|
|
11
|
-
:placeholder="placeholder"
|
|
12
|
-
:disabled="disabled"
|
|
13
|
-
:clearable="clearable"
|
|
14
|
-
:collapse-tags="collapseTags"
|
|
15
|
-
:filterable="filterable"
|
|
16
|
-
:value-on-clear="null"
|
|
17
|
-
@change="handleInput"
|
|
18
|
-
@clear="this.$emit('clear')"
|
|
19
|
-
@blur="this.$emit('blur')"
|
|
20
|
-
:empty-values="[null, undefined]"
|
|
21
|
-
>
|
|
22
|
-
<template #default>
|
|
23
|
-
<slot name="default">
|
|
24
|
-
<el-option
|
|
25
|
-
v-if="!options[0]?.label"
|
|
26
|
-
v-for="(label, value) in options"
|
|
27
|
-
:key="value"
|
|
28
|
-
:label="label"
|
|
29
|
-
:value="castValue(value)"
|
|
30
|
-
>
|
|
31
|
-
</el-option>
|
|
32
|
-
<el-option
|
|
33
|
-
v-else
|
|
34
|
-
v-for="option in options"
|
|
35
|
-
:key="option.value"
|
|
36
|
-
:label="option.label"
|
|
37
|
-
:disabled="option.disabled"
|
|
38
|
-
:value="castValue(option.value)"
|
|
39
|
-
>
|
|
40
|
-
</el-option>
|
|
41
|
-
</slot>
|
|
42
|
-
</template>
|
|
43
|
-
</el-select>
|
|
44
|
-
</XInput>
|
|
45
|
-
</template>
|
|
46
|
-
|
|
47
|
-
<script>
|
|
48
|
-
import { ElSelect } from "element-plus";
|
|
49
|
-
import { ElOption } from "element-plus";
|
|
50
|
-
import input from "./input.js";
|
|
51
|
-
import XInput from "./input.vue";
|
|
52
|
-
import _ from 'lodash';
|
|
53
|
-
|
|
54
|
-
export default {
|
|
55
|
-
mixins: [input],
|
|
56
|
-
props: {
|
|
57
|
-
...input.props,
|
|
58
|
-
modelValue: {
|
|
59
|
-
type: Array,
|
|
60
|
-
default: [],
|
|
61
|
-
},
|
|
62
|
-
baseClass: {
|
|
63
|
-
type: String,
|
|
64
|
-
default: "vel-select",
|
|
65
|
-
},
|
|
66
|
-
clearable: {
|
|
67
|
-
type: Boolean,
|
|
68
|
-
default: false,
|
|
69
|
-
},
|
|
70
|
-
collapseTags: {
|
|
71
|
-
type: Boolean,
|
|
72
|
-
default: false,
|
|
73
|
-
},
|
|
74
|
-
filterable: {
|
|
75
|
-
type: Boolean,
|
|
76
|
-
default: false,
|
|
77
|
-
},
|
|
78
|
-
options: {
|
|
79
|
-
type: Array,
|
|
80
|
-
default: [],
|
|
81
|
-
},
|
|
82
|
-
multiple: {
|
|
83
|
-
type: Boolean,
|
|
84
|
-
default: false,
|
|
85
|
-
}
|
|
86
|
-
},
|
|
87
|
-
|
|
88
|
-
components: {
|
|
89
|
-
XInput,
|
|
90
|
-
ElOption,
|
|
91
|
-
ElSelect,
|
|
92
|
-
},
|
|
93
|
-
|
|
94
|
-
emits: ['change', 'clear', 'blur'],
|
|
95
|
-
methods: {
|
|
96
|
-
castValue(value) {
|
|
97
|
-
if (
|
|
98
|
-
!_.isNull(value) &&
|
|
99
|
-
typeof value === "string" &&
|
|
100
|
-
value !== "" &&
|
|
101
|
-
!isNaN(Number(value))
|
|
102
|
-
) {
|
|
103
|
-
return parseInt(value);
|
|
104
|
-
}
|
|
105
|
-
return value;
|
|
106
|
-
}
|
|
107
|
-
},
|
|
108
|
-
|
|
109
|
-
};
|
|
110
|
-
</script>
|