forked from opentiny/tiny-engine
fix:走马灯属性配置清空标签页后添加标签页显示出错 (#23)
* fix:走马灯属性配置清空标签页后添加标签页显示出错 * fix: 优化走马灯删除标签页问题修复方案
This commit is contained in:
parent
5819a9cab4
commit
25ecc86d8e
|
@ -22,7 +22,7 @@
|
|||
<script>
|
||||
import { ref } from 'vue'
|
||||
import MetaListItems from './MetaListItems.vue'
|
||||
import { useProperties, useHistory } from '@opentiny/tiny-engine-controller'
|
||||
import { useProperties, useResource, useHistory } from '@opentiny/tiny-engine-controller'
|
||||
import { utils } from '@opentiny/tiny-engine-utils'
|
||||
import { iconDel } from '@opentiny/vue-icon'
|
||||
|
||||
|
@ -32,7 +32,10 @@ export default {
|
|||
IconDel: iconDel()
|
||||
},
|
||||
setup() {
|
||||
const schemaChildren = useProperties().getSchema().children
|
||||
const { children: schemaChildren, componentName } = useProperties().getSchema()
|
||||
const configureMap = useResource().getConfigureMap()
|
||||
const childComponentName =
|
||||
configureMap[componentName]?.nestingRule?.childWhitelist?.[0] || schemaChildren?.[0]?.componentName
|
||||
|
||||
schemaChildren.forEach((item) => {
|
||||
if (!item.props) {
|
||||
|
@ -48,7 +51,7 @@ export default {
|
|||
const name = utils.guid()
|
||||
|
||||
schemaChildren.push({
|
||||
componentName: schemaChildren?.[0]?.componentName,
|
||||
componentName: childComponentName,
|
||||
props: {
|
||||
title: '选项卡',
|
||||
name
|
||||
|
|
Loading…
Reference in New Issue