xyyd-fatfox/src/user/BackupRecovery.tsx

50 lines
2.3 KiB
TypeScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

import { defineComponent, ref, Transition } from 'vue'
import useRouterStore from '@/useRouterStore'
import { Radio, RadioGroup } from 'ant-design-vue'
import useUserStore from './useUserStore'
export default defineComponent(() => {
const router = useRouterStore()
const userStore = useUserStore()
const select = ref(1)
return () => (
<div class="fixed left-0 top-0 z-50 w-full">
<Transition>
<div
class="w-full h-screen bg-black/50"
></div>
</Transition>
<Transition name="modal">
<div class="absolute left-1/2 top-1/2 -translate-x-1/2 -translate-y-1/2 overflow-hidden transition-all w-[400px] h-[240px] rounded-lg bg-white/30 ">
<div class="w-full h-full flex flex-col justify-between p-4 px-6 rounded-lg bg-white overflow-hidden relative">
<div class={"text-center border-b-[#ddd] border-b-[1px] pb-2 "}></div>
<span class={"text-[#666] text-[14px]"}></span>
<RadioGroup value={select.value} onChange={(e) => {
select.value = e.target.value
}} class={"flex flex-col text-[#333] gap-y-3"}>
<Radio value={1} class={"text-[#333]"}></Radio>
<Radio value={2} class={"text-[#333]"}></Radio>
</RadioGroup>
<div class={"flex justify-end "}
onClick={() => {
if (select.value === 1) {
userStore.comineData()
} else {
userStore.coverageData()
}
router.replace('')
}}
>
<button class={"px-10 py-1 hover:opacity-80 duration-150 bg-[#4a7aff] text-white rounded-lg"}></button>
</div>
</div>
</div>
</Transition>
</div>
)
})