This commit is contained in:
2025-09-22 17:21:08 +08:00
parent 3a250e8d73
commit 0bc7cf2f66
2 changed files with 7 additions and 7 deletions

View File

@@ -1,5 +1,5 @@
<template>
<div class="plan-content-editor">
<div class="plan-detail">
<div v-if="loading" class="loading">
<el-skeleton animated />
</div>
@@ -45,7 +45,7 @@
<h4>子计划列表</h4>
<div v-for="subPlan in sortedContent" :key="subPlan.id" class="sub-plan-container">
<!-- 递归使用组件 -->
<plan-content-editor :plan-id="subPlan.id" />
<plan-detail :plan-id="subPlan.id" />
</div>
</div>
<div v-else>
@@ -63,7 +63,7 @@
import apiClient from '../api/index.js';
export default {
name: 'PlanContentEditor', // name
name: 'PlanDetail', // name
props: {
planId: {
type: [Number, String],
@@ -129,7 +129,7 @@ export default {
</script>
<style scoped>
.plan-content-editor {
.plan-detail {
margin-top: 10px;
}
.loading, .error {

View File

@@ -95,7 +95,7 @@
width="70%"
top="5vh"
>
<plan-content-editor
<plan-detail
v-if="detailsVisible"
:plan-id="selectedPlanIdForDetails"
/>
@@ -113,14 +113,14 @@
import { Refresh } from '@element-plus/icons-vue';
import apiClient from '../api/index.js';
import PlanForm from './PlanForm.vue';
import PlanContentEditor from './PlanContentEditor.vue'; // 导入新组件
import PlanDetail from './PlanDetail.vue'; // 导入新组件
import cronParser from 'cron-parser';
export default {
name: 'PlanList',
components: {
PlanForm,
PlanContentEditor, // 注册新组件
PlanDetail, // 注册新组件
Refresh
},
data() {