responsive controlled

This commit is contained in:
Burak Civan
2022-11-07 17:36:32 +03:00
parent b6295dfaf5
commit 624deafb0b
8 changed files with 42 additions and 10 deletions

View File

@ -1,5 +1,5 @@
<template>
<div :id="'dropzone-' + _uid" class="dropzone dz-clickable" :class="[preview == 'single' ? 'dropzone-single': 'dropzone-multiple', singleWidthClasses ? 'w-full': 'w-37']">
<div :id="'dropzone-' + _uid" class="dropzone dz-clickable" :class="[preview == 'single' ? 'dropzone-single': 'dropzone-multiple', singleWidthClasses ? 'w-full': 'sm:w-37']">
<div class="fallback">
<div class="custom-file">
<input type="file" class="custom-file-input" :id="'projectCoverUploads' + _uid" :multiple="multiple">

View File

@ -50,7 +50,7 @@ const app = new Vue({
},
item_name_input: false,
price_name_input: false,
quantity_name_input: false
quantity_name_input: false,
}
},
@ -141,24 +141,41 @@ const app = new Vue({
});
},
onSmallWidthColumn(item) {
this.$refs[item].$el.classList.remove('sm:col-span-6');
this.$refs[item].$el.classList.add('sm:col-span-3');
},
onFullWidthColumn(item) {
this.$refs[item].$el.classList.add('sm:col-span-6');
this.$refs[item].$el.classList.remove('sm:col-span-3');
},
settingsInvoice() {
if (this.form.item_name == 'custom') {
this.item_name_input = true;
this.onSmallWidthColumn("item_name");
} else {
this.item_name_input = false;
this.onFullWidthColumn("item_name");
}
if (this.form.price_name == 'custom') {
this.price_name_input = true;
this.onSmallWidthColumn("price_name");
} else {
this.price_name_input = false;
this.onFullWidthColumn("price_name");
}
if (this.form.quantity_name == 'custom') {
this.quantity_name_input = true;
this.onSmallWidthColumn("quantity_name");
} else {
this.quantity_name_input = false;
this.onFullWidthColumn("quantity_name");
}
},
// Change currency get money