<template>
    <view>
        <u-modal
            :show="show"
            :content="content"
            confirmText="我已了解"
            @confirm="handleConfirm"
        ></u-modal>
    </view>
</template>

<script setup lang="ts">
import { useToggle } from '@/hooks/useLockFn'
import { ref } from 'vue'

const { show, handleToggle } = useToggle()

const content = ref('')
const openModal = (message: string) => {
    content.value = message
    handleToggle()
}
const handleConfirm = () => {
    handleToggle(true)
    uni.navigateBack()
}
defineExpose({
    openModal
})
</script>
<style scoped></style>
