【表单发布后】详情disable 选项卡
parent
97147b4c1b
commit
632f3bbf26
|
|
@ -408,13 +408,43 @@
|
||||||
}
|
}
|
||||||
if (!unref(isUpdate) && unref(isDetail)) {
|
if (!unref(isUpdate) && unref(isDetail)) {
|
||||||
getTitle.value = '详情';
|
getTitle.value = '详情';
|
||||||
|
let isTabs = false
|
||||||
data.tab = changeCardStructure(data.tab)
|
data.tab = changeCardStructure(data.tab)
|
||||||
data.tab.forEach(itemComponent => {
|
data.tab.forEach(itemComponent => {
|
||||||
if(itemComponent.component){
|
if(itemComponent.component === 'Tabs'){
|
||||||
|
isTabs = true
|
||||||
|
itemComponent.componentProps.options.forEach(itemChild => {
|
||||||
|
itemChild.children.forEach(itemChildComponent => {
|
||||||
|
if(itemChildComponent.component){
|
||||||
|
itemChildComponent.componentProps.disabled = true
|
||||||
|
}
|
||||||
|
})
|
||||||
|
})
|
||||||
|
}else if(itemComponent.component){
|
||||||
itemComponent.componentProps.disabled = true
|
itemComponent.componentProps.disabled = true
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
if(isTabs){
|
||||||
|
data.tab = data.tab[0]
|
||||||
|
data.tab.componentProps.options = data.tab.componentProps.options.map(item => {
|
||||||
|
return {
|
||||||
|
value: item.value,
|
||||||
|
label: item.label,
|
||||||
|
schemas: item.children
|
||||||
|
}
|
||||||
|
})
|
||||||
|
data.tab.componentProps.options = cardNestStructure(data.tab.componentProps.options)
|
||||||
|
data.tab.componentProps.options = data.tab.componentProps.options.map(item => {
|
||||||
|
return {
|
||||||
|
value: item.value,
|
||||||
|
label: item.label,
|
||||||
|
children: item.schemas
|
||||||
|
}
|
||||||
|
})
|
||||||
|
tabsColumns.value = data.tab.componentProps.options
|
||||||
|
}else{
|
||||||
data.tab = cardNestStructure(data.tab)
|
data.tab = cardNestStructure(data.tab)
|
||||||
|
}
|
||||||
if (Object.keys(cardValues.value).length > 0) {
|
if (Object.keys(cardValues.value).length > 0) {
|
||||||
Object.keys(cardValues.value).forEach((cardItem) => {
|
Object.keys(cardValues.value).forEach((cardItem) => {
|
||||||
let cardItemKeyList = Object.keys(cardValues.value[cardItem]);
|
let cardItemKeyList = Object.keys(cardValues.value[cardItem]);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue