Replace deprecated PrimeVue components with their successors (S1874)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-03-10 00:14:01 +08:00
parent 716edb33b7
commit 6d13bc9eb8
11 changed files with 37 additions and 36 deletions

View File

@@ -1,5 +1,5 @@
<template> <template>
<Sidebar <Drawer
:visible="sidebarState" :visible="sidebarState"
:closeIcon="'pi pi-angle-right'" :closeIcon="'pi pi-angle-right'"
:modal="false" :modal="false"
@@ -293,7 +293,7 @@
</div> </div>
</section> </section>
</div> </div>
</Sidebar> </Drawer>
</template> </template>
<script setup> <script setup>
// The Lucia project. // The Lucia project.

View File

@@ -247,7 +247,7 @@
> >
<div> <div>
<span class="block mb-2">Start time</span> <span class="block mb-2">Start time</span>
<Calendar <DatePicker
v-model="startTime" v-model="startTime"
dateFormat="yy/mm/dd" dateFormat="yy/mm/dd"
:panelProps="panelProps" :panelProps="panelProps"
@@ -263,7 +263,7 @@
<span class="block mt-4">~</span> <span class="block mt-4">~</span>
<div> <div>
<span class="block mb-2">End time</span> <span class="block mb-2">End time</span>
<Calendar <DatePicker
v-model="endTime" v-model="endTime"
dateFormat="yy/mm/dd" dateFormat="yy/mm/dd"
:panelProps="panelProps" :panelProps="panelProps"

View File

@@ -29,7 +29,7 @@
</div> </div>
<!-- button --> <!-- button -->
<div class="min-w-fit"> <div class="min-w-fit">
<InputSwitch <ToggleSwitch
v-model="rule.item.toggle" v-model="rule.item.toggle"
@input="isRule($event, rule.index)" @input="isRule($event, rule.index)"
/> />

View File

@@ -28,7 +28,7 @@
<div class="flex justify-center items-center space-x-2 w-full"> <div class="flex justify-center items-center space-x-2 w-full">
<div> <div>
<span class="block mb-2">Start time</span> <span class="block mb-2">Start time</span>
<Calendar <DatePicker
v-model="startTime" v-model="startTime"
dateFormat="yy/mm/dd" dateFormat="yy/mm/dd"
:panelProps="panelProps" :panelProps="panelProps"
@@ -44,7 +44,7 @@
<span class="block mt-4">~</span> <span class="block mt-4">~</span>
<div> <div>
<span class="block mb-2">End time</span> <span class="block mb-2">End time</span>
<Calendar <DatePicker
v-model="endTime" v-model="endTime"
dateFormat="yy/mm/dd" dateFormat="yy/mm/dd"
:panelProps="panelProps" :panelProps="panelProps"

View File

@@ -1,5 +1,5 @@
<template> <template>
<Sidebar <Drawer
:visible="sidebarFilter" :visible="sidebarFilter"
:closeIcon="'pi pi-chevron-left'" :closeIcon="'pi pi-chevron-left'"
:modal="false" :modal="false"
@@ -269,7 +269,7 @@
</div> </div>
<!-- header: funnel --> <!-- header: funnel -->
<Funnel v-if="tab === 'funnel'" @submit-all="sumbitAll"></Funnel> <Funnel v-if="tab === 'funnel'" @submit-all="sumbitAll"></Funnel>
</Sidebar> </Drawer>
</template> </template>
<script setup> <script setup>

View File

