|
@@ -1,41 +1,62 @@
|
|
|
-<script setup lang="ts">
|
|
|
-import './cy-dialog.scss'
|
|
|
-import {UseCyDialog} from "./useCyDialog";
|
|
|
-import {onMounted} from "vue";
|
|
|
-import {useZIndex, ElButton} from "element-plus";
|
|
|
-import {ref} from 'vue'
|
|
|
+<!--<script setup lang="ts">-->
|
|
|
+<!--import './cy-dialog.scss'-->
|
|
|
+<!--import {UseCyDialog} from "./useCyDialog";-->
|
|
|
+<!--import {useZIndex, ElButton} from "element-plus";-->
|
|
|
+<!--import {ref} from 'vue'-->
|
|
|
|
|
|
-export declare type Props = {
|
|
|
- title?: string,
|
|
|
- emit: () => void,
|
|
|
- fullScreen?: boolean
|
|
|
-}
|
|
|
+<!--export declare type Props = {-->
|
|
|
+<!-- title?: string,-->
|
|
|
+<!-- emit: () => void,-->
|
|
|
+<!-- fullScreen?: boolean,-->
|
|
|
+<!--}-->
|
|
|
|
|
|
-const props = withDefaults(
|
|
|
- defineProps<Props>(),
|
|
|
- {
|
|
|
- fullScreen: false
|
|
|
- }
|
|
|
-)
|
|
|
+<!--const props = withDefaults(-->
|
|
|
+<!-- defineProps<Props>(),-->
|
|
|
+<!-- {-->
|
|
|
+<!-- fullScreen: false-->
|
|
|
+<!-- }-->
|
|
|
+<!--)-->
|
|
|
|
|
|
-const {
|
|
|
- ns,
|
|
|
- headerRef,
|
|
|
- footerRef,
|
|
|
- containerRef,
|
|
|
- bodyHeightStyle,
|
|
|
- boxRef,
|
|
|
- bodyRef,
|
|
|
- observerHeight
|
|
|
-} = UseCyDialog(props)
|
|
|
|
|
|
-const zIndex = ref(useZIndex().nextZIndex())
|
|
|
+<!--const emits = defineEmits()-->
|
|
|
|
|
|
-onMounted(() => {
|
|
|
+<!--const {-->
|
|
|
+<!-- ns,-->
|
|
|
+<!-- headerRef,-->
|
|
|
+<!-- footerRef,-->
|
|
|
+<!-- containerRef,-->
|
|
|
+<!-- bodyHeightStyle,-->
|
|
|
+<!-- boxRef,-->
|
|
|
+<!-- bodyRef,-->
|
|
|
+<!-- observerHeight-->
|
|
|
+<!--} = UseCyDialog(props)-->
|
|
|
+
|
|
|
+<!--const zIndex = ref(useZIndex().nextZIndex())-->
|
|
|
+<!--</script>-->
|
|
|
+<script lang="ts">
|
|
|
+import {ElButton} from 'element-plus'
|
|
|
+import {CyDialogProps, UseCyDialog} from "@/components/cy/dialog/src/useCyDialog";
|
|
|
+import './cy-dialog.scss'
|
|
|
|
|
|
+const COMPONENT_NAME = 'CyDialog'
|
|
|
+export default defineComponent({
|
|
|
+ name: COMPONENT_NAME,
|
|
|
+ componentName: COMPONENT_NAME,
|
|
|
+ components: {
|
|
|
+ ElButton
|
|
|
+ },
|
|
|
+ props: CyDialogProps,
|
|
|
+ setup(props, {emit}) {
|
|
|
+ const API = UseCyDialog(props)
|
|
|
+
|
|
|
+ return {
|
|
|
+ ...API
|
|
|
+ }
|
|
|
+ }
|
|
|
})
|
|
|
</script>
|
|
|
|
|
|
+
|
|
|
<template>
|
|
|
<div
|
|
|
ref="containerRef"
|