<template>
  <div v-if="formConfig.currentItem.componentCode == 'carousel'">
    <a-form-item>
      <template #label>
        <a-space :size="10">
          <span>轮播图配置:</span>
          <a-button type="primary" shape="circle" @click="editCarousel"><edit-outlined /></a-button>
        </a-space>
      </template>
    </a-form-item>

    <!-- 轮播图配置弹框 -->
    <ConfigEdit
      v-model:visible="showEditCarousel"
      v-if="showEditCarousel"
      title="轮播图配置"
      listName="formItemCarouselList"
      :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 showEditCarousel = ref(false);

// 编辑轮播图
const editCarousel = () => {
  showEditCarousel.value = true;
};
</script>

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