<template>
  <bz-modal
    @register="register"
    title="Modal Title"
    :helpMessage="['提示1', '提示2']"
    :okButtonProps="{ disabled: true }"
  >
    <bz-button type="primary" @click="closeModal" class="mr-2"> 从内部关闭弹窗 </bz-button>
    <bz-button type="primary" @click="setModalProps"> 从内部修改title </bz-button>
  </bz-modal>
</template>
<script lang="ts">
  import { defineComponent } from 'vue';
  import { useModalInner } from '/@/index';
  export default defineComponent({
    setup() {
      const [register, { closeModal, setModalProps }] = useModalInner();
      return {
        register,
        closeModal,
        setModalProps: () => {
          setModalProps({ title: 'Modal New Title' });
        },
      };
    },
  });
</script>
