<template>
  <div v-if="formConfig.currentItem.componentCode == 'breadcrumb'">
    <a-form-item>
      <template #label>
        <a-space :size="10">
          <span>面包屑配置:</span>
          <a-button type="primary" shape="circle" @click="editBreadcrumb"><edit-outlined /></a-button>
        </a-space>
      </template>
    </a-form-item>

    <!-- 面包屑配置弹框 -->
    <ConfigEdit
      title="面包屑配置"
      listName="formItemBreadcrumbList"
      v-model:visible="showEditBreadcrumb"
      v-if="showEditBreadcrumb"
      :currentItem="formConfig.currentItem"
    />
  </div>
</template>

<script setup name="StepAttr">
import { inject, ref } from 'vue';
import ConfigEdit from '../diaolog/config-edit.vue';

const formConfig = inject('formConfig');

// 是否显示轮播图编辑弹框
const showEditBreadcrumb = ref(false);

// 编辑面包屑
const editBreadcrumb = () => {
  showEditBreadcrumb.value = true;
};
</script>

<style scoped lang="less"></style>
