Заменил селекты на BaseSelect
This commit is contained in:
@@ -4,20 +4,21 @@
|
||||
.dot.w-2.h-2(:style="{ backgroundColor : settings.settings.find((el) => el.priority == value).color }")
|
||||
span.text-sm(:style="{ color : settings.settings.find((el) => el.priority == value).color }") {{settings.settings.find((el) => el.priority == value).text}}
|
||||
.flex.gap-x-2.text-sm
|
||||
base-select(v-if="isOpenChange" :size-input="10" :option-data="getOption" :list-data="selectData" :style-border="true" :choose-option="choosePriority" disabled)
|
||||
old-base-select(v-if="isOpenChange" :size-input="10" :option-data="getOption" :list-data="selectData" :style-border="true" :choose-option="choosePriority" disabled)
|
||||
base-select(v-if="isOpenChange" :items="getPriorityList" v-model="getOption")
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { column } from "@/pages/clients/utils/tableConfig";
|
||||
import BaseSelect from "@/components/base/OldBaseSelect";
|
||||
import OldBaseSelect from "@/components/base/OldBaseSelect";
|
||||
import BaseSelect from "@/components/base/BaseSelect";
|
||||
export default {
|
||||
name: "TableCellBodyPriority",
|
||||
props: ["value", "width", "isOpenChange", "choosePriority"],
|
||||
components: { BaseSelect },
|
||||
components: { OldBaseSelect, BaseSelect },
|
||||
data() {
|
||||
return {
|
||||
settings: column.find((el) => el.name === "priority"),
|
||||
selectData: ["Высокий", "Средний", "Низкий", "-"],
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
@@ -25,6 +26,11 @@ export default {
|
||||
return this.settings.settings.find((el) => el.priority == this.value)
|
||||
.text;
|
||||
},
|
||||
getPriorityList() {
|
||||
return this.settings.settings.map((el) => {
|
||||
return { label: el.text, id: el.id };
|
||||
});
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user