This commit is contained in:
oneao committed 2025-09-17 21:55:31 +08:00
1 parent 27263365ad
commit 8eedf281fd
9 files changed
+338 -83

No files matched your search

+51 -17
View File
@@ -1,24 +1,58 @@
<script setup lang="ts">
import { ref } from 'vue'
const value = ref('')
const AModal1Visible = ref(false)
const AModal2Visible = ref(false)
const AModal3Visible = ref(false)
</script>
<template>
<div class="main">
<ASwitch v-model="value" loading checked-value="1" unchecked-value="2" checked-content="1" unchecked-content="2" />
{{ value }}
</div>
</template>
<button @click="AModal1Visible = true">
打开第 1 个 AModal
</button>
<style lang="scss" scoped>
.main {
width: 100%;
height: 800px;
display: flex;
align-items: center;
justify-content: center;
flex-direction: column;
gap: 16px;
}
</style>
<!-- 第 1 个 AModal -->
<AModal v-model:visible="AModal1Visible" mask-closable>
<template #title>
第 1 个 AModal
</template>
<p>这是第 1 个弹窗内容</p>
<template #footer>
<button @click="AModal2Visible = true">
打开第 2 个 AModal
</button>
<button @click="AModal1Visible = false">
关闭
</button>
</template>
</AModal>
<!-- 第 2 个 AModal -->
<AModal v-model:visible="AModal2Visible" mask-closable>
<template #title>
第 2 个 AModal
</template>
<p>这是第 2 个弹窗内容</p>
<template #footer>
<button @click="AModal3Visible = true">
打开第 3 个 AModal
</button>
<button @click="AModal2Visible = false">
关闭
</button>
</template>
</AModal>
<!-- 第 3 个 AModal -->
<AModal v-model:visible="AModal3Visible" mask-closable>
<template #title>
第 3 个 AModal
</template>
<p>这是第 3 个弹窗内容</p>
<template #footer>
<button @click="AModal3Visible = false">
关闭
</button>
</template>
</AModal>
</template>
+1
View File
@@ -18,6 +18,7 @@ declare module 'vue' {
AInput: typeof import('@ao/ao-design')['Input']
ALoading: typeof import('@ao/ao-design')['Loading']
AMessage: typeof import('@ao/ao-design')['Message']
AModal: typeof import('@ao/ao-design')['Modal']
APopconfirm: typeof import('@ao/ao-design')['Popconfirm']
APopup: typeof import('@ao/ao-design')['Popup']
ARadio: typeof import('@ao/ao-design')['Radio']