初步完成了增改查包括磁盘状态

This commit is contained in:
Sun
2024-01-06 11:46:59 +08:00
parent a85d90985d
commit 3f4b3c67f2
6 changed files with 81 additions and 39 deletions
@@ -62,8 +62,11 @@ const monitorDatas = ref<MonitorData[]>([])
function handleClick(index: number, item: MonitorData) {
editShowStatus.value = true
editData.value = item
editIndex.value = index
console.log(editData.value)
}
async function getData() {
@@ -77,6 +80,10 @@ onMounted(() => {
function handleSaveDone() {
getData()
}
function handleSaveSort() {
}
</script>
<template>
@@ -118,7 +125,6 @@ function handleSaveDone() {
v-for="item, index in monitorDatas" :key="index"
:title="item.description"
@click="handleClick(index, item)"
@contextmenu="(e) => handleContextMenu(e, itemGroupIndex, item)"
>
<AppIconSystemMonitor
:extend-param="item.extendParam"
@@ -145,7 +151,6 @@ function handleSaveDone() {
v-for="item, index in monitorDatas" :key="index"
:title="item.description"
@click="handleClick(index, item)"
@contextmenu="(e) => handleContextMenu(e, itemGroupIndex, item)"
>
<AppIconSystemMonitor
:extend-param="item.extendParam"
@@ -163,7 +168,7 @@ function handleSaveDone() {
<!-- 编辑栏 -->
<div v-if="monitorGroup.sortStatus" class="flex mt-[10px]">
<div>
<NButton color="#2a2a2a6b" @click="handleSaveSort(monitorGroup)">
<NButton color="#2a2a2a6b" @click="handleSaveSort()">
<template #icon>
<SvgIcon class="text-white font-xl" icon="material-symbols:save" />
</template>