

<script>
/* eslint-disable */
// sd-skip-auto-import
import components from"./_import-components/sd-tabbed-editor-import";var _render=function t(){var e=this,a=e._self._c;return a("a-tabs",e._b({model:{value:e.activeTab,callback:function(t){e.activeTab=t},expression:"activeTab"}},"a-tabs",e.designerData.attrFD.tabsProps,false),e._l(e.tabbedData,(function(t,n){return a("a-tab-pane",{key:t.id,attrs:{tab:t.label}},[a("sd-draggable",{attrs:{list:e.tabbedData[n].contents,disabled:e.activeTab!==t.id,handle:".sd-drag-handle",draggable:".sd-draggable-item",group:{name:e.designer.formProps.tableName,put:true}},on:{update:e.onUpdate,add:t=>e.componentAdded(t,e.tabbedData[n].contents)}},e._l(e.tabbedData[n].contents,(function(t){return a("sd-component-wrapper",{key:t.attrFD.id,staticClass:"sd-draggable-item",attrs:{component:t,list:e.tabbedData[n].contents}})})),1)],1)})),1)};var staticRenderFns=[];_render._withStripped=true;export default{name:"SdTabbedEditor",inject:["designer"],components:components,props:{designerData:{type:Object,required:true}},data(){return{activeTab:this.designerData.data[0]?.id}},computed:{tabbedData(){return this.designerData.data}},methods:{componentAdded(t,e){this.designer.$refs.main.componentAdded(t,e)},appendChild(t){const e=this.tabbedData.find((t=>t.id===this.activeTab));if(!e)return false;this.designer.$refs.main.addComponentToList(t,e.contents);return true},onUpdate(){this.designer.takeSnapshot("移动组件")}},render:_render,staticRenderFns:staticRenderFns};</script>

<style module lang="scss">
@use '@/common/design' as *;
</style>
