feat(fe smartblock): added props to limit component
This commit is contained in:
parent
efdca547fc
commit
e071d4d959
1 changed files with 12 additions and 1 deletions
|
@ -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>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue