Files
bio_frontend/pages/admin/resource.vue
2025-08-14 11:00:48 +09:00

41 lines
946 B
Vue

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