WIP Сделала селект и кнопку сортировки

This commit is contained in:
Daria Golova
2023-04-28 13:56:51 +03:00
parent 430ac66273
commit a5acc67c10
2 changed files with 39 additions and 3 deletions

View File

@@ -9,8 +9,16 @@
icon="add",
:style="{width: '100%'}"
)
.p-4.rounded.background.h-full
base-select
.p-4.rounded.background.h-full.w-full
.flex.w-full
base-select(:style="{flex: 1}")
q-btn.ml-2(
icon="sort"
:style="{width: '40px', height: '40px'}",
padding="0"
:class="sortingClass"
@click="invertSorting"
)
</template>
<script>
@@ -18,6 +26,27 @@ import BaseSelect from "@/components/base/BaseSelect.vue";
export default {
name: "MedicalProtocolsList",
components: { BaseSelect },
data() {
return {
sorting: false,
};
},
computed: {
sortingClass() {
return this.sorting
? {
"sort-icon-active": true,
}
: {
"sort-icon-default": true,
};
},
},
methods: {
invertSorting() {
this.sorting = !this.sorting;
},
},
};
</script>
@@ -26,4 +55,10 @@ export default {
width: 19.6%
.background
background-color: var(--default-white)
.sort-icon-default
background-color: var(--bg-light-grey)
color: var(--font-grey-color)
.sort-icon-active
background-color: var(--btn-blue-color)
color: var(--default-white)
</style>