mirror of
https://github.com/hay-kot/mealie.git
synced 2025-07-05 20:42:23 -07:00
Some checks are pending
CodeQL / Analyze (push) Waiting to run
Docker Nightly Production / Backend Server Tests (push) Waiting to run
Docker Nightly Production / Frontend Tests (push) Waiting to run
Docker Nightly Production / Build Package (push) Waiting to run
Docker Nightly Production / Build Tagged Release (push) Blocked by required conditions
Docker Nightly Production / Notify Discord (push) Blocked by required conditions
Release Drafter / ✏️ Draft release (push) Waiting to run
60 lines
1 KiB
Vue
60 lines
1 KiB
Vue
<template>
|
|
<div
|
|
class="d-flex align-center"
|
|
style="max-width: 60px"
|
|
>
|
|
<v-text-field
|
|
v-model.number="quantity"
|
|
hide-details
|
|
:label="$t('form.quantity-label-abbreviated')"
|
|
:min="min"
|
|
:max="max"
|
|
type="number"
|
|
size="small"
|
|
variant="plain"
|
|
/>
|
|
</div>
|
|
</template>
|
|
|
|
<script lang="ts">
|
|
export default defineNuxtComponent({
|
|
name: "VInputNumber",
|
|
props: {
|
|
min: {
|
|
type: Number,
|
|
default: 0,
|
|
},
|
|
max: {
|
|
type: Number,
|
|
default: 9999,
|
|
},
|
|
rules: {
|
|
type: Array,
|
|
default: () => [],
|
|
},
|
|
step: {
|
|
type: Number,
|
|
default: 1,
|
|
},
|
|
modelValue: {
|
|
type: Number,
|
|
default: 0,
|
|
},
|
|
},
|
|
emits: ["update:modelValue"],
|
|
setup(props, context) {
|
|
const quantity = computed({
|
|
get: () => {
|
|
return Number(props.modelValue);
|
|
},
|
|
set: (val) => {
|
|
context.emit("update:modelValue", val);
|
|
},
|
|
});
|
|
|
|
return {
|
|
quantity,
|
|
};
|
|
},
|
|
});
|
|
</script>
|