@nixweb/nixloc-ui 0.0.128 → 0.0.129
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/package.json +87 -79
- package/src/App.vue +13 -13
- package/src/component/forms/Button.vue +171 -170
- package/src/component/forms/ButtonGroup.vue +57 -0
- package/src/component/forms/ButtonSub.vue +98 -0
- package/src/component/forms/CheckboxGroup.vue +73 -72
- package/src/component/forms/CheckboxSimple.vue +46 -46
- package/src/component/forms/Color.vue +38 -38
- package/src/component/forms/DateTime.vue +167 -167
- package/src/component/forms/Dropdown.vue +242 -218
- package/src/component/forms/EditorHtml.vue +126 -126
- package/src/component/forms/FileUpload.vue +185 -185
- package/src/component/forms/IncrementDecrement.vue +7 -2
- package/src/component/forms/InputDecimal.vue +150 -142
- package/src/component/forms/InputDecimalDiscount.vue +92 -0
- package/src/component/forms/InputNumber.vue +160 -154
- package/src/component/forms/InputPassword.vue +135 -135
- package/src/component/forms/InputText.vue +174 -162
- package/src/component/forms/InputTextEdit.vue +68 -0
- package/src/component/forms/Modal.vue +65 -65
- package/src/component/forms/RadioGroup.vue +50 -50
- package/src/component/forms/Select.vue +351 -349
- package/src/component/forms/SelectStatic.vue +127 -127
- package/src/component/forms/Slider.vue +18 -18
- package/src/component/forms/TextArea.vue +126 -126
- package/src/component/forms/Toggle.vue +3 -1
- package/src/component/layout/Account.vue +3 -3
- package/src/component/layout/Alert.vue +92 -92
- package/src/component/layout/Badge.vue +104 -103
- package/src/component/layout/FixedBar.vue +100 -100
- package/src/component/layout/Gantt.vue +130 -0
- package/src/component/layout/Header.vue +38 -38
- package/src/component/layout/IconMolded.vue +48 -0
- package/src/component/layout/LoadingFullPage.vue +27 -27
- package/src/component/layout/Menu.vue +213 -210
- package/src/component/layout/Molded.vue +28 -28
- package/src/component/layout/Panel.vue +140 -140
- package/src/component/layout/Popover.vue +126 -126
- package/src/component/layout/ScrollBar.vue +42 -42
- package/src/component/layout/Wizard.vue +211 -211
- package/src/component/rental/DisplayCalculatePeriod.vue +49 -0
- package/src/component/rental/DisplayPeriodRent.vue +19 -44
- package/src/component/rental/DisplayTotalization.vue +11 -2
- package/src/component/shared/Collapse.vue +131 -131
- package/src/component/shared/Confirmation.vue +21 -2
- package/src/component/shared/DocumentPreview.vue +2 -1
- package/src/component/shared/ExportPDF.vue +116 -116
- package/src/component/shared/FullCalendar.vue +159 -0
- package/src/component/shared/HorizontalFilter.vue +59 -59
- package/src/component/shared/Loading.vue +107 -107
- package/src/component/shared/LoadingMoreButton.vue +23 -23
- package/src/component/shared/Messages.vue +81 -81
- package/src/component/shared/PDFViewer.vue +22 -22
- package/src/component/shared/Pagination.vue +52 -52
- package/src/component/shared/ProgressBar.vue +22 -22
- package/src/component/shared/QueryButton.vue +66 -66
- package/src/component/shared/SaveCancel.vue +3 -2
- package/src/component/shared/Search.vue +154 -154
- package/src/component/shared/Table.vue +163 -163
- package/src/component/shared/TableButton.vue +36 -36
- package/src/component/shared/TableTotalization.vue +47 -47
- package/src/component/shared/TimeLine.vue +47 -0
- package/src/component/shared/Tip.vue +42 -42
- package/src/component/shared/Toast.vue +54 -54
- package/src/component/shared/VerticalFilter.vue +97 -97
- package/src/component/shared/query-builder/AddRule.vue +181 -181
- package/src/component/shared/query-builder/DynamicComponentList.vue +73 -73
- package/src/component/shared/query-builder/QueryBuilder.vue +69 -69
- package/src/component/shared/query-builder/utilities.js +21 -21
- package/src/component/template/ListViewWithDataHandler.vue +260 -260
- package/src/component/template/ViewTemplateConfiguration.vue +64 -64
- package/src/component/template/ViewTemplateReportList.vue +1 -1
- package/src/component/template/ViewTemplateReportPreview.vue +0 -1
- package/src/component/template/ViewTemplateWithSalveCancel.vue +32 -32
- package/src/component/template/ViewTemplateWithTable.vue +56 -56
- package/src/config/axios.js +9 -9
- package/src/config/dicas.js +14 -14
- package/src/config/router.js +13 -13
- package/src/config/token.js +14 -14
- package/src/main.js +23 -23
- package/src/store/modules/generic.js +543 -512
- package/src/store/modules/user.js +3 -0
- package/src/store/modules/validation.js +38 -38
- package/src/store/store.js +13 -13
package/package.json
CHANGED
|
@@ -1,79 +1,87 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@nixweb/nixloc-ui",
|
|
3
|
-
"version": "0.0.
|
|
4
|
-
"description": "Componentes UI",
|
|
5
|
-
"author": "Fábio Ávila <fabio@nixweb.com.br>",
|
|
6
|
-
"private": false,
|
|
7
|
-
"scripts": {
|
|
8
|
-
"serve": "vue-cli-service serve",
|
|
9
|
-
"build": "vue-cli-service build",
|
|
10
|
-
"lint": "vue-cli-service lint"
|
|
11
|
-
},
|
|
12
|
-
"dependencies": {
|
|
13
|
-
"@babel/polyfill": "^7.12.1",
|
|
14
|
-
"@ckeditor/ckeditor5-vue2": "^2.0.0",
|
|
15
|
-
"
|
|
16
|
-
"
|
|
17
|
-
"
|
|
18
|
-
"
|
|
19
|
-
"
|
|
20
|
-
"
|
|
21
|
-
"
|
|
22
|
-
"vue
|
|
23
|
-
"
|
|
24
|
-
"
|
|
25
|
-
"
|
|
26
|
-
"
|
|
27
|
-
"
|
|
28
|
-
"
|
|
29
|
-
"vue
|
|
30
|
-
"vue-
|
|
31
|
-
"vue-
|
|
32
|
-
"vue-
|
|
33
|
-
"vue-
|
|
34
|
-
"vue-
|
|
35
|
-
"vue-
|
|
36
|
-
"vue-
|
|
37
|
-
"vue-
|
|
38
|
-
"vue-
|
|
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
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
"
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
1
|
+
{
|
|
2
|
+
"name": "@nixweb/nixloc-ui",
|
|
3
|
+
"version": "0.0.129",
|
|
4
|
+
"description": "Componentes UI",
|
|
5
|
+
"author": "Fábio Ávila <fabio@nixweb.com.br>",
|
|
6
|
+
"private": false,
|
|
7
|
+
"scripts": {
|
|
8
|
+
"serve": "vue-cli-service serve",
|
|
9
|
+
"build": "vue-cli-service build",
|
|
10
|
+
"lint": "vue-cli-service lint"
|
|
11
|
+
},
|
|
12
|
+
"dependencies": {
|
|
13
|
+
"@babel/polyfill": "^7.12.1",
|
|
14
|
+
"@ckeditor/ckeditor5-vue2": "^2.0.0",
|
|
15
|
+
"@fullcalendar/core": "^5.11.3",
|
|
16
|
+
"@fullcalendar/daygrid": "^5.11.3",
|
|
17
|
+
"@fullcalendar/interaction": "^5.11.3",
|
|
18
|
+
"@fullcalendar/list": "^5.11.3",
|
|
19
|
+
"@fullcalendar/timegrid": "^5.11.3",
|
|
20
|
+
"@fullcalendar/vue": "^5.11.2",
|
|
21
|
+
"axios": "^0.24.0",
|
|
22
|
+
"bootstrap-vue": "^2.0.0-rc.11",
|
|
23
|
+
"core-js": "^3.6.5",
|
|
24
|
+
"frappe-gantt": "^0.6.1",
|
|
25
|
+
"sass-loader": "^10.1.1",
|
|
26
|
+
"timeline-vuejs": "^1.1.7",
|
|
27
|
+
"v-runtime-template": "^1.10.0",
|
|
28
|
+
"vodal": "^2.4.0",
|
|
29
|
+
"vue": "^2.6.11",
|
|
30
|
+
"vue-color": "^2.7.0",
|
|
31
|
+
"vue-currency-filter": "^3.3.0",
|
|
32
|
+
"vue-html2pdf": "^1.8.0",
|
|
33
|
+
"vue-image-crop-upload": "^3.0.3",
|
|
34
|
+
"vue-js-toggle-button": "^1.3.0",
|
|
35
|
+
"vue-json-excel": "^0.3.0",
|
|
36
|
+
"vue-loading-template": "^1.3.0",
|
|
37
|
+
"vue-moment": "^4.0.0",
|
|
38
|
+
"vue-multiselect": "^2.1.0",
|
|
39
|
+
"vue-numeric": "^2.4.1",
|
|
40
|
+
"vue-print-nb": "^1.7.5",
|
|
41
|
+
"vue-router": "^3.0.1",
|
|
42
|
+
"vue-simple-progress": "^1.1.1",
|
|
43
|
+
"vue-the-mask": "^0.11.1",
|
|
44
|
+
"vue-toasted": "^1.1.28",
|
|
45
|
+
"vue-toggles": "^1.1.4",
|
|
46
|
+
"vue-upload-file": "^1.1.0",
|
|
47
|
+
"vue2-datepicker": "^2.13.0",
|
|
48
|
+
"vue2-editor": "^2.6.6",
|
|
49
|
+
"vuedraggable": "^2.24.3",
|
|
50
|
+
"vuejs-ace-editor": "^1.0.1",
|
|
51
|
+
"vuex": "^3.6.2",
|
|
52
|
+
"vuex-persistedstate": "^4.0.0"
|
|
53
|
+
},
|
|
54
|
+
"devDependencies": {
|
|
55
|
+
"@vue/cli-plugin-babel": "~4.5.0",
|
|
56
|
+
"@vue/cli-service": "~4.5.0",
|
|
57
|
+
"babel-eslint": "^10.1.0",
|
|
58
|
+
"eslint": "^6.7.2",
|
|
59
|
+
"eslint-plugin-vue": "^6.2.2",
|
|
60
|
+
"script-loader": "^0.7.2",
|
|
61
|
+
"vue-template-compiler": "^2.6.11"
|
|
62
|
+
},
|
|
63
|
+
"eslintConfig": {
|
|
64
|
+
"root": true,
|
|
65
|
+
"env": {
|
|
66
|
+
"node": true
|
|
67
|
+
},
|
|
68
|
+
"extends": [
|
|
69
|
+
"plugin:vue/essential",
|
|
70
|
+
"eslint:recommended"
|
|
71
|
+
],
|
|
72
|
+
"parserOptions": {
|
|
73
|
+
"parser": "babel-eslint"
|
|
74
|
+
},
|
|
75
|
+
"rules": {}
|
|
76
|
+
},
|
|
77
|
+
"engines": {
|
|
78
|
+
"node": "16.14.2",
|
|
79
|
+
"npm": ">= 3.0.0"
|
|
80
|
+
},
|
|
81
|
+
"browserslist": [
|
|
82
|
+
"> 1%",
|
|
83
|
+
"last 2 versions",
|
|
84
|
+
"not dead"
|
|
85
|
+
],
|
|
86
|
+
"main": "babel.config.js"
|
|
87
|
+
}
|
package/src/App.vue
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div id="app">
|
|
3
|
-
<router-view :key="$route.fullPath"></router-view>
|
|
4
|
-
</div>
|
|
5
|
-
</template>
|
|
6
|
-
|
|
7
|
-
<script>
|
|
8
|
-
export default {
|
|
9
|
-
name: "App",
|
|
10
|
-
};
|
|
11
|
-
</script>
|
|
12
|
-
|
|
13
|
-
<style></style>
|
|
1
|
+
<template>
|
|
2
|
+
<div id="app">
|
|
3
|
+
<router-view :key="$route.fullPath"></router-view>
|
|
4
|
+
</div>
|
|
5
|
+
</template>
|
|
6
|
+
|
|
7
|
+
<script>
|
|
8
|
+
export default {
|
|
9
|
+
name: "App",
|
|
10
|
+
};
|
|
11
|
+
</script>
|
|
12
|
+
|
|
13
|
+
<style></style>
|
|
@@ -1,170 +1,171 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div class="c-div-button">
|
|
3
|
-
<button
|
|
4
|
-
class="button"
|
|
5
|
-
:class="{
|
|
6
|
-
small: size === 'small',
|
|
7
|
-
medium: size === 'medium',
|
|
8
|
-
large: size === 'large',
|
|
9
|
-
primary: type === 'primary',
|
|
10
|
-
success: type === 'success',
|
|
11
|
-
warning: type === 'warning',
|
|
12
|
-
info: type === 'info',
|
|
13
|
-
edit: type === 'edit',
|
|
14
|
-
danger: type === 'danger',
|
|
15
|
-
disabled: disabled,
|
|
16
|
-
}"
|
|
17
|
-
:disabled="disabled"
|
|
18
|
-
@click="execute()"
|
|
19
|
-
>
|
|
20
|
-
<i class="title" :class="classIcon" v-if="!isLoading(this._key) && classIcon"></i>
|
|
21
|
-
<span v-if="!isLoading(this._key)">{{ title }}</span>
|
|
22
|
-
<vue-loading
|
|
23
|
-
v-if="isLoading(this._key)"
|
|
24
|
-
type="bubbles"
|
|
25
|
-
color="#fff"
|
|
26
|
-
:size="{ width: '26px', height: '26px' }"
|
|
27
|
-
></vue-loading>
|
|
28
|
-
</button>
|
|
29
|
-
</div>
|
|
30
|
-
</template>
|
|
31
|
-
|
|
32
|
-
<script>
|
|
33
|
-
import { mapGetters, mapMutations } from "vuex";
|
|
34
|
-
|
|
35
|
-
export default {
|
|
36
|
-
name: "Button",
|
|
37
|
-
props: {
|
|
38
|
-
_key: String,
|
|
39
|
-
title: String,
|
|
40
|
-
type: String,
|
|
41
|
-
size: String,
|
|
42
|
-
eventName: String,
|
|
43
|
-
eventData: Object,
|
|
44
|
-
classIcon: String,
|
|
45
|
-
disabled: Boolean,
|
|
46
|
-
params: Object,
|
|
47
|
-
clicked: Function,
|
|
48
|
-
},
|
|
49
|
-
computed: {
|
|
50
|
-
...mapGetters("generic", ["isLoading"]),
|
|
51
|
-
},
|
|
52
|
-
methods: {
|
|
53
|
-
...mapMutations("generic", ["addLoading", "addEvent"]),
|
|
54
|
-
execute() {
|
|
55
|
-
if (this.eventName)
|
|
56
|
-
this.addEvent({
|
|
57
|
-
name: this.eventName,
|
|
58
|
-
data: this.eventData,
|
|
59
|
-
});
|
|
60
|
-
this.addLoading(this._key);
|
|
61
|
-
if (this.clicked) this.clicked(this.params);
|
|
62
|
-
},
|
|
63
|
-
},
|
|
64
|
-
};
|
|
65
|
-
</script>
|
|
66
|
-
<style scoped>
|
|
67
|
-
.c-div-button {
|
|
68
|
-
display: inline-block;
|
|
69
|
-
margin-left: 5px;
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
.title {
|
|
73
|
-
margin: 2px;
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
.button {
|
|
77
|
-
padding: 8px 12px;
|
|
78
|
-
cursor: pointer;
|
|
79
|
-
border: none;
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
font-
|
|
83
|
-
font-
|
|
84
|
-
|
|
85
|
-
-
|
|
86
|
-
-
|
|
87
|
-
box-shadow: 0px 10px 20px -6px
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
color: #
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
color: #
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
1
|
+
<template>
|
|
2
|
+
<div class="c-div-button">
|
|
3
|
+
<button
|
|
4
|
+
class="button"
|
|
5
|
+
:class="{
|
|
6
|
+
small: size === 'small',
|
|
7
|
+
medium: size === 'medium',
|
|
8
|
+
large: size === 'large',
|
|
9
|
+
primary: type === 'primary',
|
|
10
|
+
success: type === 'success',
|
|
11
|
+
warning: type === 'warning',
|
|
12
|
+
info: type === 'info',
|
|
13
|
+
edit: type === 'edit',
|
|
14
|
+
danger: type === 'danger',
|
|
15
|
+
disabled: disabled,
|
|
16
|
+
}"
|
|
17
|
+
:disabled="disabled"
|
|
18
|
+
@click="execute()"
|
|
19
|
+
>
|
|
20
|
+
<i class="title" :class="classIcon" v-if="!isLoading(this._key) && classIcon"></i>
|
|
21
|
+
<span v-if="!isLoading(this._key)">{{ title }}</span>
|
|
22
|
+
<vue-loading
|
|
23
|
+
v-if="isLoading(this._key)"
|
|
24
|
+
type="bubbles"
|
|
25
|
+
color="#fff"
|
|
26
|
+
:size="{ width: '26px', height: '26px' }"
|
|
27
|
+
></vue-loading>
|
|
28
|
+
</button>
|
|
29
|
+
</div>
|
|
30
|
+
</template>
|
|
31
|
+
|
|
32
|
+
<script>
|
|
33
|
+
import { mapGetters, mapMutations } from "vuex";
|
|
34
|
+
|
|
35
|
+
export default {
|
|
36
|
+
name: "Button",
|
|
37
|
+
props: {
|
|
38
|
+
_key: String,
|
|
39
|
+
title: String,
|
|
40
|
+
type: String,
|
|
41
|
+
size: String,
|
|
42
|
+
eventName: String,
|
|
43
|
+
eventData: Object,
|
|
44
|
+
classIcon: String,
|
|
45
|
+
disabled: Boolean,
|
|
46
|
+
params: Object,
|
|
47
|
+
clicked: Function,
|
|
48
|
+
},
|
|
49
|
+
computed: {
|
|
50
|
+
...mapGetters("generic", ["isLoading"]),
|
|
51
|
+
},
|
|
52
|
+
methods: {
|
|
53
|
+
...mapMutations("generic", ["addLoading", "addEvent"]),
|
|
54
|
+
execute() {
|
|
55
|
+
if (this.eventName)
|
|
56
|
+
this.addEvent({
|
|
57
|
+
name: this.eventName,
|
|
58
|
+
data: this.eventData,
|
|
59
|
+
});
|
|
60
|
+
this.addLoading(this._key);
|
|
61
|
+
if (this.clicked) this.clicked(this.params);
|
|
62
|
+
},
|
|
63
|
+
},
|
|
64
|
+
};
|
|
65
|
+
</script>
|
|
66
|
+
<style scoped>
|
|
67
|
+
.c-div-button {
|
|
68
|
+
display: inline-block;
|
|
69
|
+
margin-left: 5px;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
.title {
|
|
73
|
+
margin: 2px;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
.button {
|
|
77
|
+
padding: 8px 12px;
|
|
78
|
+
cursor: pointer;
|
|
79
|
+
border: none;
|
|
80
|
+
min-width: 33px;
|
|
81
|
+
border-radius: 40px !important;
|
|
82
|
+
font-size: 13px !important;
|
|
83
|
+
font-weight: normal;
|
|
84
|
+
font-style: normal !important;
|
|
85
|
+
letter-spacing: 1px !important;
|
|
86
|
+
-webkit-box-shadow: 0px 10px 20px -6px rgb(0 0 0 / 12%);
|
|
87
|
+
-moz-box-shadow: 0px 10px 20px -6px rgba(0, 0, 0, 0.12);
|
|
88
|
+
box-shadow: 0px 10px 20px -6px rgb(0 0 0 / 12%);
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
.small {
|
|
92
|
+
padding: 3px 7px;
|
|
93
|
+
font-size: 13px;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
.medium {
|
|
97
|
+
padding: 7px 12px;
|
|
98
|
+
font-size: 14px;
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
.large {
|
|
102
|
+
padding: 10px 15px;
|
|
103
|
+
font-size: 14px;
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
.disabled {
|
|
107
|
+
background: #bbbbbb !important;
|
|
108
|
+
border-color: #bbbbbb !important;
|
|
109
|
+
color: #fff;
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
.primary {
|
|
113
|
+
background: #577696;
|
|
114
|
+
border-color: #577696;
|
|
115
|
+
color: #fff;
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
.primary:hover {
|
|
119
|
+
background: #355472;
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
.success {
|
|
123
|
+
color: #fff;
|
|
124
|
+
background: #94aa2a;
|
|
125
|
+
border-color: #94aa2a;
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
.success:hover {
|
|
129
|
+
background: #6d7e1c;
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
.info {
|
|
133
|
+
color: #fff;
|
|
134
|
+
border-color: #4ab4e2;
|
|
135
|
+
background: #4ab4e2;
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
.info:hover {
|
|
139
|
+
background: #3e90b3;
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
.edit {
|
|
143
|
+
color: #fff;
|
|
144
|
+
border-color: #7b7f83;
|
|
145
|
+
background: #7b7f83;
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
.edit:hover {
|
|
149
|
+
background: #595c5f;
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
.warning {
|
|
153
|
+
color: #fff;
|
|
154
|
+
border-color: #f1bc31;
|
|
155
|
+
background: #f1bc31;
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
.warning:hover {
|
|
159
|
+
background: #a37d1b;
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
.danger {
|
|
163
|
+
color: #fff;
|
|
164
|
+
border-color: #f0134d;
|
|
165
|
+
background: #f0134d;
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
.danger:hover {
|
|
169
|
+
background: #c70f40;
|
|
170
|
+
}
|
|
171
|
+
</style>
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div>
|
|
3
|
+
<div>
|
|
4
|
+
<b-button-group size="sm">
|
|
5
|
+
<b-button
|
|
6
|
+
v-for="option in options"
|
|
7
|
+
:class="{ selected: option.title == selected }"
|
|
8
|
+
class="btn-group"
|
|
9
|
+
@click="execute(option)"
|
|
10
|
+
:key="option.title"
|
|
11
|
+
>
|
|
12
|
+
{{ option.title }}
|
|
13
|
+
</b-button>
|
|
14
|
+
</b-button-group>
|
|
15
|
+
</div>
|
|
16
|
+
</div>
|
|
17
|
+
</template>
|
|
18
|
+
<script>
|
|
19
|
+
import { mapMutations } from "vuex";
|
|
20
|
+
|
|
21
|
+
export default {
|
|
22
|
+
name: "ButtonGroup",
|
|
23
|
+
props: {
|
|
24
|
+
initialOption: String,
|
|
25
|
+
options: {
|
|
26
|
+
type: Array,
|
|
27
|
+
default: [],
|
|
28
|
+
},
|
|
29
|
+
},
|
|
30
|
+
data() {
|
|
31
|
+
return {
|
|
32
|
+
selected: "",
|
|
33
|
+
};
|
|
34
|
+
},
|
|
35
|
+
created() {
|
|
36
|
+
this.selected = this.initialOption;
|
|
37
|
+
},
|
|
38
|
+
methods: {
|
|
39
|
+
...mapMutations("generic", ["addEvent"]),
|
|
40
|
+
execute(option) {
|
|
41
|
+
this.selected = option.title;
|
|
42
|
+
this.addEvent({ name: option.eventName, data: option });
|
|
43
|
+
},
|
|
44
|
+
},
|
|
45
|
+
};
|
|
46
|
+
</script>
|
|
47
|
+
<style scoped>
|
|
48
|
+
.btn-group {
|
|
49
|
+
background-color: white !important;
|
|
50
|
+
color: black !important;
|
|
51
|
+
border-color: #e9e9e9 !important;
|
|
52
|
+
outline: none !important;
|
|
53
|
+
}
|
|
54
|
+
.selected {
|
|
55
|
+
background-color: #f5f5f5 !important;
|
|
56
|
+
}
|
|
57
|
+
</style>
|