

<script>
/* eslint-disable */
// sd-skip-auto-import
import util from"./util";import components from"./_import-components/sd-preview-mobile-btn-import";var _render=function e(){var i=this,t=i._self._c;return t("span",[t("a-button",{attrs:{icon:"mobile",type:"link"},on:{click:i.previewMobile}},[i._v("移动端预览")]),t("a-modal",{attrs:{footer:null,"destroy-on-close":"",centered:"","dialog-class":i.$style.previewMobile},model:{value:i.showPreviewMobile,callback:function(e){i.showPreviewMobile=e},expression:"showPreviewMobile"}},[t("sd-phone-frame",[t("sd-mobile-render",{attrs:{fields:i.fields,"form-props":i.formProps}})],1)],1)],1)};var staticRenderFns=[];_render._withStripped=true;export default{name:"SdPreviewMobileBtn",components:components,mixins:[util.mixin],data(){return{showPreviewMobile:false,fields:void 0}},methods:{previewMobile(){this.fields=util.getPreviewData(this.designer.componentInstancesWithHiddenFlag,this.formProps,true).then((e=>{this.fields=e.fields;this.showPreviewMobile=true}))}},render:_render,staticRenderFns:staticRenderFns};</script>

<style module lang="scss">
@use '@/common/design' as *;
.preview-mobile {
  // antd居中有bug，强制覆盖
  /* stylelint-disable-next-line  */
  top: 0 !important;
  :global(.ant-modal-body) {
    max-height: none;
    padding-top: 0;
    padding-bottom: 0;
  }
  :global(.ant-modal-content) {
    background-color: transparent;
    box-shadow: none;
  }

  :global .ant-modal-close {
    top: -20px;
    right: 50px;
    .anticon {
      padding: 5px;
      background-color: $white;
      border-radius: 50%;
    }
  }
}
</style>
