You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
108 lines
2.6 KiB
108 lines
2.6 KiB
<template>
|
|
<div >
|
|
<div v-if="topLabel" class="top-label Fa Thin mr-3 light-gray"> {{ topLabel }} </div>
|
|
<div :class="`quantity-select ${theme}`">
|
|
<div class="controls">
|
|
<div class="add">
|
|
<v-icon color="cyan">WMi-plus</v-icon>
|
|
</div>
|
|
<div class="reduce">
|
|
<v-icon color="red">WMi-minus</v-icon>
|
|
</div>
|
|
</div>
|
|
<div class="value En Bold">
|
|
<div class="number"> {{ quantity }} </div>
|
|
<div class="unit Fa Thin"> {{ label }} </div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
</template>
|
|
|
|
<script>
|
|
export default {
|
|
props: {
|
|
theme: { default: '' },
|
|
quantity: { default: '' },
|
|
label: { default: 'نام فارسی' },
|
|
topLabel: String,
|
|
|
|
},
|
|
};
|
|
</script>
|
|
<style lang="scss" scoped>
|
|
.quantity-select {
|
|
width: 100%;
|
|
padding: 0px 5px;
|
|
text-align: center;
|
|
display: flex;
|
|
justify-content: center;
|
|
align-items: center;
|
|
}
|
|
.quantity-select .v-icon {
|
|
font-size: 30px;
|
|
opacity: 0.7;
|
|
cursor: pointer;
|
|
}
|
|
.quantity-select .value {
|
|
padding: 0px 0px 0px 0px;
|
|
margin-top: 0px;
|
|
font-size: 35px;
|
|
line-height: 30px;
|
|
color: var(--color-black);
|
|
margin-top: -2px;
|
|
}
|
|
.quantity-select .value .unit {
|
|
font-size: 12px;
|
|
line-height: 16px;
|
|
/*margin-top: 8px;*/
|
|
}
|
|
.quantity-select .v-icon:hover {
|
|
opacity: 1;
|
|
}
|
|
.top-label {
|
|
border-radius: 5px;
|
|
margin-bottom: 3px;
|
|
}
|
|
|
|
.quantity-select .controls .add {
|
|
display: block;
|
|
}
|
|
.quantity-select .controls .reduce {
|
|
display: block;
|
|
margin-top: -10px;
|
|
margin-right: 1px;
|
|
}
|
|
|
|
|
|
/*----------------------------------------------------*/
|
|
/* SM Size */
|
|
/*----------------------------------------------------*/
|
|
.quantity-select.sm .v-icon {
|
|
font-size: 25px;
|
|
}
|
|
.quantity-select.sm .value {
|
|
font-size: 40px;
|
|
}
|
|
.quantity-select.sm .value .unit {
|
|
display: none;
|
|
}
|
|
.quantity-select.sm .value {
|
|
padding-top: 0px;
|
|
margin-top: 0px;
|
|
}
|
|
.quantity-select.sm .controls .add {
|
|
display: block;
|
|
margin-bottom: -10px;
|
|
margin-top: 5px;
|
|
}
|
|
.quantity-select.sm .controls .reduce {
|
|
display: block;
|
|
margin-top: 3px;
|
|
margin-right: 1px;
|
|
}
|
|
|
|
|
|
|
|
</style>
|