guhongwei 2 år sedan
förälder
incheckning
e1669650b3
1 ändrade filer med 9 tillägg och 9 borttagningar
  1. 9 9
      src/components/frame/c-dialog.vue

+ 9 - 9
src/components/frame/c-dialog.vue

@@ -1,24 +1,24 @@
 <template>
   <div id="e-dialog">
-    <el-dialog :title="dialog.title" v-model="dialog.show" :width="width" :before-close="handleClose" :close-on-click-modal="false" :append-to-body="true">
+    <el-dialog :title="dialog.title" v-model="dialog.show" :width="width" :before-close="toClose" :close-on-click-modal="false" :append-to-body="true">
       <el-col :span="24" class="dialogInfo" :style="{ 'max-height': height }"><slot name="info"></slot></el-col>
     </el-dialog>
   </div>
 </template>
 
 <script lang="ts" setup>
-import { toRefs } from 'vue';
+import { toRefs } from 'vue'
 const props = defineProps({
   dialog: { type: Object, default: () => {} },
   width: { type: String, default: '40%' },
   height: { type: String, default: '400px' }
-});
-const { dialog } = toRefs(props);
-const { width } = toRefs(props);
-const emit = defineEmits(['handleClose']);
-const handleClose = () => {
-  emit('handleClose');
-};
+})
+const { dialog } = toRefs(props)
+const { width } = toRefs(props)
+const emit = defineEmits(['toClose'])
+const toClose = () => {
+  emit('toClose')
+}
 </script>
 
 <style lang="scss" scoped>