<!-- 编辑弹窗 -->
<template>
  <ele-modal form :width="1080" v-model="visible" title="售价日志">
    <SimpleTable style="width: 100%" :columns="columns" border> </SimpleTable>

    <template #footer>
      <el-button @click="handleCancel">关闭</el-button>
    </template>
  </ele-modal>
</template>

<script setup>
  import { ref, reactive, nextTick } from 'vue';
  import { Flag, ChatDotSquare } from '@element-plus/icons-vue';
  import SimpleTable from '@/components/CommonPage/SimpleTable.vue';

  /** 弹窗是否打开 */
  const visible = defineModel({ type: Boolean });

  /** 关闭弹窗 */
  const handleCancel = () => {
    visible.value = false;
  };

  /** 弹窗打开事件 */
  const handleOpen = () => {
    visible.value = true;
    nextTick(() => console.log('打开'));
  };

  // 表格数据
  const columns = reactive([
    { label: '操作人', prop: 'createBy' },
    { label: '价格', prop: 'createBy' },
    { label: '规格', prop: 'discount' },
    { label: '描述', prop: 'recycleTime' },
    { label: '修改时间', prop: 'createTime' }
  ]);

  defineExpose({
    handleOpen
  });
</script>
