1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950 |
- <script setup>
- import { ref } from 'vue'
- defineProps({
- title: String,
- text: String,
- cancel: Function,
- sure: Function
- })
- defineOptions({ name: 'ct-confirm' })
- const dialog = ref(true)
- // const show = () => {
- // dialog.value = true
- // }
- // defineExpose({ show })
- </script>
- <template>
- <v-app>
- <v-dialog
- v-model="dialog"
- max-width="400"
- persistent
- >
- <v-card
- :text="text"
- :title="title"
- >
- <template #prepend>
- <v-icon color="warning">mdi-alert-circle-outline</v-icon>
- </template>
- <template v-slot:actions>
- <v-spacer></v-spacer>
- <v-btn @click="cancel">
- 取消
- </v-btn>
- <v-btn color="success" @click="sure">
- 确认
- </v-btn>
- </template>
- </v-card>
- </v-dialog>
- </v-app>
-
- </template>
|