<template>
  <a-button type="primary" @click="state.visible = true" style="margin-left: 10px">弹出弹窗</a-button>
  <lt-a-model v-model:visible="state.visible" @ok="onOk" title="弹窗基本功能测试" :afterClose="handleOnClose">
    <div>
      ① 窗口可以拖动；<br />
      ② 窗口可以通过八个方向改变大小；<br />
      ③ 窗口可以最小化、最大化、还原、关闭；<br />
    </div>
    <!-- <div name="footer">自定义弹窗页脚</div> -->
  </lt-a-model>

</template>

<script lang="ts">
import { defineComponent, reactive } from 'vue';
import ltAModel from '../../../../packages/components/lt-a-model';

export default defineComponent({
  name: 'LtAModelDemo',
  components: {
    ltAModel,
  },
  setup() {
    const state = reactive({
      visible: false,
    });

    const onOk = function () {
      state.visible = false;
    };

    const handleOnClose = function () {
      //弹窗完全关闭函数
    };
    return {
      state,
      onOk,
      handleOnClose,
    };
  },
});
</script>
