tab, component, popup 변경
This commit is contained in:
41
pages/[tabId]/admin/resource.vue
Normal file
41
pages/[tabId]/admin/resource.vue
Normal file
@@ -0,0 +1,41 @@
|
||||
<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>
|
||||
|
Reference in New Issue
Block a user