WIP Сделала селект и кнопку сортировки
This commit is contained in:
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user