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

56 lines
1.4 KiB
Vue

<!--
* @Author: qinzhenpen qzp1807@126.com
* @Date: 2025-04-22 14:05:45
* @LastEditors: qinzhenpen qzp1807@126.com
* @LastEditTime: 2025-04-24 13:28:12
* @FilePath: \e-commerce-internet\src\views\components\mainContent.vue
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
<template>
<div class="main-content">
<el-scrollbar height="730px">
<component :is="currentComponent" ref="content"></component>
</el-scrollbar>
</div>
</template>
<script setup>
import { defineExpose } from "vue";
const props = defineProps({
currentComponent: {
type: Object,
required: true,
},
});
const content = ref(null);
// 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();
};
const retrainMethod = () => {
// console.log(666);
content.value.retrain();
};
defineExpose({
submitMethod,
retrainMethod,
});
</script>
<style lang="scss" scoped>
.main-content {
width: calc(100% - 60px);
}
</style>