PassCalculate.vue
716 Bytes
<template>
<BasicModal
v-bind="$attrs"
:title="title"
@register="register"
width="500px"
:bodyStyle="{ height: '100px' }"
@ok="handleOk"
>
<div style="margin-left: 10px; font-size: 16px">一次通过率:{{ result }}</div>
</BasicModal>
</template>
<script lang="ts" setup>
import { BasicModal, useModalInner } from '@/components/Modal';
import { computed, ref } from 'vue';
const [register, { closeModal }] = useModalInner(async (data) => {
console.log(data, 56562);
title.value = data.title;
});
const title = ref('');
const result = computed(() => {
const res = 1234;
return res;
});
async function handleOk() {
closeModal();
}
</script>