@fishawack/lab-velocity 1.11.1 → 2.0.0-beta.10
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 +177 -49
- package/_Build/vue/components/Icon.vue +33 -0
- package/_Build/vue/components/Svg.vue +45 -0
- package/{basic → _Build/vue/components/basic}/Button.vue +17 -19
- package/{basic → _Build/vue/components/basic}/link.vue +8 -7
- package/{form → _Build/vue/components/form}/Cascader.vue +13 -13
- package/{form → _Build/vue/components/form}/CheckboxGroup.vue +28 -6
- package/{form → _Build/vue/components/form}/DatePicker.vue +23 -7
- package/{form → _Build/vue/components/form}/InputNumber.vue +1 -2
- package/{form → _Build/vue/components/form}/Select.vue +10 -11
- package/_Build/vue/components/form/Spinner.vue +5 -0
- package/{form → _Build/vue/components/form}/Switch.vue +2 -2
- package/{form → _Build/vue/components/form}/Upload.vue +4 -6
- package/{form → _Build/vue/components/form}/Wysiwyg.vue +14 -14
- package/_Build/vue/components/form/Wysiwyg2.vue +577 -0
- package/{form → _Build/vue/components/form}/basic.vue +25 -7
- package/{form → _Build/vue/components/form}/file.vue +1 -1
- package/{form → _Build/vue/components/form}/input.js +2 -2
- package/{form → _Build/vue/components/form}/input.vue +31 -11
- package/{layout → _Build/vue/components/layout}/Alert.vue +10 -10
- package/_Build/vue/components/layout/Footer.vue +50 -0
- package/{layout → _Build/vue/components/layout}/Header.vue +5 -7
- package/_Build/vue/components/layout/Loader.vue +59 -0
- package/{layout → _Build/vue/components/layout}/Tooltip.vue +12 -12
- package/{layout → _Build/vue/components/layout}/pageTitle.vue +4 -4
- package/{layout → _Build/vue/components/layout}/sideBar.vue +4 -6
- package/{navigation → _Build/vue/components/navigation}/Breadcrumbs.vue +15 -10
- package/{navigation → _Build/vue/components/navigation}/BreadcrumbsItem.vue +6 -6
- 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 +259 -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 +181 -0
- package/_Build/vue/modules/AuthModule/adminRoutes/PCompanies/Children/show.vue +267 -0
- package/_Build/vue/modules/AuthModule/adminRoutes/PCompanies/parent.vue +36 -0
- package/_Build/vue/modules/AuthModule/adminRoutes/PUsers/Children/create.vue +113 -0
- package/_Build/vue/modules/AuthModule/adminRoutes/PUsers/Children/edit.vue +101 -0
- package/_Build/vue/modules/AuthModule/adminRoutes/PUsers/Children/index.vue +112 -0
- package/_Build/vue/modules/AuthModule/adminRoutes/PUsers/Children/partials/form.vue +174 -0
- package/_Build/vue/modules/AuthModule/adminRoutes/PUsers/Children/show.vue +123 -0
- package/_Build/vue/modules/AuthModule/adminRoutes/PUsers/parent.vue +36 -0
- package/{AuthModule → _Build/vue/modules/AuthModule}/components/AuthModal.vue +30 -35
- 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 +117 -0
- package/_Build/vue/modules/AuthModule/components/VBreadcrumbs.vue +33 -0
- package/_Build/vue/modules/AuthModule/components/VFormFooter.vue +52 -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 +136 -0
- package/_Build/vue/modules/AuthModule/components/VTableSorter.vue +252 -0
- package/_Build/vue/modules/AuthModule/js/FakeAPI.js +78 -0
- package/_Build/vue/modules/AuthModule/js/axios.js +81 -0
- package/_Build/vue/modules/AuthModule/js/router.js +295 -0
- package/_Build/vue/modules/AuthModule/js/store.js +62 -0
- package/{AuthModule → _Build/vue/modules/AuthModule}/routes/account-exists.vue +6 -8
- package/{AuthModule → _Build/vue/modules/AuthModule}/routes/change-password.vue +39 -38
- package/{AuthModule → _Build/vue/modules/AuthModule}/routes/container.vue +4 -8
- package/{AuthModule → _Build/vue/modules/AuthModule}/routes/expired-reset.vue +17 -15
- package/{AuthModule → _Build/vue/modules/AuthModule}/routes/expired-verification.vue +21 -20
- package/{AuthModule → _Build/vue/modules/AuthModule}/routes/force-reset.vue +45 -40
- package/{AuthModule → _Build/vue/modules/AuthModule}/routes/forgot.vue +15 -11
- package/{AuthModule → _Build/vue/modules/AuthModule}/routes/login.vue +27 -26
- package/{AuthModule → _Build/vue/modules/AuthModule}/routes/logincallback.vue +6 -13
- package/_Build/vue/modules/AuthModule/routes/loginheadless.vue +21 -0
- package/{AuthModule → _Build/vue/modules/AuthModule}/routes/loginsso.vue +34 -29
- package/_Build/vue/modules/AuthModule/routes/logout.vue +19 -0
- package/_Build/vue/modules/AuthModule/routes/logoutheadless.vue +25 -0
- package/{AuthModule → _Build/vue/modules/AuthModule}/routes/register.vue +52 -37
- package/{AuthModule → _Build/vue/modules/AuthModule}/routes/reset.vue +29 -19
- package/{AuthModule → _Build/vue/modules/AuthModule}/routes/success-forgot.vue +22 -19
- package/{AuthModule → _Build/vue/modules/AuthModule}/routes/success-reset.vue +6 -6
- package/_Build/vue/modules/AuthModule/routes/success-verify.vue +30 -0
- package/{AuthModule → _Build/vue/modules/AuthModule}/routes/verify.vue +26 -26
- package/_base.scss +0 -1
- package/_defaults.scss +3 -15
- package/_variables.scss +24 -21
- package/components/_alert.scss +2 -2
- package/components/_auth.scss +163 -0
- 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/{modules → components}/_modal.scss +3 -3
- 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/package.json +104 -102
- package/vendor.scss +2 -3
- 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/loginheadless.vue +0 -16
- package/AuthModule/routes/logout.vue +0 -21
- package/AuthModule/routes/success-verify.vue +0 -29
- package/Icon.vue +0 -33
- package/Svg.vue +0 -40
- package/components/_input.scss +0 -0
- package/form/Wysiwyg2.vue +0 -278
- package/layout/Footer.vue +0 -35
- package/layout/Loader.vue +0 -39
- package/modules/_AuthModule.scss +0 -209
- package/modules/_AuthVariables.scss +0 -7
- 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/{form → _Build/vue/components/form}/Checkbox.vue +0 -0
- /package/{form → _Build/vue/components/form}/color.vue +0 -0
package/README.md
CHANGED
|
@@ -10,59 +10,187 @@ Prevent code repetition.
|
|
|
10
10
|
|
|
11
11
|
## Getting started
|
|
12
12
|
|
|
13
|
+
### Requirements
|
|
14
|
+
|
|
15
|
+
```json
|
|
16
|
+
"vue": "^3.3.4",
|
|
17
|
+
"vue-router": "^4.2.4",
|
|
18
|
+
"vuex": "^4.1.0",
|
|
19
|
+
"vuex-persistedstate": "^4.1.0"
|
|
20
|
+
"vue-loader": "^17.2.2"
|
|
21
|
+
```
|
|
22
|
+
|
|
13
23
|
### Install
|
|
14
24
|
|
|
15
25
|
```bash
|
|
16
26
|
npm install @fishawack/lab-velocity
|
|
17
27
|
```
|
|
18
28
|
|
|
29
|
+
## Hydrate Views
|
|
30
|
+
|
|
31
|
+
Frontend & Admin files to work with the Hydrate Module including routes, store, axios and components.
|
|
32
|
+
|
|
33
|
+
### Installation
|
|
34
|
+
|
|
35
|
+
### Configure axios
|
|
36
|
+
|
|
37
|
+
##### script.js
|
|
38
|
+
|
|
39
|
+
```js
|
|
40
|
+
import { Auth } from "@fishawack/lab-velocity";
|
|
41
|
+
|
|
42
|
+
// Call in your boot method
|
|
43
|
+
Auth.Axios.setAxiosDefaults(process.env.APP_URL, router);
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
### Configure router
|
|
47
|
+
|
|
48
|
+
##### router.js
|
|
49
|
+
|
|
50
|
+
```js
|
|
51
|
+
import { Auth } from "@fishawack/lab-velocity";
|
|
52
|
+
import store from "./store.js";
|
|
53
|
+
|
|
54
|
+
// ... initialize router
|
|
55
|
+
|
|
56
|
+
Auth.Router.beforeEach(router, store);
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
### Configure routes
|
|
60
|
+
|
|
61
|
+
There are two different set of routes for the admin and the frontend.
|
|
62
|
+
|
|
63
|
+
##### routes.js
|
|
64
|
+
|
|
65
|
+
```js
|
|
66
|
+
import { Auth } from "@fishawack/lab-velocity";
|
|
67
|
+
|
|
68
|
+
[
|
|
69
|
+
// ... other routes
|
|
70
|
+
|
|
71
|
+
// End user routes for login, register, chang password etc
|
|
72
|
+
...Auth.Router.routes(node),
|
|
73
|
+
|
|
74
|
+
// Admin routes for headless login & managing users & companies
|
|
75
|
+
...Auth.Router.adminRoutes(node),
|
|
76
|
+
|
|
77
|
+
// ... wildcard 404 routes etc
|
|
78
|
+
];
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
### Configure store
|
|
82
|
+
|
|
83
|
+
##### store.js
|
|
84
|
+
|
|
85
|
+
```js
|
|
86
|
+
import { Auth } from "@fishawack/lab-velocity";
|
|
87
|
+
|
|
88
|
+
// Call in store
|
|
89
|
+
{
|
|
90
|
+
plugins: [
|
|
91
|
+
VuexPersistedState({
|
|
92
|
+
// ...
|
|
93
|
+
paths: ["auth.user"],
|
|
94
|
+
}),
|
|
95
|
+
],
|
|
96
|
+
|
|
97
|
+
modules: {
|
|
98
|
+
auth: Auth.Store,
|
|
99
|
+
},
|
|
19
100
|
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
101
|
+
// ...
|
|
102
|
+
}
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
### Base Styles
|
|
106
|
+
|
|
107
|
+
@fishawack/lab-velocity extends @fishawack/lab-ui, for this reason you should replace the two references to variables & defaults with @fishawack/lab-velocity ones.
|
|
108
|
+
|
|
109
|
+
#### \_variables.scss
|
|
110
|
+
|
|
111
|
+
```sass
|
|
112
|
+
@import "@fishawack/lab-velocity/variables";
|
|
113
|
+
|
|
114
|
+
// Set global variables here, e.g $color6: red;
|
|
115
|
+
```
|
|
116
|
+
|
|
117
|
+
#### \_defaults.scss
|
|
118
|
+
|
|
119
|
+
```sass
|
|
120
|
+
@use "variables";
|
|
121
|
+
@import "@fishawack/lab-velocity/defaults";
|
|
122
|
+
|
|
123
|
+
$colors: variables.dynamic("color", module-variables("variables"));
|
|
124
|
+
|
|
125
|
+
// Override lab-ui defaults here, e.g $button: $color6;
|
|
126
|
+
```
|
|
127
|
+
|
|
128
|
+
### Route Styles
|
|
129
|
+
|
|
130
|
+
There are two different set of sass imports for the admin and the frontend routes.
|
|
131
|
+
|
|
132
|
+
#### Frontend
|
|
133
|
+
|
|
134
|
+
```sass
|
|
135
|
+
// Vendor imports / Lab-ui imports
|
|
136
|
+
@import "@fishawack/lab-ui/typography";
|
|
137
|
+
@import "@fishawack/lab-ui/grid";
|
|
138
|
+
@import "@fishawack/lab-ui/utilities";
|
|
139
|
+
@import "@fishawack/lab-ui/icon";
|
|
140
|
+
|
|
141
|
+
// Lab velocity
|
|
142
|
+
@import "@fishawack/lab-velocity/base";
|
|
143
|
+
@import "@fishawack/lab-velocity/components/basic";
|
|
144
|
+
@import "@fishawack/lab-velocity/components/button";
|
|
145
|
+
@import "@fishawack/lab-velocity/components/form";
|
|
146
|
+
@import "@fishawack/lab-velocity/components/auth";
|
|
147
|
+
```
|
|
148
|
+
|
|
149
|
+
#### Admin
|
|
150
|
+
|
|
151
|
+
##### vendor.scss
|
|
152
|
+
|
|
153
|
+
```sass
|
|
154
|
+
// Vendor imports / Lab-ui imports
|
|
155
|
+
@import "@fishawack/lab-ui/typography";
|
|
156
|
+
@import "@fishawack/lab-ui/grid";
|
|
157
|
+
@import "@fishawack/lab-ui/utilities";
|
|
158
|
+
|
|
159
|
+
// Lab velocity
|
|
160
|
+
@import "@fishawack/lab-velocity/base";
|
|
161
|
+
@import "@fishawack/lab-velocity/components/pageTitle";
|
|
162
|
+
@import "@fishawack/lab-velocity/components/breadcrumbs";
|
|
163
|
+
@import "@fishawack/lab-velocity/components/table";
|
|
164
|
+
@import "@fishawack/lab-velocity/components/icon";
|
|
165
|
+
@import "@fishawack/lab-velocity/components/basic";
|
|
166
|
+
@import "@fishawack/lab-velocity/components/button";
|
|
167
|
+
@import "@fishawack/lab-velocity/components/form";
|
|
168
|
+
@import "@fishawack/lab-velocity/components/checkbox";
|
|
169
|
+
@import "@fishawack/lab-velocity/components/select";
|
|
170
|
+
@import "@fishawack/lab-velocity/components/loader";
|
|
171
|
+
@import "@fishawack/lab-velocity/components/permissionLegend";
|
|
172
|
+
@import "@fishawack/lab-velocity/components/chip";
|
|
173
|
+
```
|
|
174
|
+
|
|
175
|
+
### Icons
|
|
176
|
+
|
|
177
|
+
Ensure Content has Velocity pulled in & copy out the svg folder contents into the svg files within vue.
|
|
178
|
+
|
|
179
|
+
```json
|
|
180
|
+
{
|
|
181
|
+
"lftp": "ftp-fishawack.egnyte.com",
|
|
182
|
+
"location": "Shared/FW/Knutsford/Digital/Auto-Content/Lab/Velocity"
|
|
183
|
+
}
|
|
184
|
+
```
|
|
185
|
+
|
|
186
|
+
### ENV VARS (frontend)
|
|
187
|
+
|
|
188
|
+
```env
|
|
189
|
+
# Required
|
|
190
|
+
HYDRATE_LOGO=example-logo
|
|
191
|
+
|
|
192
|
+
# Descriptions
|
|
193
|
+
HYDRATE_LOGO Name of svg logo to display on page
|
|
194
|
+
HYDRATE_REDIRECT Default index if not configured
|
|
195
|
+
HYDRATE_CONTACT Default mailto:EP@avalerehealth, Email for contact us button
|
|
196
|
+
```
|
|
@@ -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>
|
|
@@ -1,27 +1,25 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<el-button
|
|
3
|
-
:class="[`vel-button ${baseClass}__button`]"
|
|
4
|
-
:name="name"
|
|
5
|
-
:id="name"
|
|
2
|
+
<el-button
|
|
3
|
+
:class="[`vel-button ${baseClass}__button`]"
|
|
4
|
+
:name="name"
|
|
5
|
+
:id="name"
|
|
6
6
|
:disabled="disabled"
|
|
7
|
-
:round="round"
|
|
8
|
-
:circle="circle"
|
|
9
|
-
:size="size"
|
|
10
|
-
:text="text"
|
|
11
|
-
:tag="tag"
|
|
7
|
+
:round="round"
|
|
8
|
+
:circle="circle"
|
|
9
|
+
:size="size"
|
|
10
|
+
:text="text"
|
|
11
|
+
:tag="tag"
|
|
12
12
|
:autofocus="autofocus"
|
|
13
|
-
:native-type="nativeType"
|
|
14
|
-
:type="type"
|
|
15
|
-
:link="link"
|
|
16
|
-
:plain="plain"
|
|
13
|
+
:native-type="nativeType"
|
|
14
|
+
:type="type"
|
|
15
|
+
:link="link"
|
|
16
|
+
:plain="plain"
|
|
17
17
|
:loading="loading"
|
|
18
|
-
:customIcon="customIcon"
|
|
18
|
+
:customIcon="customIcon"
|
|
19
19
|
:href="href"
|
|
20
20
|
:target="target"
|
|
21
|
-
|
|
22
|
-
|
|
21
|
+
>
|
|
23
22
|
<slot />
|
|
24
|
-
|
|
25
23
|
</el-button>
|
|
26
24
|
</template>
|
|
27
25
|
|
|
@@ -36,7 +34,7 @@ export default {
|
|
|
36
34
|
},
|
|
37
35
|
type: {
|
|
38
36
|
type: String,
|
|
39
|
-
default:
|
|
37
|
+
default: "default",
|
|
40
38
|
},
|
|
41
39
|
name: {
|
|
42
40
|
type: String,
|
|
@@ -105,7 +103,7 @@ export default {
|
|
|
105
103
|
},
|
|
106
104
|
|
|
107
105
|
components: {
|
|
108
|
-
ElButton
|
|
106
|
+
ElButton,
|
|
109
107
|
},
|
|
110
108
|
};
|
|
111
109
|
</script>
|
|
@@ -1,15 +1,16 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<el-link
|
|
3
|
-
:class="[
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
:
|
|
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"
|
|
7
9
|
:disabled="disabled"
|
|
8
10
|
:href="href"
|
|
9
11
|
:target="target"
|
|
10
12
|
>
|
|
11
13
|
<slot />
|
|
12
|
-
|
|
13
14
|
</el-link>
|
|
14
15
|
</template>
|
|
15
16
|
|
|
@@ -28,7 +29,7 @@ export default {
|
|
|
28
29
|
},
|
|
29
30
|
underline: {
|
|
30
31
|
type: Boolean,
|
|
31
|
-
default: true
|
|
32
|
+
default: true,
|
|
32
33
|
},
|
|
33
34
|
href: {
|
|
34
35
|
type: String,
|
|
@@ -12,14 +12,14 @@
|
|
|
12
12
|
:show-all-levels="showAllLevels"
|
|
13
13
|
:props="{
|
|
14
14
|
multiple: multiple,
|
|
15
|
-
checkStrictly:checkStrictly
|
|
15
|
+
checkStrictly: checkStrictly,
|
|
16
16
|
}"
|
|
17
17
|
/>
|
|
18
18
|
</XInput>
|
|
19
19
|
</template>
|
|
20
20
|
|
|
21
21
|
<script>
|
|
22
|
-
import { ElCascader } from
|
|
22
|
+
import { ElCascader } from "element-plus";
|
|
23
23
|
import input from "./input.js";
|
|
24
24
|
import XInput from "./input.vue";
|
|
25
25
|
|
|
@@ -32,19 +32,19 @@ export default {
|
|
|
32
32
|
},
|
|
33
33
|
multiple: {
|
|
34
34
|
type: Boolean,
|
|
35
|
-
default: false
|
|
35
|
+
default: false,
|
|
36
36
|
},
|
|
37
37
|
checkStrictly: {
|
|
38
38
|
type: Boolean,
|
|
39
|
-
default: false
|
|
39
|
+
default: false,
|
|
40
40
|
},
|
|
41
41
|
clearable: {
|
|
42
42
|
type: Boolean,
|
|
43
|
-
default: false
|
|
43
|
+
default: false,
|
|
44
44
|
},
|
|
45
45
|
showAllLevels: {
|
|
46
46
|
type: Boolean,
|
|
47
|
-
default: false
|
|
47
|
+
default: false,
|
|
48
48
|
},
|
|
49
49
|
options: {
|
|
50
50
|
type: Array,
|
|
@@ -57,7 +57,7 @@ export default {
|
|
|
57
57
|
ElCascader,
|
|
58
58
|
},
|
|
59
59
|
|
|
60
|
-
emits: [
|
|
60
|
+
emits: ["change", "clear", "blur"],
|
|
61
61
|
methods: {
|
|
62
62
|
castValue(value) {
|
|
63
63
|
if (
|
|
@@ -70,16 +70,16 @@ export default {
|
|
|
70
70
|
return value;
|
|
71
71
|
},
|
|
72
72
|
handleInput(value, $event) {
|
|
73
|
-
this.$emit(
|
|
74
|
-
}
|
|
73
|
+
this.$emit("change", value);
|
|
74
|
+
},
|
|
75
75
|
},
|
|
76
76
|
|
|
77
77
|
data() {
|
|
78
78
|
return {
|
|
79
79
|
pr: {
|
|
80
|
-
multiple:true
|
|
81
|
-
}
|
|
82
|
-
}
|
|
83
|
-
}
|
|
80
|
+
multiple: true,
|
|
81
|
+
},
|
|
82
|
+
};
|
|
83
|
+
},
|
|
84
84
|
};
|
|
85
85
|
</script>
|
|
@@ -1,15 +1,37 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<XInput v-bind="$props">
|
|
3
|
-
<el-checkbox-group
|
|
4
|
-
:
|
|
5
|
-
|
|
6
|
-
|
|
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
|
+
>
|
|
7
23
|
<slot name="label" :label="label" :value="value">
|
|
8
24
|
<span v-html="label"></span>
|
|
9
25
|
</slot>
|
|
10
26
|
</el-checkbox>
|
|
11
|
-
<el-checkbox-button
|
|
12
|
-
|
|
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
|
+
>
|
|
13
35
|
<slot name="label" :label="label" :value="value">
|
|
14
36
|
<span v-html="label"></span>
|
|
15
37
|
</slot>
|
|
@@ -9,9 +9,10 @@
|
|
|
9
9
|
:type="type"
|
|
10
10
|
:disabled="disabled"
|
|
11
11
|
:disabled-date="disabledDate"
|
|
12
|
-
-
|
|
12
|
+
-
|
|
13
|
+
:placeholder="placeholder"
|
|
13
14
|
:shortcuts="shortcuts"
|
|
14
|
-
:size="size"
|
|
15
|
+
:size="size"
|
|
15
16
|
class="w-100 vel-datepicker"
|
|
16
17
|
v-model="content"
|
|
17
18
|
@change="handleInput"
|
|
@@ -37,20 +38,35 @@ export default {
|
|
|
37
38
|
...input.props,
|
|
38
39
|
type: {
|
|
39
40
|
type: String,
|
|
40
|
-
validator: (value) =>
|
|
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),
|
|
41
57
|
default: "date",
|
|
42
58
|
},
|
|
43
59
|
format: {
|
|
44
|
-
type: String
|
|
60
|
+
type: String,
|
|
45
61
|
},
|
|
46
62
|
valueFormat: {
|
|
47
|
-
type: String
|
|
63
|
+
type: String,
|
|
48
64
|
},
|
|
49
65
|
dateFormat: {
|
|
50
|
-
type: String
|
|
66
|
+
type: String,
|
|
51
67
|
},
|
|
52
68
|
timeFormat: {
|
|
53
|
-
type: String
|
|
69
|
+
type: String,
|
|
54
70
|
},
|
|
55
71
|
baseClass: {
|
|
56
72
|
type: String,
|
|
@@ -22,7 +22,6 @@
|
|
|
22
22
|
:required="required"
|
|
23
23
|
@input="handleInput"
|
|
24
24
|
>
|
|
25
|
-
|
|
26
25
|
<template #prefix>
|
|
27
26
|
<slot name="prefix" />
|
|
28
27
|
</template>
|
|
@@ -79,7 +78,7 @@ export default {
|
|
|
79
78
|
controls: {
|
|
80
79
|
type: Boolean,
|
|
81
80
|
default: true,
|
|
82
|
-
}
|
|
81
|
+
},
|
|
83
82
|
},
|
|
84
83
|
|
|
85
84
|
components: {
|
|
@@ -49,15 +49,15 @@ import { ElSelect } from "element-plus";
|
|
|
49
49
|
import { ElOption } from "element-plus";
|
|
50
50
|
import input from "./input.js";
|
|
51
51
|
import XInput from "./input.vue";
|
|
52
|
-
import _ from
|
|
52
|
+
import _ from "lodash";
|
|
53
53
|
|
|
54
54
|
export default {
|
|
55
55
|
mixins: [input],
|
|
56
56
|
props: {
|
|
57
57
|
...input.props,
|
|
58
58
|
modelValue: {
|
|
59
|
-
type: Array,
|
|
60
|
-
default: [],
|
|
59
|
+
type: [Array, Number],
|
|
60
|
+
default: () => [],
|
|
61
61
|
},
|
|
62
62
|
baseClass: {
|
|
63
63
|
type: String,
|
|
@@ -82,7 +82,7 @@ export default {
|
|
|
82
82
|
multiple: {
|
|
83
83
|
type: Boolean,
|
|
84
84
|
default: false,
|
|
85
|
-
}
|
|
85
|
+
},
|
|
86
86
|
},
|
|
87
87
|
|
|
88
88
|
components: {
|
|
@@ -91,20 +91,19 @@ export default {
|
|
|
91
91
|
ElSelect,
|
|
92
92
|
},
|
|
93
93
|
|
|
94
|
-
emits: [
|
|
94
|
+
emits: ["change", "clear", "blur"],
|
|
95
95
|
methods: {
|
|
96
96
|
castValue(value) {
|
|
97
|
-
|
|
97
|
+
if (
|
|
98
98
|
!_.isNull(value) &&
|
|
99
99
|
typeof value === "string" &&
|
|
100
100
|
value !== "" &&
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
101
|
+
!isNaN(Number(value))
|
|
102
|
+
) {
|
|
103
|
+
return parseInt(value);
|
|
104
104
|
}
|
|
105
105
|
return value;
|
|
106
|
-
}
|
|
106
|
+
},
|
|
107
107
|
},
|
|
108
|
-
|
|
109
108
|
};
|
|
110
109
|
</script>
|