设计需求、测试项、用例的上级hover显示
This commit is contained in:
@@ -17,7 +17,14 @@
|
||||
>
|
||||
<template #title>{{ actionTitle }}</template>
|
||||
<a-spin :loading="dataLoading" tip="加载中..." class="w-full">
|
||||
<ma-form v-model="form" :columns="formColumns" :options="formOptions" ref="maFormRef">
|
||||
<!-- 修改源码parentKey -->
|
||||
<ma-form
|
||||
v-model="form"
|
||||
:columns="formColumns"
|
||||
:parent-key="props.parentKey"
|
||||
:options="formOptions"
|
||||
ref="maFormRef"
|
||||
>
|
||||
<template v-for="slot in Object.keys($slots)" #[slot]="component">
|
||||
<slot :name="slot" v-bind="component" />
|
||||
</template>
|
||||
@@ -35,6 +42,11 @@ import { useRouter } from "vue-router"
|
||||
import tool from "@/utils/tool"
|
||||
import { useFormStore } from "@/store/index"
|
||||
|
||||
// 2025年5月14日新增
|
||||
const props = defineProps({
|
||||
parentKey: { type: String, default: "" }
|
||||
})
|
||||
|
||||
const formStore = useFormStore()
|
||||
const router = useRouter()
|
||||
const formOptions = ref({ showButtons: false })
|
||||
|
||||
@@ -257,7 +257,8 @@
|
||||
|
||||
<ma-setting ref="crudSettingRef" @onChangeSearchHide="initSearchColumns()" @onChangeColumnHide="changeColumn" />
|
||||
<!-- 修改源码:透传ma-crud属性给ma-form -->
|
||||
<ma-form ref="crudFormRef" @success="requestSuccess" v-bind="$attrs">
|
||||
<!-- 修改源码:传递parentKey值 -->
|
||||
<ma-form ref="crudFormRef" @success="requestSuccess" v-bind="$attrs" :parent-key="props.parentKey">
|
||||
<template v-for="(slot, index) in Object.keys($slots)" #[slot]="component" :key="index">
|
||||
<slot :name="slot" v-bind="component" />
|
||||
</template>
|
||||
@@ -308,7 +309,9 @@ const props = defineProps({
|
||||
options: { type: Object, default: {} },
|
||||
crud: { type: Object, default: {} },
|
||||
// 字段列设置
|
||||
columns: { type: Array, default: [] }
|
||||
columns: { type: Array, default: [] },
|
||||
// ~~~2025年5月14日新增透传给ma-form字段
|
||||
parentKey: { type: String, default: "" }
|
||||
})
|
||||
|
||||
const loading = ref(true)
|
||||
|
||||
Reference in New Issue
Block a user