You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
dianshang-qianduan/src/views/components/mainContent.vue

43 lines
878 B
Vue

<template>
<div class="main-content">
<el-scrollbar height="680px">
<component :is="currentComponent" ref="content"></component>
</el-scrollbar>
</div>
</template>
<script setup>
2 years ago
import {defineExpose } from 'vue'
const props = defineProps({
currentComponent: {
type: Object,
required: true,
},
});
const content = ref(null);
2 years ago
// const consumerLeft = () => {
// content.value.consumer();
// };
// const resLeft = () => {
// content.value.practicalTraining();
// };
// const submitDataLeft = () => {
// content.value.submitData();
// };
// const submitMethod = () => {
// console.log(666);
// // content.value.submitData();
// };
const submitMethod = () => {
// console.log(666);
content.value.submitData()
};
defineExpose({
2 years ago
submitMethod,
});
</script>
<style lang="scss" scoped>
.main-content {
width: calc(100% - 60px);
}
</style>