@nixweb/nixloc-ui 1.19.0 → 1.20.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/package.json +1 -1
- package/src/component/forms/ButtonFilter.vue +104 -104
- package/src/component/forms/ButtonGroup.vue +66 -66
- package/src/component/forms/ButtonGroupInline.vue +210 -210
- package/src/component/forms/ButtonSub.vue +97 -97
- package/src/component/forms/ButtonToggle.vue +76 -76
- package/src/component/forms/DateYearMonth.vue +192 -192
- package/src/component/forms/ImageUpload.vue +214 -214
- package/src/component/forms/IncrementDecrement.vue +151 -151
- package/src/component/forms/InputAddressGoogle.vue +171 -171
- package/src/component/forms/InputCallToAction.vue +135 -135
- package/src/component/forms/InputDecimalDiscount.vue +146 -146
- package/src/component/forms/InputTag.vue +124 -124
- package/src/component/forms/InputTextEdit.vue +69 -69
- package/src/component/forms/InputWhatsApp.vue +47 -47
- package/src/component/forms/SideBar.vue +99 -99
- package/src/component/forms/Toggle.vue +72 -72
- package/src/component/layout/Account.vue +131 -131
- package/src/component/layout/AnimatedPhrase.vue +68 -68
- package/src/component/layout/BarFloating.vue +67 -67
- package/src/component/layout/BottomActionsBar.vue +205 -205
- package/src/component/layout/ColorPicker.vue +175 -175
- package/src/component/layout/Gantt.vue +128 -128
- package/src/component/layout/HideShow.vue +61 -61
- package/src/component/layout/IconMolded.vue +58 -58
- package/src/component/layout/IconPicker.vue +161 -161
- package/src/component/layout/NewAccount.vue +136 -136
- package/src/component/layout/NewHeader.vue +59 -59
- package/src/component/layout/NewIconMolded.vue +70 -70
- package/src/component/layout/NewMenu.vue +472 -472
- package/src/component/layout/Tab.vue +259 -259
- package/src/component/layout/Tag.vue +97 -97
- package/src/component/layout/Tooltip.vue +155 -155
- package/src/component/layout/Zoom.vue +111 -111
- package/src/component/rental/DisplayCalculatePeriod.vue +48 -48
- package/src/component/rental/DisplayPeriodRent.vue +55 -55
- package/src/component/rental/DisplayTotalization.vue +86 -86
- package/src/component/report/Fields.vue +108 -108
- package/src/component/report/Report.vue +377 -377
- package/src/component/report/ReportTable.vue +111 -111
- package/src/component/report/Totalization.vue +33 -33
- package/src/component/shared/CodeEditor.vue +128 -128
- package/src/component/shared/Confirmation.vue +74 -74
- package/src/component/shared/DocumentEditor.vue +99 -99
- package/src/component/shared/DocumentPreview.vue +105 -105
- package/src/component/shared/DocumentPublic.vue +33 -33
- package/src/component/shared/ExportExcel.vue +56 -56
- package/src/component/shared/FullCalendar.vue +175 -175
- package/src/component/shared/HeaderReport.vue +47 -47
- package/src/component/shared/ListNotifications.vue +70 -70
- package/src/component/shared/Loading.vue +1 -4
- package/src/component/shared/LoadingCard.vue +64 -64
- package/src/component/shared/ParameterLegend.vue +169 -169
- package/src/component/shared/Report.vue +250 -250
- package/src/component/shared/SaveCancel.vue +99 -117
- package/src/component/shared/SelectOption.vue +162 -162
- package/src/component/shared/TableDraggable.vue +117 -117
- package/src/component/shared/TableImport.vue +93 -93
- package/src/component/shared/TableItem.vue +228 -228
- package/src/component/shared/TableTotalPerPage.vue +114 -114
- package/src/component/shared/TableTotalRecords.vue +44 -44
- package/src/component/shared/TimeLine.vue +41 -41
- package/src/component/shared/Timer.vue +77 -77
- package/src/component/shared/ToggleTheme.vue +127 -127
- package/src/component/shared/TotalizationReport.vue +86 -86
- package/src/component/shared/actions/ActionButtons.vue +53 -53
- package/src/component/shared/actions/ActionErrorContent.vue +103 -103
- package/src/component/shared/actions/ActionFooter.vue +93 -99
- package/src/component/shared/actions/ActionHeader.vue +110 -110
- package/src/component/shared/actions/ActionItemList.vue +143 -143
- package/src/component/shared/actions/ActionsOptions.vue +209 -209
- package/src/component/shared/actions/ActionsSelected.vue +262 -262
- package/src/component/shared/automation/ActivitiesList.vue +43 -43
- package/src/component/shared/automation/AddRule.vue +60 -60
- package/src/component/shared/automation/AutomationBuilder.vue +26 -26
- package/src/component/shared/automation/DynamicComponentList.vue +85 -85
- package/src/component/shared/automation/SelectRule.vue +97 -97
- package/src/component/shared/automation/components/BillingByRent.vue +97 -97
- package/src/component/shared/automation/components/SendEmail.vue +93 -93
- package/src/component/shared/file-manager/FileManager.vue +390 -390
- package/src/component/shared/filter-builder/FilterBuilder.vue +220 -220
- package/src/component/shared/filter-builder/FilterQuery.vue +95 -95
- package/src/component/shared/query-builder/ConvertToOdata.js +86 -86
- package/src/component/shared/query-builder/DynamicComponent.vue +161 -161
- package/src/component/shared/query-builder/Fields.vue +93 -93
- package/src/component/shared/query-builder/Rules.vue +68 -68
- package/src/component/shared/query-builder/SelectRule.vue +97 -97
- package/src/component/shared/query-builder/Tags.vue +59 -59
- package/src/component/signature/Payment.vue +160 -160
- package/src/component/signature/Warning.vue +75 -75
- package/src/component/template/ReportCreateUpdate.vue +110 -110
- package/src/component/template/ViewTemplateDocumentView.vue +213 -213
- package/src/component/template/ViewTemplateImportFile.vue +347 -347
- package/src/component/template/ViewTemplateReportList.vue +240 -240
- package/src/component/template/ViewTemplateReportPreview.vue +521 -521
- package/src/component/template/ViewTemplateSelectOption.vue +46 -46
- package/src/component/template/model/Report.js +5 -5
- package/src/component/training/Course.vue +343 -343
- package/src/component/training/CourseView.vue +198 -198
- package/src/component/value-objects/Address.js +10 -10
- package/src/component/value-objects/Address.vue +173 -173
- package/src/component/value-objects/Contact.js +6 -6
- package/src/component/value-objects/Contact.vue +106 -106
- package/src/component/value-objects/Person.js +10 -10
- package/src/component/value-objects/Person.vue +130 -130
- package/src/store/modules/automation.js +30 -30
- package/src/store/modules/generic.js +15 -1
- package/src/store/modules/report.js +277 -277
- package/src/store/modules/user.js +69 -69
- package/src/store/modules/util.js +25 -25
|
@@ -1,72 +1,72 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div class="main">
|
|
3
|
-
<b-row>
|
|
4
|
-
<b-col xs="6" sm="6" md="6" lg="6" xl="6">
|
|
5
|
-
<span class="title">
|
|
6
|
-
<i class="toggle-icon" :class="classIcon"></i> {{ title }}
|
|
7
|
-
</span>
|
|
8
|
-
<br />
|
|
9
|
-
</b-col>
|
|
10
|
-
<b-col xs="6" sm="6" md="6" lg="4" xl="4">
|
|
11
|
-
<VueToggles height="23" width="60" checkedText="Sim" uncheckedText="Não" :checkedBg="color"
|
|
12
|
-
uncheckedBg="lightgrey" :disabled="disabled" :value="value" @click="clicked" />
|
|
13
|
-
</b-col>
|
|
14
|
-
</b-row>
|
|
15
|
-
</div>
|
|
16
|
-
</template>
|
|
17
|
-
|
|
18
|
-
<script>
|
|
19
|
-
import VueToggles from "vue-toggles";
|
|
20
|
-
|
|
21
|
-
export default {
|
|
22
|
-
name: "Toggle",
|
|
23
|
-
components: {
|
|
24
|
-
VueToggles,
|
|
25
|
-
},
|
|
26
|
-
props: {
|
|
27
|
-
title: String,
|
|
28
|
-
color: String,
|
|
29
|
-
classIcon: String,
|
|
30
|
-
disabled: {
|
|
31
|
-
type: Boolean,
|
|
32
|
-
default: false,
|
|
33
|
-
},
|
|
34
|
-
params: Object,
|
|
35
|
-
changed: Function,
|
|
36
|
-
value: Boolean,
|
|
37
|
-
},
|
|
38
|
-
data() {
|
|
39
|
-
return {
|
|
40
|
-
valueLocal: false,
|
|
41
|
-
};
|
|
42
|
-
},
|
|
43
|
-
created() {
|
|
44
|
-
this.valueLocal = this.value;
|
|
45
|
-
},
|
|
46
|
-
methods: {
|
|
47
|
-
clicked() {
|
|
48
|
-
this.valueLocal = !this.valueLocal;
|
|
49
|
-
this.$emit("input", this.valueLocal);
|
|
50
|
-
if (this.changed) this.changed(this.params);
|
|
51
|
-
},
|
|
52
|
-
},
|
|
53
|
-
};
|
|
54
|
-
</script>
|
|
55
|
-
|
|
56
|
-
<style scoped>
|
|
57
|
-
.main {
|
|
58
|
-
padding: 5px;
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
.toggle-icon {
|
|
62
|
-
font-size: 14px;
|
|
63
|
-
margin-right: 5px;
|
|
64
|
-
margin-bottom: 2px;
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
.title {
|
|
68
|
-
margin-left: -3px;
|
|
69
|
-
padding-right: 35px;
|
|
70
|
-
margin-bottom: 50px !important;
|
|
71
|
-
}
|
|
72
|
-
</style>
|
|
1
|
+
<template>
|
|
2
|
+
<div class="main">
|
|
3
|
+
<b-row>
|
|
4
|
+
<b-col xs="6" sm="6" md="6" lg="6" xl="6">
|
|
5
|
+
<span class="title">
|
|
6
|
+
<i class="toggle-icon" :class="classIcon"></i> {{ title }}
|
|
7
|
+
</span>
|
|
8
|
+
<br />
|
|
9
|
+
</b-col>
|
|
10
|
+
<b-col xs="6" sm="6" md="6" lg="4" xl="4">
|
|
11
|
+
<VueToggles height="23" width="60" checkedText="Sim" uncheckedText="Não" :checkedBg="color"
|
|
12
|
+
uncheckedBg="lightgrey" :disabled="disabled" :value="value" @click="clicked" />
|
|
13
|
+
</b-col>
|
|
14
|
+
</b-row>
|
|
15
|
+
</div>
|
|
16
|
+
</template>
|
|
17
|
+
|
|
18
|
+
<script>
|
|
19
|
+
import VueToggles from "vue-toggles";
|
|
20
|
+
|
|
21
|
+
export default {
|
|
22
|
+
name: "Toggle",
|
|
23
|
+
components: {
|
|
24
|
+
VueToggles,
|
|
25
|
+
},
|
|
26
|
+
props: {
|
|
27
|
+
title: String,
|
|
28
|
+
color: String,
|
|
29
|
+
classIcon: String,
|
|
30
|
+
disabled: {
|
|
31
|
+
type: Boolean,
|
|
32
|
+
default: false,
|
|
33
|
+
},
|
|
34
|
+
params: Object,
|
|
35
|
+
changed: Function,
|
|
36
|
+
value: Boolean,
|
|
37
|
+
},
|
|
38
|
+
data() {
|
|
39
|
+
return {
|
|
40
|
+
valueLocal: false,
|
|
41
|
+
};
|
|
42
|
+
},
|
|
43
|
+
created() {
|
|
44
|
+
this.valueLocal = this.value;
|
|
45
|
+
},
|
|
46
|
+
methods: {
|
|
47
|
+
clicked() {
|
|
48
|
+
this.valueLocal = !this.valueLocal;
|
|
49
|
+
this.$emit("input", this.valueLocal);
|
|
50
|
+
if (this.changed) this.changed(this.params);
|
|
51
|
+
},
|
|
52
|
+
},
|
|
53
|
+
};
|
|
54
|
+
</script>
|
|
55
|
+
|
|
56
|
+
<style scoped>
|
|
57
|
+
.main {
|
|
58
|
+
padding: 5px;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
.toggle-icon {
|
|
62
|
+
font-size: 14px;
|
|
63
|
+
margin-right: 5px;
|
|
64
|
+
margin-bottom: 2px;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
.title {
|
|
68
|
+
margin-left: -3px;
|
|
69
|
+
padding-right: 35px;
|
|
70
|
+
margin-bottom: 50px !important;
|
|
71
|
+
}
|
|
72
|
+
</style>
|
|
@@ -1,131 +1,131 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div>
|
|
3
|
-
<div class="icon-logout" @click="execute">
|
|
4
|
-
<i class="fa-duotone fa-right-from-bracket"></i>
|
|
5
|
-
</div>
|
|
6
|
-
<div class="profile-container" v-if="hideShow">
|
|
7
|
-
<div class="item-header text-center">
|
|
8
|
-
<span>Conta</span>
|
|
9
|
-
</div>
|
|
10
|
-
<div class="profile-content" v-for="item in items" :key="item.title">
|
|
11
|
-
<div class="item-content" @click="navegateTo(item.routeName)">
|
|
12
|
-
<div class="title-container">
|
|
13
|
-
<span>
|
|
14
|
-
<i :class="item.classIcon"></i>
|
|
15
|
-
<span class="title-profile title-input">{{ item.title }}</span>
|
|
16
|
-
</span>
|
|
17
|
-
</div>
|
|
18
|
-
</div>
|
|
19
|
-
</div>
|
|
20
|
-
<div class="profile-content" @click="execute">
|
|
21
|
-
<div class="item-content">
|
|
22
|
-
<div class="title-container">
|
|
23
|
-
<span>
|
|
24
|
-
<i class="fas fa-sign-in"></i>
|
|
25
|
-
<span class="title-profile title-input">Sair</span>
|
|
26
|
-
</span>
|
|
27
|
-
</div>
|
|
28
|
-
</div>
|
|
29
|
-
</div>
|
|
30
|
-
</div>
|
|
31
|
-
</div>
|
|
32
|
-
</template>
|
|
33
|
-
<script>
|
|
34
|
-
export default {
|
|
35
|
-
name: "Account",
|
|
36
|
-
props: {
|
|
37
|
-
items: [],
|
|
38
|
-
exited: Function,
|
|
39
|
-
},
|
|
40
|
-
data() {
|
|
41
|
-
return {
|
|
42
|
-
hideShow: false,
|
|
43
|
-
};
|
|
44
|
-
},
|
|
45
|
-
methods: {
|
|
46
|
-
navegateTo(routeName) {
|
|
47
|
-
this.$router.push({ name: routeName });
|
|
48
|
-
this.hideShow = false;
|
|
49
|
-
},
|
|
50
|
-
execute() {
|
|
51
|
-
if (this.exited) this.exited();
|
|
52
|
-
},
|
|
53
|
-
},
|
|
54
|
-
};
|
|
55
|
-
</script>
|
|
56
|
-
<style scoped>
|
|
57
|
-
.icon-logout {
|
|
58
|
-
margin-top: -37px;
|
|
59
|
-
padding-right: 18px;
|
|
60
|
-
cursor: pointer;
|
|
61
|
-
position: fixed;
|
|
62
|
-
float: right;
|
|
63
|
-
left: auto;
|
|
64
|
-
right: 0;
|
|
65
|
-
color: white;
|
|
66
|
-
font-size: 20px;
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
img {
|
|
70
|
-
border-radius: 50%;
|
|
71
|
-
height: 40px;
|
|
72
|
-
width: 40px;
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
.profile-container {
|
|
76
|
-
position: fixed;
|
|
77
|
-
float: right;
|
|
78
|
-
left: auto;
|
|
79
|
-
right: 0;
|
|
80
|
-
margin-right: 20px;
|
|
81
|
-
height: 100%;
|
|
82
|
-
z-index: 1000;
|
|
83
|
-
width: 190px;
|
|
84
|
-
margin-top: 26px;
|
|
85
|
-
background-color: white;
|
|
86
|
-
height: auto;
|
|
87
|
-
border-bottom: 1px solid #e9ebec;
|
|
88
|
-
}
|
|
89
|
-
|
|
90
|
-
.profile-content {
|
|
91
|
-
right: 0;
|
|
92
|
-
height: 100%;
|
|
93
|
-
z-index: 101;
|
|
94
|
-
width: 190px;
|
|
95
|
-
height: auto;
|
|
96
|
-
}
|
|
97
|
-
|
|
98
|
-
.item-header {
|
|
99
|
-
padding: 8px 20px;
|
|
100
|
-
background: #f8f8f8;
|
|
101
|
-
border-left: 1px solid #e9ebec;
|
|
102
|
-
border-right: 1px solid #e9ebec;
|
|
103
|
-
border-top: 1px solid #e9ebec;
|
|
104
|
-
}
|
|
105
|
-
|
|
106
|
-
.item-content {
|
|
107
|
-
padding-left: 15px;
|
|
108
|
-
height: 45px;
|
|
109
|
-
background: white;
|
|
110
|
-
border: 1px solid #e9ebec;
|
|
111
|
-
border-bottom: 0px solid #e9ebec;
|
|
112
|
-
cursor: pointer;
|
|
113
|
-
}
|
|
114
|
-
|
|
115
|
-
.item-content:hover {
|
|
116
|
-
background: #f8f8f8;
|
|
117
|
-
}
|
|
118
|
-
|
|
119
|
-
.title-container {
|
|
120
|
-
padding-top: 10px;
|
|
121
|
-
}
|
|
122
|
-
|
|
123
|
-
.title-container:hover {
|
|
124
|
-
padding-top: 10px;
|
|
125
|
-
color: #37597c;
|
|
126
|
-
}
|
|
127
|
-
|
|
128
|
-
.title-profile {
|
|
129
|
-
padding-left: 10px;
|
|
130
|
-
}
|
|
131
|
-
</style>
|
|
1
|
+
<template>
|
|
2
|
+
<div>
|
|
3
|
+
<div class="icon-logout" @click="execute">
|
|
4
|
+
<i class="fa-duotone fa-right-from-bracket"></i>
|
|
5
|
+
</div>
|
|
6
|
+
<div class="profile-container" v-if="hideShow">
|
|
7
|
+
<div class="item-header text-center">
|
|
8
|
+
<span>Conta</span>
|
|
9
|
+
</div>
|
|
10
|
+
<div class="profile-content" v-for="item in items" :key="item.title">
|
|
11
|
+
<div class="item-content" @click="navegateTo(item.routeName)">
|
|
12
|
+
<div class="title-container">
|
|
13
|
+
<span>
|
|
14
|
+
<i :class="item.classIcon"></i>
|
|
15
|
+
<span class="title-profile title-input">{{ item.title }}</span>
|
|
16
|
+
</span>
|
|
17
|
+
</div>
|
|
18
|
+
</div>
|
|
19
|
+
</div>
|
|
20
|
+
<div class="profile-content" @click="execute">
|
|
21
|
+
<div class="item-content">
|
|
22
|
+
<div class="title-container">
|
|
23
|
+
<span>
|
|
24
|
+
<i class="fas fa-sign-in"></i>
|
|
25
|
+
<span class="title-profile title-input">Sair</span>
|
|
26
|
+
</span>
|
|
27
|
+
</div>
|
|
28
|
+
</div>
|
|
29
|
+
</div>
|
|
30
|
+
</div>
|
|
31
|
+
</div>
|
|
32
|
+
</template>
|
|
33
|
+
<script>
|
|
34
|
+
export default {
|
|
35
|
+
name: "Account",
|
|
36
|
+
props: {
|
|
37
|
+
items: [],
|
|
38
|
+
exited: Function,
|
|
39
|
+
},
|
|
40
|
+
data() {
|
|
41
|
+
return {
|
|
42
|
+
hideShow: false,
|
|
43
|
+
};
|
|
44
|
+
},
|
|
45
|
+
methods: {
|
|
46
|
+
navegateTo(routeName) {
|
|
47
|
+
this.$router.push({ name: routeName });
|
|
48
|
+
this.hideShow = false;
|
|
49
|
+
},
|
|
50
|
+
execute() {
|
|
51
|
+
if (this.exited) this.exited();
|
|
52
|
+
},
|
|
53
|
+
},
|
|
54
|
+
};
|
|
55
|
+
</script>
|
|
56
|
+
<style scoped>
|
|
57
|
+
.icon-logout {
|
|
58
|
+
margin-top: -37px;
|
|
59
|
+
padding-right: 18px;
|
|
60
|
+
cursor: pointer;
|
|
61
|
+
position: fixed;
|
|
62
|
+
float: right;
|
|
63
|
+
left: auto;
|
|
64
|
+
right: 0;
|
|
65
|
+
color: white;
|
|
66
|
+
font-size: 20px;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
img {
|
|
70
|
+
border-radius: 50%;
|
|
71
|
+
height: 40px;
|
|
72
|
+
width: 40px;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
.profile-container {
|
|
76
|
+
position: fixed;
|
|
77
|
+
float: right;
|
|
78
|
+
left: auto;
|
|
79
|
+
right: 0;
|
|
80
|
+
margin-right: 20px;
|
|
81
|
+
height: 100%;
|
|
82
|
+
z-index: 1000;
|
|
83
|
+
width: 190px;
|
|
84
|
+
margin-top: 26px;
|
|
85
|
+
background-color: white;
|
|
86
|
+
height: auto;
|
|
87
|
+
border-bottom: 1px solid #e9ebec;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
.profile-content {
|
|
91
|
+
right: 0;
|
|
92
|
+
height: 100%;
|
|
93
|
+
z-index: 101;
|
|
94
|
+
width: 190px;
|
|
95
|
+
height: auto;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
.item-header {
|
|
99
|
+
padding: 8px 20px;
|
|
100
|
+
background: #f8f8f8;
|
|
101
|
+
border-left: 1px solid #e9ebec;
|
|
102
|
+
border-right: 1px solid #e9ebec;
|
|
103
|
+
border-top: 1px solid #e9ebec;
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
.item-content {
|
|
107
|
+
padding-left: 15px;
|
|
108
|
+
height: 45px;
|
|
109
|
+
background: white;
|
|
110
|
+
border: 1px solid #e9ebec;
|
|
111
|
+
border-bottom: 0px solid #e9ebec;
|
|
112
|
+
cursor: pointer;
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
.item-content:hover {
|
|
116
|
+
background: #f8f8f8;
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
.title-container {
|
|
120
|
+
padding-top: 10px;
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
.title-container:hover {
|
|
124
|
+
padding-top: 10px;
|
|
125
|
+
color: #37597c;
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
.title-profile {
|
|
129
|
+
padding-left: 10px;
|
|
130
|
+
}
|
|
131
|
+
</style>
|
|
@@ -1,68 +1,68 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div>
|
|
3
|
-
<transition name="slide-up" mode="out-in">
|
|
4
|
-
<div v-if="currentPhrase" :key="currentPhrase" class="phrase title">
|
|
5
|
-
{{ currentPhrase }}
|
|
6
|
-
</div>
|
|
7
|
-
</transition>
|
|
8
|
-
</div>
|
|
9
|
-
</template>
|
|
10
|
-
|
|
11
|
-
<script>
|
|
12
|
-
export default {
|
|
13
|
-
name: "AnimatedPhrase",
|
|
14
|
-
props: {
|
|
15
|
-
phrases: {
|
|
16
|
-
type: Array,
|
|
17
|
-
required: true
|
|
18
|
-
},
|
|
19
|
-
interval: {
|
|
20
|
-
type: Number,
|
|
21
|
-
default: 3000
|
|
22
|
-
}
|
|
23
|
-
},
|
|
24
|
-
data() {
|
|
25
|
-
return {
|
|
26
|
-
currentPhrase: null,
|
|
27
|
-
timer: null
|
|
28
|
-
}
|
|
29
|
-
},
|
|
30
|
-
mounted() {
|
|
31
|
-
this.showRandomPhrase()
|
|
32
|
-
this.timer = setInterval(this.showRandomPhrase, this.interval)
|
|
33
|
-
},
|
|
34
|
-
beforeDestroy() {
|
|
35
|
-
clearInterval(this.timer)
|
|
36
|
-
},
|
|
37
|
-
methods: {
|
|
38
|
-
showRandomPhrase() {
|
|
39
|
-
const index = Math.floor(Math.random() * this.phrases.length)
|
|
40
|
-
this.currentPhrase = this.phrases[index]
|
|
41
|
-
}
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
</script>
|
|
45
|
-
|
|
46
|
-
<style scoped>
|
|
47
|
-
.phrase {
|
|
48
|
-
font-size: 15px;
|
|
49
|
-
margin-top: 20px;
|
|
50
|
-
opacity: 1;
|
|
51
|
-
transition: all 0.5s ease-in-out;
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
.slide-up-enter-active,
|
|
55
|
-
.slide-up-leave-active {
|
|
56
|
-
transition: all 0.5s ease;
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
.slide-up-enter,
|
|
60
|
-
.slide-up-leave-to {
|
|
61
|
-
opacity: 0;
|
|
62
|
-
transform: translateY(20px);
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
.slide-up-leave-active {
|
|
66
|
-
transform: translateY(-20px);
|
|
67
|
-
}
|
|
68
|
-
</style>
|
|
1
|
+
<template>
|
|
2
|
+
<div>
|
|
3
|
+
<transition name="slide-up" mode="out-in">
|
|
4
|
+
<div v-if="currentPhrase" :key="currentPhrase" class="phrase title">
|
|
5
|
+
{{ currentPhrase }}
|
|
6
|
+
</div>
|
|
7
|
+
</transition>
|
|
8
|
+
</div>
|
|
9
|
+
</template>
|
|
10
|
+
|
|
11
|
+
<script>
|
|
12
|
+
export default {
|
|
13
|
+
name: "AnimatedPhrase",
|
|
14
|
+
props: {
|
|
15
|
+
phrases: {
|
|
16
|
+
type: Array,
|
|
17
|
+
required: true
|
|
18
|
+
},
|
|
19
|
+
interval: {
|
|
20
|
+
type: Number,
|
|
21
|
+
default: 3000
|
|
22
|
+
}
|
|
23
|
+
},
|
|
24
|
+
data() {
|
|
25
|
+
return {
|
|
26
|
+
currentPhrase: null,
|
|
27
|
+
timer: null
|
|
28
|
+
}
|
|
29
|
+
},
|
|
30
|
+
mounted() {
|
|
31
|
+
this.showRandomPhrase()
|
|
32
|
+
this.timer = setInterval(this.showRandomPhrase, this.interval)
|
|
33
|
+
},
|
|
34
|
+
beforeDestroy() {
|
|
35
|
+
clearInterval(this.timer)
|
|
36
|
+
},
|
|
37
|
+
methods: {
|
|
38
|
+
showRandomPhrase() {
|
|
39
|
+
const index = Math.floor(Math.random() * this.phrases.length)
|
|
40
|
+
this.currentPhrase = this.phrases[index]
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
</script>
|
|
45
|
+
|
|
46
|
+
<style scoped>
|
|
47
|
+
.phrase {
|
|
48
|
+
font-size: 15px;
|
|
49
|
+
margin-top: 20px;
|
|
50
|
+
opacity: 1;
|
|
51
|
+
transition: all 0.5s ease-in-out;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
.slide-up-enter-active,
|
|
55
|
+
.slide-up-leave-active {
|
|
56
|
+
transition: all 0.5s ease;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
.slide-up-enter,
|
|
60
|
+
.slide-up-leave-to {
|
|
61
|
+
opacity: 0;
|
|
62
|
+
transform: translateY(20px);
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
.slide-up-leave-active {
|
|
66
|
+
transform: translateY(-20px);
|
|
67
|
+
}
|
|
68
|
+
</style>
|
|
@@ -1,68 +1,68 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div>
|
|
3
|
-
<transition name="fade">
|
|
4
|
-
<div v-if="showFloating" class="div-fixed footer-bar">
|
|
5
|
-
<slot></slot>
|
|
6
|
-
</div>
|
|
7
|
-
</transition>
|
|
8
|
-
</div>
|
|
9
|
-
</template>
|
|
10
|
-
<script>
|
|
11
|
-
export default {
|
|
12
|
-
name: "BarFloating",
|
|
13
|
-
props: {
|
|
14
|
-
distance: {
|
|
15
|
-
type: Number,
|
|
16
|
-
default: 0,
|
|
17
|
-
}
|
|
18
|
-
},
|
|
19
|
-
data() {
|
|
20
|
-
return {
|
|
21
|
-
showFloating: true,
|
|
22
|
-
}
|
|
23
|
-
},
|
|
24
|
-
mounted() {
|
|
25
|
-
window.addEventListener('scroll', this.checkPosition);
|
|
26
|
-
},
|
|
27
|
-
destroyed() {
|
|
28
|
-
window.removeEventListener('scroll', this.checkPosition);
|
|
29
|
-
},
|
|
30
|
-
methods: {
|
|
31
|
-
checkPosition() {
|
|
32
|
-
if (this.distance == 0) {
|
|
33
|
-
return true;
|
|
34
|
-
}
|
|
35
|
-
else {
|
|
36
|
-
const currentPosition = window.scrollY;
|
|
37
|
-
if (currentPosition > this.distance) {
|
|
38
|
-
this.showFloating = true;
|
|
39
|
-
} else {
|
|
40
|
-
this.showFloating = false;
|
|
41
|
-
}
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
}
|
|
45
|
-
}
|
|
46
|
-
</script>
|
|
47
|
-
<style scoped>
|
|
48
|
-
.div-fixed {
|
|
49
|
-
position: fixed;
|
|
50
|
-
top: 90%;
|
|
51
|
-
left: 57%;
|
|
52
|
-
transform: translate(-50%, -50%);
|
|
53
|
-
width: 75%;
|
|
54
|
-
opacity: 1;
|
|
55
|
-
transition: opacity 1s ease;
|
|
56
|
-
z-index: 1000;
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
.fade-enter-active,
|
|
60
|
-
.fade-leave-active {
|
|
61
|
-
transition: opacity 0.5s;
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
.fade-enter,
|
|
65
|
-
.fade-leave-to {
|
|
66
|
-
opacity: 0;
|
|
67
|
-
}
|
|
1
|
+
<template>
|
|
2
|
+
<div>
|
|
3
|
+
<transition name="fade">
|
|
4
|
+
<div v-if="showFloating" class="div-fixed footer-bar">
|
|
5
|
+
<slot></slot>
|
|
6
|
+
</div>
|
|
7
|
+
</transition>
|
|
8
|
+
</div>
|
|
9
|
+
</template>
|
|
10
|
+
<script>
|
|
11
|
+
export default {
|
|
12
|
+
name: "BarFloating",
|
|
13
|
+
props: {
|
|
14
|
+
distance: {
|
|
15
|
+
type: Number,
|
|
16
|
+
default: 0,
|
|
17
|
+
}
|
|
18
|
+
},
|
|
19
|
+
data() {
|
|
20
|
+
return {
|
|
21
|
+
showFloating: true,
|
|
22
|
+
}
|
|
23
|
+
},
|
|
24
|
+
mounted() {
|
|
25
|
+
window.addEventListener('scroll', this.checkPosition);
|
|
26
|
+
},
|
|
27
|
+
destroyed() {
|
|
28
|
+
window.removeEventListener('scroll', this.checkPosition);
|
|
29
|
+
},
|
|
30
|
+
methods: {
|
|
31
|
+
checkPosition() {
|
|
32
|
+
if (this.distance == 0) {
|
|
33
|
+
return true;
|
|
34
|
+
}
|
|
35
|
+
else {
|
|
36
|
+
const currentPosition = window.scrollY;
|
|
37
|
+
if (currentPosition > this.distance) {
|
|
38
|
+
this.showFloating = true;
|
|
39
|
+
} else {
|
|
40
|
+
this.showFloating = false;
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
</script>
|
|
47
|
+
<style scoped>
|
|
48
|
+
.div-fixed {
|
|
49
|
+
position: fixed;
|
|
50
|
+
top: 90%;
|
|
51
|
+
left: 57%;
|
|
52
|
+
transform: translate(-50%, -50%);
|
|
53
|
+
width: 75%;
|
|
54
|
+
opacity: 1;
|
|
55
|
+
transition: opacity 1s ease;
|
|
56
|
+
z-index: 1000;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
.fade-enter-active,
|
|
60
|
+
.fade-leave-active {
|
|
61
|
+
transition: opacity 0.5s;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
.fade-enter,
|
|
65
|
+
.fade-leave-to {
|
|
66
|
+
opacity: 0;
|
|
67
|
+
}
|
|
68
68
|
</style>
|