<template>
  <c-table ref="tableRef" :option="option" :params="{ dictId: dict.id }"> </c-table>
</template>

<script setup lang="ts">
import useOption from './dict-item-option'
import { SysDict } from '@/entity/upms'

const props = defineProps<{
  dict: SysDict
}>()
const option = useOption(computed(() => props.dict))
const tableRef = ref<any>()
watch(
  () => props.dict.id,
  () => {
    nextTick(() => {
      tableRef.value.load(true)
    })
  }
)
</script>

<style scoped></style>
