feat(fe smartblock): added props to limit component

This commit is contained in:
Marco Cavalli 2025-03-27 10:35:14 +01:00
parent efdca547fc
commit e071d4d959

View file

@ -1,10 +1,14 @@
<script setup lang="ts">
import {reactive} from "vue";
import {onBeforeMount, reactive} from "vue";
const emit = defineEmits([
'updateProperty'
])
const props = defineProps({
limit: Object
})
const limit = reactive({
type: null,
quantity: null
@ -32,6 +36,13 @@ const limitItems = [
const update = (e) => {
emit('updateProperty', limit, 'limit')
}
onBeforeMount(() => {
if (props.limit) {
limit.type = props.limit.type
limit.quantity = props.limit.quantity
}
})
</script>
<template>