Files
bio_frontend/pages/[tabId]/admin/resource.vue

37 lines
856 B
Vue
Raw Normal View History

2025-08-14 11:00:48 +09:00
<template>
2025-09-25 15:33:11 +09:00
<ContentsWrapper>
<template #actions>
<button @click="onAddClick">추가</button>
<button @click="onUpdateClick">저장</button>
</template>
<input type="text" />
<ToastGrid ref="grid1Ref" :data="data" :columns="colDefs" />
</ContentsWrapper>
2025-08-14 11:00:48 +09:00
</template>
2025-09-25 15:33:11 +09:00
2025-08-14 11:00:48 +09:00
<script setup lang="ts">
2025-09-25 15:33:11 +09:00
import { colDefs } from "../../../constants/resourceGrid";
2025-08-14 11:00:48 +09:00
definePageMeta({
2025-09-25 15:33:11 +09:00
title: "리소스 관리",
});
2025-08-14 11:00:48 +09:00
2025-09-25 15:33:11 +09:00
const data = [{}];
2025-08-14 11:00:48 +09:00
const grid1Ref = ref();
onMounted(async () => {
2025-09-25 15:33:11 +09:00
await nextTick(); // DOM 및 컴포넌트 렌더링 완료 대기
grid1Ref.value?.api()?.setBodyHeight("700");
});
2025-08-14 11:00:48 +09:00
function onAddClick() {
2025-09-25 15:33:11 +09:00
grid1Ref.value?.api()?.appendRow({});
2025-08-14 11:00:48 +09:00
}
function onUpdateClick() {
2025-09-25 15:33:11 +09:00
//grid1Ref.value?.clearGrid();
console.log(grid1Ref.value?.api()?.getModifiedRows());
2025-08-14 11:00:48 +09:00
}
</script>