@@ -1,5 +1,5 @@
<template> <template>
<Sidebar <Drawer
:visible="sidebarState" :visible="sidebarState"
:closeIcon="'pi pi-angle-right'" :closeIcon="'pi pi-angle-right'"
:modal="false" :modal="false"
@@ -325,8 +325,8 @@
{{ i18next.t("Map.Reset") }} {{ i18next.t("Map.Reset") }}
</div> </div>
<div> <div>
<TabView ref="tabview2" v-model:activeIndex="activeTrace"> <Tabs v-model:value="activeTrace">
<TabPanel header="Self-loop" contentClass="text-sm"> <TabPanel :value="0" header="Self-loop" contentClass="text-sm">
<p v-if="insights.self_loops.length === 0">No data</p> <p v-if="insights.self_loops.length === 0">No data</p>
<ul v-else class="ml-6 space-y-1"> <ul v-else class="ml-6 space-y-1">
<li v-for="(value, key) in insights.self_loops" :key="key"> <li v-for="(value, key) in insights.self_loops" :key="key">
@@ -334,7 +334,7 @@
</li> </li>
</ul> </ul>
</TabPanel> </TabPanel>
<TabPanel header="Short-loop" contentClass="text-sm"> <TabPanel :value="1" header="Short-loop" contentClass="text-sm">
<p v-if="insights.short_loops.length === 0">No data</p> <p v-if="insights.short_loops.length === 0">No data</p>
<ul v-else class="ml-6 space-y-1"> <ul v-else class="ml-6 space-y-1">
<li <li
@@ -359,6 +359,7 @@
<TabPanel <TabPanel
v-for="([field, label], i) in fieldNamesAndLabelNames" v-for="([field, label], i) in fieldNamesAndLabelNames"
:key="i" :key="i"
:value="i + 2"
:header="label" :header="label"
contentClass="text-sm" contentClass="text-sm"
> >
@@ -420,11 +421,11 @@
</li> </li>
</ul> </ul>
</TabPanel> </TabPanel>
</TabView> </Tabs>
</div> </div>
</div> </div>
</div> </div>
</Sidebar> </Drawer>
</template> </template>
<script setup> <script setup>
@@ -570,13 +571,13 @@ function hide() {
:deep(.p-progressbar .p-progressbar-value) { :deep(.p-progressbar .p-progressbar-value) {
@apply bg-primary; @apply bg-primary;
} }
:deep(.p-tabview-nav-container) { :deep(.p-tablist) {
@apply hidden; @apply hidden;
} }
:deep(.p-tabview-panels) { :deep(.p-tabpanels) {
@apply p-2 rounded; @apply p-2 rounded;
} }
:deep(.p-tabview-panel) { :deep(.p-tabpanel) {
@apply animate-fadein; @apply animate-fadein;
} }
.caseDurationTable td { .caseDurationTable td {

View File

@@ -1,5 +1,5 @@
<template> <template>
<Sidebar <Drawer
:visible="sidebarTraces" :visible="sidebarTraces"
:closeIcon="'pi pi-chevron-left'" :closeIcon="'pi pi-chevron-left'"
:modal="false" :modal="false"
@@ -97,7 +97,7 @@
</div> </div>
</section> </section>
</div> </div>
</Sidebar> </Drawer>
</template> </template>
<script setup> <script setup>
// The Lucia project. // The Lucia project.

View File

@@ -1,5 +1,5 @@
<template> <template>
<Sidebar <Drawer
:visible="sidebarView" :visible="sidebarView"
:closeIcon="'pi pi-chevron-left'" :closeIcon="'pi pi-chevron-left'"
:modal="false" :modal="false"
@@ -140,7 +140,7 @@
</ul> </ul>
</div> </div>
</div> </div>
</Sidebar> </Drawer>
</template> </template>
<script setup> <script setup>

View File

@@ -31,11 +31,11 @@ import "sweetalert2/dist/sweetalert2.min.css";
import PrimeVue from "primevue/config"; import PrimeVue from "primevue/config";
import Aura from "@primevue/themes/aura"; import Aura from "@primevue/themes/aura";
import "primeicons/primeicons.css"; //icons import "primeicons/primeicons.css"; //icons
import Sidebar from "primevue/sidebar"; import Drawer from "primevue/drawer";
import Dropdown from "primevue/dropdown"; import Select from "primevue/select";
import Tag from "primevue/tag"; import Tag from "primevue/tag";
import ProgressBar from "primevue/progressbar"; import ProgressBar from "primevue/progressbar";
import TabView from "primevue/tabview"; import Tabs from "primevue/tabs";
import TabPanel from "primevue/tabpanel"; import TabPanel from "primevue/tabpanel";
import DataTable from "primevue/datatable"; import DataTable from "primevue/datatable";
import Column from "primevue/column"; import Column from "primevue/column";
@@ -43,12 +43,12 @@ import ColumnGroup from "primevue/columngroup"; // optional
import Row from "primevue/row"; // optional import Row from "primevue/row"; // optional
import RadioButton from "primevue/radiobutton"; import RadioButton from "primevue/radiobutton";
import Timeline from "primevue/timeline"; import Timeline from "primevue/timeline";
import InputSwitch from "primevue/inputswitch"; import ToggleSwitch from "primevue/toggleswitch";
import InputNumber from "primevue/inputnumber"; import InputNumber from "primevue/inputnumber";
import InputText from "primevue/inputtext"; import InputText from "primevue/inputtext";
import Chart from "primevue/chart"; import Chart from "primevue/chart";
import Slider from "primevue/slider"; import Slider from "primevue/slider";
import Calendar from "primevue/calendar"; import DatePicker from "primevue/datepicker";
import Tooltip from "primevue/tooltip"; import Tooltip from "primevue/tooltip";
import Checkbox from "primevue/checkbox"; import Checkbox from "primevue/checkbox";
import Dialog from "primevue/dialog"; import Dialog from "primevue/dialog";
@@ -74,11 +74,11 @@ app.use(ToastPlugin, {
duration: 5000, duration: 5000,
}); });
app.use(PrimeVue, { theme: { preset: Aura } }); app.use(PrimeVue, { theme: { preset: Aura } });
app.component("Sidebar", Sidebar); app.component("Drawer", Drawer);
app.component("Dropdown", Dropdown); app.component("Select", Select);
app.component("Tag", Tag); app.component("Tag", Tag);
app.component("ProgressBar", ProgressBar); app.component("ProgressBar", ProgressBar);
app.component("TabView", TabView); app.component("Tabs", Tabs);
app.component("TabPanel", TabPanel); app.component("TabPanel", TabPanel);
app.component("DataTable", DataTable); app.component("DataTable", DataTable);
app.component("Column", Column); app.component("Column", Column);
@@ -86,12 +86,12 @@ app.component("ColumnGroup", ColumnGroup);
app.component("Row", Row); app.component("Row", Row);
app.component("RadioButton", RadioButton); app.component("RadioButton", RadioButton);
app.component("Timeline", Timeline); app.component("Timeline", Timeline);
app.component("InputSwitch", InputSwitch); app.component("ToggleSwitch", ToggleSwitch);
app.component("InputNumber", InputNumber); app.component("InputNumber", InputNumber);
app.component("InputText", InputText); app.component("InputText", InputText);
app.component("Chart", Chart); app.component("Chart", Chart);
app.component("Slider", Slider); app.component("Slider", Slider);
app.component("Calendar", Calendar); app.component("DatePicker", DatePicker);
app.component("Checkbox", Checkbox); app.component("Checkbox", Checkbox);
app.component("Dialog", Dialog); app.component("Dialog", Dialog);
app.component("ContextMenu", ContextMenu); app.component("ContextMenu", ContextMenu);

View File

@@ -195,7 +195,7 @@
<h2 class="font-bold">All Files</h2> <h2 class="font-bold">All Files</h2>
<ul class="flex items-center gap-x-4"> <ul class="flex items-center gap-x-4">
<li> <li>
<Dropdown <Select
v-model="gridSort" v-model="gridSort"
:options="columnType" :options="columnType"
optionLabel="name" optionLabel="name"
@@ -203,7 +203,7 @@
class="w-full !border-neutral-500" class="w-full !border-neutral-500"
inputClass="!text-sm" inputClass="!text-sm"
@change="getGridSortData($event)" @change="getGridSortData($event)"
></Dropdown> ></Select>
</li> </li>
<li> <li>
<IconGrid class="hover:bg-neutral-50 duration-300"></IconGrid> <IconGrid class="hover:bg-neutral-50 duration-300"></IconGrid>

View File

@@ -86,7 +86,7 @@
:key="index" :key="index"
class="px-2 py-1 bg-neutral-300 border border-neutral-500 max-w-[198px]" class="px-2 py-1 bg-neutral-300 border border-neutral-500 max-w-[198px]"
> >
<Dropdown <Select
v-model="selectedColumns[index]" v-model="selectedColumns[index]"
:options="columnType" :options="columnType"
optionLabel="name" optionLabel="name"
@@ -101,7 +101,7 @@
<span>{{ slotProps.option.name }}</span> <span>{{ slotProps.option.name }}</span>
</div> </div>
</template> </template>
</Dropdown> </Select>
</td> </td>
</tr> </tr>
</thead> </thead>