<template>
  <Dialog
    v-model="dialogVisible"
    diaTitle="预览配置界面"
    :width="500"
    :height="500"
    @close="closeFun"
    show-footer
  >
    <FlowNodeParamTable
      v-if="dialogVisible"
      hideButtons
      :nodeParams="pageConfigList"
    ></FlowNodeParamTable>
    <template #footer>
      <div>
        <el-button @click="closeFun">取消</el-button>
        <el-button type="primary" @click="closeFun">确定</el-button>
      </div>
    </template>
  </Dialog>
</template>
<script lang="ts" setup>
import Dialog from '@/components/common/dialog/index.vue';
// import { ElMessage } from 'element-plus';
import { computed } from 'vue';
import FlowNodeParamTable from '@/components/flow/flowNodeParamTable.vue';

const props = defineProps<{
  pageConfigList: any[];
  showReviewDialog: boolean;
}>();

const dialogVisible = computed({
  get() {
    return props.showReviewDialog;
  },
  set(val) {
    emits('update:showReviewDialog', val);
  },
});
const emits = defineEmits(['update:showReviewDialog']);

const closeFun = () => {
  emits('update:showReviewDialog', false);
};
</script>
