fcad-core-dragon 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/.editorconfig +33 -33
- package/.eslintignore +29 -29
- package/{.eslintrc.js → .eslintrc.cjs} +81 -86
- package/CHANGELOG +364 -364
- package/README.md +71 -71
- package/bk.scss +117 -0
- package/package.json +61 -63
- package/src/$locales/en.json +143 -179
- package/src/$locales/fr.json +105 -181
- package/src/assets/data/onboardingMessages.json +47 -47
- package/src/components/AppBase.vue +1054 -614
- package/src/components/AppBaseButton.vue +87 -63
- package/src/components/AppBaseErrorDisplay.vue +438 -420
- package/src/components/AppBaseFlipCard.vue +84 -83
- package/src/components/AppBaseModule.vue +1673 -1842
- package/src/components/AppBasePage.vue +779 -312
- package/src/components/AppBasePopover.vue +41 -0
- package/src/components/AppCompAudio.vue +234 -0
- package/src/components/AppCompBranchButtons.vue +552 -582
- package/src/components/AppCompButtonProgress.vue +126 -147
- package/src/components/AppCompCarousel.vue +298 -192
- package/src/components/AppCompInputCheckBoxNext.vue +195 -0
- package/src/components/AppCompInputDropdownNext.vue +159 -0
- package/src/components/AppCompInputRadioNext.vue +152 -0
- package/src/components/{AppCompInputTextBox.vue → AppCompInputTextNext.vue} +106 -91
- package/src/components/AppCompInputTextTableNext.vue +141 -0
- package/src/components/AppCompInputTextToFillDropdownNext.vue +230 -0
- package/src/components/{AppCompInputTextToFillText.vue → AppCompInputTextToFillNext.vue} +171 -164
- package/src/components/AppCompJauge.vue +74 -55
- package/src/components/AppCompMenu.vue +413 -209
- package/src/components/AppCompMenuItem.vue +228 -174
- package/src/components/AppCompNavigation.vue +960 -949
- package/src/components/AppCompNoteCall.vue +133 -126
- package/src/components/AppCompNoteCredit.vue +292 -164
- package/src/components/AppCompPlayBar.vue +1218 -1319
- package/src/components/AppCompPlayBarNext.vue +2052 -0
- package/src/components/AppCompPlayBarProgress.vue +82 -0
- package/src/components/AppCompPopUpNext.vue +503 -0
- package/src/components/{AppCompQuiz.vue → AppCompQuizNext.vue} +2904 -2989
- package/src/components/AppCompQuizRecall.vue +276 -250
- package/src/components/AppCompSVGNext.vue +347 -0
- package/src/components/AppCompSettingsMenu.vue +172 -171
- package/src/components/AppCompTableOfContent.vue +387 -264
- package/src/components/AppCompTranscript.vue +24 -19
- package/src/components/AppCompVideoPlayer.vue +368 -336
- package/src/components/AppCompViewDisplay.vue +6 -6
- package/src/components/BaseModule.vue +72 -67
- package/src/composables/useQuiz.js +206 -0
- package/src/externalComps/ModuleView.vue +22 -0
- package/src/externalComps/SummaryView.vue +91 -0
- package/src/main.js +272 -227
- package/src/mixins/$mediaMixins.js +819 -0
- package/src/mixins/timerMixin.js +155 -156
- package/src/module/stores/appStore.js +893 -0
- package/src/module/xapi/ADL.js +376 -339
- package/src/module/xapi/Crypto/Hasher.js +241 -241
- package/src/module/xapi/Crypto/WordArray.js +278 -278
- package/src/module/xapi/Crypto/algorithms/BufferedBlockAlgorithm.js +103 -103
- package/src/module/xapi/Crypto/algorithms/C_algo.js +315 -319
- package/src/module/xapi/Crypto/algorithms/HMAC.js +9 -9
- package/src/module/xapi/Crypto/algorithms/SHA1.js +9 -9
- package/src/module/xapi/Crypto/encoders/Base.js +105 -105
- package/src/module/xapi/Crypto/encoders/Base64.js +99 -99
- package/src/module/xapi/Crypto/encoders/Hex.js +61 -61
- package/src/module/xapi/Crypto/encoders/Latin1.js +61 -61
- package/src/module/xapi/Crypto/encoders/Utf8.js +45 -45
- package/src/module/xapi/Crypto/index.js +53 -53
- package/src/module/xapi/Statement/activity.js +47 -47
- package/src/module/xapi/Statement/agent.js +55 -55
- package/src/module/xapi/Statement/group.js +26 -26
- package/src/module/xapi/Statement/index.js +259 -259
- package/src/module/xapi/Statement/statement.js +253 -253
- package/src/module/xapi/Statement/statementRef.js +23 -23
- package/src/module/xapi/Statement/substatement.js +22 -22
- package/src/module/xapi/Statement/verb.js +36 -36
- package/src/module/xapi/activitytypes.js +17 -17
- package/src/module/xapi/launch.js +157 -157
- package/src/module/xapi/utils.js +167 -167
- package/src/module/xapi/verbs.js +294 -294
- package/src/module/xapi/wrapper.js +1963 -1890
- package/src/module/xapi/xapiStatement.js +444 -444
- package/src/plugins/bus.js +8 -3
- package/src/plugins/gsap.js +14 -17
- package/src/plugins/helper.js +308 -295
- package/src/plugins/i18n.js +44 -31
- package/src/plugins/idb.js +219 -212
- package/src/plugins/save.js +37 -37
- package/src/plugins/scorm.js +287 -287
- package/src/plugins/xapi.js +11 -11
- package/src/public/index.html +33 -21
- package/src/router/index.js +43 -41
- package/src/router/routes.js +312 -337
- package/src/shared/generalfuncs.js +210 -188
- package/src/shared/validators.js +1069 -249
- package/vite.config.js +27 -0
- package/.prettierrc.js +0 -5
- package/babel.config.js +0 -3
- package/src/components/AppBaseDragChoice.vue +0 -91
- package/src/components/AppBaseDropZone.vue +0 -112
- package/src/components/AppCompBif.vue +0 -120
- package/src/components/AppCompDragAndDrop.vue +0 -339
- package/src/components/AppCompInputAssociation.vue +0 -332
- package/src/components/AppCompInputCheckBox.vue +0 -227
- package/src/components/AppCompInputDropdown.vue +0 -184
- package/src/components/AppCompInputRadio.vue +0 -169
- package/src/components/AppCompInputTextTable.vue +0 -155
- package/src/components/AppCompInputTextToFillDropdown.vue +0 -255
- package/src/components/AppCompMediaPlayer.vue +0 -397
- package/src/components/AppCompPopUp.vue +0 -522
- package/src/components/AppCompPopover.vue +0 -27
- package/src/components/AppCompSVG.vue +0 -309
- package/src/mixins/$pageMixins.js +0 -459
- package/src/mixins/$quizMixins.js +0 -456
- package/src/module/store.js +0 -895
- package/src/plugins/timeManager.js +0 -77
- package/src/routes_bckp.js +0 -313
- package/src/routes_static.js +0 -344
- package/vue.config.js +0 -83
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<router-view />
|
|
3
|
-
</template>
|
|
4
|
-
<script>
|
|
5
|
-
export default {}
|
|
6
|
-
</script>
|
|
1
|
+
<template>
|
|
2
|
+
<router-view />
|
|
3
|
+
</template>
|
|
4
|
+
<script>
|
|
5
|
+
export default {}
|
|
6
|
+
</script>
|
|
@@ -1,67 +1,72 @@
|
|
|
1
|
-
<!--
|
|
2
|
-
*@ Description: Root component used to extends the AppBase Module
|
|
3
|
-
*@ What it does: Entry point for the data of appBaseModule. manage progress, indexeDB connection.
|
|
4
|
-
*@Note :Must be used
|
|
5
|
-
-->
|
|
6
|
-
<template>
|
|
7
|
-
<div v-if="mData" class="module-wrapper">
|
|
8
|
-
<div
|
|
9
|
-
class="overlay-close-widget"
|
|
10
|
-
:class="{ blockOverlay: over }"
|
|
11
|
-
@click="overlayClose()"
|
|
12
|
-
></div>
|
|
13
|
-
<slot name="mTitle" />
|
|
14
|
-
<slot>Module</slot>
|
|
15
|
-
</div>
|
|
16
|
-
</template>
|
|
17
|
-
|
|
18
|
-
<script>
|
|
19
|
-
|
|
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
|
-
|
|
1
|
+
<!--
|
|
2
|
+
*@ Description: Root component used to extends the AppBase Module
|
|
3
|
+
*@ What it does: Entry point for the data of appBaseModule. manage progress, indexeDB connection.
|
|
4
|
+
*@Note :Must be used
|
|
5
|
+
-->
|
|
6
|
+
<template>
|
|
7
|
+
<div v-if="mData" class="module-wrapper">
|
|
8
|
+
<!-- <div
|
|
9
|
+
class="overlay-close-widget"
|
|
10
|
+
:class="{ blockOverlay: over }"
|
|
11
|
+
@click="overlayClose()"
|
|
12
|
+
></div> -->
|
|
13
|
+
<slot name="mTitle" />
|
|
14
|
+
<slot>Module</slot>
|
|
15
|
+
</div>
|
|
16
|
+
</template>
|
|
17
|
+
|
|
18
|
+
<script>
|
|
19
|
+
export default {
|
|
20
|
+
props: {
|
|
21
|
+
mData: {
|
|
22
|
+
type: Object,
|
|
23
|
+
required: true
|
|
24
|
+
}
|
|
25
|
+
},
|
|
26
|
+
|
|
27
|
+
data() {
|
|
28
|
+
return {
|
|
29
|
+
data: null
|
|
30
|
+
// over: false
|
|
31
|
+
// back: null
|
|
32
|
+
}
|
|
33
|
+
},
|
|
34
|
+
|
|
35
|
+
mounted() {
|
|
36
|
+
// this.$bus.$on('toggle-widget', () => {
|
|
37
|
+
// this.over = true
|
|
38
|
+
// })
|
|
39
|
+
// this.$bus.$on('close-widget', () => {
|
|
40
|
+
// this.over = false
|
|
41
|
+
// })
|
|
42
|
+
},
|
|
43
|
+
created() {},
|
|
44
|
+
methods: {
|
|
45
|
+
// overlayClose() {
|
|
46
|
+
// this.$bus.$emit('close-widget')
|
|
47
|
+
// }
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
</script>
|
|
51
|
+
|
|
52
|
+
<style lang="scss" scoped>
|
|
53
|
+
.module-wrapper {
|
|
54
|
+
width: 100%;
|
|
55
|
+
height: 100%;
|
|
56
|
+
min-height: 100vh;
|
|
57
|
+
padding: 0 145px;
|
|
58
|
+
}
|
|
59
|
+
.overlay-close-widget {
|
|
60
|
+
position: absolute;
|
|
61
|
+
top: 0;
|
|
62
|
+
left: 0;
|
|
63
|
+
width: 100%;
|
|
64
|
+
height: 100%;
|
|
65
|
+
z-index: 2;
|
|
66
|
+
display: none;
|
|
67
|
+
|
|
68
|
+
&.blockOverlay {
|
|
69
|
+
display: block;
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
</style>
|
|
@@ -0,0 +1,206 @@
|
|
|
1
|
+
//This composable sould Extend the functionality of a the quiz
|
|
2
|
+
|
|
3
|
+
import i18n from '@/i18n' //Must import directly the local from project app because vue-18in does not work in legacy mode with composable
|
|
4
|
+
|
|
5
|
+
export function useQuiz(quiz) {
|
|
6
|
+
const { quizType, solution, showSolution, quizInputType } = quiz
|
|
7
|
+
const { t } = i18n.global
|
|
8
|
+
|
|
9
|
+
// /**
|
|
10
|
+
// * @param {String} inputId
|
|
11
|
+
// * @returns {Array} the class
|
|
12
|
+
// */
|
|
13
|
+
function classInput(inputId, optSelected = null) {
|
|
14
|
+
let theClass = []
|
|
15
|
+
|
|
16
|
+
switch (true) {
|
|
17
|
+
case ['choix_unique', 'reponse_ouverte'].includes(quizType.value):
|
|
18
|
+
if (inputId == quizInputType.value) {
|
|
19
|
+
theClass.push('reponseSelectionner')
|
|
20
|
+
}
|
|
21
|
+
break
|
|
22
|
+
|
|
23
|
+
case quizType.value == 'choix_mult':
|
|
24
|
+
if (containsValue(quizInputType.value, inputId)) {
|
|
25
|
+
theClass.push('reponseSelectionner')
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
if (showSolution.value) {
|
|
30
|
+
if (solution.value !== null) {
|
|
31
|
+
switch (true) {
|
|
32
|
+
case ['choix_unique', 'reponse_ouverte'].includes(quizType.value):
|
|
33
|
+
if (inputId == solution.value) {
|
|
34
|
+
theClass.push('correct_answer')
|
|
35
|
+
} else {
|
|
36
|
+
theClass.push('wrong_answer')
|
|
37
|
+
}
|
|
38
|
+
break
|
|
39
|
+
|
|
40
|
+
case quizType.value == 'choix_mult':
|
|
41
|
+
if (containsValue(solution.value, inputId)) {
|
|
42
|
+
theClass.push('correct_answer')
|
|
43
|
+
} else {
|
|
44
|
+
theClass.push('wrong_answer')
|
|
45
|
+
}
|
|
46
|
+
break
|
|
47
|
+
case quizType.value == 'dropdown':
|
|
48
|
+
if (!optSelected || !optSelected[inputId]) return
|
|
49
|
+
if (solution.value[inputId] == optSelected[inputId]) {
|
|
50
|
+
theClass.push('correct_answer')
|
|
51
|
+
} else {
|
|
52
|
+
theClass.push('wrong_answer')
|
|
53
|
+
}
|
|
54
|
+
break
|
|
55
|
+
|
|
56
|
+
case quizType.value == 'texte_troue_select':
|
|
57
|
+
if (typeof optSelected[inputId] !== 'undefined') {
|
|
58
|
+
if (
|
|
59
|
+
Object.values(solution.value[inputId])[0] ==
|
|
60
|
+
optSelected[inputId]
|
|
61
|
+
) {
|
|
62
|
+
theClass.push('correct_answer')
|
|
63
|
+
} else {
|
|
64
|
+
theClass.push('wrong_answer')
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
break
|
|
68
|
+
|
|
69
|
+
case quizType.value == 'texte_tableau':
|
|
70
|
+
if (
|
|
71
|
+
containsValue(
|
|
72
|
+
solution.value[inputId].reponse_value,
|
|
73
|
+
optSelected[inputId]
|
|
74
|
+
)
|
|
75
|
+
) {
|
|
76
|
+
theClass.push('correct_answer')
|
|
77
|
+
} else {
|
|
78
|
+
theClass.push('wrong_answer')
|
|
79
|
+
}
|
|
80
|
+
break
|
|
81
|
+
case quizType.value == 'texte_troue':
|
|
82
|
+
if (typeof optSelected[inputId] !== 'undefined') {
|
|
83
|
+
if (
|
|
84
|
+
containsValue(
|
|
85
|
+
Object.values(solution.value[inputId])[0],
|
|
86
|
+
optSelected[inputId]
|
|
87
|
+
)
|
|
88
|
+
) {
|
|
89
|
+
theClass.push('correct_answer')
|
|
90
|
+
} else {
|
|
91
|
+
theClass.push('wrong_answer')
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
break
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
return theClass
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
function messageAccessibility(inputId, optSelected = null) {
|
|
102
|
+
let mess = ''
|
|
103
|
+
if (showSolution.value) {
|
|
104
|
+
if (solution.value !== null) {
|
|
105
|
+
switch (true) {
|
|
106
|
+
case ['choix_unique', 'reponse_ouverte'].includes(quizType.value):
|
|
107
|
+
if (inputId == solution.value) {
|
|
108
|
+
mess = `${t('quizState.goodAnswer')}`
|
|
109
|
+
} else {
|
|
110
|
+
mess = `${t('quizState.badAnswer')}`
|
|
111
|
+
}
|
|
112
|
+
break
|
|
113
|
+
|
|
114
|
+
case quizType.value == 'choix_mult':
|
|
115
|
+
if (containsValue(solution.value, inputId)) {
|
|
116
|
+
mess = `${t('quizState.goodAnswer')}`
|
|
117
|
+
} else {
|
|
118
|
+
mess = `${t('quizState.badAnswer')}`
|
|
119
|
+
}
|
|
120
|
+
break
|
|
121
|
+
case quizType.value == 'dropdown':
|
|
122
|
+
if (solution[inputId.value] == optSelected[inputId.value]) {
|
|
123
|
+
mess = `${t('quizState.goodAnswer')}`
|
|
124
|
+
} else {
|
|
125
|
+
mess = `${t('quizState.badAnswer')}`
|
|
126
|
+
}
|
|
127
|
+
break
|
|
128
|
+
|
|
129
|
+
case quizType.value == 'texte_troue_select':
|
|
130
|
+
if (typeof optSelected[inputId] !== 'undefined') {
|
|
131
|
+
if (
|
|
132
|
+
Object.values(solution.value[inputId])[0] ==
|
|
133
|
+
optSelected[inputId]
|
|
134
|
+
) {
|
|
135
|
+
mess = `${t('quizState.goodAnswer')}`
|
|
136
|
+
} else {
|
|
137
|
+
mess = `${t('quizState.badAnswer')}`
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
break
|
|
141
|
+
|
|
142
|
+
case quizType.value == 'texte_tableau':
|
|
143
|
+
if (
|
|
144
|
+
containsValue(
|
|
145
|
+
solution.value[inputId].reponse_value,
|
|
146
|
+
optSelected[inputId]
|
|
147
|
+
)
|
|
148
|
+
) {
|
|
149
|
+
mess = `${t('quizState.goodAnswer')}`
|
|
150
|
+
} else {
|
|
151
|
+
mess = `${t('quizState.badAnswer')}`
|
|
152
|
+
}
|
|
153
|
+
break
|
|
154
|
+
case quizType.value == 'texte_troue':
|
|
155
|
+
if (typeof optSelected[inputId] !== 'undefined') {
|
|
156
|
+
if (
|
|
157
|
+
containsValue(
|
|
158
|
+
Object.values(solution.value[inputId])[0],
|
|
159
|
+
optSelected[inputId]
|
|
160
|
+
)
|
|
161
|
+
) {
|
|
162
|
+
mess = `${t('quizState.goodAnswer')}`
|
|
163
|
+
} else {
|
|
164
|
+
mess = `${t('quizState.badAnswer')}`
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
break
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
}
|
|
171
|
+
return mess
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
/**
|
|
175
|
+
* @description check if a values exists in a array
|
|
176
|
+
* @param {Array} array
|
|
177
|
+
* @param value
|
|
178
|
+
* @returns {Boolean}
|
|
179
|
+
*/
|
|
180
|
+
function containsValue(array, value) {
|
|
181
|
+
return array.includes(value)
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
/**
|
|
185
|
+
* @description shuffles an array used to randomized the option order if shuffleAnswers is true
|
|
186
|
+
* @param {Array} array
|
|
187
|
+
* @returns {Array}
|
|
188
|
+
*/
|
|
189
|
+
function shuffleArray(array) {
|
|
190
|
+
let newArray = []
|
|
191
|
+
let newArray2 = []
|
|
192
|
+
|
|
193
|
+
for (let i = 0; i < array.length; i++) {
|
|
194
|
+
const element = array[i]
|
|
195
|
+
newArray.push(element)
|
|
196
|
+
}
|
|
197
|
+
while (newArray.length > 0) {
|
|
198
|
+
let pos = Math.floor(newArray.length * Math.random())
|
|
199
|
+
newArray2.push(newArray[pos])
|
|
200
|
+
newArray.splice(pos, 1)
|
|
201
|
+
}
|
|
202
|
+
return newArray2
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
return { containsValue, shuffleArray, classInput, messageAccessibility }
|
|
206
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<app-base-module :module-config="$data" />
|
|
3
|
+
</template>
|
|
4
|
+
|
|
5
|
+
<script>
|
|
6
|
+
export default {
|
|
7
|
+
data() {
|
|
8
|
+
return {
|
|
9
|
+
id: 'module_99',
|
|
10
|
+
consigneBehavior: 'onHover', //Controle the behavior of desplaying instruction
|
|
11
|
+
bookmarkActive: true, // Controle the use of saved point
|
|
12
|
+
allowNavigationToActivity: null
|
|
13
|
+
|
|
14
|
+
//main:''// Edit to define the ID of the node that will be main. When skipping to main content in the page.
|
|
15
|
+
}
|
|
16
|
+
},
|
|
17
|
+
created() {
|
|
18
|
+
this.allowNavigationToActivity =
|
|
19
|
+
this.$helper.getSettingsFromStore('auto_next_activity')
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
</script>
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div>
|
|
3
|
+
<app-comp-menu></app-comp-menu>
|
|
4
|
+
<!-- <h6>normal</h6>
|
|
5
|
+
<div class="t normal"></div>
|
|
6
|
+
<h6>red</h6>
|
|
7
|
+
<div class="t red"></div>
|
|
8
|
+
<h6>green</h6>
|
|
9
|
+
<div class="t green"></div>
|
|
10
|
+
<h6>hue</h6>
|
|
11
|
+
<div class="t hue"></div>
|
|
12
|
+
<h6>Saturation</h6>
|
|
13
|
+
<div class="t saturation"></div>
|
|
14
|
+
<h6>desaturation</h6>
|
|
15
|
+
<div class="t desaturation"></div>
|
|
16
|
+
<h6>lighteness</h6>
|
|
17
|
+
<div class="t lighteness"></div>
|
|
18
|
+
<h6>darkness</h6>
|
|
19
|
+
<div class="t darkness"></div>
|
|
20
|
+
<h6>whiteness</h6>
|
|
21
|
+
<div class="t whiteness"></div>
|
|
22
|
+
<h6>blackness</h6>
|
|
23
|
+
<div class="t blackness"></div> -->
|
|
24
|
+
</div>
|
|
25
|
+
</template>
|
|
26
|
+
|
|
27
|
+
<script>
|
|
28
|
+
export default {
|
|
29
|
+
data() {
|
|
30
|
+
return {}
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
</script>
|
|
34
|
+
<!-- <style lang="scss">
|
|
35
|
+
@use 'sass:color';
|
|
36
|
+
$color: #f11532;
|
|
37
|
+
$color-red: color.change($color, $red: 155);
|
|
38
|
+
$color-green: color.change($color, $green: 255);
|
|
39
|
+
$color-hue: adjust-hue($color, -30deg);
|
|
40
|
+
$color-saturation: color.scale($color, $saturation: 100%);
|
|
41
|
+
$color-desaturate: color.scale($color, $saturation: -50%);
|
|
42
|
+
$color-lighteness: color.scale($color, $lightness: 50%);
|
|
43
|
+
$color-darkness: color.scale($color, $lightness: -50%);
|
|
44
|
+
$color-whiteness: color.scale($color, $whiteness: 50%);
|
|
45
|
+
$color-blackness: color.scale($color, $blackness: 50%);
|
|
46
|
+
|
|
47
|
+
.t {
|
|
48
|
+
width: 50px;
|
|
49
|
+
height: 50px;
|
|
50
|
+
|
|
51
|
+
&.normal {
|
|
52
|
+
background: $color;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
&.red {
|
|
56
|
+
background: $color-red;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
&.green {
|
|
60
|
+
background: $color-green;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
&.hue {
|
|
64
|
+
background: $color-hue;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
&.saturation {
|
|
68
|
+
background: $color-saturation;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
&.desaturation {
|
|
72
|
+
background: $color-desaturate;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
&.lighteness {
|
|
76
|
+
background: $color-lighteness;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
&.darkness {
|
|
80
|
+
background: $color-darkness;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
&.whiteness {
|
|
84
|
+
background: $color-whiteness;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
&.blackness {
|
|
88
|
+
background: $color-blackness;
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
</style> -->
|