Animations, Policy, Toolbar Colors

This commit is contained in:
Surya Paolo
2022-11-23 10:27:36 +01:00
parent 358bdd5d1e
commit 46bf74e9e2
48 changed files with 1852 additions and 630 deletions

View File

@@ -1,17 +1,20 @@
import { defineComponent, onMounted, ref } from 'vue'
import { defineComponent, onMounted, PropType, ref } from 'vue'
import { tools } from '@src/store/Modules/tools'
import { shared_consts } from '@src/common/shared_vuejs'
import { emit } from 'process'
import { IAnim } from '@src/model'
export default defineComponent({
name: 'CSelectAnimation',
emits: ['update:modelValue'],
props: {
modelValue: {
type: String,
required: true,
default: '',
type: Object as PropType<IAnim | string | undefined>,
required: false,
default : () => {
return {name: '', clduration: '', cldelay: ''}
}
},
label: {
type: String,
@@ -23,27 +26,18 @@ export default defineComponent({
setup(props, { emit }) {
const myclass = ref('')
const animType = ref('')
const animSpeed = ref('')
const animDelay = ref('')
const myrec = ref(<IAnim>{name: '', clduration: '', cldelay: ''})
function updateClass() {
if (typeof props.modelValue === 'object') {
myrec.value = props.modelValue
}
let mycl = ''
myclass.value = 'animate__animated ' + animType.value + ' ' + animSpeed.value + ' ' + animDelay.value
emit('update:modelValue', myclass.value)
emit('update:modelValue', myrec.value)
}
function mounted() {
const myarr = props.modelValue.split(' ')
animType.value = tools.findFirstElemInCommon(tools.SelectListAnimation, myarr)
animSpeed.value = tools.findFirstElemInCommon(tools.SelectListSpeed, myarr)
animDelay.value = tools.findFirstElemInCommon(tools.SelectListDelay, myarr)
updateClass()
}
onMounted(mounted)
@@ -51,9 +45,7 @@ export default defineComponent({
return {
tools,
updateClass,
animType,
animSpeed,
animDelay,
myrec,
}
},